Gomoku Rules: How to Play Five in a Row
Gomoku's rules are short: two players take turns placing one stone each on an empty point, and the first to make an unbroken line of five wins. Almost every argument about Gomoku rules is about the details around that core — what happens with six in a row, who moves first, and which extra restrictions apply. This page covers the core first, then the variants, then the exact rules used on 5Row. If you have never seen the game, what is Gomoku? is a gentler introduction.
Gomoku rules at a glance
- Two players: Black and White (or X and O).
- The board starts empty. The standard competitive board is 15×15.
- Black moves first. Players then alternate.
- On your turn, place exactly one stone on any empty point.
- Stones are never moved or removed.
- The first player to make five of their stones in an unbroken line — horizontally, vertically or diagonally — wins.
- If the board is full and nobody has five, the game is a draw.
Everything below either explains one of these lines or describes a variant that changes one of them.
Board setup
Gomoku starts on an empty board. No stones are pre-placed, and nothing else needs to be set up.
Traditionally the game uses a Go board, and stones go on the intersections of the lines. Many paper and online versions place marks inside squares instead. Both work the same way: each point holds one stone, and lines are counted point by point. The usual competitive size is 15×15; larger boards such as 19×19 are common in casual play. Size does not change the rules, but it does change the game, which our guide to Gomoku board size explains.
Who moves first
Black places the first stone. In a single casual game, players often agree who takes Black or toss a coin, and then swap colours for the next game.
Moving first is a real advantage, because the first player is always one stone ahead in the race to five. That is why competitive Gomoku adds an opening rule — most commonly swap2, in which one player places the first three stones and the other chooses a colour or adds two more stones and passes the choice back — and why Renju restricts Black's moves. Casual games usually skip all of this.
Turn order and placing stones
After the first stone, players alternate one stone at a time. You may place your stone on any empty point on the board: it does not have to touch an existing stone, and there is no capturing, flipping or sliding. A point that already holds a stone cannot be used again.
Because stones are permanent, every placement is a commitment. A stone in the middle of the board will be part of many possible lines for the rest of the game; a stone in a corner will only ever be part of a few.
How a game is won
You win by forming a line of five stones of your own colour, side by side, with no empty point and no opposing stone inside the line. The line can run in four directions.
Horizontal wins
Five stones along the same row.
Vertical wins
Five stones in the same column.
Diagonal wins
Five stones along either diagonal. These count exactly the same as straight lines, and they are the ones most often missed by both players.
What does not count
Four stones with a gap is not five, even if the gap is "obviously" coming: X X · X X still needs another move, and the opponent gets to play first. A line broken by an opposing stone is not five either. And a line made of both colours never counts — the five must all be yours.
Overlines: six or more in a row
An overline is a line of six or more stones of one colour. Whether it wins depends on the rule set:
- Freestyle Gomoku: five or more wins, so an overline wins.
- Standard Gomoku: only exactly five wins. An overline does not count for either player.
- Renju: an overline is a forbidden move for Black, while White wins with five or more.
Overlines are rare in practice, but they matter in close tactical fights, where filling one point might make either five or six.
Draws
If every point is filled and nobody has made five, the game is a draw. On a 15×15 board that means 225 stones, so it almost never happens — games are nearly always decided long before. Many online sites also let players agree to a draw.
Variants and other rule sets
"Gomoku" is used for a family of closely related rule sets. These are the ones you are most likely to meet:
| Rule set | Usual board | What wins | Overline | Extra rules |
|---|---|---|---|---|
| Freestyle Gomoku | 15×15 | Five or more | Wins | None |
| Standard Gomoku | 15×15 | Exactly five | Does not win | Opening rule (often swap2) in competition |
| Renju | 15×15 | Five (Black), five or more (White) | Forbidden for Black | Black may not make double threes, double fours or overlines; formal opening rule |
| Caro | Varies, often a paper grid | Five that is not blocked at both ends | Varies by group | Blocked-ends rule |
Freestyle is the simplest and the most common in casual play. Standard Gomoku tightens the win condition and is used with an opening rule in tournaments. Renju goes further and limits the first player's moves to balance the game — our Gomoku vs Renju comparison explains every restriction. Caro is the Vietnamese tradition; its best-known rule is that a five sealed at both ends does not win, though exact details vary between groups.
Freestyle Gomoku vs other rule sets
The variants exist mostly because of the first-move advantage. With freestyle rules the first player has a strong edge between skilled players; computer analysis has shown it is a forced win on 15×15 with perfect play. Standard rules, opening rules and Renju's restrictions all try to give the second player a fairer chance.
For learning, freestyle is ideal: there are no exceptions to remember, and every tactic you learn carries over to the other rule sets.
The rules on 5Row
5Row uses freestyle Gomoku as its base, on a wider board, with the Vietnamese two-end rule available.
- Board: 19 columns by 15 rows of squares, labelled A–S and 1–15.
- First move: X moves first. In ranked matches sides are assigned at random; in a private room the host plays X; in practice games you play X.
- Winning: five or more of your marks in a row, in any of the four directions. There is no exact-five requirement and there are no forbidden moves.
- Two-end rule (on by default): a line of exactly five that is blocked at both ends by opposing marks does not win. The edge of the board does not count as a block, and a line of six or more always wins.
- Draws: a full board is a draw, and players can also agree to a draw.
- Clock: each move has its own countdown (45 seconds by default). Running out of time on your turn loses the game, and you can resign at any time.
Online matches fix the two-end rule when the match is created, using the setting of the player who creates the room or joins the queue. A small indicator in the top bar shows when the rule is in force. In practice games you can switch it on and off.
These diagrams show how the two-end rule decides borderline cases:
For the short version you can keep open while playing, see the 5Row rules page. The quickest way to get a feel for the two-end rule is a practice game against the computer, where you can switch it on and off.
Common beginner mistakes about the rules
- Counting a gapped line as five. X X · X X is a strong threat, not a win.
- Forgetting diagonals. Check all four directions every time your opponent moves — diagonal fives are the ones that slip through.
- Assuming six always wins. It depends on the rule set. On 5Row it does; in standard Gomoku it does not.
- Thinking any five wins under the two-end rule. If you play with it, a five boxed in at both ends does not count, so attack with open lines.
- Waiting to block. The rules only end the game at five, but by the time your opponent has four with an open end, it is usually too late to stop them. Learn to respond earlier — how to play Gomoku shows when.
Once the rules feel natural, the next step is learning why some moves are better than others. Our Gomoku strategy guide starts there.
FAQ
Can you win Gomoku with six in a row?
In freestyle Gomoku, yes — five or more wins. In standard Gomoku, no: only exactly five counts. In Renju, six is forbidden for Black but wins for White. On 5Row, six or more always wins.
Do diagonal lines count?
Yes. Both diagonals count exactly like rows and columns.
Can I place a stone anywhere?
Anywhere empty. A stone does not need to touch any other stone, although moves far from the action are usually weak.
Is there a time limit?
Not in the basic rules. Tournaments use clocks, and on 5Row each move has a 45-second countdown by default.
What happens if nobody makes five?
When the board fills up with no five on it, the game is a draw. It is rare, because most games are decided by a double threat long before that point.
Why do some versions restrict the first player?
Because the first player has a significant advantage. Opening rules such as swap2 and Renju's forbidden moves exist to make the game fairer for the second player.