PDF download Download Article
Learn these classic game instructions for 2 or more players
PDF download Download Article

If you want to challenge your friends to a challenging logic puzzle, Mastermind is the perfect game to try out. This classic head-to-head game has players trying to solve a secret code before they run out of time, but they only get a few hints with each guess. Mastermind is a great 2-player game, but has multiplayer rules for a full group! Keep reading, and we’ll walk you through how to play along with some helpful strategies and fun variations!

Mastermind Board Game: Quick Rules

To play Mastermind, choose a code maker to create a secret code using 4 colored pegs. The codebreaker uses colored pegs to guess the code. The code maker lets the codebreaker know if their pegs are the right color or in the right positions. End the game when the codebreaker solves the code or runs out of guesses.

Section 1 of 5:

Object of the Mastermind Board Game

PDF download Download Article
  1. One player takes the role of the code maker and creates a hidden code using 4 colored pegs. The other player is the codebreaker and uses colored pegs to guess the code. After each guess, the code maker marks if any of the guessed pegs are the right color or in the right position.
    • If the code breaker solves the code before they run out of guesses, they win.
    • If the code breaker runs out of guesses without solving the code, then the code maker wins.
    • Mastermind is usually a 2-player game, but some versions of the game allow up to 5 players.
  2. Advertisement
Section 2 of 5:

How to Play Mastermind with 2 Players

PDF download Download Article
  1. Choose a player randomly to be the first code maker, and set the board so the side with the hidden area faces them. The person playing the code maker secretly takes any of the colored pegs and places them in any order they want in the holes of the hidden area. This is the code that the other player has to guess correctly.[1]
    • The standard Mastermind game uses 6 different colors and 4 pegs to make a code, but some versions may have more colors or longer codes.
    • You can use the same color multiple times when to make the code, or you can use all different colors.
  2. The other player becomes the codebreaker and sits on the other side of the board. The code breaker can choose any of the colored pegs and place them in the row closest to 4 large holes closest to them. This becomes their first guess for the code.[2]
  3. Key pegs are smaller white and black pegs placed in the small square of holes next to each guess. After the codebreaker makes a guess, the code maker checks their code and places key pegs. A white peg means 1 guessed peg is the correct color, but is in the wrong position. A red peg means 1 guessed peg is the correct color and in the correct position. No peg means that a guessed peg is not a part of the code.[3]
    • Example: If the code is Yellow-Yellow-Green-Blue and the guess was Blue-Orange-Green-Purple, then the codebreaker would place 1 white peg (for the blue in the wrong position) and 1 red peg (for the green in the right position). The 2 empty key peg holes signal that 2 of the colors aren’t in the code at all.
    • Key pegs do not specify which pegs are correct or incorrect, so it’s up to the code maker to figure out which ones are actually a part of the code.
    • In some versions of the game, the key pegs are black instead of red.
  4. The codebreaker now has some limited info about the secret code, but it’s up to them to figure out which pegs are right and wrong. Starting in the next closest row, they choose 4 more colored pegs to make their next guess. The codebreaker responds by placing more key pegs next to the guess.[4]
    • Example: For the next guess, the codebreaker tries Blue-Yellow-Orange-Pink. The code maker would place 1 white peg (for the Blue in the wrong position) and 1 red peg (for the Yellow in the correct position). The code maker leaves the other key peg holes empty.
    • All of the previous guesses stay on the board so the codebreaker can look at the colors and positions that they already tried.
  5. Most versions of Mastermind give the codebreaker 8-10 guesses to figure out the secret code. When the codebreaker solves the code correctly or uses up all of their guesses, then the round immediately ends.
    • If you want to keep track of points, give the code maker 1 point for every guess made by the codebreaker.
  6. Turn the board around and give the other player a chance to make a code. Play the game exactly the same making guesses to solve the code and marking correct colors and positions with the key pegs.
    • If you were keeping score, play an even number of rounds. At the end of the last game, compare how many points each player earned as the code maker, and whoever has the higher score wins!
  7. Advertisement
Section 3 of 5:

Mastermind Game Rules for 3-5 Players

PDF download Download Article
  1. Randomly choose one of the players to be the code maker, and everyone else becomes a codebreaker for the round. The code maker chooses 4 colored pegs and arranges them however they want behind their hidden screen.
  2. Start with the codebreaker sitting to the left of the code maker for the first guess. They choose 4 colored pegs and arrange them in the row closest to their end of the board.
  3. The code maker checks the colors and positions of the pegs in the guess and compares it to their code. For each peg that’s the right color but in the wrong position, they place 1 white key peg. For each peg that’s the right color and placed correctly, they place 1 red key peg. The codebreaker earns points for their turn based on the key pegs for their guess:[5]
    • Every white peg scores 1 point.
    • Every red peg scores 2 points.
    • Example: If the code maker sets the code as Purple-Blue-Red-Green and the codebreaker guesses Green-Blue-Blue-Orange, they get 1 white peg for the green they guessed, and 1 red peg for the blue in the correct position. They earn 3 points for their turn.
  4. After key pegs are placed, the next codebreaker to the left takes their turn. After they make a guess, the code maker places key pegs and awards the player points. Keep alternating codebreakers between turns for the rest of the game.
    • Each time a codebreaker takes a turn, add their score from the previous guess to their new one.
  5. Codebreakers in multiplayer games usually have 12 guesses to figure out the code. If they solve the code before they run out of guesses, they earn 10 points. The code maker earns points depending on how long the group took to solve the code, and earn bonus points if they run out of guesses. The code maker’s score per row depends on the player count:[6]
    • 3 players: 5 pts, 6 pts, 7 pts, 8 pts, 9 pts, 10 pts, 14 pts, 18 pts, 22 pts, 26 pts, 30 pts, 34 pts, 40 pts if unsolved
    • 4 players: 5 pts, 6 pts, 7 pts, 8 pts, 9 pts, 10 pts, 13 pts, 16 pts, 19 pts, 22 pts, 25 pts, 28 pts, 30 pts if unsolved
    • 5 players: 5 pts, 6 pts, 7 pts, 8 pts, 9 pts, 10 pts, 12 pts, 14 pts, 16 pts, 18 pts, 20 pts, 22 pts, 25 pts if unsolved
    • Example: In a 2-player game, if the codebreakers solved the code in 6 turns, then the code maker earns 10 points for the round.
  6. After a round ends, the next player becomes the code maker and creates a new secret code. The other codebreakers again try to solve it and earn points based on their guesses.[7]
  7. After everyone has been the code maker once, tally up all the scores from each round. Whoever earned the most points from correct guesses and from being the code maker wins the game!
  8. Advertisement
Section 4 of 5:

Strategies for Playing Mastermind

PDF download Download Article
  1. Rather than using 4 different colors, stick to a single color to narrow down your options right away. That way, you can see how many pegs of a certain color are in actual code or eliminate colors from the code completely.[8]
    • Example: If you guess 4 yellows and receive 1 red, you know that there’s only 1 yellow peg in the final code.
  2. Use 2 pegs of one color and 2 pegs of another color in your guess. Since there are only 6 colors in a standard game, you could try out all of the colors with your first 3 guesses to see which ones are present in the code and which ones are absent.
    • Example: If you guess Red-Red-Blue-Blue and receive 0 key pegs, then you know red and blue does not appear at all in the actual code.
  3. All of your guesses stay on the board, so you can easily look back to see what you’ve already tried. Take a moment to look at your previous guesses, and try to make a logical guess for your next one.
    • Example: If you guessed 4 blue and got 1 red peg, place 1 Blue as the first peg and 3 of a different color for your second guess. That way, you can check if the Blue is in the correct position and see if another color is present in the code.
  4. Advertisement
Section 5 of 5:

Mastermind Variations

PDF download Download Article
  1. Rather than a colored peg in each hole, you can now leave 1 or more open spots in the code. When the codebreaker leaves an empty spot in their guess, place a white key peg if the empty space is in the wrong position or a red key peg if it’s in the right spot.
  2. Some players may get stuck thinking through their guesses, and it could slow the game down. If you want to keep the game quick between rounds, set a 2- or 3-minute timer for each guess to keep the game moving.
  3. If you try out the game, use numbers instead of colors. Have the code maker secretly write down a code on a sheet of paper. On a different sheet, have the codebreaker write down their guesses. Instead of key pegs, mark an O for the right number in the wrong position or an X for the right number in the correct position.
    • The pen and paper version of Mastermind is sometimes called “Bulls and Cows.”
  4. If you’re a Wordle fan and want to play your own version, use a 4-letter word to make your code. When someone makes a guess, it has to be a real word. Mark which letters are in the correct position and which ones need to be moved around until the codebreaker solves the word.
  5. Advertisement


Community Q&A

Search
Add New Question
  • Question
    How many guesses do I get?
    Community Answer
    Community Answer
    Many. The strategy proposed as methodical is maybe easy, but needs a large number of guesses. Donald Knuth has described an optimal strategy in his paper, "The Computer as a Master Mind." His first question is "Blue Blue Red Red" and he always wins within 5 rounds.
  • Question
    What are the holes on the other side of the board used for?
    Technist
    Technist
    Community Answer
    They're for the code maker to set the code so that she won't forget it (or cheat by changing the code in her head).
  • Question
    What are the pegs on the left side of the board used for? They aren’t used in any example picture or explained?
    Best Soup Mix of the '70s
    Best Soup Mix of the '70s
    Community Answer
    The strip of holes on the other side are for keeping track of who won each game. You can play a bunch of games in a row and see who did best overall.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Advertisement

About This Article

Deon Voss
Co-authored by:
Board Game Expert
This article was co-authored by Deon Voss and by wikiHow staff writer, Hunter Rising. Deon Voss is a Board Game Expert based in Galesburg, Michigan. He is the owner and operator of Voss Media Board Game Cafe, Southwest Michigan's first Board Game Cafe. They have the largest selection of board games in the region. Through his business, he is trying to build the best board gaming community in the world, an interactive cafe that is forging community through games. In addition to tabletop board gaming, the cafe hosts meet-ups for group gaming, Dungeons & Dragons, Pathfinder, Pokemon, trivia, and Magic the Gathering. It’s a welcoming place for family and friends to reconnect through tabletop board gaming. They have over 2200 board games in-house with unique board gaming tables, and offer daily, monthly, or yearly memberships for avid gamers. Deon created Voss Media in the hope that it would become the community’s family-friendly game destination. This article has been viewed 438,488 times.
How helpful is this?
Co-authors: 21
Updated: February 23, 2026
Views: 438,488
Article SummaryX

Mastermind is a code-breaking puzzle game played by two players, although you can also play it online against a computer. The goal of the game is for the codebreaker to crack the mastermind’s code by using a combination of deductive reasoning, and trial and error. The game is played on a Mastermind board, which has 10 rows on it. In each row, there are 4 slots for the codebreaker to place their guesses. Next to each set of 4 slots, there are 4 smaller slots for the mastermind to place their feedback for each guess. To start, one player is the mastermind and the other player is the codebreaker. The codebreaker closes their eyes or leaves the room, and the mastermind creates the secret code by putting 4 colored balls in any order on the top row. You can only use each color once to make your code. Then, the mastermind covers it up with the board’s top cover. The codebreaker returns and starts on the bottom row. They can place any of the 6-8 colored balls in any order to make their initial guess. Next, the mastermind provides feedback on their guesses by putting 4 black or white balls in the smaller openings at the end of the row. If the mastermind places a white ball down, it means you placed a correct color in the wrong position. If they place a black ball in one of the slots, you put a correct color in the correct position. This means that if you have 2 of the colored balls in the correct sequence, you will get 2 black balls. If you have 2 colored balls in the right order and 2 of the other colors are correct but misplaced, you will get 2 black and 2 white balls. Keep in mind, the order of the mastermind’s feedback does not match the order of the balls on the board. So just because the mastermind placed a black ball in the first slot, it does not necessarily mean that the codebreaker’s first ball is correct. After the mastermind provides their feedback, the codebreaker uses the next row to make their next set of guesses based on the feedback from the last row. Keep repeating this process by laying colored balls down and placing feedback next to each guess. If the codebreaker gets the sequence right before 9 turns are over, they win the round. If they can’t get it right in 9 guesses, the mastermind wins the round and reveals the code at the top. Once the first round ends, the mastermind and codebreaker switch roles. You can see who can win the most rounds, or play the best out of 3 rounds to complete a game. You can make the game easier by only using 4 colored balls, or by placing the feedback balls in the same order as the colored balls so that a black peg in the first slot means the codebreaker’s first guess was correct. You can make the game more challenging by allowing the mastermind to repeat colors in their code, or by using more colors to play the game. For a few great strategies you can use, read on!

Did this summary help you?

Thanks to all authors for creating a page that has been read 438,488 times.

Reader Success Stories

  • Anonymous

    Anonymous

    Dec 8, 2018

    "Thanks a lot. Very helpful, clearly organised and understandable. I like the strategies, too."
    Rated this article:
Share your story

Did this article help you?

Advertisement