Nim is a game of uncertain origins. It is first mentioned by Luca Paccioli, an Italian mathematician in the early sixteenth or late fifteenth century. It is similar to other games worldwide, but multiple independent inventions may be possible, not necessarily the dispersion of a single game.
Rules
Essentially, the game consists of a number of objects in "heaps," and players alternate turns taking any number of objects from one of the heaps. This continues until no objects are left, and the last player to remove an object loses.