next up previous
Next: MasterMind: the problem Up: Finding a needle in Previous: Finding a needle in


MasterMind, the game

MasterMind is a commercial version of an old game called ``bulls and cows'', in which two players, the codemaker and the codebreaker match their wits. The codemaker lays out a secret combination of colored pegs, which is hidden from the sight of the codebreaker. The codebreaker, drawing also pegs from a set, makes a guess at what the hidden combination looks like, and is answered by the codemaker with a black pin (which was traditionally called ``bull'') for each colored peg that is in the correct position and with the right color, and with a white pin (``cow'') for each peg with the correct color, but with a different position. This is shown in figure 1

Figure: In the top row, a length-6 hidden combination using 6 colors. Classical MasterMind uses combinations of length 4. On the bottom row, an example of a guess for that same combination, and the answer given by the codemaker: 3 black pins for the 2 pink pegs and the red one which are correctly placed, and the white pins for the green and light blue which are misplaced.
\begin{figure}
\vspace{0.3cm}
{ \psfig{figure=hidden.ps,width=2.2in}\psfig{figure=answer.ps,width=3in}}
\vspace{1in}
\vspace{0.3cm}
\end{figure}

The codebreaker is allowed to make a maximum number of guesses, after which the codemaker has won; if he can find the combination before that maximal number, he scores as many points as guesses. In a tournament, the winner is the one that has accumulated less guesses.

Actually, the old british game ``bulls and cows'' was somewhat different from MasterMind. It was played on paper, not on a board, all the secret digits must be different, and digits from 0 to 9 are allowed [1].


next up previous
Next: MasterMind: the problem Up: Finding a needle in Previous: Finding a needle in

1999-06-23