Two Piles of Stones

  • Medium
  • Game strategy puzzles
  • Tests: Finding the position you want to hand over

The puzzle

Two piles hold 7 and 4 stones. Players alternate, and a move is to take any number of stones - at least one - from a single pile. Whoever takes the last stone wins.

You move first. Can you force a win, and what is your move?

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

What is the one position you would hate to be handed?

Hint 2

Equal piles are special. Try to see why.

Show the answer Hide the answer

Yes. Take 3 from the pile of 7, leaving 4 and 4, then mirror every move your opponent makes in the other pile.

How to get there

Equal piles are a loss for whoever must move: anything they do to one pile you copy in the other, so you always have a reply and they run out first.

From 7 and 4 you can reach 4 and 4 in one move by taking three.

After that, mirror. The piles stay equal after each of your turns and shrink to 0 and 0 on your move, so you take the last stone.

The technique worth keeping

Look for a symmetry you can restore every turn. A mirroring strategy guarantees you always have a legal reply, which is exactly what "the other player runs out first" means.