# Mastermind

Mastermind is a game played by two players, the codemaker and the codebreaker. The game was invented [Pickover, p. 442] in 1970 by Mordecai Meirowitz, an Israeli postmaster and telecommunications expert. Mainstream game companies all rejected Meirowitz; thus, he published with the small English game company Invita Plastics. The game went on to sell more than 50 million copies, making it the most successful new game of the 1970.

The game begins with the codemaker selecting a code, a sequence of four colors (digits, pegs or other symbols) _{1}, c_{2}, c_{3}, c_{4})_{1}, g_{2}, g_{3}, g_{4})_{k} = g_{k} ,

Mastermind triggered a long stream of research. In 1977, D. Knuth published a strategy that enables a player to always guess the correct code within 5 attempts. In 1993, Kenji Koyama and Tony W. Lai published a strategy with a maximum of 6 guesses required in the worst case scenario, but with an average number of guesses of only 4.340. In 1996, Zhixiang Chen and colleagues generalized previous results to the case of n colors and m positions.

In the applet bellow the number of exact matches is indicated by small red dots, while white dots define the second number. In the real game the codemaker uses small pegs for the same purpose.

When you choose "Continuous response", the small pegs are displayed as soon as you complete one row of the puzzle. In the static variant, computer makes a sequence of (always the same!) moves responses to which clarify the situation completely. All you have to do is to find the right move to solve the puzzle.

What if applet does not run? |

### Reference

- C. Pickover,
*The Math Book*, Sterling Publishing Co., 2009

### Mastermind

- Invitation To Mastermind
- Mastermind: an interactive gizmo
- Computer Mastermind
- Mastermind Variants
- Bulls and Cows
- Vowel Movement
- Thugs and Bowmen

## Related material
| |

## Worst-Case Scenario | |

| |

| |

| |

| |

| |

|Contact| |Front page| |Contents| |Games|

Copyright © 1996-2018 Alexander Bogomolny

71683942