Basic Examples
Use the function to find solutions to the 24 Game with four cards:
Each element of the output list is a Hold expression representing a solution to the puzzle. If no solutions were found, and empty list is returned:
Solve the puzzle with five cards given:
Here and in further examples PrettyPrint was set to True to make the output more easily readable. See the options section for more information.
Play with the game with the goal number being 36:
Solve the game when using powers is allowed:
Scope
The cards must come in a list:
The values of all cards and the goal number must be positive integers:
Even though in the original 24 Game there is a limit to how high the value of a card can be, Game24Solve allows to solve the puzzle with any positive integer values of cards:
Options
Set PrettyPrint to True so that the solution was presented as a Column of Strings:
This option doesn't affect the content of the output but simply changes the way it is presented. It doesn't affect the algorithms the function uses or its' running time: