recent

New courses at MIT Sloan include ‘Pursuing happiness’

To boost innovation, think ‘around the box’

Why companies need artificial intelligence explainability

Credit: Daderot / Higgins Armory Museum

Ideas Made to Matter

Research

How an algorithm solves Wordle

Everyone has an opinion about how to play Wordle, the popular word guessing game. Start every game with AUDIO. Or maybe CRANE, or ARISE. Bill Gates has shared his strategy. So has Kamala Harris.

A new paper by MIT Sloan professorand MIT Sloan PhD student Alex Paskov may settle the matter once and for all.

Through a modeling method known as Exact Dynamic Programming, the researchers devised an algorithm that solves the game in the optimal manner without fail. In Wordle, players have six tries to guess a five-letter word. After a word is entered, colored tiles reveal whether the letters are in the word and if they are in the correct spot. The model solves the game in just two guesses 4% of the time and in three guesses 57% of the time. It only needs a fifth guess 3% of the time, and it never relies on that sixth and final round.

What word does the computer start with? SALET — an obsolete form of salett, which is an “ornamentally engraved helmet,” according to Wiktionary. For AUDIO-philes out there, Bertsimas and Paskov note that SALET reveals an average of 1.683 colored tiles on the first move, while AUDIO reveals an average of 1.320 colored tiles. The other top words include REAST (an obsolete spelling of rest), TRACE, CRATE, and SLATE.

Related Articles

How to use algorithms to solve everyday problems
Machine learning, explained
Managing and visualizing big data

With SALET, the computer model averages a win in just 3.421 guesses. As a point of comparison, Saint Paul, Minnesota, which boasts the best average Wordle score of any city in the U.S., comes in at 3.51 guesses.

The algorithm achieves this score by opening the game with SALET. Based on the colored tiles that this initial guess reveals, it then determines every possible guess that could follow, pulling from a list of 10,657 five-letter words. (Only 2,315 of these are possible answers, as Wordle limits the universe of solutions.) Finally, based on what’s available, the algorithm picks the most strategically illuminating next word.

Bertsimas and Paskov designed the algorithm to explain each move — in a sense, it teaches best practices by demonstrating its logic. (The website wordleopt.com lets users see what the algorithm suggests based on SALET as a starting word.) As an example, they present a hypothetical case in which somebody begins with the word LIGHT. This guess reveals that IGHT are all the right letters in the right position.

To figure out what comes next, most people would start rolling through the possibilities — TIGHT, FIGHT, MIGHT, RIGHT, and NIGHT, for example. Instead, the computer opts for a second guess of FERMS (Middle English form of “farms”) and, in one line, knocks out five possibilities at once.

For those who play Wordle, it may help to take note of the algorithm’s approach, study a Scrabble dictionary, and brush up on your Middle English. But a simpler first step is to begin a game with SALET, and see where that takes you.

Figure comparing the resulting Wordle board of a possible human-played game and of the optimal policy. Credit: Bertsimas, D. and Paskov, A., "An Exact and Interpretable Solution to Wordle," 2022.

 

For more info Sara Brown Senior News Editor and Writer