CODEBREAK strategy guide
CODEBREAK looks like a guessing game, but it rewards reasoning far more than luck. Every clue removes a large share of the remaining possibilities, and a player who keeps track of what each clue proves will usually finish well inside the eight tries. This guide describes a method you can follow every day.
Know the numbers
The code has four different digits and never starts with 0, so there are 9 × 9 × 8 × 7 = 4,536 possible codes. A guess can come back in only 14 different ways (every mix of green and yellow circles that adds up to four or fewer, except three green plus one yellow, which cannot happen). So one guess cannot identify the code, but a well-chosen guess can cut the field dramatically. Computer analysis of the classic version of the game, which allows a leading zero, shows that perfect play never needs more than seven guesses. You have eight, so the goal is not brilliance. It is to avoid wasting guesses.
Step 1: open with two guesses that share no digits
Start with 1234. For the second guess use four completely different digits, 5678. Add up the circles from both guesses (green plus yellow each time). That total is how many of the digits 1 to 8 are in the code. Because the code has four digits, the remainder must come from the two digits you have not tried yet, 9 and 0.
After just two guesses you therefore know how many of the four digits come from each group, and that is the most valuable fact in the early game. Any other pair of opening guesses that share no digits works just as well. The point is that overlap wastes information.
Step 2: decide which digits are in the code
Next, work out exactly which digits are present. Treat each group as a small puzzle. If 1234 returned two circles in total, then exactly two of 1, 2, 3 and 4 are in the code. Your third guess should mix digits from the groups, for example two from the first group, two from the second, so that the new total splits the possibilities again.
Keep a simple note for every digit: in, out or unknown. A guess that scores no circles at all is the best news you can get, because it proves four digits are out in one go. The keypad greys them out so you do not have to remember.
Step 3: find the positions
Once you know the four digits, only their order is left. There are at most 4 × 3 × 2 × 1 = 24 arrangements, fewer once the first digit cannot be 0, and the green circles prune that list quickly. Two techniques help:
- Use blanks. A digit you know is out can fill a space in a guess so that it cannot add any circles. If you want to test 3 and 5 alone, put them in the first two positions and fill the last two with digits you know are out. Any circles must then come from 3 and 5.
- Move few digits at a time. Swap two digits between guesses and watch what changes. If the greens go up by one or two, the swap told you something definite.
Step 4: guess something that could still be right
Before you submit, check your guess against every earlier clue. Ask: if this were the code, would my previous guesses have produced exactly the circles I saw? If the answer is no, the guess cannot win, and it has to earn its place by teaching you something. A guess that is consistent with everything so far gives you a chance to win right now and still narrows the field if it is wrong. This single habit is the difference between steady and wasteful play.
A full example
Suppose the hidden code is 7 3 0 5. You do not know that, of course.
- Guess 1: 1 2 3 4 scores 0 green and 1 yellow. Exactly one of 1, 2, 3, 4 is in the code.
- Guess 2: 5 6 7 8 scores 0 green and 2 yellow. Two of 5, 6, 7, 8 are in the code.
- One plus two is three digits from 1 to 8. The fourth digit must be 9 or 0.
- Guess 3: 3 7 0 9 scores 1 green and 2 yellow, three circles in all. Exactly one of 0 and 9 is in the code, and that supplies one circle. The other two must come from 3 and 7, so both 3 and 7 are in.
- That settles the first group: 3 is the one digit from 1 to 4, so 1, 2 and 4 are out. The code is made of 3, 7, one of 5, 6 or 8, and one of 0 or 9.
Now check candidate guesses against every clue so far. 7305 fits all three: 3 is not third (guess 1 had no greens), 5 is not first and 7 is not third (guess 2 had no greens), and against guess 3 it gives one green (the 0 in third place) and two yellow. Because it is consistent with everything, it is a good fourth guess, and in this example it happens to be correct.
Common mistakes
- Ignoring the zeros. A clue of 0 green and 0 yellow is a lot of information. Use it.
- Treating yellow as a position hint only. A yellow circle also confirms the digit is in the code, which is often the more useful half of the message.
- Repeating a test. If a guess cannot give an answer you do not already have, change it.
- Guessing with feeling. Look for guesses that follow from the clues, not guesses that look nice.
- Forgetting the first-digit rule. The code never begins with 0, which removes a surprising number of candidates.
Practise on purpose
Play each day's puzzle, then look back at your guesses. Which one taught you least? Aim to make every guess earn its place. If you have not yet read the rules in full, start with how to play, and when you are ready, play today's puzzle.