The Game of Nim

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Welcome to the game of Nim. Initially a random number of coins are arranged in stacks; you control their number and maximum capacity. The rules are simple: you start first. You and the computer alternate in removing any number of coins from any single stack. Whoever takes the last coin wins. You click on a coin to remove it and all the ones above it. The computer then signals its turn. Click again to allow it to play and so on until one of you wins.

Contributed by: Jaime Rangel-Mondragon (March 2011)
Open content licensed under CC BY-NC-SA




Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.