Nim is a mathematical combinatorial game 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.
Key facts
- Game.name
- Nim
- Game.image
- NimGame.svg
- Game.caption
- 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.
- Game.players
- 2
- Game.random_chance
- None
via Wikipedia infobox
Wikidata facts
- Image
- NimGame.svg
Show 3 more facts
- Commons category
- Nim (game)
- minimum number of players
- 2
- maximum number of players
- 2
Sources (1)
via Wikidata · CC0
~22 min read
Article
22 sectionsContents
- History
- Game play and illustration
- Winning positions
- Mathematical theory
- Proof of the winning formula
- Variations
- The subtraction game
- The 21 game
- The 100 game
- A multiple-heap rule
- Circular nim
- Grundy's game
- Greedy nim
- Index-''k'' nim
- Building nim
- Higher-dimensional nim
- Graph nim
- Candy nim
- See also
- References
- Further reading
- External links
Nim is a mathematical combinatorial game 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.
Nim is fundamental to the Sprague–Grundy theorem, which essentially says that every impartial game is equivalent (when regarded as a subgame of a larger impartial game) to a nim game with a single pile.