Nim is a simple game for two persons. It can be played everywhere without preparations because no special material is needed — some coins, matches, pebbles, or similar pieces are sufficient.
The playing pieces are arranged in – two or more – heaps.
The players alternate their moves.
A move consists of removing one or more pieces of one of the heaps.
The game is won by the player who takes the last piece.
(In an alternative rule, the "misere" variation, that player loses who is forced to take the last piece.)
Since the winning strategy, i.e., the best moves in each situation, are well-known and can be (relatively) easily described, playing the game for entertainment is only possible when both players do not know this strategy.