NerdleBuddy

How the Nerdle Solver Works

No magic, no lookup of today’s answer — just counting. Here is the full method behind our solver, in plain English, with the real numbers.

Last updated

On this page · 6 sections

The Problem: 17,723 Suspects, 6 Questions#

NerdleBuddy’s model starts with the same suspect list: its 17,723 modelled 8-character candidate answer forms. Each guess is a question, and the colored tiles are the reply. The solver’s entire job is to ask questions whose answers shrink the suspect list as fast as possible, no matter which equation happens to be the answer.

Feedback Patterns Are Information#

When you play a guess, every possible answer would produce some specific coloring — greens, purples, blacks. That means a guess partitions the suspect list: every answer falls into exactly one feedback-pattern bucket, and once the real colors appear, every answer outside your bucket is eliminated instantly.

So a guess is exactly as good as the buckets it creates. Many small buckets mean that whatever feedback you get, few suspects survive. A few big buckets mean you can get unlucky and learn almost nothing. Our first-ranked model opener, 52-34=18, splits the field into 1,703 buckets. A repeat-heavy guess like 11+11=22 manages only 415 — it asks the same question about the same few characters twice.

Scoring a Guess: Expected Remaining Answers#

To build its candidate pool, the solver first asks: if the answer is chosen at random, how many suspects will still be alive after I see the feedback? Big buckets get weighted by how likely you are to land in them (a bucket holding 100 answers is hit 100 times as often as one holding 1), which is why lopsided guesses score badly.

The live solver then calculates expected total guesses for the visible candidates and sorts the first suggestion page by that full-game metric. Expected answers left remains the exact one-move comparison shown beneath each suggestion.

OpenerFeedback bucketsExpected answers left
52-34=181,703~33
10-5+3=81,100~79
11+11=22415~319

Same rules, same 17,723 suspects — but the first-ranked opener leaves you a to-do list of ~33 while the worst of these leaves ~319, ten times as many. That one choice is often the difference between solving in 3 and sweating on 5. The full ranking lives in the strategy guide.

The Decision Tree: A Verified Strategy, Precomputed#

Scoring one guess is cheap; searching every legal strategy at every turn is not. We therefore build a practical strategy offline and save it as a decision tree whose root is 52-34=18 — the recommended opener, currently ranked #1 by exact expected total guesses in our opener ranking. The tree has one branch per feedback pattern, each leading to the strategy’s next reply, and so on until every branch ends in the answer.

At each node, the builder pools every remaining answer as a candidate guess, and once 500 or fewer answers remain it adds up to 2,000 deterministically sampled probe guesses. The 64 candidates that leave the fewest expected answers after one move then receive an exact expected-total-guesses evaluation, and the winner is chosen with the same tie-break chain the live suggestion ranking uses. That shortlist keeps the tree tractable, but it also means we do not claim a mathematical global optimum. The full methodology records the dataset, ranking rules, and limitations in one place.

The published opener table goes one step further: it treats every modelled answer form as a possible opener, plays a fast greedy follow-up strategy against every modelled answer, and measures complete game length. Those averages are exact for that follow-up strategy — the committed tree’s exact per-node evaluation averages slightly fewer guesses. The tree sometimes plays probe guesses that can’t be the answer (explained in the strategy guide). When you use the solver, a position on the known path can walk this precomputed tree. If your guesses leave that path, the solver ranks candidates for the remaining pool instead.

What the Numbers Say#

3.0
Average for this strategy
5
Verified maximum
1,703
Branches after guess one
17,723
Answers covered — all of them

These figures walk every modelled answer through the saved response table under real Nerdle rules, where a commutative rearrangement of the answer also wins. They are exact outcomes for that strategy — the same one our difficulty ratings come from — not proof of an optimal one. Nine answers need all five guesses; meet the hardest Nerdle answers.

Frequently Asked Questions#

Does the Nerdle solver know today's answer?

No. The solver never looks anything up — it only narrows its full list of modelled answer forms using the guesses and colors you enter, the same information you have.

What algorithm does a Nerdle solver use?

NerdleBuddy scores candidate guesses by expected remaining answers: how many possibilities survive on average after the feedback, weighted by how likely each pattern is. The tree evaluates all remaining answers plus a deterministic sample of probes in smaller states, then gives the strongest candidates an exact expected-total-guesses evaluation. The result is a verified strategy, not an exhaustive proof of global optimality.

Can the solver lose a game of Nerdle?

Following the saved response table under real Nerdle rules — a commutative rearrangement of the answer also wins — solves all 17,723 modelled answer forms in at most 5 guesses, averaging 3.0. That is an exact result for this strategy — the same one behind our difficulty ratings — not a proof of a globally optimal strategy.

Is this the same math as Wordle solvers?

Yes. The core idea — partitioning the remaining answers into feedback buckets — is the same one behind information-theoretic Wordle solvers. Nerdle's arithmetic constraints often create sharp splits; NerdleBuddy's verified tree averages close to 3 guesses.

See It Play

Watch the tree pick your next guess in real time, or study the openers it grew from.