About Code Breaker
Code Breaker is a deduction game in the style of Mastermind. The computer hides a code of four coloured pegs, and you have ten guesses to find it. After each guess you are told how many pegs are exactly right and how many are the right colour in the wrong place.
How to play
- The secret code is four pegs long and uses six colours: red, blue, green, yellow, purple and orange. Colours can repeat, so a code like red, red, blue, red is possible.
- You get ten guesses. Each guess must have all four pegs filled before you can check it.
- A filled circle marks a peg that is the right colour in the right position. A hollow circle marks a peg that is the right colour but in the wrong position. A dot means no match.
- The markers tell you how many pegs matched, not which ones. Each peg in the code is counted at most once.
- Cracking the code scores 100 points for each guess you had left including the winning one: 1000 for a first-guess solve, down to 100 on the tenth guess. Running out of guesses scores nothing and reveals the code.
Controls
- Mouse or touch: tap a colour to add it to the next open slot in your guess, from left to right.
- The backspace button on the guess row removes the last peg you placed.
- Press Check to submit the guess once all four slots are filled.
Tips and strategy
- Make your first two or three guesses cover as many colours as possible, for example red, red, blue, blue and then green, green, yellow, yellow. The total of filled and hollow markers tells you how many of each colour are in the code.
- Count the total markers before thinking about positions. If a guess of four different colours gets three markers in total, exactly three of those colours are in the code.
- Change one thing at a time when you are working on positions. Swapping two pegs and watching whether a filled circle becomes hollow tells you exactly where things belong.
- Every new guess should be consistent with all the feedback you have had so far. A guess that could not possibly be the code wastes a try.
- Remember repeats are allowed. If you have identified only three colours but have four markers, one colour appears twice.
Background
Mastermind was invented by Israeli postmaster and telecommunications expert Mordecai Meirowitz and released in 1970 by the British company Invicta Plastics. It is based on an older pencil-and-paper game called Bulls and Cows, which uses digits instead of colours. In 1977 the computer scientist Donald Knuth showed that the four-peg, six-colour version can always be solved in five guesses or fewer.
Questions
- Can the code contain the same colour more than once?
- Yes. Each of the four pegs is chosen independently, so repeats, including all four the same, are possible.
- Is there a keyboard shortcut?
- No. This game is played by tapping or clicking the colour buttons and the Check button.
- What is the highest possible score?
- 1000 points, for guessing the code on your first try. Each extra guess costs 100 points.