What the topic is about
Games of strategy: two players take turns taking stones from a heap. Work out who wins with the right play, and what the first move must be.
Where it leads
Stone games are a first taste of game theory, where a winning strategy beats a lucky move. Working backwards — finding the losing positions and leading the opponent into them — is used in programming, economics and chess. Thinking several moves ahead becomes natural.
How to solve
- Find the losing positions: from them every move leads to a winning one for the opponent.
- If you may take 1 to k stones, the losing numbers are multiples of k + 1.
- The winner always leaves the opponent a losing position.
A worked example
Stones in a heap: 40. Two players take turns, each turn takes any number of stones from 1 to 2. Whoever takes the last stone loses. Who wins with the right play?
Answer: Player 2
- Whoever gets the last stone loses. Leave your opponent a number of stones that, less one, is divisible by 3.
- 40 − 1 = 13 × 3 + 0
- The remainder is 0: whatever player 1 takes, player 2 makes it up to 3. Player 2 wins.
Typical mistakes
- Trying moves at random instead of working back from the end.
- Playing for the last stone when the rule says the last stone loses.
How to tell it is learnt
- Finds the losing positions by working back from the end.
- Names the first move that leads to a win.
- Explains why the strategy works whatever the other player does.
How to help at home
Play with matches: 15 matches, take 1 to 3. Then share the secret and play again.
A game without a phone
Play with 15 matchsticks: take turns taking 1, 2 or 3, and whoever takes the last one wins. Play a few times and talk about which numbers are good to leave for the other player. The answer is multiples of 4. Then change the rules: take 1 to 4, or whoever takes the last one loses.
Stones in a heap: 6. Two players take turns, each turn takes any number of stones from 1 to 2. Whoever takes the last stone wins. Who wins with the right play?
Answer
Player 2
- Leave your opponent a number of stones divisible by 3: whatever they take, take enough to make 3 together.
- 6 = 2 × 3 + 0
- The remainder is 0: whatever player 1 takes, player 2 makes it up to 3. Player 2 wins.
Stones in a heap: 21. Two players take turns, each turn takes any number of stones from 1 to 3. Whoever takes the last stone wins. How many stones must player 1 take to be sure to win?
Answer
1
- Leave your opponent a number of stones divisible by 4: whatever they take, take enough to make 4 together.
- 21 = 5 × 4 + 1
- Player 1 takes 1 and then makes every move of the other up to 4. Player 1 wins.
Stones in a heap: 27. Two players take turns, each turn takes any number of stones from 1 to 2. Whoever takes the last stone loses. Who wins with the right play?
Answer
Player 1
- Whoever gets the last stone loses. Leave your opponent a number of stones that, less one, is divisible by 3.
- 27 − 1 = 8 × 3 + 2
- Player 1 takes 2 and then makes every move of the other up to 3. Player 1 wins.
Stones in a heap: 14. Two players take turns, each turn takes any number of stones from 1 to 4. Whoever takes the last stone loses. How many stones must player 1 take to be sure to win?
Answer
3
- Whoever gets the last stone loses. Leave your opponent a number of stones that, less one, is divisible by 5.
- 14 − 1 = 2 × 5 + 3
- Player 1 takes 3 and then makes every move of the other up to 5. Player 1 wins.
Stones in a heap: 11. Two players take turns, a turn takes this many stones: 1, 3, 4. Whoever cannot move loses. Who wins with the right play?
Answer
Player 1
- Find the losing positions, where every move leads to a winning one for the opponent: 0, 2, 7, 9.
- 11 is not on the list: player 1 moves so that a number on the list is left. Player 1 wins.
Two heaps of stones: 7 and 9. Two players take turns, a turn takes any number of stones, even all, but from one heap only. Whoever takes the last stone wins. Who wins with the right play?
Answer
Player 1
- The heaps differ: player 1 takes 2 from the bigger one, making them equal, and then copies the other player. Player 1 wins.