This is a simple queue-based approach to solving the Digits puzzle in the fewest number of steps possible.
- Clone this repository
- Install Python 3.9 or newer using @wsvincent's excellent guide
- Run:
python solver.py 1 2 3 4 10 25 --target 81
(where the six numbers are the six numbers outlined in a dashed circle and 81 is the big number you're trying to reach) - Follow those steps in the NYT game
- Celebrate your victory (I won't judge)
$ python3 solver.py 5 11 19 20 23 25 -t 413
Found a solution in 4 steps. Run with --spoil to see the details.
$ python3 solver.py 5 11 19 20 23 25 -t 413 --spoil
Found a solution in 4 steps:
20 ➖ 11 🟰 9
23 ➕ 25 🟰 48
9 ✖️ 48 🟰 432
432 ➖ 19 🟰 413
I have some minimal tests in test_solver.py
. Run python -m unittest
to see if things work after you make changes.
Find me on Mastodon: https://takahe.social/@drew
PRs welcome!