Nim
Take marks from a single row each turn and avoid being left to take the last one.
Loading Nim...
Controls
| Up and Down arrows | Choose which row to take from. |
|---|---|
| Left and Right arrows | Set how many marks to take. |
| Space, Enter or tap | Take the chosen marks. |
| R | Start a new game. |
How to play
- Press R or tap to start. You move first against the computer.
- Choose a row with the up and down arrows, then set how many marks to take with the left and right arrows.
- Press space, Enter, or tap to take that many marks from the chosen row. You must take at least one.
- Whoever is forced to take the very last mark loses, so plan to leave your opponent holding it.
About Nim
Nim is the game that looks like nothing and turns out to be solved mathematics. There are a few rows of marks; on your turn you take as many as you like from a single row, and whoever is forced to take the last mark loses. It sounds like a toss-up, yet there is a precise winning strategy hiding in the binary of the row counts.
That strategy is unforgiving: from a winning position perfect play never slips, so the opening matters. This version deals you a start that can be won and lets you move first, which means a careful player can beat the computer every time - and the moment you hand it an even position, it will punish the mistake. You pick a row, choose how many to take, and confirm with the primary key or a tap.
Frequently asked questions
While you are here
BNS Data Tools
The same team builds a set of free, privacy-first data and developer utilities - formatters, converters, validators and calculators - that run in your browser the same way these games do.
Open BNS Data Tools