Nim

≈ 2 min read

Basic Information

Nim is the mathematical take-away game: players alternately remove any positive number of counters from one of several heaps; the player taking the last counter wins (normal play) or loses (misère); the winning strategy uses the nim-sum (XOR) of heap sizes — solved by Charles Bouton in 1901. Within the mind, board and card games on this site, its closest relatives are Wythoff's Game, Chomp, Sprouts; the related pages are listed under Important Links (Bouton, C. L, 1901).

A Nim game exhibit at Saint-Quentin

Figure: René Hourdry. (2023-03-30). A Nim game exhibit at Saint-Quentin [Photograph]. Wikimedia Commons. CC BY-SA 4.0. https://commons.wikimedia.org/wiki/File:Jeu_de_Nim_-_Village_des_métiers_d'antan_de_Saint-Quentin.jpg

Rules

Several heaps of counters; a move takes 1+ from exactly one heap; normal or misère convention; the nim-sum (binary XOR) of heap sizes = 0 is the losing (P) position; Bouton's 1901 theorem gives perfect play (Bouton, C. L, 1901).

History

Nim's name and rules were the game is ancient (a Chinese ancestor, 'tsyan shid', is documented); Charles Bouton solved it mathematically in 1901 ('Nim, a game in a pile of—'); the Saint-Quentin 'village des métiers d'antan' photo shows a nim exhibit (Wikipedia, n.d.-a).

Sources

Figure Index