WordleEngine is a solver for the popular word game Wordle written natively in Python. It prunes the wordlist based on results of guesses and applies a scoring algorithm based on which word will extract the most information and eliminate the most possibilities.
- Python 3.x
- Two word list files:
answer.txt– List of possible Wordle answers (one per line).valid_wordle_words.txt– List of all acceptable guesses (one per line).
-
Prepare Word Lists
Ensure you haveanswer.txtandvalid_wordle_words.txtin the same directory. These files should contain one word per line. -
Run the Solver
python wordle_engine.py
-
Follow Prompts
- Enter your guessed word (must be valid and 5 letters).
- Enter the color clue using:
g= green (correct letter, correct spot)y= yellow (correct letter, wrong spot)b= black/gray (letter not in the word)
Example:
word: crate colors: bgybb -
The engine will suggest the next best word. Repeat until solved.
- Filters words based on given colors.
- Tracks letter frequencies for each position.
- Scores each candidate word:
- Rewards high-frequency letters in optimal positions.
- Selects the best-scoring word as the next guess.
word: slate
colors: bbybg
crate
colors: ggygg
crane
- deploy to an actual application
- improve interface outside of just cli
- improve input, possibly with tkinter or something more advanced
- refine algorithm further or try to optimize an better algorithm using ML