python-wordle-solver
Welcome to my Wordle Solver! Quickly guess the wordle of the day between three to five attemtps!
About Wordle
Wordle is a word game reminiscent of mastermind. The player tries to guess a five letter word within six attempts. After each attempt, hints are given. Green tiles show that the letter is in the right position. Yellow tiles indicate that the letter is in the word but in the wrong spot. Grey tiles show that the letter is not in the world. Words a 5 lettered and only a maximum of six attempts are allowed.
Installing Dependencies
Use the package manager pip to install required dependicies found in requirements.txt
.
pip install -r requirements.txt
Launching Instructions
- Open a console
- Create a vitual enviroment
- Install the dependiences
- Run the following command
python3 solver.py
in the console - Follow the instructions
- Enjoy!
Operating the Solver
- Open Wordle and Run
solver.py
side by side. - A sequence of 15 words should appear in the console. These are the words that have the highest commonality value ranging from 0 to 1. The higher the value, the higher the chance it is to have a letter in the daily wordle.
- Choose a word from the list and enter it into the Wordle Puzzle.
- Enter the cooresponding output.
G
or1
for green tiles,Y
or2
for yellow tiles, and?
or3
for grey tiles. Hit Enter. - Another sequence of words sorted by their commonality values will appear. Choose one and repeat steps 3 and 4 until the Wordle is correctly guessed.
Variables
There are options available to customize the solver
- The word list can be changed by altering the
words.txt
file in the data folder. However, its name and path must bedata/words.txt
- The length of word can be changed depending on the the size of the board. The default is set to
5
. This can be changed by altering theword_len
variable in thewordle.py
file. Note that the words in thewords.txt
only inlcude five letter words, which are standard to wordle - The number of attempts can also be altered by changing the
max_attempt
variable inwordle.py
- The set of legal characters can also be altered by changing the
legal_char
variable inwordle.py
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.