r/pythonhelp • u/matthewfelgate • Jan 08 '22
Let's Solve Wordle
There is a game called Worlde where you have to guess the 5 letter word. I want to know if you can solve it for every answer after 3 guesses (so on your fourth guess).
There are 2315 possible answer words.
There are 12972 words you can use to guess.
Every guess gives you information on each letter:
Letter does not exist in word.
Letter exists but not in correct place.
Letter correct and in correct place.
My intuition tells me an algorithm should be able to know the word after 3 guesses every time.
But I'm not sure how to program it. Any ideas?
-----------------------
My thoughts are: you go through each possible starting word:
And for each answer, there will be a set of other possible answers.
So see if, with 2 additional guesses, you can always uniquely identify each of these possible other answers. So with a 2nd guess word, followed by a 3rd guess word, depending on the information gathered from the 2nd guess word.
So see if there is a 1st guess that, combined with 2nd and 3rd guesses you can always uniquely identify the Answer.
1
u/CraigAT Jan 08 '22
Interesting that the GitHub link only has 2083 words.