Board Bash

Play Nim online – free, with friends or against a bot

Nim is four heaps of stones and one decision per turn: which heap, and how many. It looks trivial and is not — the winning strategy is a piece of binary arithmetic hiding in plain sight. Board Bash plays the classic 1-3-5-7 version, against a friend on another device, on the same phone, or against a bot.

Play Nim now

How to play Nim

The game starts with four heaps holding 1, 3, 5 and 7 stones — sixteen in total.

On your turn you take any number of stones, at least one, from exactly one heap. Clearing a whole heap in one move is allowed.

You cannot take from two heaps in the same turn, and you cannot pass.

Whoever takes the last stone wins. This is normal play, not misère: taking the last stone is the win, never the loss.

There are no draws. Every position with a stone left has a legal move, so somebody always takes the last one.

Frequently asked questions

Is Nim a solved game?

Yes. You are winning exactly when the XOR of the heap sizes is not zero. From 1-3-5-7 that XOR is zero, so perfect play favours the second player.

How hard is the bot?

It knows the arithmetic and plays the move that zeroes the XOR — but only some of the time. Rookie finds it once in ten turns, Grandmaster nearly always.

Can I play Nim with a friend?

Yes. Create a game, choose "A friend" and share the link or the QR code. You can also pass one phone back and forth with the same-device option.