The rules of the word game Wordle are simple, but solving it in the optimal number of guesses is an incredibly challenging task. I was inspired to create a program to solve the Wordle game after my father and younger brother each created their own programs for it. Once I had created my program, I wanted to be able to compare how well it played with how well my brother and dad's algorithms played. Since it seemed that depending on the word, there would be a different winner each time, I felt inspired to make a benchmark tool that will have each program solve every possible wordle score and generate a score report.
For the Wordle solver, I created my own algorithm based on probability. The goal of the algorithm was to minimize the expected value of the number of possible words after the next guess is scored. The way this would work is by having the algorithm keep a list of all the words that it could be, then rating each legal guess based on the average number of words that would be remaining in the possible word list if each of the possible words were the true word.
For the Wordle solver benchmarker, I wrote code that would use a wordle solver to solve each of the words in the wordle wordlist and keep track of how many guesses it takes for each word. Then it generates a report with the average number of guesses and the distribution between 1-6 and 7+ guesses. 
This is the output of the Wordle solver benchmarker running on my Wordle solver:
Back to Top