NIM
MATHEMATICAL STRATEGY / LAST STONE WINS OR LOSES
CLICK stones in a heap to select them ·
TAKE to remove selected stones
You must take at least 1 stone from exactly 1 heap per turn
You must take at least 1 stone from exactly 1 heap per turn
DIFFICULTY
VARIANT
HEAPS
YOUR TURN
NIM STRATEGY: XOR all heap sizes. If the result is 0, you're in trouble.
If non-zero, you can always force a win. The optimal move makes the XOR equal 0.
NORMAL: Last to take wins ·
MISÈRE: Last to take loses