3 ms·
Show HN: Solver for the game 24 in Python
- panda88888 8y agoWrote a solver for the game 24 as a afternoon project. It's is based on reducing the number of integers in the problem set by 1 in each iteration, and when there is only 1 integer left in the problem set, check if it's equal to 24. The command line prompt assumes 4 numbers inputs but supports custom target number (24 is the default). It can be configured to either tell whether a solution exists or print the actual solutions.