Skip to content
kawu

How to Play Nim

Nim is the oldest mathematical game and the one every other combinatorial game is measured against. Simple to play, fully understood, and still a good test of nerve against someone who knows the trick.

The rules

  1. Several heaps of counters (kawu deals 3, 4 or 5 heaps of up to seven).
  2. On your turn take one or more counters from a single heap; you may take the whole heap.
  3. Normal play: whoever takes the last counter wins. Misère: whoever takes the last counter loses.

Playing on kawu

Next, read the Nim strategy.

Frequently asked questions

Is Nim solved?

Yes, completely. Charles Bouton proved in 1901 that the player to move wins exactly when the nim-sum (the exclusive-or of the heap sizes) is not zero, and showed how to find the winning move. The hard computer plays that strategy.

What is misère Nim?

The same game, except that taking the last counter loses. The strategy is identical until only heaps of one remain; then you leave an odd number of them.

Last updated 2026-10-20

Play Nim now →Nim strategy