Nim

Take turns removing sticks from one row; whoever takes the last stick loses. Includes a "show the winning formula" mode using binary logic.

The maths behind Nim

Nim is a game whose perfect strategy is known. Write each row’s stick count in binary and add them without carrying (XOR). If the result is zero, the player to move is in a losing position. Because taking the last stick loses here, the strategy changes slightly at the end: when every row has one stick or none, leave an odd number of rows. A great way to learn binary numbers through play.

tags: #nim #take away game #two player game #math #binary

How to install the app

This browser has not offered an automatic install button yet. Install it from the browser menu:

Android (Chrome)
Tap the ⋮ menu at the top right, then choose "Install app" or "Add to Home screen".
iPhone / iPad (Safari)
Tap the Share button (the square with an up arrow), then choose "Add to Home Screen". On iOS this only works in Safari.
Computer (Chrome / Edge)
Click the install icon (a monitor with a down arrow) at the right end of the address bar, or menu ⋮ → "Install Daily Apps".