Nim
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).

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
- Bouton, C. L.. (1901). Nim, a game in a pile of counters. Annals of Mathematics. Retrieved November 26, 2026, from https://en.wikipedia.org/wiki/Charles_Bouton
- Wikipedia.. (n.d.-a). Nim. Retrieved November 26, 2026, from https://en.wikipedia.org/wiki/Nim_(game)
- Wikipedia.. (n.d.-b). Nim. Retrieved November 26, 2026, from https://en.wikipedia.org/wiki/Nim
Figure Index
- René Hourdry. (2023-03-30). A Nim game exhibit at Saint-Quentin [Photograph]. Wikimedia Commons. Retrieved November 26, 2026, from https://commons.wikimedia.org/wiki/File:Jeu_de_Nim_-_Village_des_métiers_d'antan_de_Saint-Quentin.jpg (CC BY-SA 4.0)
Important Links
- See also on this site: Wythoff's Game, Chomp, Sprouts
- Related on this site: Blind Chess, Mafia (Werewolf), Avalon, The Resistance, Coup, Diplomacy, Risk, Stratego, Mastermind, Set, Dobble, Halli Galli, Uno, Codenames, Taboo, Twister, Jenga, Connect Four, Tic Tac Toe, Battleship, Dots and Boxes, Sprouts, Chomp and Wythoff's Game — the mind, board and card games on this site.