About Code Breaker
Code Breaker is a free logic game: crack a hidden color code using the clues given after each guess.
Code Breaker is a Mastermind-style logic game. The computer picks a secret code of colored pegs, and you try to guess it. After every guess you get clue pegs that tell you how close you were.
In classic mode the code has 4 pegs chosen from 6 colors, and you get 10 guesses. Hard mode uses 5 pegs, 8 colors and 12 guesses. Colors can repeat in the code, and each color is labelled with a number so the game is easy to read.
1,296
POSSIBLE CODES, CLASSIC
How to play Code Breaker
- Choose Classic (4 pegs, 6 colors, 10 guesses) or Hard (5 pegs, 8 colors, 12 guesses).
- Tap a color to place it in the next empty slot of your guess. Tap a placed peg to remove it.
- When every slot is filled, press Check.
- A black clue peg means one peg is the right color in the right place. A white clue peg means a right color in the wrong place. The clue pegs are not in any particular order.
- Use the clues to work out the code before you run out of guesses. Colors can appear more than once.
Code Breaker tips and strategy
- Open with two different colors in two slots each, for example 1 1 2 2. The clues tell you a lot about how many of each color are in the code.
- Treat every old guess as a rule. A new guess should be one that could still be the secret code, given all the clues so far.
- Black pegs fix positions and white pegs only tell you about colors. Work out the colors first, then the places.
- If a guess scores no pegs at all, you can rule out every color in it.
- Write the counts down: for each guess, black plus white equals how many of your pegs are in the code.
Frequently asked questions
What do the black and white pegs mean?
Black means a correct color in the correct position. White means a correct color in the wrong position. A color is only counted as many times as it appears in the code.
Can colors repeat in the secret code?
Yes. The code can use the same color more than once, in any positions.
How many guesses do I get?
Classic mode gives 10 guesses for a 4-peg code with 6 colors. Hard mode gives 12 guesses for a 5-peg code with 8 colors.
How many possible codes are there?
Classic mode has 6 to the power of 4, which is 1,296 possible codes. Hard mode has 8 to the power of 5, which is 32,768.
Is there a best strategy?
Yes. Always guess a code that is still possible given the clues you have seen. Computer scientists have shown that 4-peg, 6-color codes can always be cracked in 5 guesses with the best strategy.
Why are the colors numbered?
Each color has a number on it so the pegs are easy to tell apart, including for colorblind players.
Is it free to play?
Yes. It is free in your browser with no download or account.