Pupils vs machine
5#Pupils vs Machine
5.3 Teaching Materials
M1
Nim game rules
- Nim is a game played by two people.
- 8 pens are placed in the middle of the table.
- The players take it in turns to remove 1, 2 or 3 pens.
- The last person to remove one or more pens wins.
M2
Instructions for the machine
The machine plays the game according to the following instructions:
- It places the 8 cups (numbered from 1 to 8) in front of itself.
- The cups 3 to 8 are each filled with 3 tokens bearing the numbers 1, 2 and 3.
- Cup 2 is only filled with the tokens bearing the numbers 1 and 2.
- Cup 1 is only filled with the token bearing the number 1.
- When it is the machine’s turn, it counts how many pens are left on the table and takes the corresponding cup. It removes a token at random from the cup, places it in front of the cup and removes the same number of pens as the number on the token.
- When the game is over, there are two possible outcomes: The machine has either won or lost.
-
- If it has won, it takes all of the tokens and puts them back into the corresponding cups;
- if it has lost, it puts all of the tokens back into the corresponding cups, except the last one. That one was clearly bad. The machine puts this token aside and thereby eliminates it from the game.
- The game continues in this way. When a cup is empty and contains no more tokens, it is turned over. If it reaches the point in another game where the machine has to resort to an upturned cup, it gives up the game and applies point ii (all tokens except the last one go back into the cups).