3
$\begingroup$

Related: What's the optimal strategy for Wordle?


About a year ago, a friend and I created a custom variant of Wordle, called Wordle Master Mode.

The gameplay is similar to Wordle, but with a couple of changes:

  • Instead of 6 guesses, the player gets 10.
  • Rather than highlighting individual letters, it's played like a game of Mastermind, where color-coded dots are added to the right of each guess, giving clues about the target word.

If you're unfamiliar with Mastermind, here's the way the dots work:

  • The red dots always appear before the blue dots.
  • For every letter that is in its correct position, a red dot is added.
  • For every letter that is in the correct word but is not in its correct position, a blue dot is added.

This makes the game more difficult, forcing the player to use logical deduction to determine which letters the dots correspond to.

Here's an example of gameplay:

Example gameplay

To keep things fair, only valid Scrabble words can be used in this game, for both guesses and the target word.

So here's my question: What's the optimal strategy?

$\endgroup$
1
  • 1
    $\begingroup$ This looks very open-ended to me. There are optimal strategies known for playing mastermind but they would be very incompatible with the restriction to valid words. At best I could see taking the entire scrabble word list and numerically brute forcing a strategy. $\endgroup$ Commented Sep 19, 2024 at 8:04

2 Answers 2

7
$\begingroup$

Definitions

The only relevant information during the game is

  • dictionary: the list of guessable words
  • candidates: the list of words in the dictionary consistent with your guesses
  • guesses: the number of guesses remaining

Simple Strategy

Your next guess will generate a response that will reduce candidates. A simple strategy is to always guess a word which minimizes how large candidates will be in the worst case.

This guarantees a win in $9$ guesses. ($5.75$ guesses on average). Only the words ZILLS and VILLS require all $9$ guesses.

The Decision Tree

Here is the decision tree

Here is what the top level of the decision tree looks like:

TORES (12972)
      ..... LAMIA (1102)
      ~.... SAINE (2091)
      ~~... PRONE (1663)
      ~~~.. STARE (522)
      ~~~~. STATE (72)
      ~~~~~ ABORD (3)
      $.... WAINS (2055)
      $~... RIADS (2133)
      $~~.. RAITS (816)
      $~~~. MEASE (73)
      $$... ARLED (1363)
      $$~.. LEATS (591)
      $$~~. DREGS (87)
      $$~~~ ROSET (1)
      $$$.. OLDEN (308)
      $$$~. RANTS (58)
      $$$~~ ROTES (2)
      $$$$. ROPEY (31)
      $$$$$ 
  • $ indicates a letter in the correct place (red dot)
  • ~ indicates a letter in the wrong place (blue dot)
  • . indicates an incorrect letter

Explanation
Your first guess is TORES ($12972$ candidates remain).
If the response is ....., there are now $1102$ candidates, and you should guess LAMIA.
If the response is ~...., there are now $2091$ candidates, and you should guess SAINE.
...
If the response is $$$$$, you're done, the answer was TORES.

Any response will leave at most $2133$ candidates (which is fewer than any other initial guess).

$\endgroup$
3
$\begingroup$

The Swaszek (1999-2000) strategy for Mastermind, as mentioned in "master Mind"'s answer here is:

Create the list 1111,...,6666 of all candidate secret codes
Start with 1122.
Repeat the following 2 steps:

  1. After you got the answer (number of red and number of white pegs) eliminate from the list of candidates all codes that would not have produced the same answer if they were the secret code.
  2. Pick the first element in the list and use it as new guess.

The initial list of candidates is 6^4, i.e. 1,296 entries long.

The Scrabble dictionary has 12,915 valid 5-letter words so almost exactly 10 times the candidate list size. However, the MasterWordle candidate pool as a percentage of all possible 5-letter sequences (26^5) is also much sparser (the Mastermind pool is 100% non-sparse) so on average I think this means that more of the pool will be eliminated in a given turn.

The same algorithm will therefore work, albeit somewhat slowly. I just implemented it in Python (although I could only find a free open source 5-letter-word list with 5700 items in it - if anyone knows the actual official Scrabble words list available open source I can use that instead) and over 100 games it solved it in an average of 13.57 guesses.

$\endgroup$
8
  • $\begingroup$ See: boardgames.stackexchange.com/questions/38366/… It wouldn't be too hard to prune that down to 5 letters $\endgroup$ Commented Sep 19, 2024 at 14:34
  • $\begingroup$ FINDSTR /R "^.....$" "Collins Scrabble Words (2019).txt" > "5letter.txt" Prunes it to 12972 lines. $\endgroup$ Commented Sep 19, 2024 at 14:53
  • 1
    $\begingroup$ Thank you for the pointer, I've repeated the experiment with that list and this time over 100 games it averaged 15.5 guesses. $\endgroup$ Commented Sep 19, 2024 at 15:00
  • $\begingroup$ @Vicky interesting experiments! For completeness to the question, how many of those are successful runs (i.e., guesses the wordle by the 10th guess)? $\endgroup$ Commented Sep 19, 2024 at 15:33
  • $\begingroup$ @justhalf not many! I just ran another hundred, this time the average was 15.33, only 4 were successful in 10 or fewer guesses. $\endgroup$ Commented Sep 19, 2024 at 16:20

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.