Classic Nim

Experience the timeless wisdom of game theory · the classic 3·5·7 setup

v0.2.1 · hints off by default

← Back

Choose Who Goes First

Classic 3·5·7: 3 piles with 3 / 5 / 7 stones

Tip: in the 3·5·7 setup the first player wins with perfect play

Classic Nim
👤 Your Turn
Click any pile above to begin
← Back

📖 Classic Nim · How to Play

Nim is one of the most celebrated classical games in combinatorial game theory, and is said to have originated in China. This edition uses a 3-pile setup: 3 · 5 · 7.

1

Goal

You and your opponent alternate turns. On each turn, remove at least 1 stone from any single pile. The player who takes the last stone wins.

2

How to Move

  • Click any pile above to select it.
  • Buttons numbered 1 to the pile size appear below; click one to choose how many stones to take.
  • Confirm to pass the turn to the opponent (the system).
3

Taking Turns

You and the system alternate turns. You cannot skip a turn, and you cannot take zero — every move must remove at least 1 stone from some pile.

4

Winning

When every pile is empty, the player who took the last stone wins. This is the standard Normal Play convention.

5

This Setup

Classic 3 · 5 · 7 setup: 3 piles of 3, 5, and 7 stones. The first player can force a win simply by keeping the Nim-sum ≠ 0.

💡 Beginner Tip

During play, the 💡 Hint toggle in the top-right will tell you exactly which pile and how many stones to take. It is recommended that you keep it on while learning — follow the suggestion to win, then turn it off whenever you are ready to challenge yourself!