Inspiration
One day, I woke up in the morning and went about my usual routine. I showered, ate breakfast... and attempted the daily Wordle. 6 Guesses! I was ecstatic that I managed to solve the puzzle. I shared it with my friends... but that's when things took a turn for the worst.
They pointed and laughed at me. "6 Guesses?!" they bellowed. "We did it in 3!".
Embarrassment flooded my body as I covered my face in shame. I ran out the door and vowed to myself; I will never let this happen again.
What it does
The program we developed will automatically solve the daily Wordle.
How we built it
We found text files of all possible Wordle guesses and answers online Starting with an initial "best guess" found online (3blue1brown), Salet, we use a python module (pyautogui) to find the color value of each letter to create a 5 letter string, which we will call S, where each character represents the color of the letter
(ex. YYBYG meaning letters 1, 2 and 4 were yellow, letter 3 was black black, and letter 5 was green)
We then shorten our list of possible words to ones that satisfy S
For each word in our shortened list, we compare it to every possible combination of S (BBBBB, BBBBY, BBBYG, BBYYG, ... GGGGG)
For every possible result, we check the length of the list of possible words that would remain (ex. Crane (BBBBB) would result in a list of 732 possible answers Crane (BBBBY) would result in a list of 656 possible answers Crane (BGYGG) would result in a list of 308 possible answers)
We then find the average number of possible answers for every guess
The guess that has the lowest average length of possible answers is selected as the best guess
Then automatically type the guess into the Wordle website and repeat this process until it is solved
Challenges we ran into
Finding a way to generate all possible guess results (BBBBB, BBBBY, BBBYG, etc.) for use in our algorithm took a while. We eventually settled on creating our own function to generate the 207 different permutations.
Accomplishments that we're proud of
We are proud that we were able to create a reliable method of ranking the possible guesses. Our methodology has resulted in a bot that is unbeatable.
What we learned
We learned how to implement statistics into our workflow to create educated guesses
What's next for Wordle Solver
The next for us is to make the solver automatically open up a browser and go to the Wordle site. It will then solve it, then share their results on twitter at the user specified time.
This software could result in an inflation of Wordle scores (especially those of my enemies), so this solver should be distributed sparsely
Built With
- pyautogui
- python
Log in or sign up for Devpost to join the conversation.