Software:Mastermind (board game)
A completed game of Mastermind | |
Designer(s) | Mordecai Meirowitz |
---|---|
Years active | 1970 to present |
Genre(s) | Board game Paper & pencil game [root] |
Players | 2 |
Setup time | < 5 minutes |
Playing time | 10–30 minutes |
Random chance | Negligible |
Age range | 8 and up |
Mastermind or Master Mind (Template:He) is a code-breaking game for two players invented in Israel.[1][2] It resembles an earlier pencil and paper game called Bulls and Cows that may date back a century.
History
Mastermind was invented in 1970 by Mordecai Meirowitz, an Israeli postmaster and telecommunications expert. After presenting the idea to major toy companies and showing it at the Nuremberg International Toy Fair, it was picked up by a plastics company, Invicta Plastics, based near Leicester, United Kingdom . Invicta purchased all the rights to the game and the founder, Edward Jones-Fenleigh, refined the game further. It was released in 1971–2.[1][2][3]
The game is based on a paper-based game called Bulls and Cows. A computer adaptation was run in the 1960s on Cambridge University’s Titan computer system, where it was called 'MOO'. This version was written by Frank King. There was also another version for the TSS/8 time sharing system, written by J.S. Felton and finally a version for the Multics system at MIT by Jerrold Grochow.[4]
Since 1971, the rights to Mastermind have been held by Invicta Plastics. (Invicta always named the game Master Mind.) They originally manufactured it themselves, though they have since licensed its manufacture to Hasbro worldwide, with the exception of Pressman Toys and Orda Industries who have the manufacturing rights to the United States and Israel, respectively.[5] Chieftain Products acquired the rights to manufacture in Canada in 1972, though they went out of business in 1996.
Starting in 1973, the game box featured a photograph of a man in a suit jacket seated in the foreground, with a young Asian woman standing behind him. The two amateur models (Bill Woodward and Cecilia Fung) reunited in June 2003 to pose for another publicity photo.[6]
Gameplay and rules
The game is played using:
- a decoding board, with a shield at one end covering a row of four large holes, and twelve (or ten, or eight, or six) additional rows containing four large holes next to a set of four small holes;
- code pegs of six different colors (or more; see Variations below), with round heads, which will be placed in the large holes on the board; and
- key pegs, some colored (red in the image, though often black) and 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.[7]:120 The codemaker chooses a pattern of four code pegs. Players decide in advance whether duplicates and blanks are allowed. If so, the codemaker may choose up to four same-colored code pegs or four blanks. If blanks are not allowed in the code, the codebreaker may not use blanks in their guesses. The codemaker places the chosen pattern in the four holes covered by the shield, visible to the codemaker but not to the codebreaker.[8]
The codebreaker tries to guess the pattern, in both order and color, within eight to twelve turns. Each guess is made by placing a row of code pegs on the decoding board.[7]:120 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 key peg indicates the existence of a correct color code peg placed in the wrong position.[9]
If there are duplicate colors in the guess, they cannot all be awarded a key peg unless they correspond to the same number of duplicate colors in the hidden code. For example, if the hidden code is red-red-blue-blue and the player guesses red-red-red-blue, the codemaker will award two colored key pegs for the two correct reds, nothing for the third red as there is not a third red in the code, and a colored key peg for the blue. No indication is given of the fact that the code also includes a second blue.[10]
Once feedback is provided, another guess is made; guesses and feedback continue to alternate until either the codebreaker guesses correctly, or all rows on the decoding board are full.
Traditionally, players can only earn points when playing as the codemaker. The codemaker gets one point for each guess the codebreaker makes. An extra point is earned by the codemaker if the codebreaker is unable to guess the exact pattern within the given number of turns. (An alternative is to score based on the number of key pegs placed.) The winner is the one who has the most points after the agreed-upon number of games are played.
Other rules may be specified.[11]
Algorithms and strategies
Before asking for a best strategy of the codebreaker one has to define what is the meaning of "best": The minimal number of moves can be analyzed under the conditions of worst and average case and in the sense of a minimax value of a zero-sum game in game theory.
Best strategies with four holes and six colors
With four holes and six colors, there are 64 = 1,296 different patterns (allowing duplicate colors but not blanks).
Worst case: Five-guess algorithm
In 1977, Donald Knuth demonstrated that the codebreaker can solve the pattern in five moves or fewer, using an algorithm that progressively reduces the number of possible patterns.[12] Described using the numbers 1–6 to represent the 6 colors of the code pegs, the algorithm works as follows:
- Create the set S of 1,296 possible codes {1111, 1112, ... 6665, 6666}.
- Start with initial guess 1122. (Knuth gives examples showing that this algorithm using first guesses other than "two pair"; such as 1111, 1112, 1123, or 1234; does not win in five tries on every code.)
- Play the guess to get a response of colored and white key pegs.
- If the response is four colored key pegs, the game is won, the algorithm terminates.
- Otherwise, remove from S any code that would not give that response of colored and white pegs.
- The next guess is chosen by the minimax technique, which chooses a guess that has the least worst response score. In this case, a response to a guess is some number of colored and white key pegs, and the score of such a response is defined to be the number of codes in S that are still possible even after the response is known. The score of a guess is pessimistically defined to be the worst (maximum) of all its response scores. From the set of guesses with the best (minimum) guess score, select one as the next guess, choosing a code from S whenever possible. (Within these constraints, Knuth follows the convention of choosing the guess with the least numeric value; e.g., 2345 is lower than 3456. Knuth also gives an example showing that in some cases no code from S will be among the best scoring guesses and thus the guess cannot win on the next turn, yet will be necessary to assure a win in five.)
- Repeat from step 3.
Average case
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 performed an exhaustive depth-first search showing that the optimal method for solving a random code could achieve an average of 5,625/1,296 = 4.3403 turns to solve, with a worst-case scenario of six turns.[13]
Minimax value of game theory
The minimax value in the sense of game theory is 5,600/1,290 = 4.3411. The minimax strategy of the codemaker consists in a uniformly distributed selection of one of the 1,290 patterns with two or more colors.[14]
Genetic algorithm
A new algorithm with an embedded genetic algorithm, where a large set of eligible codes is collected throughout the different generations. The quality of each of these codes is determined based on a comparison with a selection of elements of the eligible set.[15][16] This algorithm is based on a heuristic that assigns a score to each eligible combination based on its probability of actually being the hidden combination. Since this combination is not known, the score is based on characteristics of the set of eligible solutions or the sample of them found by the evolutionary algorithm.
The algorithm works as follows, with P = length of the solution used in the game, X1 = exact matches ("red pins") and Y1 = near matches ("white pins"):
- Set i = 1
- Play fixed initial guess G1
- Get the response X1 and Y1
- Repeat while Xi ≠ P:
- Increment i
- Set Ei = ∅ and h = 1
- Initialize population
- Repeat while h ≤ maxgen and |Ei| ≤ maxsize:
- Generate new population using crossover, mutation, inversion and permutation
- Calculate fitness
- Add eligible combinations to Ei
- Increment h
- Play guess Gi which belongs to Ei
- Get response Xi and Yi
Complexity and the satisfiability problem
In November 2004, Michiel de Bondt proved that solving a Mastermind board is an NP-complete problem when played with n pegs per row and two colors, by showing how to represent any one-in-three 3SAT problem in it. He also showed the same for Consistent Mastermind (playing the game so that every guess is a candidate for the secret code that is consistent with the hints in the previous guesses).Cite error: Closing </ref>
missing for <ref>
tag[better source needed]
Variations
Varying the number of colors and the number of holes results in a spectrum of Mastermind games of different levels of difficulty. Another common variation is to support different numbers of players taking on the roles of codemaker and codebreaker. The following are some examples of Mastermind games produced by Invicta, Parker Brothers, Pressman, Hasbro, and other game manufacturers:
Game | Year | Colors | Holes | Comments |
---|---|---|---|---|
Mastermind | 1972 | 6 | 4 | Original version |
Bagels[17] | 1972 | 10 digits | 3 | Also played as a word game with 2- or 3-digit numbers |
Royale Mastermind | 1972 | 5 colors × 5 shapes | 3 | |
Mastermind44 | 1972 | 6 | 5 | For four players |
Grand Mastermind | 1974 | 5 colors × 5 shapes | 4 | |
Super Mastermind (a.k.a. Deluxe Mastermind; a.k.a. Advanced Mastermind) | 1972[18] | 8 | 5 | |
Word Mastermind | 1975[lower-alpha 1] | 26 letters | 4 | Only valid words may be used as the pattern and guessed each turn. |
Mini Mastermind | 1976 | 6 | 4 | Travel-sized version; room for only six guesses |
Number Mastermind | 1976 | 6 digits | 4 | Uses numbers instead of colors. The codemaker may optionally give, as an extra clue, the sum of the digits. |
Electronic Mastermind (Invicta) | 1977 | 10 digits | 3, 4, or 5 | Uses numbers instead of colors. Handheld electronic version. Solo or multiple players vs. the computer. Invicta branded. |
Super-Sonic Electronic Mastermind (Invicta) | 1979 | 10 digits | 3, 4, 5, or 6 | Identical gameplay to the 1977 Electronic Mastermind. Super-Sonic version adds a sixth digit to potential codes. Gives an audible signal when the correct code is tried, or the code is revealed via the Fail key. Displays the length of time and number of tries to reach a solution. |
Walt Disney Mastermind | 1978 | 5 | 3 | Uses Disney characters instead of colors |
Mini Mastermind (a.k.a. Travel Mastermind) | 1988 | 6 | 4 | Travel-sized version; room for only six guesses |
Mastermind Challenge | 1993 | 8 | 5 | Both players simultaneously play code maker and code breaker. |
Parker Mastermind | 1993 | 8 | 4 | |
Mastermind for Kids | 1996 | 6 | 3 | Animal theme |
Mastermind Secret Search | 1997 | 26 letters | 3-6 | Valid words only; clues are provided letter-by-letter using up/down arrows for earlier/later in the alphabet. |
Electronic Hand-Held Mastermind (Hasbro) | 1997 | 6 | 4 | Handheld electronic version. Hasbro. |
New Mastermind | 2004 | 8 | 4 | For up to five players |
Mini Mastermind | 2004 | 6 | 4 | Travel-sized self-contained version; room for only eight guesses |
There was also a version called Super Code produced in East Germany by VEB Plasticart.
The difficulty level of any of the above can be increased by treating “empty” as an additional color or decreased by requiring only that the code's colors be guessed, independent of position. In Mini Mastermind the colored code pegs are the same size and shape as the colored or white key pegs so the difficulty can be increased by permitting the key pegs to be used as code pegs for two additional colors.
Computer and Internet versions of the game have also been made, sometimes with variations in the number and type of pieces involved and often under different names to avoid trademark infringement. Mastermind can also be played with paper and pencil. There is a numeral variety of the Mastermind in which a 4-digit number is guessed.[20] The 2021 web game Wordle has been compared to Mastermind.[21]
The game was included in the compilation party video game Clubhouse Games for the Nintendo Switch under the name "Hit & Blow".[22]
Reviews
- Games #3[23]
- Games and Puzzles[24]
- 1980 Games 100 in Games[25]
- 1981 Games 100 in Games
- Games & Puzzles[26]
- The Playboy Winner's Guide to Board Games[27]
- Family Games: The 100 Best[28]
See also
- Israeli inventions and discoveries
- Bulls and Cows – a similar game with numbers
- Jotto - a similar pen and paper word game for two players
- Lingo – a similar TV show
- Wordle – a similar 2021 web game
Explanatory notes
References
- ↑ 1.0 1.1 Nelson, Toby (9 March 2000). "A Brief History of the Master MindTM Board Game". http://www.tnelson.demon.co.uk/mastermind/history.html.
- ↑ 2.0 2.1 "Mastermind Board Game". Board Game Geek. http://boardgamegeek.com/boardgame/2392/mastermind.
- ↑ "Invicta Toys and Games". 12 August 2007. http://dspace.dial.pipex.com/town/road/gbd76/toys.htm.
- ↑ Francis, John (January 2010). "Strategies for playing MOO, or 'Bulls and Cows'". http://www.jfwaf.com/Bulls%20and%20Cows.pdf.
- ↑ "Invicta Toy History page". http://dspace.dial.pipex.com/town/road/gbd76/toys.htm.
- ↑ "Landmark Reunion for Mastermind Box Models". Invicta Plastics. June 2003. http://www.le.ac.uk/press/press/landmarkreunion.html.
- ↑ 7.0 7.1 Fullerton, Tracy (2008). Game design workshop (2 ed.). Morgan Kaufmann Publishers. ISBN 978-0-240-80974-8.
- ↑ "Industrious". http://www.industrious.com/mastermind/gamerules.html.
- ↑ "Wolfram". http://mathworld.wolfram.com/Mastermind.html.
- ↑ "Archimedes". http://www.archimedes-lab.org/mastermind.html.
- ↑ "Bulls and Cows & co.". http://codebreaker-mastermind-superhirn.blogspot.de/2012/07/bulls-and-cows-mastermind-superhirn.html.
- ↑ Knuth, Donald (1976–1977). "The Computer as Master Mind". J. Recr. Math. (9): 1–6. http://www.cs.uni.edu/~wallingf/teaching/cs3530/resources/knuth-mastermind.pdf.
- ↑ Koyama, Kenji; Lai, Tony (1993). "An Optimal Mastermind Strategy". Journal of Recreational Mathematics (25): 230–256.
- ↑ Knuth, Donald (2011). Selected papers on fun and games. Center for the Study of Language and Information. p. 226. ISBN 9781575865843.
- ↑ Berghman, Lotte (2007–2008). "Efficient solutions for Mastermind using genetic algorithms". K.U.Leuven (1): 1–15. https://lirias.kuleuven.be/bitstream/123456789/164803/1/kbi_0806.pdf.
- ↑ Merelo J.J.; Mora A.M.; Cotta C.; Fernández-Leiva A.J. (2013). "Finding an Evolutionary Solution to the Game of Mastermind with Good Scaling Behavior". in Nicosia, G.; Pardalos, P.. Learning and Intelligent Optimization. Lecture Notes in Computer Science. 7997. Springer. pp. 288–293. doi:10.1007/978-3-642-44973-4_31. ISBN 978-3-642-44973-4. https://doi.org/10.1007/978-3-642-44973-4_31. Retrieved 22 December 2021.
- ↑ "Bagels (1972)". https://www.mobygames.com/game/bagels.
- ↑ In Poland - Copyright Invicta 1972 in cooperation with Krajowa Agencja Wydawnicza "BoardGameGeek". https://boardgamegeek.com/image/281994/ultimate-mastermind?size=large.
- ↑ "Vortex Software – Company". The Centre for Computing History. February 26, 2018. http://www.computinghistory.org.uk/det/33087/Vortex-Software/.
- ↑ "Bulls and Cows Classic". http://www.mastermind.idhost.kz/.
- ↑ Pisani, Joseph (31 January 2022). "Wordle Has People Digging Out Old Games. Mastermind or Jotto, Anyone?". Dow Jones & Company, Inc.. https://www.wsj.com/articles/wordle-has-people-digging-out-old-games-mastermind-or-jotto-anyone-11643586137. "Jan. 31, 2022 9:00 am ET Wordle fans are returning to childhood games including Mastermind, which tests players’ logic skills using color codes, similar to what Wordle does with words and letters."
- ↑ "Nintendo Shares A Handy Infographic Featuring All 51 Worldwide Classic Clubhouse Games". 25 May 2020. https://www.nintendolife.com/news/2020/05/nintendo_shares_a_handy_infographic_featuring_all_51_worldwide_classic_clubhouse_games.
- ↑ "GAMES Magazine #3". January 1978. https://archive.org/details/games-3-1978-january/page/48/mode/2up.
- ↑ "Games and Puzzles 1973-04: Iss 12". A H C Publications. April 1973. https://archive.org/details/sim_games-and-puzzles_1973-04_12/page/20/mode/2up.
- ↑ "GAMES Magazine #20". November 1980. https://archive.org/details/games-20-1980-november/page/48/mode/2up.
- ↑ "Games and Puzzles March-April 1974: Iss 23". A H C Publications. March 1974. https://archive.org/details/sim_games-and-puzzles_march-april-1974_23/page/10/mode/2up.
- ↑ "The Playboy winner's guide to board games". 18 November 1979. https://archive.org/details/playboywinnersgu00free/page/156/mode/2up.
- ↑ https://archive.org/details/familygames100be0000unse/page/218/mode/2up
External links
- Mastermind: An augment reality approach, Porting a Legacy Game to New Interaction Paradigm
- Mathworld article on Mastermind
- Optimal Solution Look-Up Table on Mastermind
ru:Быки и коровы