Skip to main content
Skip to content

Betaboardgames.zone is still being built — tell us what to fix next.

Learn Code Breaker: Rules

2 players · 10–20 min · Moderate to learn

Goal

Codebreaker: Deduce the secret code within 10 (or 12) guesses. Codemaker: Create a code that stumps the guesser.

Overview

Code Breaker (Mastermind) is a code-breaking game of logic and deduction. One player creates a secret code using colored pegs, and the other player attempts to guess it within a limited number of tries, receiving feedback after each guess.

Setup

The codemaker secretly arranges 4 colored pegs from 6 available colors (duplicates allowed). The guesser has a decoding board with rows for guesses and small holes for feedback pegs.

How to play

  1. The codemaker creates a secret 4-peg code using any combination of the 6 colors.
  2. The guesser places 4 colored pegs as their first guess.
  3. The codemaker provides feedback: a black peg for each correct color in the correct position, a white peg for each correct color in the wrong position.
  4. Feedback pegs don't indicate which guess pegs earned them - just the totals.
  5. The guesser uses the feedback to make a refined second guess.
  6. Continue until the code is guessed exactly (4 black pegs) or guesses run out.
  7. Standard limit is 10 or 12 guesses.

Winning the game

Codebreaker wins by matching the exact code within the guess limit. Codemaker wins if the guesser fails to crack the code.

Strategy tips

Start with a guess using 4 different colors to maximize information.
Track your guesses and feedback carefully - elimination is key.
If you get black pegs, keep those positions and test other colors.
White pegs are valuable - you have the right colors, just wrong positions.
A good second strategy: change one color at a time to isolate information.
As codemaker: use duplicate colors to increase difficulty.

Variants

Mini4 colors, 3 pegs (easier, good for children).
Super8 colors, 5 pegs (much harder).
NumbersUse digits 1-6 instead of colors (good for digital versions).
No duplicatesEasier variant where each color appears only once in the code.

History

Mastermind was invented in 1970 by Mordecai Meirowitz, based on an earlier pencil-and-paper game called Bulls and Cows. It has sold over 50 million copies worldwide.

No sign-up required. Share a link and start playing.v0.0.1 · 7242324