A solver for the wordle game. Solves all words in an average 3.8 guesses.
Navigate to http://quinnftw.com/wordle and follow the on screen instructions.
- Clone this repo
- Run
python3 solver.py
- Use the suggested guess presented
- Provide the resulting tile colors in the verdict prompt, using
B
for black,Y
for yellow,G
for green, orbad
if the suggested guess was not a valid wordle word - goto 3 until you win
word_scorer.py
generates a "score" for each word in five_letter_words.txt
that
represents the average information gain that word provides as a guess. The
information gain is calculated by simulating using the word as a guess for every
possible secret word.
solver.py/app.jsx
uses the information gained from each guess to build a list of
constraints that the secret word must conform to, and then selects the highest
scoring word which meets those constraints as the suggested guess.