Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Nim
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Game play and illustration == Nim is typically played as a [[misère game]], in which the player to take the last object loses. Nim can also be played as a "normal play" game whereby the player taking the last object wins. In either normal play or a misère game, when there is exactly one heap with at least two objects, the player who takes next can easily win. If this removes either all or all but one objects from the heap that has two or more, then no heaps will have more than one object, so the players are forced to alternate removing exactly one object until the game ends. If the player leaves an even number of non-zero heaps (as the player would do in normal play), the player takes last; if the player leaves an odd number of heaps (as the player would do in misère play), then the other player takes last. The normal game is between two players and is played with three heaps of any number of objects. The two players alternate taking any number of objects from any one of the heaps. The goal is to be the last to take an object. In misère play, the goal is instead to ensure that the opponent is forced to take the last remaining object. The following example of a normal game is played between fictional players [[Bob and Alice]], who start with heaps of three, four and five objects. {| class="wikitable" |- !Heap A !Heap B !Heap C !Move |- | 3 || 4 || 5 || Game begins |- | 1 || 4 || 5 || Bob takes 2 from A |- | 1 || 4 || 2 || Alice takes 3 from C |- | 1 || 3 || 2 || Bob takes 1 from B |- | 1 || 2 || 2 || Alice takes 1 from B |- | 0 || 2 || 2 || Bob takes entire A heap, leaving two 2s |- | 0 || 1 || 2 || Alice takes 1 from B |- | 0 || 1 || 1 || Bob takes 1 from C leaving two 1s. (''In misère play he would take 2 from C leaving [0, 1, 0]'') |- | 0 || 0 || 1 || Alice takes 1 from B |- | 0 || 0 || 0 || Bob takes entire C heap and wins |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)