Introduction | Mastermind - Rules of the Game | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Homepage | ||||||||||||||||||||||||||
Fore note: this game requires JavaScript and DynamicHTML. Please make sure your browser has JavaScript enabled. | ||||||||||||||||||||||||||
1. Summary 2. How to play 3. Rules 4. Examples 5. High scores 6. Notes 7. The colour game |
1. SummaryThe goal of Mastermind is to discover a combination of of coloured pegs selected by the computer at random. At each turn, the player chooses a combination of coloured pegs and the computer returns one black dot for each peg on the right position and one white dot for each peg present in the combination in a different position. Then the player chooses a different combination, adding pegs of other colours, switching the order of the coloured pegs, or both. The game continues until the combination is found or the maximum number of turns is reached. This implementation of Mastermind offers three levels of increasing difficulty. From level I to level III, the number of pegs and the number of possible colours increase and also the maximum number of turns.
|
|||||||||||||||||||||||||
1. Summary 2. How to play 3. Rules 4. Examples 5. High scores 6. Notes 7. The colour game |
2. How to play2.1. The game boardAn example of the level I board is shown on the right. The board shows the key pegs on the top; these will be hidden until the end of the game. The game progresses from top to bottom, one turn on each row. In this example, the two rows under the key show the first and second turns and the next row shows the undefined pegs for the third turn. The column on the right shows the results for each turn. |
|||||||||||||||||||||||||
2.2. The game sequenceEach turn is composed of five steps:
If the player hits the key - the number of the black dots is equal to the number of pegs -, the game ends. The key is revealed on top and a green flagis shown on the right. If the combination is not correct and there are empty turns to play, a new row with the symbols appears below the last one. If the maximum number of turns is reached before the key is discovered, the player looses. The key is revealed on top and a red flagis shown on the right. At any instant during the game, if the player clicks an invalid point a yellow warning flagappears on the top right corner of the board. The command "Quit the game" terminates the game at any moment, revealing the key. The command "jogar de novo . play again . jouer à nouveau" starts a new game at the same level. To choose a different level, one should return to the Introduction. To choose a different game one should return to the homepage. |
||||||||||||||||||||||||||
1. Summary 2. How to play 3. Rules 4. Examples 5. High scores 6. Notes 7. The colour game |
3. RulesThe key is a combination of N coloured pegs, chosen from a set of possible colours P, with or without repetition. Each turn is formed by a combination of N coloured pegs, chosen from a set of possible colours P, with or without repetition. On Table 1 the values for N and P are shown for the three levels of the game. After each turn, the computer compares the proposed combination with the key:
|
|||||||||||||||||||||||||
1. Summary 2. How to play 3. Rules 4. Examples 5. High scores 6. Notes 7. The colour game |
4. ExamplesThe illustration of the game is based on Level I examples but the translation to other levels is straightforward. In addition to the illustration of the rules, a crude explanation of a possible reasoning is offered. The sorting of pegs is from left to right: first peg on the left, forth peg on the right.
|
|||||||||||||||||||||||||
4.1. Example of rule application and deduction of the hidden keyLet's assume the following hidden key: |
||||||||||||||||||||||||||
Let's assume the first two turns are as illustrated on the right. Given the key and the turns chosen by the player the computer determines the following:
The analysis the two turns returns:
|
||||||||||||||||||||||||||
Let's assume the third and fourth turns are played as illustrated on the right. Given the key and the turns played, the computer determines the following:
The analysis the two turns returns:
|
||||||||||||||||||||||||||
Let's assume the fifth and sixth turns are played as illustrated on the right. Given the key and the turns played, the computer determines the following:
The analysis of the two turns, combined with the previous four turns returns:
|
||||||||||||||||||||||||||
4.2. Example with deduction of the keyThe table on the right shows another example of deduction. The secret key is revealed on the top line. One possible line of deduction - among the many possible - is presented, leading towards the correct solution:
4.3. NotesThese examples do not intend to "teach you" how to play Mastermind. The goal is to illustrate the rules used by the computer and introduce new players of the game into the typical deductive processes that apply to the game and highlight its differences from the colour game. There was also a concern to show a limited set of hypotheses to explore to help new players understand the rules. Like the colour game, Mastermind depends on chance to some extent but depends much more on the player's deductive skills and experience. A seasoned player recognises the patterns of coloured pegs and corresponding black and white marks and deploys the various possibilities without stating them explicitly peg by beg. It should be emphasised that Mastermind patterns are completely different from the colour game patterns. |
||||||||||||||||||||||||||
1. Summary 2. How to play 3. Rules 4. Examples 5. High scores 6. Notes 7. The colour game |
5. High scoresThis Mastermind implementation offers the possibility of storing the high scores reached on each computer. To this purpose, a cookie is stored on the computer disk. This option is only available in case you allow the use of cookies. It must be emphasised that no information is sent to the server where the game is installed. If you're moving to another browser or to another computer, you will start a new table of high scores. The high score table stores the number of turns to success, the key, your name and the date. The procedure is straightforward: upon success, the computer checks your result with the scores on the board. If you have reached a better result, you are invited to write your name - or any message - up to 44 characters. In case you do not want to record you score you may "Close" this option. When a new score is added to the table, it is shown automatically. To check the current high scores at other times, follow the "High score table" link in the "Introduction" page. The high score table shows the results for each level. From this page it is possible to start a new game on the same level with "jogar de novo . play again . jouer à nouveau", "Reset high scores" on this level or review the tables for the other levels. |
|||||||||||||||||||||||||
1. Summary 2. How to play 3. Rules 4. Examples 5. High scores 6. Notes 7. The colour game |
6. Notes
|
|||||||||||||||||||||||||
1. Summary 2. How to play 3. Rules 4. Examples 5. High scores 6. Notes 7. The colour game |
7. The colour gameThe colour game is my personal variation of Mastermind. The colour game rules are very similar to the Mastermind rules. They differ only in the manner the white pegs (right colour at the wrong location) are computed. This minor change suffices to change deeply the game algorithms and the deduction patterns. Thus, I advise you not to change too often between the two games to minimise the confusion. |
|||||||||||||||||||||||||
Introduction | ||||||||||||||||||||||||||
Homepage | I wish you many pleasant moments with the Mastermind game. In case you have any doubts, remarks or suggestions, feel free to contact me. All messages are welcome. |