Mastermind (board game)

Template:Infobox Game Mastermind is a simple code-breaking board game for two players, invented in 1970 by Mordecai Meirowitz, an Israeli postmaster.

The game is played using:

  • a decoding board, with a shield at one end covering a row of four large holes, and ten additional rows containing four large holes next to a set of four small holes;
  • code pegs of six different colors, with round heads, which will be placed in the large holes on the board; and
  • key pegs, some colored, some white, which are flat-headed and smaller than the code pegs; they will be placed in the small holes on the board.

The two players decide in advance how many games they will play, which must be an even number. One player becomes the codemaker, the other the codebreaker. The codemaker chooses a pattern of four code pegs. Duplicates are allowed, i.e. the player could even choose four code pegs of the same color. The chosen pattern is placed in the four holes covered by the shield, visible to the codemaker but not to the codebreaker.

The codebreaker tries to guess the pattern, in both order and color, within ten turns. Each guess is made by placing a row of code pegs on the decoding board. Once placed, the codemaker provides feedback by placing from zero to four key pegs in the small holes of the row with the guess. A colored key peg is placed for each code peg from the guess which is correct in both color and position; a white peg indicates the existence of a correct color peg placed in the wrong position. Once feedback is provided, another guess is made; guesses and feedback continue to alternate until either the codebreaker guesses correctly, or ten incorrect guesses are made.

The codemaker gets one point for each guess a codebreaker makes. The winner is the one who has the most points after the agreed-upon number of games are played.

In 1977, Donald Knuth demonstrated that the codebreaker can solve the pattern in five moves or less, using an algorithm that progressively reduced the number of possible patterns. Subsequent mathematicians have been finding various algorithms that reduce the average number of turns needed to solve the pattern: in 1993, Kenji Koyama and Tony W. Lai found a method that required an average of 4.340 turns to solve, with a worst case scenario of six turns.

Since 1971, the rights to Mastermind have been held by Invicta Plastics of Leicester, England. They originally manufactured it themselves, though they have since licensed its manufacture to Hasbro in most of the world, and two other manufacturers who have the United States and Israel manufacturing rights.

Computer and Internet versions of the game have also been made, sometimes with variations in the number and type of pieces involved. It can also be played with paper and pencil.

Solving the game

Here is a simple brute-force greedy algorithm to solve the game:

Given previous guesses and its results (if any):

  1. Calculate all possible secret combinations (secret combinations which don't conflict with the results of previous guesses), given previous guesses and their results. If there are no previous guesses, then all secret combinations are possible.
  2. If number of possible secret combinations calculated in last step is:
    • ... 0, then all secret combinations are impossible (all secret combinations conflict with the results of previous guesses), hence there's no solution to the puzzle. If this situation is reached, then either the puzzle, guesses, or both were invalid.
    • ... 1, then there's only one secret combination possible, which must be the answer to the puzzle. Enter the secret combination and win.
    • ... greater than 1, then find a guess which will reduce the amount of possible secret combinations to a number as close as possible to the lowest possible (1, that is), given any results of this guess. Enter this guess and return to step 1. For example, one could use a guess which will yield the highest number of different results if applied to all possible secret combinations, or maybe a guess, where the mean and standard deviation of the frequency of the results is the lowest, etc.

External links

es:Mastermind fr:Mastermind ja:マスターマインド nl:Mastermind

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools