ToolNextToolNext
🪨

Nim

Take turns removing objects — whoever takes the last one loses

Take turns removing stones from any row. The player who takes the last stone loses!

Row 1
Row 2
Row 3
Row 4

About This Game

How do I play Nim?
Take turns removing objects — whoever takes the last one loses The game is completely free and runs directly in your browser — no plugins or downloads needed.
What are the rules of Nim?
There are 4 rows with different numbers of objects. Each turn, remove 1 or more objects from a single row. The player who takes the last object loses (misère rules).
Is there a winning strategy?
Yes! Nim has a mathematical solution based on XOR (binary digital sum). If the XOR of all row sizes is 0, the player to move is in a losing position. The AI uses this strategy, so you need to put it in a losing position first.
How many difficulty levels or stages does Nim have?
Nim offers multiple difficulty levels ranging from beginner to expert. Some levels are procedurally generated, ensuring a unique experience every time you play and greatly enhancing replayability.
What should I do if I get stuck in Nim? Is there a hint system?
If you get stuck, try approaching the puzzle from a different angle. Nim is designed to encourage logical reasoning and patience. Some levels support undo actions, allowing you to backtrack and try alternative strategies.
Can I play Nim on my phone?
Yes. Nim supports mobile browsers with touch-friendly controls, so you can play anytime, anywhere.