Mastermind
Put your logic skills to the test in this intense mind-reading duel. One player hides, one hunts—can you crack the code before your guesses run out?
Sign in to rate this game
What You'll Need
About This Game
One player creates a secret code of colored pegs, and the other tries to crack it through logic and deduction. After each guess, the codemaker gives clues about correct colors and positions.
How to Play
What You Need
- A Mastermind set. That is a board with 10 rows of holes (some editions have 12), a hinged shield, code pegs in 6 colors, and small key pegs in two colors. Classic sets use black and white key pegs. Some newer sets use red and white pegs, or sliders. Same meaning.
- No set? Use pencil and paper. Write codes as four digits from 1 to 6.
Setup
- Decide who makes the code first. Put the board between you with the four shielded holes facing the codemaker.
- The codemaker picks 4 code pegs and puts them behind the shield. Any of the 6 colors, in any order. Repeats are allowed. Two reds, three reds, even four reds is legal.
- The codebreaker sits on the other side and starts in the row nearest them.
How a Turn Works
- The codebreaker places 4 code pegs in the next open row. That is a guess.
- The codemaker scores the guess with key pegs in the small holes beside that row. One black peg for every guess peg that is the right color in the right position. One white peg for every guess peg that is the right color in the wrong position. Nothing for a color that is not in the code.
- Key pegs go in any order. They never say which guess peg they refer to. Working that out is the game.
- The codebreaker uses the feedback to build the next guess in the next row. Old rows stay where they are.
- Repeat until a guess earns 4 black pegs, or the rows run out.
The Duplicates Rule
Each peg in the secret code can earn at most one key peg, and black beats white. Say the code holds one green. You guess two greens, one of them in the right spot. You get one black and no white. The second green earns nothing because there is no second green to match.
Another one. The code is red, blue, red, yellow. You guess green, red, red, white. Your third peg is red in the right spot, so one black. Your second peg is red in the wrong spot, and the code has a second red, so one white. Total: one black, one white.
Scoring
- The codemaker scores 1 point for every row the codebreaker used. Crack it in four rows and the codemaker gets 4.
- If the codebreaker never cracks it, the codemaker gets one point per row plus 1 bonus. On a 10-row board that is 11.
- If the codemaker gave wrong feedback, the classic rules replay that game and give the codebreaker 3 bonus points.
- Now swap roles and play again.
Winning
Play an agreed even number of games so each player makes the code the same number of times. Four or six is a normal match. Highest total wins. Scores go to the codemaker, so the better codebreaker is the one who gives away fewer points.
Two-Player Notes
- Mastermind is built for two. The roles are not equal, so swap after every game and play an even number.
- The codemaker's real job is accurate scoring. One wrong key peg ruins the game. Count blacks first, cover those pegs with a finger, then count whites.
- Check your board before you start. Ten rows is standard. Some editions give 12, which makes the no-crack bonus 13 instead of 11.
- Blanks: the classic rule book has a harder second game where the codemaker may leave holes empty. A blank counts as a seventh color. Agree before play, never mid-match.
- If one player stalls, set a 3 or 4 minute limit per guess.
Strategy Tips
- Open with two pairs, such as red, red, blue, blue. It tests two colors at once and gives position information too.
- Every guess must fit all feedback so far. If a guess is already ruled out, it wastes a row.
- A perfect player never needs more than 5 guesses. Donald Knuth proved that in 1977. Most people take 6 or 7.
- As codemaker, repeat a color. Codes with four different colors are the easiest to crack.
Variations
- Allow blanks. That is the classic rule book's second game, with 2,401 possible codes instead of 1,296.
- Pencil and paper: four digits from 1 to 6. Same feedback, no plastic.
- Super Mastermind: 5 pegs, 8 colors. A different board and a longer game.
Where to Buy
History & Background
Mastermind was invented in 1970 by Mordecai Meirowitz, an Israeli postmaster and puzzle enthusiast who created the game as a paper-and-pencil concept. The game gained widespread popularity after it was licensed and produced by Invicta Plastics in the UK, eventually becoming a household name across Europe and North America. Its elegant design—combining simple rules with deep strategic complexity—made it an instant classic in the puzzle game genre.
The game's brilliance lies in its perfect balance of roles: the codemaker must create a sufficiently challenging code while the codebreaker must employ logical deduction and pattern recognition to solve it. This role reversal creates a unique two-player dynamic where both players are equally engaged, whether they're concealing secrets or pursuing them. Mastermind became particularly influential in computer science and mathematics education, as the game's mechanics mirror algorithmic thinking and information theory principles.
Since its debut, Mastermind has sold millions of copies worldwide and spawned numerous digital versions. The game has even been analyzed mathematically, with researchers proving optimal solving strategies require a maximum of five moves. For two-player enthusiasts, Mastermind remains a timeless battle of wits where every guess carries weight and every feedback clue is a step closer to victory.
Frequently Asked Questions
Can you play Mastermind with 2 players?
Yes! Mastermind is an excellent choice for 2 players — in fact, it's designed specifically for a duo. You'll get the full experience without any compromises.
How long does Mastermind take to play?
A typical game of Mastermind takes about 10-20 min. This can vary based on players' experience level and how quickly decisions are made.
What do you need to play Mastermind?
To play Mastermind, you need: Mastermind board with pegs. That's it — no special equipment required.
Similar Games
SET
PuzzleRace your opponent to spot visual patterns in this lightning-fast card game where sharp eyes and quick reflexes determine the winner. Perfect two-player showdown of perception and speed.
Rush Hour
PuzzleRace your opponent to untangle a traffic jam in this addictive sliding puzzle. Quick thinking and spatial reasoning decide the winner—solve it in fewer moves or beat them to the exit.
Rubik's Race
PuzzleRace your opponent in real-time to solve sliding puzzles faster. Shake, slide, and slam your way to victory in this intense head-to-head puzzle battle.
Labyrinth (Board Game)
PuzzleNavigate an ever-shifting maze where every move you make transforms the board for your opponent—a mind-bending duel of strategy, adaptation, and perfect timing.
Tangram Duel
PuzzleRace your opponent to complete ancient Chinese puzzles in real-time. Tangram Duel transforms a centuries-old brain teaser into a thrilling head-to-head speed competition.
Unlock! (Series)
PuzzleRace against the clock together in this app-powered card escape room where combining numbered cards and solving puzzles requires teamwork, communication, and quick thinking—all in 60 minutes.
Perplexus (Competitive)
PuzzleRace head-to-head through a mind-bending 3D maze inside a sphere—tilt, twist, and flip your way to victory while your opponent battles the same labyrinth in real-time.
Sudoku Duel
PuzzleTurn the world's favorite puzzle into a high-stakes race: solve Sudoku faster than your opponent, but one mistake ends it all. No erasing, pure tension, pure skill.
Want something different than Mastermind?
Answer 4 quick questions and we'll pick a game for tonight.
Explore More Games
Discover the most popular two-player games or browse by category.