Invented in China, Nim (meaning "to take") is played by children on small pieces of paper or by adults using coins. In 1902 it was given the name Nim by Harvard mathematician Charles Bouton, who published a full analysis of the game. Nim was also analyzed in W.W. Rouse Ball's Mathematical Recreations and Essays where the author describes every position as 'safe' or 'unsafe'. A player in a 'safe' position can only move to an 'unsafe' position, regardless of how many pieces he removes on his turn. On the other hand, an 'unsafe' player can always move to a 'safe' or 'unsafe' position on his turn. Thus, a player can easily move from an 'unsafe'position to a 'safe' position and defeat the other player.

The Board

Any flat surface.

The Pieces

A supply of counters such as matchsticks or drawing pins.


To move: Remove at least one counter on your turn.

To win: To remove the last counter.

In this game counters are arranged randomly in several heaps. Each player removes counters from one of the piles. The player must remove at least one counter from a pile. The game continues until all the counters are removed. The person to remove the last counter is the winner.





All games

All puzzles