Puzzle Games

Information Theory and Word Guessing Games

Learn how information theory explains good guesses in word games: why the best guess splits the remaining candidates as evenly as possible, with worked examples.

On this page
  1. What a guess actually does
  2. Feedback patterns set a ceiling
  3. Why an even split is the goal
  4. A worked example with eight candidates
  5. Candidates are not equally likely
  6. Patterns that help in practice
  7. Limits of the idea

What a guess actually does

In a game where you try to identify a hidden word from feedback, every guess has two jobs. It might be the answer, and it also tells you something about the answer. Early in the game the second job matters far more than the first. A guess that is almost certainly wrong can still be the best move if the feedback it produces eliminates most of the remaining candidates.

Information theory gives a way to measure that second job. The basic unit is the bit: one bit is the amount of information that halves the set of possibilities. If 1,000 words are still possible, you need roughly 10 bits to pinpoint one, because 2 to the power of 10 is 1,024. Each guess supplies some number of bits, and the aim is to collect them as quickly as possible.

Feedback patterns set a ceiling

Most word games respond with a coloured pattern for each letter, such as correct, present elsewhere, or absent. With three possible marks per position and five positions, there are 3 x 3 x 3 x 3 x 3 = 243 distinct patterns. That caps what one guess can reveal: the base-2 logarithm of 243 is a little under 8, so no single guess can deliver much more than about 7.9 bits.

In practice a guess never gets close to that ceiling, because many patterns are rare or impossible for real words. What matters is how the remaining words are distributed across the patterns that can occur. If one pattern catches most of the candidates, you learn little whichever pattern shows up. If the candidates spread across many patterns, you learn a lot almost regardless of what you see.

Why an even split is the goal

Think of the possible patterns as buckets, and each remaining word as sitting in the bucket it would produce. After you guess, the feedback tells you which bucket you are in, and you continue with only the words in that bucket. A guess is good when the buckets are many and similar in size, so that even an unlucky result leaves a small group.

The average information gained is the entropy of that bucket distribution. For buckets with probabilities p, the entropy is the sum of -p x log2(p). You do not need to compute it by hand to use the idea, but a small example shows how it behaves.

A worked example with eight candidates

Suppose eight words remain and each is equally likely to be the answer. Compare three possible guesses.

  • Guess A puts every word in its own bucket, so eight buckets of one. Whatever feedback appears, the answer is identified. The information gained is 3 bits, since 2 cubed is 8.
  • Guess B produces four buckets of two words each. You always end up with two candidates left. The information gained is 2 bits.
  • Guess C puts seven words in one bucket and one word in another. Seven times out of eight you learn almost nothing. The average information is 7/8 x log2(8/7) + 1/8 x log2(8), which comes to roughly 0.54 bits.

Guess C looks tempting if its single-word bucket holds your favourite candidate, because it has a one in eight chance of winning outright. But it leaves you with seven candidates most of the time, while Guess A resolves the puzzle on the next turn with certainty. This is the central trade-off: a guess that could win is not the same as a guess that informs.

Candidates are not equally likely

The eight-word example assumes every candidate is as likely as every other. Real games rarely work that way. Some words are far more plausible as answers than others, particularly if the game draws from a curated list of common words rather than a full dictionary. Weighting each bucket by the likelihood of its words is a direct use of conditional probability: you update what you believe after each result, and you choose the next guess against the updated beliefs rather than the original ones.

The same logic explains why strategies change as the game progresses. Early on, you may prefer an exploratory guess that spreads candidates widely, even if it uses letters in an odd arrangement. Late in the game, when only a handful of candidates remain, the chance of winning with the guess itself starts to outweigh the information it gives, and guessing a real candidate becomes the better choice.

Patterns that help in practice

You do not need a computer to benefit from these ideas.

  • Prefer guesses that test several common letters in positions where they are plausible, so the feedback differs a lot between candidates.
  • Avoid repeating letters in an exploratory guess, since a repeated letter usually adds little new information.
  • When several candidates differ only in one letter, such as a group that all end in the same four letters, a guess that tests different options from the group at once can beat guessing them one at a time. A word that is not itself a candidate may be worth using for this.
  • Keep a mental list of what is still possible rather than only what the colours seem to say. Careless reading of feedback is a more common source of lost games than a poor opening.

Programs that solve these games typically do the bucket calculation for every allowed guess and pick the one with the highest expected information, sometimes adjusted for how likely each guess is to be correct. The exact results depend on the word list and the rules, so treat any claim about a single “best” opening word with caution unless it names the list it was computed on.

Limits of the idea

Maximising information is a strategy for finishing in as few guesses as possible on average. It does not guarantee a win in any particular game, and a guess that is best on average can still turn out badly on a specific hidden word. Games with a strict limit on the number of guesses also change the balance: if you only have a few turns left, a lower-information guess that is more likely to be correct may be worth the risk.

The reasoning here carries over to other deduction puzzles and to Mastermind-style code-breaking, where the same question applies: which question to ask next so that the remaining possibilities shrink the most. Counting how many options each possible answer would leave is the same skill as counting outcomes in any other game, applied to a small, well-defined set.

The complete guide to puzzle games

Probability and Problem-Solving: The Key to Success in Puzzle Games
Read the guide

Keep exploring

Guides from other topics

All topics →