Sorry, this page isn't maintained anymore. There are better Nim pages now.
Probably a lot more than you care to know
about...
The Game of Nim
On-line Play
The Web offers a great variety of nim games that can be played on line. (You'll need a Java aware browser.)
- Yahoo's Nim Page by itself offers a variety of online nim games.
- Srdjan Susnic has a very fine Java implementation of nim (here you need a Java enabled browser to play on line).
- Alexander Bogomolny explains the math with his Javascript version. Click on the Theory button.
- Evan Glazer, on the introductory Web page to his Java nim game, sums up nim nicely as ... a strategic game with a secret order hidden within it by mathematics. Without mathematical logic, it is difficult to win. But, if you look for a pattern, you just might outsmart your opponent!
- Here is a version written in Pascal. It's colorful, but it's rigged so you can't win. Also, its "about" page gives away some of the "secrets" to nim (and, as we know, nobody appreciates what they've been given nearly as much as something they've hacked together for them self).
- Here is a bare bones nim game at the University of Chicago.
Download for Off-line Play
If you don't have a Java or even a Javascript capable browser, there are plenty of nim games you can download and play off-line. As a general rule, these aren't as interesting as the implementations now available on the Web, but they're good enough. (How good does the virtual replacement of stick and pebbles have to be?)
- NIM.ZIP; 3,470 bytes, for DOS. The program itself, written by Marijke van Gans in assembler, is an incredibly compact 1k. Van Gans inclueds MARIEN.BAT to recreate the 7-5-3-1 layout used in "Last Year at Marienbad". Van Gans also provides his source code: ftp://ftp.silicon-alley.com/pub/DOS/nimsrc.zip).
And the source code comments contains this gem:; rejoice! silicon alley lives! the tree that scatters its catkins to the winds
; lives a thousand times! publish and be immortal...
- MAC versions: Friends of Nim has a Mac collection nim-1.0.sit.hqx that is usually available on the Net somewhere. Check: http://ftp.wustl.edu/systems/mac/amug/files/game/n-q/. There is also, for the Mac, MARIENBAD-42.HQX, a nim game named after Resnais' movie.
"Last Year in Marienbad" features three playings of nim. In the first of these scenes, Sascha Pitoëff's character introduces the game in this dialogue:
"I know a game I always win."
"If you can't lose, it's no game."
"I can lose, but I always win."He always does win too ( which anyone familiar with nim will recognize as some of the film's more plausible events).
If you have a Mac, try downloading MARIENBAD-42.HQX from one of the sites listed at: http://www.gamesdomain.com/directd/mac/board/marienbad.html.
- Matches.exe An easy to learn Windows 95/NT version of nim in a 201K ZIP file, with a nice, clean interface.
- EINSTEIN.ZIP In 1986 I wrote a compiled BASIC version of Nim for DOS. It was a game I played as a kid. We called it "the match-stick game" because we didn't know any better. When I sent this version out into the ether I named it "Hey Einstein". My version is interesting because it's the only implementation I've run across with a dynamic row count. The game starts with 5 rows, but by removing counters in the rows' centers, the row count can reach, in effect, as many as 8. (I fully concede that the dynamic row count might be because our source for the rules just didn't know any better.)
Hey Einstein is still floating around out there. It got picked up and published on the first GIGA GAMES CD-ROM. (It's in the /games/dos/word/ directory. I was only interested in the game's logic at the time, so to save having to program graphics and pointing devices, I used the letters "A" through "S" in the interface. Apparently that satisfied the conditions for a word game. Now, Hey Einstein appears to be on a new GIGA GAMES 5 .) Several years later, when I was programming in "C", I tried to make a more compact program. In NIM.EXE I got the logic and a mouse interface down to 13k. But NIM.EXE (downloadable as NIM.ZIP ) has ONLY a mouse interface. It can't be played with a keyboard. It will run in a Windows DOS box, but it's a crude program.
A Book of Stick Games with a Nim Chapter
That's
it.
This page has been accessed times since 6/6/2000.
Frans GustafsonFrans@lafn.org
Page updated: