Nim
Rules
New game
You
Whoever takes the last one wins
The machine
Matchstick games
Nim
The matches lie on the table in groups. The groups do not have to be the same size.
On your turn, choose one group and take as many matches from it as you like: one, a few, or the whole group.
Whoever takes the last match wins. You can also play the reversed game, where whoever takes the last match loses.
If the players agree, a turn may split a group into two smaller groups instead of taking from it. Decide before the game how: only into unequal parts, only groups with an odd number of matches, or freely.
Nimbi
The matches lie in a rectangle of rows and columns.
On your turn, take any number of matches lying side by side in one row or one column. They must be neighbours: where a match is already gone, the gap cannot be taken across.
Whoever takes the last match wins.
Squayles
31 matches form the sides of a grid of 12 squares, four across and three down.
On your turn, take a chain: one match, or several lying end to end, each one starting where the one before it ends. A chain may turn corners, and it may be long — more than twenty matches can go in a single turn.
Whoever takes the last match wins.
In this version
Nim starts with five groups of 4, 6, 5, 7 and 3 matches. Charles Leonard Bouton solved nim in 1901, and the machine plays it perfectly, with splitting and in the reversed game too.
Piet Hein made nimbi so that no formula would win it. You can play on 3 × 3, 4 × 3, 4 × 4 or 5 × 4. The machine works the smaller boards out completely; on 5 × 4 it thinks for up to a second and a half and guesses the rest.
In squayles, tap the matches in the order you take them. The machine looks two moves ahead and keeps its own chains to eight matches or fewer.
Close
New game
Game
Nim
Nimbi
Squayles
Nim rules
Last one wins
Last one loses
No splitting
Split into unequal parts
Split only odd groups
Split freely
The board
3 × 3
4 × 3
4 × 4
5 × 4
Who begins
You
The machine
Start
Cancel
Play again
See the table