3 ms·
A very naive solver is giving me 3.289 guesses on average. What I did was simply sort the word_list based on frequency analysis. The guess is always the first
by AlexanderTheGr8 5y ago
A very naive solver is giving me 3.289 guesses on average.
What I did was simply sort the word_list based on frequency analysis.
The guess is always the first word in the list (with the highest score)
After each guess, I update the list based on the results (gray, yellow, green)
For the final test, I just looped through each word in the list and played the game for that word. My algorithm got every single word (2315 words) in 7614 total guesses giving an average guess of 3.298
Right now, I am only using the list of final_words. I believe that I can get better results by using the list of attempt_words to reduce the number of possibilities, and then using final_words to give final guesses. So maybe the first 2 guesses will be using the attempt_words and then the guesses after that will be from final_words. Or maybe keep guessing from attempt_words until the list length is below a certain number and then start guessing from final_words. Something along these lines will give better results.
In my freq analysis, I also accounted for the freq on each index.