Heavily inspired and motivated from this 3Blue1Brown video: Solving Wordle with information theory
A simple wordle solver written using Python using information theory.
Here is a graph that is updated everyday with the amount of guesses it took to solve the daily wordle.
- Clone the repo
git clone https://github.com/DogeTheBeast/bruhdle.git
cd bruhdle
- Make a virtual environment and install the requirements
python -m venv bruhdle-venv
pip -r requirements.txt
- Use either
wordle.pyto play the game ormodel.pyto see it evaluate the words and play a game of wordle optimally
python wordle.py
python model.py
Information Theory-Based Word Selection: The solver uses information theory to make optimal choices, maximizing the expected number of remaining possible words with each guess. For each guess, the solver looks for the word which split the possible solution space most uniformally. Borrowing visuals for the video linked above, this is the word count for each possible color feedback:
For each words, it checks against all possible wordle responses (ie, the color of the tiles) and determines the amount of words that would remain in the solution space afterwards. Using this, it assigns an expected information score to each word. The aim being to maximize the score which corresponds to the graph being flatter. This ensures that we get the most amount of information allowing us to have to search the smallest subspace of possible solutions.



