Skip to content

How to play Nim (Last Stick)

Last Stick is the classic matchstick game Nim for two players. Sticks lie in rows, 1, 3, 5 and 7 in the usual layout. On your turn you take one or more sticks from a single row. In the version played by default, whoever takes the last stick loses; in normal Nim, taking the last stick wins. Nim has an exact winning strategy based on binary numbers.

How to play Last Stick

  1. Lay out rows of 1, 3, 5 and 7 sticks.
  2. On your turn, take as many sticks as you like, but from one row only.
  3. You must take at least one stick.
  4. Whoever takes the last stick loses (or wins, if you play normal Nim).

Last Stick rules

Setup

  1. The classic layout is four rows of 1, 3, 5 and 7 sticks: 16 in all. Duo Clash can also deal 3 to 5 random rows of 1 to 7 sticks, the same for both players.
  2. The first starter is decided by a coin flip. After each board, the player who lost chooses to start the next or to let their rival start.

Turns

  1. Take one or more sticks from one row. Taking from two rows in one turn is not allowed.
  2. With the Pass token extra (on by default in Duo Clash), each player may skip one turn per board instead of taking.
  3. With the Take up to three extra, a single turn takes at most 3 sticks.

Winning

  1. Last stick loses is misère Nim and the default. Last stick wins is normal Nim.
  2. Someone always takes the last stick, so a board cannot be drawn.
  3. Matches are one board, best of 3 or best of 5, with best of 3 as the default.

Last Stick tips

  • Think in matching pairs

    Rows that pair up, such as 3 and 3, or 1, 2 and 3, are a loss for whoever must move: whatever they take from one, you copy in its partner.

  • Use the binary rule

    Write each row as a sum of 4s, 2s and 1s. If every size appears an even number of times across all rows, the player to move is losing. Always take so that you leave such a position.

  • The classic layout favours the second player

    In 1, 3, 5, 7 every size already appears an even number of times, so without pass tokens the starter loses against perfect play, whether the last stick wins or loses. When you may choose, let your rival start.

  • Switch at the very end in misère

    With last stick loses, play exactly as if the last stick wins until your move would leave only rows of 1 stick. Then leave an odd number of single sticks, so your rival is forced to take the last.

  • Save the pass token

    A pass flips who has to move. Kept for the endgame, it can turn a lost position into a won one.

Where to play Last Stick

  • Duo Clash

    Two players, one phone

    • Sit face to face. Tap sticks in one row to lift them, then press Take in your own dock; tap a lifted stick to put it back. Your pass token sits at your end of the table.
    • Options: last stick loses or wins; classic rows or new rows each board; single, best of 3 or best of 5. Extras: Take up to three, Pass token, and a 12-second Fuse per human turn that takes for you when it burns out.
    • Bolt, the bot, knows the winning take in any position at its best. Easy often takes at random; Normal usually finds the winning take; Hard plays loosely while many sticks remain, then perfectly at the end. A 20-coin hint rings the winning take.
    • Last Stick plays online, always on the classic 1, 3, 5, 7 rows and one board, with a 30-second turn clock and no chat.

Questions about Last Stick

  • Is there a winning strategy for Nim?

    Yes. Write each row in binary (4s, 2s and 1s) and always move so that every size appears an even number of times. The mathematician Charles Bouton published this complete strategy in 1901.

  • Should I go first in the 1, 3, 5, 7 game?

    No. That starting position is already balanced, so without pass tokens the second player can always win with correct play.

  • What is misère Nim?

    The version where taking the last stick loses. It is Last Stick's default; strategy only changes at the very end, when only single sticks would remain.

  • Where does the 1, 3, 5, 7 layout come from?

    It is the classic Nim layout and became famous from the 1961 French film Last Year at Marienbad, where characters play it.

Facts checked against the game's own design documents on .

More games like Last Stick

  • Pig: rules

    Also called Pig dice game

    Roll again or bank it. A one wipes your turn.

    • Duo Clash

    2 players, one phone, online

  • Sim: rules

    Also called Sim pencil game

    Draw lines between pins. Make a triangle of your own and lose.

    • Duo Clash

    2 players, one phone, online

  • Dots and Boxes: rules

    Also called Boxes

    Draw lines. Close a box and go again.

    • Duo Clash

    2 players, one phone

  • Kalah: rules

    Also called Mancala

    Sow seeds round the pits. Land in your store to go again.

    • Duo Clash

    2 players, one phone, online

  • Hex: rules

    Also called Nash

    Join your two sides. There are no draws.

    • Duo Clash

    2 players, one phone, online

  • Nine Men's Morris: rules

    Also called Mill

    Make a row of three, take a piece. Leave them two.

    • Duo Clash

    2 players, one phone, online

  • Blind Bid: rules

    Also called Goofspiel

    Bid a card in secret for each prize. Higher bid takes it.

    • Duo Clash

    2 players, one phone

  • Code Crack: rules

    Also called Mastermind-style

    Set a secret code. Crack theirs first.

    • Duo Clash

    2 players, one phone