Nim, a game of which there are many different versions, involves two players alternately removing at least one item from one of two or more piles or rows. The person who picks up the last item wins. In one form of the game, five rows of matches are laid out in such a way that there is one match in the first row, two matches in the second, and so on, down to five matches in the bottom row. Players take turns to remove any non-zero number of matches from any one row.
The game may have originated in China. The name "Nim" was coined Charles Bouton, an associate professor of mathematics at Harvard at the turn of the 20th century, who took it from an archaic English word meaning to steal or to take away. In 1901 he published a full analysis of Nim and proof of a winning strategy.1
The first Nim-playing computer, the Nimatron, a one-ton behemoth, was built in 1940 by the Westinghouse Electrical Corporation and was exhibited at the New York Worlds Fair. It played 100,000 games against spectators and attendants, and won an impressive 90% of the time; most of its loses came at the hands of attendants who were instructed to reassure incredulous onlookers that the machine could be beaten! In 1951 a Nim-playing robot, the Nimrod, was shown at the Festival of Britain, and later at the Berlin trade fair. It was so popular that spectators entirely ignored a bar at the other end of the room where free drinks were being offered. Eventually the local police had to be called in to control the crowds.
|Nimatron and friend
This is a variation on the game of Nim suggested by W. A. Wythoff in 1907. It is played with two heaps of counters in which a player may take any number from either heap or the same number from both. The player who takes the last counter wins.
1. Bouton, Charles L. "Nim, a Game with a Complete Mathematical Theory." Annals of Mathematics, Series 2. 3: 35–39, (1901–1902).
2. Gardner, M. Mathematical Puzzles and Diversions. New York: Simon and Schuster, 1959.