MASTERMIND / RULES, HISTORY AND STRATEGY

How to play Mastermind: feedback, repeats and useful guesses

Learn how black and white clues work, why repeated colours matter and how to choose informative guesses, with a complete feedback example.

Where the game came from

Mastermind comes from the tabletop tradition of cracking a secret code. The research paper Hardness of Mastermind dates the popular board game’s release to 1971. Publisher Hasbro still describes the roles of codemaker and codebreaker. In Rich Games, the bot chooses the secret while you keep the same task: extracting useful information from each guess.

A physical Mastermind board with coloured pegs and rows of guesses
A tabletop code: each new row tests a hypothesis.Photo: Piotrus · CC BY-SA 3.0. Resized and converted to WebP. The photograph retains its original license.
Your turnPRACTICE

Loading the practice board…

A small practice game: interact with the board and test your ideas. Restart whenever you like.

Read the feedback correctly

A black dot ● means the right colour in the right position. A white dot ○ means the right colour in a different position. The order of the dots does not correspond to the order of your pegs. Feedback summarises the entire row, rather than labelling individual positions.

Colours can repeat in the secret. Each peg is counted once: exact matches are removed first, then the remaining colours are compared. Rich Games checks a completed row automatically. Before placing the final peg, you can remove the latest input using ⌫.

Choose guesses for information

After each answer, retain only codes that would produce exactly the same feedback for every previous guess. A new guess should help distinguish those remaining possibilities, rather than merely look slightly different from the last one.

It can help to identify the colours first and their positions next. However, the stages overlap: one guess often tests both composition and arrangement. If you change everything without a clear reason, comparing answers becomes harder.

Feedback with no dots excludes every colour used in that guess. When the total number of black and white dots equals the code length, you have identified the colour multiset, including repetitions, but may still need to determine its order.

Worked example: two black dots and two white dots

For this teaching example, let the secret be “red, blue, red, green” and the guess be “red, red, blue, green”. Positions one and four match exactly, giving two black dots. After removing those matches, red and blue remain in the wrong positions, giving two white dots.

The answer ●●○○ does not identify which two positions are correct. We know only because this example reveals the secret. In an actual game, compare several rows to establish that. The two red pegs in the guess are legal and provide meaningful information.

Common interpretation mistakes

Do not mentally attach a white dot to the peg next to it: no such correspondence exists. Do not rule out repeated colours, or some valid secrets become impossible for you to find. Do not count one secret peg twice just because a colour repeats in your guess.

Another common failure is submitting a code that contradicts an earlier answer. Before the final tap, check the proposed row against at least the strongest known restriction, such as a set of fully excluded colours.

Practise in Puzzles

Start with Easy: four positions, six colours and ten guesses. Medium keeps four positions and adds colours; Hard uses five positions. A larger possibility space makes consistent checking especially valuable.

After a game, recall the guess that removed the most uncertainty. Explain its value independently of how many black dots it produced. An informative move does not have to make your visible row look immediately more like the secret.

Sources and further reading

  1. Viglietta — Hardness of Mastermind ↗
  2. Hasbro — Mastermind ↗