Code Breaker strategy
In brief
Every clue eliminates codes. After each guess, keep in mind the codes that are still possible, those that would have given exactly the same clues for all your guesses. Then choose a guess that best separates these codes, and preferably play a code that could still be the right one.
Reasoning by elimination
At the Intermediate level, there are 360 possible codes at the start. A code remains possible as long as it would have given, for each of your guesses, exactly the clues the app displayed. In the example game for this level, 24, 5, 1 and 1 remain after each guess: the last guess is the code.
- 2 well placed, 1 misplaced: 24 codes remain possible.
- 1 well placed, 2 misplaced: 5 codes remain possible.
- 3 well placed: 1 code remains possible.
- 4 well placed: 1 code remains possible.
The first guess
A good first guess splits the codes into many small groups, one group per possible response. The table gives, for a few first guesses, the number of responses the app can give and the number of codes that remain in the worst case.
| First guess | Possible responses | Codes remaining, worst case |
|---|---|---|
| 11 | 88 | |
| 9 | 102 | |
| 2 | 240 | |
| 6 | 144 | |
| 3 | 180 |
At the Intermediate level, where the code does not repeat any color, the guess with 4 different colors (red, yellow, blue, orange) leaves 88 codes in the worst case. A guess that repeats a color, or that leaves empty slots, separates less well.
Playing a code that is still possible
When few codes remain, play one of them if you can: either it's the right one and you win, or the response eliminates the others. In the example game, before guess 3, 5 codes remain; the guess red, green, blue, orange is one of them, and each of the 5 codes would give a different response. After the response, only 1 code remains: the next guess wins.
When the code can repeat a color
At the Hard and Extreme levels, a color can appear more than once in the code. The best first guess then changes:
| First guess | Possible responses | Codes remaining, worst case |
|---|---|---|
| 19 | 3 080 | |
| 20 | 2 544 | |
| 10 | 3 924 |
At the Hard level, the guess red, red, yellow, yellow, blue leaves 2,544 codes in the worst case, compared with 3,080 for red, yellow, blue, orange, purple. Also keep in mind that a color you've found may appear several times: a well-placed peg does not mean that its color is used up.
Incomplete rows
The app accepts an incomplete row, except for the last one. It can't win and it uses up a row: at the start, it teaches less than a full row (6 possible answers for red, yellow, empty slot, empty slot, versus 11 for red, yellow, blue, orange). It can be useful when only one specific question is left to settle, such as the position of a single color.
In Last Chance
The rows already played may be enough to leave only one code. Go through them one by one, keeping only the codes that fit each time. In the example on the site, at Intermediate level, the 7 pre-filled rows leave only one code.