Mastermind is a game of logic and reasoning. The objective of the game is to guess a secret code consisting of colored pegs. The secret code is a row of four pegs that may be chosen (with repeats) from the colors red, white, green, blue, yellow, and black. Each guess of the possible secret code is scored to give some information about how close the guess is to the secret code. Specifically, the player who chose the secret code indicates (1) how many of the pegs are of the correct color and in the correct position, and (2) how many of the pegs are of the correct color but in the incorrect position. This information is given in the form of a black marker, or X for (1) and a white marker , or O for (2). The game ends when all positions and colors have been correctly identified, resulting in four black markers. As we will see, this game has several interesting counting problems associated with it.
1. For practice, work in teams of two and try a few practices games to get an idea of how the game works.
2. Now, determine the secret code for the following guesses.
a)
b)
Secret Code: 3. Find a fourth guess whose scoring will allow you to determine the secret code for:
Explain why this guess will lead you to the correct solution. 4. Find the probability that your initial guess in a Mastermind game is correct. 5. What set of 4 or less X's and O's can never occur as Mastermind scores? Explain why. 6. How many different sets of X and O scores are possible ? 7. Consider the simplified game consisting of four pegs each of a different color. (Therefore, there is no repeating. How many secret codes exist now? Develop a complete strategy for playing this game so that you can determine the secret code in the fewest number of guesses.
Secret Code:Guess
Positions
Scoring
1
Green
Yellow
Red
Blue
O O O O
2
Green
Blue
Red
Yellow
O O X X
Guess
Positions
Scoring
1
Blue
Blue
Black
White
O X X
2
Yellow
White
Black
White
X X
3
White
Blue
Red
Green
O X
4
Yellow
Blue
Black
Red
X X
Guess
Positions
Scoring
1
Green
Yellow
Black
Red
X X
2
Yellow
Blue
Green
White
O X
3
Blue
White
Yellow
Yellow
O
4?
The Discrete Mathematics Project