The Last Match Loses

  • Medium
  • Game strategy puzzles
  • Tests: Re-deriving a strategy when the goal flips

The puzzle

Twenty matches lie on a table. Players alternately take one, two or three. Whoever takes the LAST match loses.

You move first. What do you do?

Stuck?

One at a time, smallest first. Open only as many as you need — the whole point of the puzzle is the part you work out yourself.

Hint 1

In the normal game you aim to leave a multiple of four. What should you aim to leave here?

Hint 2

You want your opponent to face exactly one match.

Show the answer Hide the answer

Take 3, leaving 17, then always leave a number that is one more than a multiple of four.

How to get there

You want to hand your opponent 1 match, because they must take it and lose. So 1 is the target to leave.

Working back in fours: 1, 5, 9, 13, 17 are the positions to hand over - from any of them, whatever they take you can restore the next one down.

From 20, take 3 to leave 17. Then answer their k with 4 - k, reaching 13, 9, 5 and 1.

The technique worth keeping

When the winning condition is inverted, re-derive the target rather than adjusting the old answer. Here every safe position shifts by one, which is not something you would guess from the normal game.