Is Wordle always beatable under optimal play?

[BACK]
Is Wordle always beatable under optimal play?
Posted On: June 15, 2023

Is Wordle always beatable under optimal play on easy mode (where you can guess any valid word)?


To put the question more formally, does there exist a deterministic computer program that can play Wordle successfully, without cheating, for every target word? Wordle is a deterministic game besides the hidden target word, and there is a known, finite list of target words, so this question should be decidable. An examination of Wordle's source code shows that there are 2,315 possible target words and 10,657 additional allowed guess words (12,972 total allowed guess words).


Bonus questions.


(These are included in case an answer happens to have them; they are not necessary to answer the question.).


Is the answer different for easy mode (where you can guess any valid word) vs hard mode (where your guess has both be a valid word and match the clues you've been given so far)?


If there is such a program, what is the word it uses for it's first guess? (If the program is deterministic, it should always use the same opener).


What is the worst case performance of an optimal program (ignoring the 6 guess limit if there is no optimal program that always wins)?


Question from user Zags at stackexchange.


Answer:

Wordle is always beatable under optimal play, on both easy and hard modes. This is doable using Knuth's minmax algorithm for mastermind with a curated starting guess tree.


Here is an example program that does so on easy: https://codegolf.stackexchange/a/242412/73123.


This program wins in at most 5 moves despite being suboptimal (at a minimum, the codegolf challenge restricts the guess space to the 2,315 word list when actual Wordle has 12,972 allowed guesses). It uses the starting word "LANCE", along with a curated list for some of the 2nd and 3rd round guesses, and the word that creates the smallest max split for the rest of it's guesses. Its win distribution is:.


Turn 1: 1.


Turn 2: 49.


Turn 3: 871.


Turn 4: 1354.


Turn 5: 40.


Here is an example that wins every game on hard mode: https://gist.github/zags/a093467ee6e71fd35ff849a5b76f22e5.


It's worst case performance is 6 moves, and uses the starting word "CALMS" and if it's a total miss, uses "BENTO"; otherwise, it uses the word that creates the smallest max split, with a small weight for guessing valid answer words over non-answer words. Its win distribution is:.


Turn 2: 94.


Turn 3: 834.


Turn 4: 1120.


Turn 5: 253.


Turn 6: 14.


Answer from user Zags at stackexchange.



[BACK]
Is Wordle always beatable under optimal play?
Posted On: June 15, 2023

Is Wordle always beatable under optimal play on easy mode (where you can guess any valid word)?


To put the question more formally, does there exist a deterministic computer program that can play Wordle successfully, without cheating, for every target word? Wordle is a deterministic game besides the hidden target word, and there is a known, finite list of target words, so this question should be decidable. An examination of Wordle's source code shows that there are 2,315 possible target words and 10,657 additional allowed guess words (12,972 total allowed guess words).


Bonus questions.


(These are included in case an answer happens to have them; they are not necessary to answer the question.).


Is the answer different for easy mode (where you can guess any valid word) vs hard mode (where your guess has both be a valid word and match the clues you've been given so far)?


If there is such a program, what is the word it uses for it's first guess? (If the program is deterministic, it should always use the same opener).


What is the worst case performance of an optimal program (ignoring the 6 guess limit if there is no optimal program that always wins)?


Question from user Zags at stackexchange.


Answer:

Wordle is always beatable under optimal play, on both easy and hard modes. This is doable using Knuth's minmax algorithm for mastermind with a curated starting guess tree.


Here is an example program that does so on easy: https://codegolf.stackexchange/a/242412/73123.


This program wins in at most 5 moves despite being suboptimal (at a minimum, the codegolf challenge restricts the guess space to the 2,315 word list when actual Wordle has 12,972 allowed guesses). It uses the starting word "LANCE", along with a curated list for some of the 2nd and 3rd round guesses, and the word that creates the smallest max split for the rest of it's guesses. Its win distribution is:.


Turn 1: 1.


Turn 2: 49.


Turn 3: 871.


Turn 4: 1354.


Turn 5: 40.


Here is an example that wins every game on hard mode: https://gist.github/zags/a093467ee6e71fd35ff849a5b76f22e5.


It's worst case performance is 6 moves, and uses the starting word "CALMS" and if it's a total miss, uses "BENTO"; otherwise, it uses the word that creates the smallest max split, with a small weight for guessing valid answer words over non-answer words. Its win distribution is:.


Turn 2: 94.


Turn 3: 834.


Turn 4: 1120.


Turn 5: 253.


Turn 6: 14.


Answer from user Zags at stackexchange.



[BACK]

How can I train dexteriy for a heavy weapon user? How can I train dexteriy for a heavy weapon user?

Posted On: November 7, 2023
Dexterity is trained by using light weapons however I have one medium guy focued on using sabers. Is there any way to train dexterity other than switching to a light weapon for a while? This is a r...[More]


Hogwarts Legacy is Excellent but lacking? Hogwarts Legacy is Excellent but lacking?

Posted On: April 17, 2023
Anyone else love the game but just feel they could have expanded on a lot of things? Beast taming could have been a proper side thing yet I'm just feeding them for materials, once I've gott...[More]


How do GameShark codes work? How do GameShark codes work?

Posted On: July 22, 2013
This has always boggled me. Obviously GameShark and Game Genie never got inside access to place their own cheats into every game. I don't think any developers gave them the source code to pour over fo...[More]


How can I find out the rarest Steam achievement? How can I find out the rarest Steam achievement?

Posted On: March 6, 2023
Having completed the most difficult achievements for a couple of games, I started wondering how difficult the worst achievements can be. One well-defined measure for difficulty of an achievement is it...[More]


How to view your Steam Year in Review from your profile? How to view your Steam Year in Review from your profile?

Posted On: December 20, 2023
I am unable to find a place where I can see the "My year in review" from my steam profile. I received a mail about it, and thought it was quite informative, and would like to compare this ye...[More]


What is the rate of recharge for the Divine Blessing in Genshin Impact? What is the rate of recharge for the Divine Blessing in Genshin Impact?

Posted On: June 27, 2023
I've hit the limit of my divine blessing this week. I was next to the statue and it was empty. Didn't think I used it that much, and didn't hit the limit again after. Was weird. But ...[More]


Do BG fans feel threatened by Bethesda's Starfield? Do BG fans feel threatened by Bethesda's Starfield?

Posted On: September 24, 2023
Do you think Starfield is going to completely overshadow BG3? Question from user ThanosofTitan92 at BaldursGate3 at reddit. Answer: No. Answer from user funkyfritter at BaldursGate3 at red...[More]


Maximum number of survivors in team Walking Dead Maximum number of survivors in team Walking Dead

Posted On: March 25, 2023
In The Walking Dead - No Man's Land, on iOS platform, what is the maximum number of survivors that one can team up in one level? I've unlocked one slot more from those available since the b...[More]


Can I install an old DirectX version without affecting the latest version? Can I install an old DirectX version without affecting the latest version?

Posted On: May 25, 2023
I'm attempting to run RetroArch for an old game , but it requires DirectX 9.0c. Will installing DirectX 9.0c overwrite or delete the current version I have installed (v12)? If so, can I subsequ...[More]


I’m getting bored in Hogwarts Legacy I’m getting bored in Hogwarts Legacy

Posted On: August 8, 2023
I’ve been waiting for this game since 2021 when it got announced and was honestly so hyped, but now I’m getting insanely bored. I got the game 3 months ago, then played for 26 hours total,...[More]