Nim

History

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.

A game of Misere Nim is featured in the film, "Last Year at Marienbad". The game started with four nim piles of size 1, 3, 5, and 7.

Rules

There is an arbitrary number of piles (heaps) of counters. Each pile can have a different number of counters.

On their turn, a player selects a pile and removes some number of counters from it.

A player loses when they are unable to make a move, i.e., all piles have been cleared and there are no more counters for the player to remove.

a

In the above example Nim position, the player to move can take either take (1) at least 1 and at most 2 from the first pile, (2) at least 1 and at most 3 from the second pile, (3) at least 1 and at most 5 from the third pile, or (4) at least 1 and at most 7 from the fourth pile.

Variants

References

GamesCrafters

Games

All Games

All Puzzles