Note
I recommend to use the code at woctezuma/3b1b-wordle-solver
, which is much faster!
This repository contains Python code to solve Wordle puzzles by maximizing entropy.
- Install the latest version of Python 3.X.
- Install the required packages:
pip install -r requirements.txt
To compute the optimal first guess, choose the game with --game-name
:
python wordle.py --game-name wordle
python wordle.py --game-name dungleon
A pre-computed first guess can be specified with --first-guess
:
python wordle.py --game-name wordle --first-guess soare
python wordle.py --game-name dungleon --first-guess ZOCFS
NB: the "ZOCFS"
guess in Dungleon corresponds to 🧟👹💰🐸💀.
Alternatively, run wordle-bot.ipynb
Using 3Blue1Brown's code with priors=get_true_wordle_prior()
, suggested first guesses for Dungleon are:
ZOCFS
🧟👹💰🐸💀 (purely_maximize_information
)CEBSF
💰🟡🦇💀🐸 (optimize_for_uniform_distribution
)ZOCFS
🧟👹💰🐸💀 (look_two_ahead=False
)ZBCFS
🧟🦇💰🐸💀 (look_two_ahead=True
)AWOCS
🏹🤺👹💰💀 (if only seen solutions are considered)
My adaptation of GillesVandewiele's code would suggest:
VZCFS
👨🌾🧟💰🐸💀 (guesses constrained to the set of solutions)ZOCFS
🧟👹💰🐸💀 (unconstrained guesses)
For reference, TylerGlaiel's code would suggest:
MGCFS
🧙♀️👺💰🐸💀 (guesses constrained to the set of solutions)ZOCFS
🧟👹💰🐸💀 (unconstrained guesses)
- 3Blue1Brown, Solving Wordle using information theory, posted on Youtube on February 6, 2022,
3b1b/videos
: supplementary code (in Python) accompanying the aforementioned video,GillesVandewiele/Wordle-Bot
: a solver (in Python) inspired by the video,TylerGlaiel/wordlebot
: a solver (in C++) which uses other approaches,woctezuma/dungleon-bot
: the application of different solvers to Dungleon.