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]

What is the Nintendo Wii Family Trainer Dancing Mat Controller for? What is the Nintendo Wii Family Trainer Dancing Mat Controller for?

Posted On: March 24, 2023
There is some kind of weird dance controller for the Wii. What's this for? What games are compatible with it? Question from user Ender at gaming.stackexchange.com. Answer: "Family...[More]


Stuck with the conjuration curse Stuck with the conjuration curse

Posted On: August 22, 2023
I have got 139/140 conjurations and I am missing the medium constructed decorations. All my collection chests are completed across the maps, I have checked the butterfly missions more than 5 times,...[More]


Do you guys use potions? Do you guys use potions?

Posted On: August 10, 2023
Dear Witches and wizards. Do you guys use potions, and if you do. Which ones do you use the most? Question from user ItsSolomon at HogwartsLegacyGaming at reddit. Answer: Yeah, I use them in ...[More]


What ship weapon type is designed to take down enemy ship shields and health? What ship weapon type is designed to take down enemy ship shields and health?

Posted On: October 6, 2023
I am finding space combat probably one of the more difficult things in Starfield. In particular, I am on the mission Legacy's End where. I sided with the UC SysDef and destroyed the three defen...[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]


What can I do with Dragon Bones and Scales? What can I do with Dragon Bones and Scales?

Posted On: August 25, 2015
I've started slaying dragons (like all good Dohvakiin must), and with each beastie I down, I'm getting close to 200 lbs of loot, mostly in the form of Dragon Bones and Scales. These two items are high...[More]


Can I replay Outcore after beating it? Can I replay Outcore after beating it?

Posted On: March 14, 2024
At the end of Outcore. Lumi asks if she can be released into the internet. She says that once you release her she won't come back, which sounds like it's permanent.Is it possible to replay Outcore aft...[More]


In Hogwarts Legacy, Am I the only one who prefers the switch Hagrid? In Hogwarts Legacy, Am I the only one who prefers the switch Hagrid?

Posted On: April 19, 2023
Question from user supxleon123 at HogwartsLegacyGaming at reddit.com. Answer: We’re getting a PS5 hagrid? Answer from user UglyPuta- at HogwartsLegacyGaming at reddit.com....[More]


How can I complete Desert Snakes in Forza Horizon 5? How can I complete Desert Snakes in Forza Horizon 5?

Posted On: April 3, 2023
I have been trying to complete the challenge in Forza Horizon 5 Rally Adventure, but although the timer starts when I leave Valle de Foráneos, I do not get a waypoint to follow. I have tried...[More]


It’s cool to see My Chemical Romance’s lead singer in game! It’s cool to see My Chemical Romance’s lead singer in game!

Posted On: April 2, 2025
Question from user Tendas at BaldursGate3 at reddit.com.Answer:Look at that easy smile.Answer from user DearPersimmon8155 at BaldursGate3 at reddit.com....[More]