← Back to the game

Gomoku rules: how to play five in a row

In short
  • A board of 15 × 15 lines; stones go on the intersections.
  • Black starts; the first to get five in a row wins.
  • No moving and no captures: a stone that is placed stays put.

Gomoku, or five in a row, is a strategy game for two players: each in turn places a stone on an intersection of a 15 by 15 board, and the first to line up five stones of their color wins. The rules take a minute to learn. This guide goes through them, along with the two points people hesitate over: six stones in a row, and the advantage of the player who starts.

⚫ Play Gomoku

The board and the stones

The board, called a goban, is a grid of 15 horizontal and 15 vertical lines. Stones do not go in the squares but on the intersections of the lines: there are 225 of them. One player has the black stones, the other the white ones.

To name an intersection, you give its column then its row: columns run from A to O, left to right, and rows from 1 to 15, bottom to top. The center of the board is therefore H8. The five slightly bigger dots (the center and four points near the corners) are only visual landmarks: they play no part in the rules.

ABCDEFGHIJKLMNO123456789101112131415
The 15 × 15 board. The black stone is in the center, at H8.

How a game goes

How to win: five stones in a row

You win by making an unbroken line of five stones of your color, in one of the four directions: horizontal, vertical, or either diagonal. The stones must touch: an opponent's stone or an empty point in the middle breaks the line.

CDEFGHIJKLM456789101112
Black to play: J8 makes five stones on row 8.
BCDEFGHIJKL23456789101112
A diagonal blocked at both ends still wins: you just fill the gap, at H8.

The second diagram shows a classic trap: you watch the ends of a line and forget the gap in the middle. Four stones with an empty point between them are as much of a threat as four stones in a row.

Six stones in a row: a win or not?

It all depends on the rule chosen, and that is the only real difference between the two ways of playing Gomoku.

RuleTo winSix stones or moreStart of the game
Freestyle Gomokufive stones in a row or morewinBlack places the first stone anywhere
Competition Gomokuexactly five stones in a rowdo not win, the game goes onSwap2 opening (see below)

The freestyle rule is the one played between friends on squared paper, and the one this site uses by default. The competition rule is the one in the Gomoku rules of the international federation (the Renju International Federation): they state that a line of six stones or more does not win and that the game continues.

BCDEFGHIJK456789101112
By playing G8, Black lines up six stones: a win under freestyle rules, not under competition rules.

Who starts, and why it matters

Black always plays first, and that is a real advantage: in 1993, three researchers working in the Netherlands proved by computer that on a 15 by 15 board with no opening rule, Black wins with perfect play, whether or not lines of six count. Nobody plays perfectly, and between two ordinary players the game stays wide open, but the advantage is there. Our guide Is Gomoku solved? tells the story of that proof.

So that color does not decide the game, competition Gomoku has used the Swap2 opening since 2009:

  1. The first player places three stones wherever they like: black, white, black.
  2. The second player looks at the position and chooses: either take the color they prefer, or place two more stones (white, black) and let the first player choose their color.
  3. White then plays, and the players take turns from there.

So whoever places the first three stones has every reason to offer a balanced position: if it favors one color, the opponent will take it.

DEFGHIJKL456789101112
A Swap2 start: three stones placed by the first player. The second now chooses a color, or adds two more stones.

The draw

If all 225 intersections are taken and nobody has five in a row, the game is a draw. That is very rare: there is almost always a line well before. The competition rules also allow a draw by agreement between the two players. On this site, a game ends with five in a row, a full board or, against a friend online, a draw by agreement or a resignation. Against the computer, the resign button takes you back to the settings: the game is not counted.

Three words to know before you play

All the tactics of the game follow from this: you win by creating two threats with a single move. That is the subject of the guide Gomoku strategy: the shapes that win.

Ways to play on this site

After every game you can replay it move by move. Renju and its forbidden moves are not offered here; our guide to Gomoku variants explains what sets them apart.

Frequently asked questions

Play now

More guides

This guide in other languages : 🇪🇸 Español · 🇮🇹 Italiano · 🇩🇪 Deutsch