Sometime in January I began to notice those yellow-and-green heatmap like grids of 5×6 squares showing up in my Twitter and Facebook feeds. I had no idea what they were, but they reminded me of celluar automata. They seemed to replicate like celluar automata, too, because before long, it seemed like many friends and family members were posting these grids, which I eventually learned was for a word game called Wordle.
I like word game, but I only felt tempted to play Wordle once for the purpose of writing this post. I have no objection to the game, or the viral nature of the posting of game results. I’m just at my limit of what I can handle in a day, and I’ve been avoiding Wordle because I can’t afford to spend any time on it. Time on Wordle means time away from other things.
This year, as a kind of brain exercise, I began waking up to the New York Times mini-crossword. After a little while, I graduated to their regular crossword puzzle, which I try to complete every day. I am medicore at crossword puzzles, at best. Today’s for instance, took me nearly 3 hours to complete. It was a Sunday crossword, so the hardest of the week–and I needed to cheat on a few answers to get the whole puzzle. Three hours was more than I could afford to spend, even on a Sunday. But I consider it practice and it will be interesting to see what my time looks like in December.
I really didn’t know much about Wordle until I read “Why You Can’t Resist Wordle” by Kyle Chayka in The New Yorker. This not only explained the origins of the game (pointing me to a New York Times interview with the game’s creator), but also explained the mechanics of the game, and the origin of the game’s name–a play on the creator’s name: Josh Wardle.
The mechanics are interesting:
- you start from scratch, making a complete guess at the first 5-letter word. The word “adieu” is a popular first choice because it contains four of the five vowels.
- the colors guide you to how many letters you got: gray and the letter is not in the word; yellow and it’s there, but not in the right position; green, you’ve got the right letter in the right position.
- from there, you have five more guesses to get the word.
Unlike a crossword puzzle, this seems fairly algorithmic to me. That it, it seems as if it could be solved with some simple searches against a dictionary. Never having played the game, I went to scribble out some regular expressions on paper that might work for each step in the process, where the expression checks against all of the 5-letter words in the Unix dictionary. Then I thought: I can’t be the first person to think of this–and did a Google search.
I’m not the first person to think regular expressions can solve Wordle puzzles.
I say this is different from crossword puzzles because often a crossword solution is a play on words, or a pun, or a slang reference, and not necessarily something that can be found by algorithm. I noted this last March when I wondered if an AI could solve the New York Times crossword. If it could, I suggested than it should be called The Shortz Test.
One nice thing about Wordle is that it is relatively quick. I think my attempt for this post took about 5 minutes. I didn’t use regular expressions, and I did start with “adieu.” As it turned out, my word had only one vowel, which made it tricky. You can see my play in the image above.
Attempting the Times crossword puzzle first thing in the morning can take a little while. But I’ve also found it is a good way to wake up my brain without immediately jumping into the (often depressing) news of the day.
At least I now know how to read those Wordle grids. I love that they are self-contained histories of the game that was played. It means I can see how my friends are doing and cheer them on.
Written on January 23, 2022.