Gomoku Rules: How to Play Five in a Row and Win More Games
BLOGGame Guides & Tips

By iqiqgame.com Team Nov 22, 2026 12 min read

Gomoku rules from the official RIF rulebook: exactly five stones wins, overlines don't count, plus the threat ladder that forces a win on a 15x15 board.

You know the rules of gomoku. Black goes first, stones go on the intersections, and the first player to line up five in a row wins. None of that is why you lost your last game.

You lost because around move twelve your opponent placed a stone that looked harmless, and three moves later you had two separate lines to block and one turn to do it. That is the real game: not five in a row, but two threats at once.

This guide covers both halves. The first half gets the rules right, including two details most players get wrong — the overline rule and the difference between freestyle, standard, and Renju. The second half is the threat ladder, a ten-move opening, and a defence checklist that decide games on a 15×15 board.

The Rules in One Page

The board and the turn order

Gomoku is played on a 15×15 grid: 225 intersections. Stones go on the intersections, not inside the squares. Once placed, a stone never moves and is never captured, so every move is permanent — there is no such thing as a temporary sacrifice.

A wooden gomoku board seen from above with black and white stones near the centre

Black moves first, players alternate one stone per turn, and the game ends when someone wins or the board fills up. The official Gomoku rules maintained by the Renju International Federation define the aim in a single sentence: each player tries to create an uninterrupted row of exactly five stones of their colour, horizontally, vertically, or diagonally.

What counts as five

Four directions count: horizontal, vertical, and both diagonals. Three stones with a gap do not count, and neither does a line that runs off the board.

The detail that trips people up is the word exactly. Under the official rule set, a line of six or more — an overline — is not a win. Article 4.3 of the RIF rules says it plainly: if a player creates a row of six or more stones, the game continues. Only five wins.

That is not a technicality. It changes how you attack. If you are one move from six in a row but every five-stone window inside that line is blocked at both ends, you have gained nothing, and in Renju you have committed a foul.

Draws

A game is drawn if every intersection is filled and nobody has five, or if both players agree to a draw after at least one move each. Draws are rare on a 15×15 board between beginners and almost unheard of between strong players — the first player's advantage is too large.

Three Rule Sets: Freestyle, Standard, and Renju

"Gomoku rules" is not one rule set. Before your first stone, find out which of these three you are playing, because they reward different moves.

Freestyle. No restrictions, and a line of six or more counts as a win. Most browser and mobile versions use this, because it is the simplest to implement and the most forgiving to play.

Standard. The exactly-five rule applies, so overlines do not win. This is the version the RIF governs for international competition, and the version the solved-game literature analyses.

Renju. The professional variant. Black may not make a double three, a double four, or an overline; committing one is a foul and loses the game. White has no restrictions and wins with six or more. Renju exists because unrestricted gomoku is a forced win for Black — the forbidden moves are a handicap bolted onto the rules to make competition meaningful.

Close-up of glossy black and white stones clustered on an engraved wooden grid

Swap2 opening. Official Gomoku handles the first-player problem differently: instead of handicapping Black, it makes the opening a small auction. The first player places three stones in the order black, white, black. The opponent then either picks a colour, or adds two more stones (white, then black) and lets the first player pick. Nobody keeps both the first move and the choice of colour.

Why the rule set changes your tactics

The threat-space analysis that solved gomoku found that the standard variant — the one where overlines do not win — needed a larger search tree than the unrestricted version: 153,284 nodes against 138,790, according to the UC Irvine summary of the solved-game result. The restriction does not make life easier for the attacker; it removes one of the attacker's shortcuts. If you are playing standard gomoku and building a six-stone line "just to be safe", you are playing the wrong game.

Why Black Should Win Every Game

Gomoku is a solved game. Japanese professionals claimed for decades that Black wins with perfect play, and the claim was finally substantiated by the program Victoria, which used threat-space search and proof-number search to show that the first player wins in 18 moves — 35 ply — against any optimal defence. The solution tree covered 138,790 positions.

The UC Irvine write-up of that result spells out the consequence: the program always wins when it plays Black, and the game was retired from computer competition as a result.

So why does a human playing Black lose? Because "18 moves against optimal defence" is not a tip you can memorise. It is a 35-ply forcing sequence: every Black move has to create a threat that White must answer, and the moment Black plays a move that is merely good instead of forcing, the sequence collapses. Humans do not lose because the theory is wrong. They lose because they cannot hold 35 plies of forcing moves in their head.

Modern AI research runs into the same wall from a different direction. AlphaZero-style systems applied to gomoku point out the game's built-in bias toward the first player and use Monte Carlo tree search plus self-play to cope with the tactical space. The telling detail for a human player is what those systems spend their compute on: not opening theory, but threat sequences.

Which gives you a usable reframe. You are not trying to play perfectly. You are trying to reach one position where you have two winning points and your opponent has one move.

The Threat Ladder

Every position can be graded by how many threats it contains. Work up the ladder and the board becomes readable.

Level 1: two

Two stones with open space on both sides. No immediate danger. Its value is optionality: from a two you can build a three in two directions.

Beginners overvalue twos because they look like progress. They are not a threat. They are a seed.

Level 2: three

Three stones in a row with at least one open end. An open three — space at both ends, shape . X X X . — is a genuine threat, because it becomes an open four next turn, and an open four cannot be stopped. A closed three, blocked at one end, is far weaker: it can only become a closed four, which has a single winning point.

This is the first real decision point in every game. An open three forces a response. A closed three usually does not.

Level 3: four

Four stones with one winning point left is a closed four. The opponent must block, but only in one place, so you have spent a move to force a move. Four stones with two winning points is an open four, and it is already won: no single move blocks both ends.

Level 4: two threats at once

Here is the actual win condition of gomoku. A double three is one move that creates two open threes at the same time. Your opponent blocks one, the other becomes an open four, and the game is over. A four-three does the same with a four and a three, and it is blunter: the four demands an immediate answer while the three converts.

A diagonal line of four white stones with open ends on a gomoku board

A double three is why you lost that game on move twelve. It is also why "just block everything" fails: a purely defensive player answers threats one at a time and never builds one, until a single move creates two he cannot answer.

Reading a position

For every candidate move, ask three questions: does it create a threat, does it answer a threat, and does it do both? A move that scores zero on the first two is a wasted tempo. A move that creates a three while blocking the opponent's three is how strong players accumulate an advantage without ever making a flashy play.

Gomoku is zero-sum, deterministic, and has perfect information — a formal treatment of five-in-a-row as a graph problem from Kyoto University's RIMS builds its analysis on exactly those properties. There is no luck to blame. If you lost, a threat existed and you did not see it.

Threat Shape What it forces
Two . X X . Nothing yet — use it to build
Closed three O X X X . One-point extension; you can often ignore it
Open three . X X X . A block now, or it becomes an open four
Closed four O X X X X . A forced block at one point
Open four . X X X X . Nothing works — two winning points
Double three two open threes at once Nothing works — one block cannot cover both

A Ten-Move Opening Plan

Opening theory runs deep, but a beginner does not need theory. A beginner needs a shape that keeps options open.

Move 1: the centre. The centre has four directions available; an edge has three, a corner two. Playing the centre is not superstition, it is arithmetic — more directions means more potential lines through the same stone.

A single black stone on the centre intersection of an empty gomoku board

Moves 2 to 4: stay connected. A stone that touches an existing stone participates in the same lines. A stone two intersections away starts a new, weaker line. Diagonal connections are common in the opening because a diagonal pair threatens a diagonal line while both stones can still join a row or a column.

Moves 5 to 10: build one shape with two axes. The strongest early shape is a cross or an L: one arm that can become a horizontal three, another that can become a vertical or diagonal three. Two arms from one cluster mean a single move can create threats in two directions — the double three, pre-built.

What not to do. Do not spread three separate lines across the board in the first ten moves. Three separate twos create three threats your opponent can answer one at a time. One cluster with two axes creates a threat your opponent cannot answer at all.

You can test this immediately on the 15×15 gomoku board. Play the AI, and for your first ten games allow yourself only moves that touch an existing stone. The restriction feels artificial for about three games, and after that it becomes how you see the board.

Defence: Read the Threat Before It Lands

Defence in gomoku is not passive. It is the same threat ladder read from the other side.

The three-question scan. After every opponent move, check three things in order: an open three (block now), a four (forced block), and a move that would create two threes at once (prevent the square, not the threat). If none of the three exists, you are free to attack.

Block the open end. When you block a three, block the end that leaves your opponent with the fewest follow-ups. Blocking the end where your own stone already sits is usually better, because the blocking stone joins your own line.

Make your block do two jobs. The best defensive move creates a three of your own, so your opponent has to answer you and the initiative passes back. A block that only blocks buys one turn. A block that also threatens buys the game.

Learn the two forcing patterns. Renju players drill two sequences by name: VCF (victory by continuous fours) and VCT (victory by continuous threats). Both chain forced moves — fours in the first case, threes and fours in the second — until a double threat appears. You do not need to master them to beat casual players, but recognising the shape of a forced sequence is what stops you walking into one.

The same logic scales down. On a 3×3 board it is the tic-tac-toe strategy tree: whoever creates two threats first wins, and perfect play draws. Gomoku is that principle with 225 squares and no ceiling on complexity.

Five Mistakes That Lose Games

  1. Chasing a single line. Four stones in one direction with both ends blocked is worth nothing. Two threes in different directions is worth everything.
  2. Blocking the wrong end. Blocking a three at the end where you have no stones hands your opponent the other side for free.
  3. Playing at the edge for no reason. Edges cut your directions from four to three and give your opponent a free boundary to defend against.
  4. Assuming six in a row wins. In standard and Renju rules it does not, and in Renju Black's overline is a foul.
  5. Rushing the first five moves. The opening is where the double three gets built. Playing it on instinct and "thinking later" means thinking after the position is already lost.

Practice Plan

Make the rules a habit in three steps.

First, play ten games and only make moves that touch an existing stone. That trains clustering.

Second, replay each loss and find the exact move where you allowed two threats. It is almost never the last move; it is usually three or four moves earlier.

Third, before every move in the next ten games, count out loud: how many threats do I create, how many do I answer. If the answer is zero and zero, do not play the move.

More board and card strategy lives in the board game guides section. If you want a shorter puzzle to warm up on, the same threat-reading skill applies to one-line puzzles, where every move is forced.

References