![cover image](https://wikiwandv2-19431.kxcdn.com/_next/image?url=https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/NimGame.svg/640px-NimGame.svg.png&w=640&q=50)
Nim
Game of strategy / From Wikipedia, the free encyclopedia
This article is about the mathematical game of strategy. For the programming language, see Nim (programming language). For other uses, see Nim (disambiguation).
Nim is a mathematical game of strategy in which two players take turns removing (or "nimming") objects from distinct heaps or piles. On each turn, a player must remove at least one object, and may remove any number of objects provided they all come from the same heap or pile. Depending on the version being played, the goal of the game is either to avoid taking the last object or to take the last object.
Quick Facts Genres, Players ...
![]() Matches set up in rows for a game of Nim. Players take turns to choose a row and remove any number of matches from it. | |
Genres | |
---|---|
Players | 2 |
Chance | None |
Close
Nim is fundamental to the Sprague–Grundy theorem, which essentially says that every impartial game is equivalent to a nim game with a single pile.