Menu

1 / 2

I Built a Better Wordle Solver — Here's How It Works Under the Hood

DEV Community·XIAO FENG·6 months ago
#cK8GjZSb
#wordle#webdev#opensou#software#letter
Reading 0:00
15s threshold

A Wordle solver needs to answer one question: given everything I know so far, which 5-letter words are still possible?

In a running game, you accumulate clues across multiple guesses:

Green 🟩 — correct letter, correct position

Yellow 🟨 — correct letter, wrong position

Gray ⬜ — letter not in the word

After 2-3 guesses, you might have constraints like:

Position 1 = S (green), R is somewhere but not position 2, A and E are excluded entirely.

That's a lot of state to track. And it has to update instantly as you type.

The Approach

Dictionary Preprocessing

Everything starts with the dictionary. SOWPODS (Scrabble International word list) contains ~267K words. I filtered it down to 12,470 five-letter words — the Wordle candidate pool.

This was a one-time preprocessing step.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.