Gomoku rules: how to play five in a row
- 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.
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.
How a game goes
- Black starts. The board is empty at the beginning.
- In turn, each player places a stone of their color on any empty intersection.
- A stone never moves once placed. There is no moving and no capturing: no stone ever leaves the board.
- You cannot pass your turn.
- The game ends as soon as a player lines up five stones, or when the board is full.
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.
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.
| Rule | To win | Six stones or more | Start of the game |
|---|---|---|---|
| Freestyle Gomoku | five stones in a row or more | win | Black places the first stone anywhere |
| Competition Gomoku | exactly five stones in a row | do not win, the game goes on | Swap2 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.
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:
- The first player places three stones wherever they like: black, white, black.
- 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.
- 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.
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
- A four: four stones that need only one more to make five. The opponent must block straight away.
- An open four: four stones in a row with an empty point at each end. There are two ways to make five and only one move to answer: the game is won.
- An open three: three stones that will become an open four next move if the opponent does nothing. So it must be blocked too.
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
- Against the computer: five levels, from Beginner to Expert, under freestyle rules, on the 15-line board or on a smaller 11 × 11 board. You choose who starts (you, the computer or at random); whoever starts has Black. The fastest wins go on each level's leaderboard.
- Practice: off the leaderboard, with the option to undo a move and ask for a hint.
- Two players on one screen: freestyle or competition rules (Swap2 and exactly five stones), on the 15 × 15 or the 11 × 11 board.
- Against a friend online: a four-letter code or a link, no sign-up, with a time limit per move, the option to offer a draw or resign, and rematches. Both rule sets and both board sizes are offered.
- Daily challenge: a "Black to play and win" problem, the same for everyone, with a leaderboard ranked by time. It requires a free account and can only be attempted once.
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
More guides
- Gomoku strategy: the shapes that win Basic shapes, double threats, five questions per move, defending, reading ahead and the opening.
- Gomoku, Renju, Swap2, Omok, Caro: the variants compared Freestyle and competition Gomoku, Swap2, Renju, Omok, Caro and which rule to choose.
- Is Gomoku solved? The 1993 proof, threat-space search, what it does not prove, Renju, Swap2 and today's programs.
- History of Gomoku: from Edo Japan to the world championships Uncertain origins, Edo Japan, Go Bang, Renju in 1899, the RIF in 1988, 1993 and Swap2.
- Gomoku and Go: the differences Goal, board, captures, end of the game, first-move advantage and computers, in one table.
This guide in other languages : 🇪🇸 Español · 🇮🇹 Italiano · 🇩🇪 Deutsch