Nim

Welcome to the Nim home page. Nim is a game of logic and strategy, with this Android app played against the computer.

The Nim app implements the classical game of Nim with many possible configuration options.

On each turn a player removes bars, at least one, from one of the piles. In the default setup any number of bars can be removed in one move, and the player that removes the last bar wins. It is possible to modify this to limit the number of bars that may be removed in one move, and also change the rules so that the player that removes the last bar loses.

Touch a bar to remove it and all bars above. Then wait for your opponent to make his move. You may return to previous positions of the current game by clicking on the button Back.

The start position is always chosen so that the player that goes first can win by playing a perfect game.

You can create your own start position by selecting Create from the settings menu. Touch the bars to select pile sizes. The computer will make the first move when the game is started.


To configure game settings select Setup from the settings menu. The controls are:

The game of Nim was was featured in the classical film L'Année dernière à Marienbad (Last Year at Marienbad). That particular game had four piles with 1, 3, 5 and 7 bars, and the player that took the last bar lost. You can set up this by selecting Create from the settings menu. The computer makes the first move, but with this setup the second player can always win.

Nim as well as other Android game and tool apps are available from Karrman apps.