Gomoku

How to play gomoku

Five in a row on a 15×15 board. The rules take thirty seconds; the reason it is a real game takes a little longer.

The rules

Two players alternate placing stones on the intersections of a 15×15 grid. Black plays first. The winner is the first to form an unbroken line of five of their own stones — horizontally, vertically or diagonally. Stones never move and are never captured.

If the board fills with no line of five, the game is a draw. In practice this almost never happens.

Five black stones in an unbroken diagonal line wins immediately.

Why it is not noughts and crosses

The board is large enough that you cannot simply block every threat, because a single stone can contribute to four different lines at once. The game is about creating two threats your opponent can only answer one of.

The vocabulary you need

  • Two — two stones in a line with room to grow. Not yet a threat.
  • Three — three in a line. If both ends are open it is an open three and must usually be answered immediately, because next move it becomes an open four.
  • Four — four in a line with one open end. This threatens five and must be blocked at once.
  • Open four — four in a line with both ends open. It cannot be blocked, because there are two winning points. Creating one wins the game.

That last point is the whole game in one sentence. Everything you do is aimed at building an open four, or at stopping one.

Double threats

If a single stone creates two separate threats at once — two fours, or a four and an open three — the opponent can only block one. This is how almost every game is actually won, and it is why stones near the centre matter: they participate in more lines, so they are more likely to create overlapping threats.

Count the ends

Before playing, count how many open ends your line has. Three with two open ends is urgent. Three with one blocked end can usually be ignored.

Attack and defence at the same time

The strongest moves do both. A stone that blocks your opponent's three while extending your own two is worth two moves. When choosing between candidate points, prefer the one that appears in both your own lines and theirs.

The first-move advantage

Unrestricted gomoku is a proven win for Black with perfect play. Tournament rules add restrictions — forbidding certain Black formations, or letting players swap colours after the opening — to rebalance it. The game here uses free-style rules with no restrictions, so Black does have an edge; if you want a harder game, take White.

Playing here

  • Click or tap any empty intersection to place a stone.
  • The last stone played is marked with a dot so you can follow the sequence.
  • Undo steps back past the computer's reply as well as your own.
  • Difficulty changes how deeply the opponent searches: beginner barely looks ahead, strong reads several moves of threats.
  • Two-player mode turns the computer off entirely for a game on one device.

Your first game

  1. Play near the centre. Stones there sit on more lines.
  2. Build twos and threes that point in different directions.
  3. Block every open three immediately unless you have a four of your own.
  4. Look for a move that makes two threats at once — that is the win.

Common questions

Does exactly five count, or does six also win?

In free-style gomoku, six or more in a row also wins. Some tournament rules require exactly five.

Is gomoku solved?

Yes. Free-style gomoku on a 15×15 board is a first-player win with perfect play, proven in 1993.

Which colour is harder?

White. Black has the initiative under free-style rules.

Guides for Gomoku