Home › Board & Strategy › Matchstick Nim
🪵

Matchstick Nim

Board & Strategy

Play Matchstick Nim online for free

Take sticks from one row at a time - whoever takes the very last stick wins this classic maths game.

Nim is one of the oldest mathematical strategy games. The classic board has four rows of sticks: one, three, five and seven, and our game also deals a few other layouts so every game is different. On your turn you may take as many sticks as you like, but only from a single row. Players alternate turns, and the player who takes the last stick wins.

Nim has a famous mathematical solution based on binary numbers, which our Hard computer uses perfectly. On Easy and Medium, the computer sometimes makes mistakes, giving you a chance to learn the patterns. Can you work out the winning strategy?

How to play

  1. Tap a stick in any row. That stick and every stick to its right are selected.
  2. Press Take selected to remove them.
  3. The computer then takes its turn.
  4. You can only take from one row per turn, but you can take as many as you like.
  5. Whoever takes the last stick wins.

Tips and strategy

  • Leaving two rows with equal numbers of sticks is often a winning position.
  • Try to leave positions where, written in binary, every column adds up to an even number.
  • Play Easy first to discover patterns, then challenge Hard.

Frequently asked questions

Can I take from two rows at once?

No. Each turn you take from one row only.

Is the Hard computer beatable?

Yes, but only when the starting layout gives the first player a winning position and you play perfectly. Read our Nim strategy guide to learn how.

Does taking the last stick win or lose?

In our version, taking the last stick wins.

Game details

  • Category: Board & Strategy
  • Platforms: Any modern browser on Android, iPhone, iPad, Windows, Mac and Linux
  • Controls: Touch, mouse and keyboard
  • Price: Free, no in-game purchases
  • Developer: BrightAdsSolution

🎮 You may also like

All games →