Codebreaker Strategy: Opening Probes, Consistent Guesses and the Shrinking Guess Budget

Updated October 2026

Codebreaker hides a row of four coloured pegs and lets you ask questions in the form of guesses. Each answer tells you how close you were, never where. Early codes are forgiving, but the guess allowance shrinks as your streak grows, from the eighth code on you have only five tries, and from the thirteenth only four. This guide covers how the feedback is calculated, why most codes contain a repeated colour, which openings split the possibilities best, and a guessing discipline that, in our tests, cracks the vast majority of codes inside five guesses.

What you are searching through

The code has four positions and each can be any of the six palette colours, with repeats allowed. That gives 6 × 6 × 6 × 6 = 1,296 possible codes, all equally likely, because each position is drawn independently. A consequence many players miss: only 360 of those codes use four different colours. The other 936, about 72 percent, contain at least one repeated colour. If your mental picture of a code is four different colours, you will be wrong almost three times out of four.

Building a guess is simple. Tap palette colours to fill the row from left to right, tap a placed peg to remove it (the pegs after it slide left to close the gap), or use Clear to start the row again. Guess becomes active once all four pegs are placed. There is no timer, so take as long as you need over each decision.

How the feedback works

After each guess you get up to four small markers. A filled marker means one of your pegs is the right colour in the right position. A hollow marker means one of your pegs is a colour that appears in the code, but somewhere else. The game always lists filled markers first, then hollow ones, so their order says nothing about which of your pegs earned them.

The counting rule matters with repeats. Exact matches are counted first and removed. Then, colour by colour, the hollow count is the smaller of how many times that colour remains in your guess and how many times it remains in the code. If the code has one red and you guess two reds in the wrong places, you get only one hollow marker, not two. That rule is what makes guesses with doubled colours so informative: they tell you not just whether a colour is present, but roughly how many times.

Choosing an opening

A good first guess is one that splits the 1,296 possibilities into many small groups, so that whatever answer you get, few codes remain. We measured every possible pattern of first guess by the size of the largest group it can leave behind:

The two-pair opening is the strongest of these. Its three most common results, one filled marker, one hollow marker or nothing at all, each leave exactly 256 codes. The blank result is useful in its own way: it removes two colours completely, and every later guess can be built from the four that are left.

For the second guess, aim to introduce new colours while reusing at most a little of what you learned. After a blank first answer, a guess built from three of the four remaining colours with one of them doubled, in the shape CCDE, leaves at most 46 codes in our calculation.

The consistency rule

From the second or third guess onward, the single most effective habit is this: only guess a code that could still be the answer. Before you tap Guess, check your candidate against every earlier row. Pretend it is the secret and work out the feedback each previous guess would have received. If any row does not match what the game actually showed, your candidate is impossible, and guessing it wastes a turn.

That check sounds slow, but it becomes quick with practice, and it does two things at once. A consistent guess always has a chance of being correct, and whatever feedback it gets still narrows the field. Most failed codes are lost not to bad luck but to a guess that was already ruled out.

The shrinking allowance

You have 8 guesses for each of your first two codes, 7 for the third and fourth, 6 for the fifth to seventh, 5 for the eighth to twelfth, and 4 for every code after that. Your score is the number of codes cracked in a row, and the run ends the first time you run out of guesses on a code. The answer is then revealed on the game-over card.

How demanding is five? We tested two strategies against all 1,296 codes after a two-pair opening. A player who always guesses a randomly chosen code that is consistent with every previous answer cracked about 89 percent of codes within five guesses, 99 percent within six and every code within seven. That means the first seven codes are almost free for a careful player, and the five-guess codes cost this method a code roughly once in every nine attempts.

A stricter method, which at each turn picks the guess whose worst possible answer leaves the fewest codes, solved every one of the 1,296 codes in five guesses or fewer, averaging about 4.5. You cannot run that search in your head, but its lesson carries over: when you have several consistent options, prefer the one that would split the remaining codes most evenly, especially on guess two and three.

Four guesses are a different game. We searched every possible strategy exhaustively, allowing any of the 1,296 codes at every turn, and the best one cracks only 768 of the 1,296 codes within four, about 59 percent, starting from a guess with one pair and two singles. The minimax method above manages about 47 percent within four, and the random consistent guesser about 39 percent. So from the thirteenth code on, every code is a real gamble even for perfect play, and a perfect player adds on average only about one and a half more codes before the run ends. Long streaks there come from careful splitting plus luck.

A routine for five- and four-guess codes

  1. Open with two pairs of colours.
  2. Second guess: bring in the remaining colours, keeping any colour that the first feedback shows is present.
  3. Third guess: switch to strict consistency. Count totals first, then place colours.
  4. Fourth and fifth guesses: test one positional idea per guess, and make sure each candidate fits every row on the board.

Your best streak is saved on your device, and any streak above zero can be submitted to the Hall of Fame from the game-over card.

▶ Play Codebreaker Deduce the hidden four-peg colour code from filled and hollow markers.