The Game of NIM





Nim probably originated in China, but a similar game is mentioned in the 1500's by Luca Pacioli, an Italian mathematician. In 1902 Dr Charles Bouton of Harvard University published a full analysis of the game and called it NIM after an ancient word meaning "take."

The game of Nim is played with several rows of markers. You can use coins, beans, pencils, toothpicks, etc. The rules vary depending on the version of the game, but in classic Nim there are nine markers arranged like the green marbles above. Two players take turns removing 1, 2, or 3 marbles all from the same row. The player who removes the last marker loses. There is a distinct strategy to winning, and the player going first will always win using this strategy.

Nim can also be played verbally, with two players counting out loud up to 20, taking turns saying 1, 2, or 3 consecutive numbers. The player forced to say "20" loses the game. This verbal version is a perfect game for travelling or waiting in line.

An interesting history of the game can be found here.

You can play with a friend here or play against the computer here.

The solution to winning is based on the binary number system.

Other versions of the game

Square Nim

Circle Nim

Play a fruit version

Play a frog version