There’s a new word game on the Internets. And the past week, there have been cryptic grids of black, orange, and green tiles all over my Twitter

A Wordle Solver

submited by
Style Pass
2022-01-13 08:30:08

There’s a new word game on the Internets. And the past week, there have been cryptic grids of black, orange, and green tiles all over my Twitter timeline.

Wordle is a daily word game, somewhere between a crossword puzzle and Scrabble.1 Every twenty-four hours, there’s a new “word of the day”, and you get six tries to guess what the word is.

I played the game a few times. (It’s really fun.) And it got me thinking about how a program that can solve the puzzle might look. So, here goes. Here’s how to build a Wordle solver.

As you might expect, the aim of the solver is the same as with a human player: try to guess the correct word in six or fewer tries. To see how it can do that, we’ll study a few scenarios and then build our way up to a general solution.

Say we have a game where the correct word is “STARS”. If we try guessing “RADAR”, we’ll see this result:

Leave a Comment