← Games

Code Breaker

0/10Tries
-Best

Code Breaker

The computer picks a secret code of coloured pegs (colours can repeat). Tap colours to make a guess, then press ✓ Check.
⚫ means a peg is the right colour in the right place. ⚪ means right colour, wrong place. Use the clues to crack the code in as few tries as you can!

Start with guesses that test several colours at once, like two reds and two blues.

About Code Breaker

A logic puzzle based on a famous board game. The computer hides a secret code of four coloured pegs. You make a guess, and it tells you how close you are with little clue pins: a black pin for each peg that's the right colour in the right spot, and a white pin for each peg that's a right colour but in the wrong spot. It doesn't say which pegs they are, so you have to reason it out. Crack the code before you run out of rows. Hard mode has five pegs and eight colours.

How to play

Tap colours or 1–8Add a peg
BackspaceRemove a peg
Enter / ✓Check the guess

Tips

How to get better at Code Breaker

Code Breaker is about getting the most information from every guess. A good first guess uses two colours, like red-red-blue-blue. The clues tell you how many reds and blues are in the code, and roughly where.

Then change things carefully. If you move one peg and the black count goes up, you learned where that colour belongs. If it goes down, you learned where it doesn't. Changing too much at once makes the clues hard to read.

Remember that the total of black and white pins equals how many of your colours are in the code. Once that total equals the number of pegs, you have all the right colours, and you just need the order.

From beginner to expert

Did you know?

Mathematicians proved that any 4-peg, 6-colour code can always be cracked in five guesses or fewer, if you play perfectly.

Questions players ask

Can colours repeat?

Yes, the code can use the same colour more than once.

What do the pins mean?

⚫ = right colour, right place. ⚪ = right colour, wrong place.

Guide written by Noam, who makes the games on this site. Spotted a mistake or have a tip to add? Email me · About the Game Hub

More games