Comma Puzzles
English

Gomoku (Five in a Row)

Line up five stones in a row, across, down or diagonally, before your opponent does. Black moves first.

Your records

Records are stored only in this browser.

More puzzles

How to play gomoku

Gomoku is played on the intersections of a 15×15 board. Black moves first, then the players take turns placing one stone each. The first player to line up five stones of their color across, down or diagonally wins. Under the default freestyle rule a line of six or more also wins; choose "Exactly five" and such an overline does not count. If the board fills up with no five, the game is a draw.

Strategy tips

  • Know the forcing shapes: an open four, four in a row with both ends empty, cannot be stopped. An open three becomes an open four next turn, so it must be answered at once.
  • Block early: when your opponent makes an open three, close one end right away, and block a four with one end closed on the spot.
  • Make two threats at once: a move that creates a four and an open three together (a four-three) or two fours usually wins, because one stone cannot stop both.
  • Stay central and connected: stones near the center belong to more possible lines, and a compact group threatens in several directions.
  • Attack with tempo: a four forces an immediate reply, so a chain of fours lets you steer your opponent while you set up the final double threat.

A short background

The name comes from the Japanese gomokunarabe (五目並べ), "five in a row". It is traditionally played with go stones on a go board; 15×15 is the usual size today, while 19×19 was common in the past. The game is called omok (오목) in Korea and wuziqi (五子棋) in China.

The first player has a strong advantage. In 1993 L. Victor Allis and his colleagues used computer search to show that on a 15×15 board Black can always force a win, both in freestyle gomoku and in the exactly-five version. That is why the gomoku world championships have used the Swap2 opening rule since 2009, and why renju gives Black extra restrictions.

About the computer levels

Easy looks only at the board in front of it and sometimes misses a threat. Normal blocks fours and most open threes and looks two moves ahead. Hard searches for winning chains of fours, blocks yours in advance and reads several moves ahead, yet still answers in under 0.3 seconds.

FAQ

Can two people play on one phone?
Yes. Set the opponent to "2 players" and take turns on the same screen. Two-player results are recorded separately.
What does Undo move do against the computer?
It takes back the reply from the computer and your last move together, so it is your turn again. A finished game cannot be undone.
Is the double-three ban used?
Not at the moment. Both players may make any shape; you can only choose between five-or-more and exactly-five wins.
Stones land in the wrong spot on my phone.
Turn on "Tap twice to place". The first tap shows a preview; tap the same point again or press Place here to confirm. The arrow buttons move the preview one point at a time.