From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
WikiProject Games (Rated C-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Games, a collaborative effort to improve the coverage of game related topics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
Checklist icon
 Low  This article has been rated as Low-importance on the project's importance scale.

Old posts[edit]

Nim is now used as a simple illustration of the Sprague-Grundy theorem.

A version of this game is played in Alain Resnais' movie L'année dernière à Marienbad.

A typical normal game starts with heaps of 3, 4 and 5:

A B C           (Heaps A, B, and C)
3 4 5           I take 2 from A
1 4 5           You take 3 from C
1 4 2           I take 1 from B
1 3 2           You take 1 from B
1 2 2           I take entire C heap
2 2 0           You take 1 from A
1 2 0           I take 1 from B (In the misere game I would take the entire 2 heap)
1 1 0           You take 1 from B
1 0 0           I take the last 1 and win.

Error in heap A. why is there a 2? Should be 1.

quote: " Now here, C was the one we artificially subtracted from, so we have to pick another one. You can think of it as that we pretend you took one from another stack, say A.

1 2 0   011   I take one from B
1 1 0   000   You take one from B
1 0 0   001   I take one from A, and I win.

But you see, since A was our artificial stack, it still looks like 1,0,0, and they have to make the last move "

But, if in the 1 1 0 situation, which is actually a 2 1 0 situation, You can take the two from A, and leaving a -1 1 0 situation, which is a 0 1 0, and I loose.


I have rewritten the mathematical part of the article, and deleted most of the material on strategy, because it was (IMO, anyway) disorganized, confusing, didn't contain any information (all the painfully constructed "winning patterns" there are simply special cases of the general Bouton's characterization), and sometimes incorrect (why the hell was Ling Kah Jai credited for a well-known 100 years old result?). Nevertheless, in case somebody decides to reintroduced bits of the text, here it is. -- EJ 9 July 2005 17:12 (UTC)

I've put the text from the old version of the article that was once here on the subpage /Deleted text. 4pq1injbok 19:33, 30 July 2005 (UTC)

I've rewritten much of the explanatory material to be more explanatory and correct, especially the relation to combinatorial game theory. The mathematical part got minor edits, mostly to make the stuff consistent.--Dan Hoey 19:33, 26 October 2005 (UTC)

Dan, while most of your edits here are certainly valuable, please don't attempt to link every word in the article. It clutters the text, distracts the readers, and serves no useful purpose. As a general rule, it usually suffices to link to a particular page only once. Thanks. -- EJ 03:49, 18 December 2005 (UTC)

Last move game[edit]

Does the name last move game for normal Nim actually have any currency? 4pq1injbok 06:30, 24 July 2005 (UTC)

I don't know if last move game or last stone game is really used, so I deleted it. Anyone who wants it back should say something more specific than asserting that it is used in some regions.--Dan Hoey 19:28, 26 October 2005 (UTC)

Linking blindly to a binary[edit]

It is extremely unsafe to link toa binary from an untrusted source the way you are doing it. The program isn't that great, so I don't see why we are linking to it in the first place.

Yet another variation...[edit]

For those who have the latest version of Enigma, take a look in Enigma level pack 2, level 16 (Enignimm). The thing is, you'll have to play and win two games to access the Oxyd stones locked away but there is only one heap! The first heap has 13 blocks and the second has 16. I don't think I can calculate the Nim-sum because it now has four binary digits. The only way I ever won this game is nearly by chance. In the first heap, the computer starts first, but in the second, you get to start first. What's the process of calculation?

[Later after examining code of level...]

I just found the solution. Basically, you have to use the correct subtractand so that you can get 13, 9 and 5 blocks remaining(These numbers are what makes the computer take away (random number between 1 to 3) blocks). By using the correct subtractand to get the numbers I explained, you can win both games and unlock the door to the Oxyd stones and complete the level. Again I ask, what's the process of "calculating" this? --Bruin_rrss23 (talk) 11:29, 18 January 2007 (UTC)

Appearance in popular culture[edit]

Uh, I'm not sure what the "standard" title for a section about cultural references to stuff is, so I'm not going to add it to the article, but I thought it might be of interest that this game appears in the GBA version (and possibly the PSX version, though probably not the Super Nintendo version) of Tales of Phantasia. It is the "subtraction game" variant. If you need a reference, you could probably use one of the entries at Gamefaqs.

which player will win[edit]

"there is an easily-calculated way to determine which player will win " -- assuming this player doesn't screw up. jnestorius(talk) 22:05, 10 April 2007 (UTC)


Talking about this version: [1]. Someone should insert a "rules" section before the "illustration" section.

Also, this sentence in the illustration section makes no sense: "In order to win always leave an even number of 1's, 2's, and 4's." It doesn't make sense as a win condition, because the player who did that didn't win. It also doesn't work as a winning strategy, because the player who did it lost. -- 04:36, 20 September 2007 (UTC)

New external link: nim developed in AJAX[edit]

After i read i don't know if i can add the following external link [very_simple_game] where, using AJAX techniques, I developed a program to free play at "nim" in the variant "who is getting the last element loses". There are 8 schemas, at growing difficult level. The solver server-side algorithm, was developed in PHP and it is of kind recursive reduction with sorted cached. Sorry for my bad english, my natural language is Italian. Thanks, MacApp.--MacApp (talk) 12:09, 17 March 2008 (UTC)

Computer version[edit]

In 1979-80, I acquired a number of games playable on the TRS-80 Model I microcomputer. One was "Android Nim". In this version, 18 androids are displayed on the screen, eight in the top row, six in the middle, four in the bottom. The left-most android of each row has a "ray gun", and on instruction of the player (computer user versus the computer), one of the armed androids inspects its line to see if there are enough androids to take out as per the quantity indicated by the player. After confirming this, the android nods at the screen and raises its ray gun. The androids all turn their heads to look at the android with the ray gun raised. The ray gun fires, "dissolving" the number of androids required. The next player then selects which row and how many.

If the computer user wins, the computer sometimes tries in vain to ask an android to destroy androids it does not have, and the armed android shakes its head. When the user's winning move is completed, the computer selects a half-dozen adjectives from a program list that generally describes the incredulity of the computer that the user has won.

The computer then asks if another game is desired.

I can only play it if I fire up my old Model IV computer (vintage 1984) in Model III mode, but I'm not certain if I still have readable floppy discs to do it. A version of this game true to this version, but usable on modern IBM compatibles with Windows, would be welcome! GBC (talk) 06:26, 3 August 2008 (UTC)


The name is probably derived from German nimm! meaning "take!"

Why the exclamation marks? Does the word "nimm" mean something different without it? -- Smjg (talk) 08:43, 15 October 2009 (UTC) The exclamation mark is to underline that it is an imperative. Take! is different from Take (at least in English) — Preceding unsigned comment added by (talk) 13:26, 21 February 2012 (UTC)

I added the 100 game[edit]

Hello, I added this "100 game" which I once saw in a TV show and which kept me mumbling for a whole day... (talk) 14:00, 21 February 2012 (UTC)

PAwn Duel/Northcott's Nim[edit]

There was an article called "Pawn duel". There was no reference to that name being used, except a website that plays the game. I renamed it Northcott's Nim, but that isn't quite accurate either (no first move restriction). What do you think about that article being merged into this one? Bubba73 You talkin' to me? 15:58, 21 August 2012 (UTC)

On second thought, I think I'll prod that article because of a lack of references and notability. Bubba73 You talkin' to me? 20:41, 21 August 2012 (UTC)

Is it just me?[edit]

Sorry, but the Strategy does not make sense (at least to me). If there are only 1 in each of 3 heaps then the strategy elucidated here would lead one to remove one item (which is also the only legal move) and would leave a Nim sum of 0. This of course results in the current player loosing, when the other player removes one, despite the fact that this strategy is supposed to guarantee a win. So either I have misunderstood something, or the strategy needs further explanation. — Preceding unsigned comment added by (talk) 01:32, 4 January 2013 (UTC)
If you are playing "normal" game (the last player who takes wins) then you're guaranteed to win because you take the last item. If you are playing "misère" game (the last player who takes loses) then you obviously have to invert your strategy. But starting from your example, you can only lose.-- (talk) 15:47, 17 July 2013 (UTC)

Not just you[edit]

It appears the strategy is incomplete. 1 xor 1 xor 1 is indeed 1, but it is also a winning strategy. 1 xor 1 is indeed 0, but it is a losing strategy. So it seems when every heap is size 1 then you need the nim sum to be 1 instead of zero. (talk) 10:32, 30 August 2015 (UTC) Some examples:

3,3 is a winning combination with nimsum=0

2,2 is a winning combination with nimsum=0

1,1 is a losing combination with nimsum=0

1,1,1 is a winning combination with nimsum=1 (talk) 03:54, 31 August 2015 (UTC)

This is for the normal game, not the Misère game. — Preceding unsigned comment added by (talk) 11:36, 16 June 2018 (UTC)

Nim sum[edit]

Not being dim: can 'nim sum' be better sum-med up(given that the text says 'any number' of items can be removed)? (talk) 15:28, 11 February 2016 (UTC)