Three Wordle Assistants

When I tackle a Wordle puzzle, I like to make all the key decisions myself. My three assistants set up puzzles and suggest words when I ask for help, but I guide the actual solution. My assistants also make it possible for me to play Wordle anywhere, anytime, even when my laptop is in airplane mode. I don't need theNew York Timesor access to the Web.

Contents

Three Assistants

Wordler,WordsandWordieare the three assistants.Wordlerreplaces theTimesby generating puzzles and evaluating responses.Wordsprovides lists of possible responses.Wordiehandles the Wordler Window and colors the letters gray, green or gold.

Vocabulary

Wordshas avocabularyof 4665 five-letter English words. Any of them are acceptable responses. The vocabulary begins with

vocab = [ ... "ABEAM" "ABETS" "ABHOR" "ABIDE" "ABLED" "ABLER" "ABODE" "ABORT" ...

And, 584 lines later, ends with

"ZILCH" "ZINCS" "ZINGS" "ZIPPY" "ZOMBI" "ZONAL" "ZONED" "ZONES" ... "ZOOMS" ];

If you were to print the entire vocabulary with 40 lines per page, you would print over 100 pages of words.

Words

It took me a long time to write theWordsassistant, which is called whenever the Words button in the Wordle Window is clicked.

Wordsis supported by a seventeen-program library of functions namedWordspqwherepandqare nonnegative integers withp+q <= 5.Wordspqfinds words withpgreen letters andqgold letters. The programs in theWordslibrary all have the same structure involving five nestedforloops.

The last line ofWordsis

feval(['Words' p q],Gray,Green,GreenLoc,Gold,GoldLoc)

Gray,GreenandGoldare lists of letters with specified colors and with locationsGreenLocandGoldLoc. Locating the green letters is easy because they must be in specific slots. Locating the gold letters is tricky because each of them can be in any of several different slots.

For example, this situation in the NYT puzzle described below would result in a call toWords13with

灰色= ' AIHEC '绿色= ' T ' = ' RO GreenLoc = 5黄金U' GoldLoc = {[2,3],[3,4],[1,2,4]}

Wordle

Wordlestarts a game by choosing a secret random target from the vocabulary, or from a smaller subset about half the size. At the same time, I choose my starting word, which is usuallyRATIO. My assistants respond with the Wordler Window and a simple keyboard.

The goldOtells me the target contains anO, that it is not in position 5, and the target does not containR,A,T, orI. I know there are hundreds of such words in the vocabulary. One of them isDEMOS, which I enter on the keyboard.

DEMOShappens to be a very lucky choice. The target has anEin the second slot, anSin the last slot,MandOin the remaining slots, and noD. When the answer does not occur to me in a minute or two, I click theWordsbutton. The response is

MEOWS cnt = 1

So, there is only one word to choose, and it earns five greens.

NYT

Let's do theTimespuzzle from March 23. I start with my mathematicalRATIO. I see that the answer containsR,TandOand does not containAorI.

I happen to remember thatOTHERqualifies. It does not hit any new letters, but it places additional restrictions on the ones I already have and eliminatesEandH.

Wordsnow lists 37 words that I should choose from. I pickCOURTbecause it containsU, the only remaining vowel.

Wordsinforms me that there are only two possibilities left,TROUTandGROUT. I pick the one without a double consonant and it is the winner.

Pared Down

Here is an atypical, but instructive, example. For this puzzle I am pleased to seeWordlergivesRATIOa greenAin position 2 and a goldRsomewhere in positions 3 through 5. I remember one of my favorite "technical" terms,PARSE.

To use a baseball metaphor,PARSEhits a triple and almost gets an in-the-park home run. Now I need to askWordsfor qualifying responses. There are exactly two,PAREDandPARER. (Both come from the verb "to pare", which means to cut the outer skin off something.)

One of the choices has a double consonant, so I choose the other one. When it doesn't fly, the only choice left earns the five-leaf clover.

Five Golds

How do I generate five golds? I need the starting guess to be apermutationof the final answer. A few moments thought suggestsTAKESandSKATE. I am sure there are other possibilities. But this one is special becauseSTEAKmakes it triplets.TEAKSwould make four permutations but does not meet the "hard mode" restrictions.

Thanks

Over a year ago, MATLAB programs for solving Wordle puzzles were described byAdam Filionas a guest blogger on Loren's blog and byMatt Tearlewith a YouTube video.

Software

Working on my Wordle obsession has been very interesting. I have developed some useful tools and I see forgotten five-letter words everywhere. You can share the fun by downloading the code atthis linkand running it yourself.




Published with MATLAB® R2023a

|

Comments

To leave a comment, please clickhereto sign in to your MathWorks Account or create a new one.