Gomoku Online: Play Five in a Row Free vs Computer

Browser Games›Gomoku

Gomoku, also called five in a row, is played with black and white stones on a board of 15 by 15 points. The two sides take turns placing a stone, and the first to line up five wins. Play against the computer on Easy, Medium or Hard, or switch to two players and share one device.

How to play Gomoku

  1. The board has 15 lines each way, which gives 225 points. Stones go on the points where the lines cross, not inside the squares.
  2. Black moves first. After that the two sides take turns, one stone per turn, on any empty point.
  3. A stone never moves and is never captured.
  4. The first side with five stones in an unbroken line wins. The line can run across, down or along either diagonal.
  5. If all 225 points are filled and nobody has five in a line, the game is a draw.

Controls on phone and desktop

  • Mouse: move the pointer over the board to see a faint stone, and click an empty point to place it.
  • Phone and tablet: the first tap only aims. A blue ring and two guide lines mark the point, and you can slide your finger to move the aim. Tap the same point again or press Place stone to put the stone down.
  • The switch Tap twice to place turns the aiming step on or off.
  • Keyboard: move the cursor with the arrow keys and place with Enter or Space. Z takes back a move and H shows a hint.
  • Undo takes back your last stone together with the computer’s reply. Hint marks a strong point in light blue.

The three levels

  • Easy: does not read ahead and picks loosely among fair points. It blocks your fours and open threes and punishes an open three that you leave alone, but it never sees a double threat coming.
  • Medium: looks two moves ahead, builds its own attacks and stops most double threats before they appear. To beat it, prepare a threat two or three moves deep.
  • Hard: thinks for about half a second and reads forcing chains of fours many moves deep.

Gomoku strategy: the shapes that decide the game

  • Open three: three stones in a line with both ends free. Left alone, it becomes an open four on the next move. Block it at once, on the end that also helps your own stones.
  • Four: four stones with one free end. It has to be blocked immediately, so it is a forcing move: you know where the other side’s next stone will go.
  • Open four: four stones with both ends free. One end gets blocked and the other makes five. An open four wins the game.
  • Four and three: one stone that makes a four and an open three at the same time. The other side has to block the four, and the three then grows into an open four. This is the most common way to win.
  • Three and three: one stone that makes two open threes. Only one of them can be blocked. It works unless the other side can answer with fours of its own.
  • Watch the broken shapes too. Two stones, a gap and one more stone count as a three, and the gap is usually the best place to block.
  • Start near the centre, where a stone can belong to lines in all four directions.
  • Before every move, check the other side first. Does it have a four, an open three, or a point where two of its lines cross? Defend that point before you attack.

Rules used here

This board uses the freestyle rule, the simplest form of Gomoku: five or more stones in a line win for either colour, so a line of six also counts. Against the computer you play black in the first game, and the colours swap with every new game, because moving first is an advantage. Your record for each level, the two-player score and the game in progress are saved in this browser.

Frequently asked questions

Is Gomoku the same as five in a row?

Yes. Gomoku is the Japanese name of the game: two sides place stones in turn, and the first with five in a line wins.

Does a line of six or more stones win?

Yes. This board uses the freestyle rule, where five or more in a line win. Some tournament rules count exactly five only, but they are not used here.

Who moves first in Gomoku?

Black always moves first. Against the computer you are black in the first game, and the colours swap with every new game.

Is moving first an advantage?

Yes. On a 15 by 15 board with the freestyle rule, the first player can force a win with perfect play, which was shown by computer search in the 1990s. That is why the colours swap here.

How do I avoid placing a stone on the wrong point on a phone?

The first tap only aims. Check the blue ring and the guide lines, then tap the same point again or press Place stone.

More games to play

All 80 browser games →

Handy free tools

More to play