Nim is the classic mathematical strategy game played with rows of objects. Players take turns removing as many objects as they like from a single row, and the one forced to take the last object loses.
How to play Nim
- Look at the rows of objects on the board
- On your turn, remove one or more objects from a single row
- Take turns alternating with your opponent
- Avoid being the player forced to take the final object
Tips & strategy
- Plan ahead so your opponent is left taking the last piece
- Learn the balanced positions where rows cancel each other out
- Sometimes leaving a single object in a row sets up a trap
Controls: Click or tap objects to remove them from a row.
Nim — FAQ
Who loses in Nim?
In this misère version, the player forced to take the last remaining object loses.
Is there a winning strategy?
Yes, Nim has a known mathematical strategy based on balancing the rows, which you can learn through play.
How do you play Nim?
Players take turns removing objects from rows, and on each turn you take as many as you like from a single row. Depending on the rules, the player who takes the last object either wins or loses.
How do you win at Nim?
Nim is a solved math game, and the winning strategy is based on leaving your opponent a balanced position using binary (XOR) math. With perfect play, the outcome is decided by who moves first and the starting setup.
Is Nim a 2-player game?
Yes, Nim is a 2-player strategy game you can play against a friend or against the computer in your browser. It is a classic test of logic and forward thinking.
Is Nim free and does it work offline?
Yes, Nim is free to play online with no download and no sign-up required. It also works fully offline in the free Offline Games Arcade app for iOS and Android.