Nim

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Nim is a simple game used for examples in combinatorial game theory. The rules of nim are simple:

  1. The game begins with some piles of counters.
  2. Players alternate turns.
  3. On a turn, a player takes counters from a pile. At least one counter must be taken. All counters must be in the same pile.
  4. If a player cannot take a counter, that player loses.

There is a simple mathematical strategy to play the game perfectly. If both players play perfectly, the winner is determined by the initial setup.

Other websites[change | change source]