mastermind-rules

Mastermind Rules

Four hidden colors and a handful of clues are all you get. Playiro.com explains the Mastermind rules with clear feedback examples, duplicate-color guidance, and practical ways to narrow down the secret code.

2.5 min read

How do you play Mastermind?

Mastermind is a two-player deduction game. One player creates a hidden color code, and the other tries to identify it through a series of guesses.

After each guess, the codemaker provides feedback showing how many colors are correct and how many occupy the correct positions. The clues do not reveal which individual pegs are right. You have to work that out by comparing your guesses.

This game rules guide covers the classic format with four code positions, six available colors, and repeated colors allowed. The scoring below follows the ten-row Pressman edition; check your board’s instructions if it has a different number of attempts.

Choose your roles and prepare the board

The players have different jobs during each round:

Role Responsibility
Codemaker Creates the secret code and gives accurate feedback
Codebreaker Makes guesses and uses the clues to identify the code

Position the board with the code shield facing the codemaker. Separate the large colored code pegs from the smaller feedback pegs.

Before playing, agree on an even number of rounds so each person gets the same number of turns in both roles.

Setting the secret code

The codemaker places four large pegs behind the shield, filling every position.

Colors may repeat. A code such as red, blue, red, yellow is legal, as is a code containing four pegs of the same color.

Once the round begins, the code stays unchanged. Empty positions are not part of the standard game described here.

What the feedback pegs mean

The small pegs report the result of a complete guess. They do not identify specific positions.

Feedback Meaning
Red peg One correct color in the correct position
White peg One correct color in the wrong position
No peg for an unmatched guess peg No remaining match for that occurrence
Four red pegs The code is solved exactly

Some editions use black instead of red for an exact match. Check the key supplied with your set.

Feedback placement does not correspond to the order of your guess. A red feedback peg in the first small hole does not mean your first large peg is correct.

A worked feedback example

Suppose the hidden code is:

Red – Blue – Green – Yellow

The codebreaker guesses:

Red – Green – Purple – Blue

The feedback is one red peg and two white pegs:

  • Red is the correct color in the correct position.
  • Green is present, but in a different position.
  • Blue is present, but in a different position.
  • Purple has no match.

The codebreaker sees only that combined feedback. The codemaker does not explain which colors earned it.

Playing a round step by step

Each new row is another attempt to solve the same hidden code.

  1. Fill the first guessing row. The codebreaker places four colored pegs in a chosen order.
  2. Score the guess. The codemaker adds the appropriate small feedback pegs.
  3. Compare the clues. The codebreaker considers which codes remain possible.
  4. Make the next guess. Fill the next unused row, leaving earlier guesses and feedback in place.
  5. Continue until the code is solved or the rows run out.
  6. Reveal the code and record the score. Switch roles for the next round.

A guess must match both the colors and their order to solve the code. Finding the correct four colors in the wrong arrangement is progress, but it does not end the round.

Mastermind rules for repeated colors

Repeated colors are legal, but they must be scored carefully. Each peg in the secret code can contribute to only one feedback peg per guess.

Count exact matches first. Then compare the remaining unmatched colors for misplaced matches.

Example: guessing too many of one color

Secret code: Red – Blue – Green – Yellow
Guess: Red – Red – Red – Red

The feedback is one red peg, not one red and three whites. The secret contains only one red, and that red has already been matched exactly.

Now change the secret:

Secret code: Red – Red – Blue – Green
Guess: Red – Blue – Yellow – Yellow

The feedback is one red and one white. The first red matches exactly, and blue is in the wrong position. The second red in the secret earns no feedback because the guess contains no additional red.

A reliable scoring method

To avoid mistakes, work through the guess in two passes:

  1. Count exact color-and-position matches and set them aside mentally.
  2. Match remaining guessed colors against remaining secret colors, using each occurrence once.

Never count the same secret peg as both an exact match and a misplaced match.

Winning a round and scoring a match

The codebreaker succeeds by producing four exact matches within the available attempts. If all ten rows are used without a solution, the codemaker has protected the code.

For a scored match, use this system:

Round result Codemaker’s score
Solved on the first guess 1 point
Solved on the fifth guess 5 points
Solved on the tenth guess 10 points
Not solved after ten guesses 11 points

The successful guess counts as a used row.

After the agreed number of rounds, the player with the highest total wins. High scores reward codes that took longer to solve, so make sure both players have equal opportunities as codemaker.

What if the feedback was wrong?

Reveal the code and check the disputed row together. Incorrect feedback can make a valid solution appear impossible.

Under the Pressman scoring rules used here, a proven feedback error means the round is replayed. The codebreaker receives three points, and the codemaker receives no points for that spoiled round.

Strategy: make every guess answer a question

Mastermind becomes more manageable when you know what you are testing. Randomly changing all four colors may produce new feedback, but interpreting the difference can be difficult.

Use guesses to separate possibilities

Suppose you are deciding whether red appears once or twice. A guess containing two reds can help test that question, provided you also account for the other colors.

You do not always need to guess a code you believe is the final answer. A deliberate test can be useful when it distinguishes several remaining possibilities.

Keep every earlier clue in play

A candidate solution must explain all previous feedback, not just the latest row.

If an earlier guess received no feedback, none of the colors used in that guess can appear in the secret. Do not accidentally bring them back into your proposed solution.

Treat four whites as an ordering problem

Four white pegs mean you have the correct collection of colors, including the correct quantities, but none are in the right position.

At that point, changing to new colors throws away useful knowledge. Rearrange the existing colors and use earlier clues to narrow down their positions.

Don’t assume which peg is correct

One exact-match indicator tells you that one position is right. It does not tell you which one.

Avoid permanently fixing a peg in place until your comparisons justify that conclusion.

Adjusting the difficulty

For a gentler practice game, agree that the secret must use four different colors. This is a beginner variation that removes the extra challenge of duplicates.

For a harder game, the published advanced option allows empty positions in the secret code. Treat an empty position as an additional color when guessing and scoring.

Different Mastermind sets may also change the code length, number of colors, or attempt limit. Agree on those settings before the codemaker builds the code.

Mastermind rules at a glance

Question Standard format in this guide
How many players? Two
How long is the code? Four positions
How many colors are available? Six
Can colors repeat? Yes
Can the secret change during a round? No
What does red feedback mean? Correct color and position
What does white feedback mean? Correct color, wrong position
Do feedback holes identify positions? No
How many guesses are allowed? Ten in the edition covered here
When is the code solved? All four positions match exactly
Who wins a scored match? Highest total after equal rounds in each role

Loading comments...

Mastermind Rules – How to Play and Crack the Color Code