Mastermind

Deduction game where you crack a hidden code.

Play Now

About

Mastermind is a classic code-breaking game for two players — or one player against the computer. One side sets a secret sequence of colored pegs (or in the online version, symbols/colors), and the other has to deduce it through a series of guesses, receiving only numerical feedback after each attempt.

The feedback system is the heart of the game. After each guess, you learn how many pegs are exactly right (right color, right position) and how many are right color but wrong position. From these clues alone, a skilled player can crack any 4-peg code in at most 5 guesses — sometimes fewer.

Mastermind is a lesson in information theory made playable. Each guess is a hypothesis; each response is experimental data. It sharpens logical thinking and is endlessly replayable in 5-minute sessions. The satisfaction of cracking the code on the 4th row never gets old.

How to Play

  • The computer sets a hidden sequence of 4 colored pegs (colors can repeat).
  • Make a guess by placing 4 colored pegs in the guess row.
  • Receive feedback: black pegs for correct color and position, white for correct color only.
  • Use the feedback to eliminate possibilities and refine your next guess.
  • Crack the code within the allowed number of guesses (usually 10) to win.

Tips

  • Start with a guess that uses 4 different colors — you gather maximum information.
  • Never guess a combination your previous feedback has ruled out.
  • Keep track of eliminated colors — a white peg tells you a color is present but misplaced.

History

Mastermind was invented by Israeli postmaster and telecommunications expert Mordecai Meirowitz in 1970. After being rejected by major game companies, it was picked up by Invicta Plastics in the UK and became a global hit in the 1970s. The game has a strong mathematical underpinning: Donald Knuth proved in 1977 that any code can be solved in at most 5 moves using an optimal strategy. It remains one of the best-known deduction games ever made.

Play Mastermind Now