The World at PlayWorld Games · Ready to Play
Gomoku board and pieces

Connection Games

Gomoku

Build an unbroken line of five stones while stopping your opponent's threats.

THE WORLD AT PLAY · PLATE NO.01 / 38

How You WinBe the first to place five of your stones in an unbroken horizontal, vertical, or diagonal line. If the board fills with no such line, the game is a draw.

The Story

Where it came from, and why it turned out this way.

OriginEast Asian folk game; named Renju in Japan, 1899

From a street game to a competitive one

"Line up five in a row" is a game that has appeared spontaneously all over the world, and Gomoku has no single inventor. What turned it from a pastime into a competitive discipline was Japan: gomoku narabe was already popular in the Edo period, and in 1899 the newspaperman Kuroiwa Ruikō gave it the name Renju and set about codifying its rules and organizing play. From that point on, the history of this game stopped being about how to play it and became about how to make it fair.

Why only Black is penalized

Gomoku has a fatal problem: the first player is simply too strong. The forbidden-move rules are a patch aimed squarely at that. They do not change the board and they do not change the winning condition — they only add three restrictions for Black: double three, double four, and overline. It is a very engineering-minded solution: if you know which side has the advantage, weaken only that side. So the asymmetry is not favoritism; it is the entire reason the ruleset exists.

In 1993 it was proved a first-player win

The Dutch researcher Victor Allis proved in 1993, using the threat-space search he developed, that freestyle Gomoku on a 15×15 board is a win for Black. The result retroactively justified Renju's forbidden moves and made Gomoku one of the first line-forming games computers cracked outright. Allis's core idea — expand the search tree only along forcing moves — went on to be reused widely in game-playing programs of every kind.

Why shape matters more than openings

A Gomoku stone never moves once placed, so every move is permanent. That makes the game's tactical vocabulary extremely compact: open three, forcing four, four-three, double three. These terms do not describe positions — they describe how many replies your opponent has left. A strong player is not someone who memorized more openings, but someone who can glance at the board and count the threats that demand an answer right now.

  • Kuroiwa Ruikō was far more than a games enthusiast: he founded the newspaper Yorozu Chōhō and produced the Japanese translation of The Count of Monte Cristo that made the story famous there.
  • The Renju International Federation was founded in 1988 and held its first World Championship in Kyoto in 1989, still using refined versions of the forbidden-move rules.
  • To suppress the first-move advantage further, formal Renju competition also developed opening swaps: one player sets up the opening and the other may choose to take White instead.

Complete Rules

Start with what a turn allows and how the game is won.

Board
15 × 15 intersections
First move
Black
  1. Winning conditionthe moment five stones of one color sit next to each other along any of the four directions — horizontal, vertical, or either diagonal — that player wins immediately and the game ends. If all 225 intersections are filled with no such line, the game is a draw.
  2. How a turn worksBlack moves first, then players alternate placing one stone on any empty intersection. A placed stone can never move, never be captured, and never be taken back. You must place exactly one stone per turn; passing is not allowed.
  3. Rule variantsthe settings offer three rulesets, and switching immediately starts a new game. Freestyle — five or more in a row wins for either side, and this is the default. Exact Five — the line must be exactly five, so an overline of six or more does not win. Forbidden Moves — extra restrictions apply to Black only, which is the closest option to tournament Renju.
  4. Under Forbidden Moves the checks run in a fixed order, and understanding that order prevents most misreadings: first, is the move an overline (six or more in one direction)? If so it is illegal. If not, is it an exact five? If so Black wins on the spot. Only if neither applies does the engine go on to test double four and double three. A move that makes five and also forms a double four is therefore a perfectly legal winning move.
  5. Forbidden Moves restricts Black only; White is completely unrestricted. White may play double threes, double fours, and overlines freely, and any White line of five or more wins. This asymmetry exists precisely to offset Black's first-move advantage.
  6. A double four is one move that creates two separate fours, where a "four" means a shape one stone short of an exact five. If filling a given line would only produce an overline, that line does not count as a four and therefore cannot contribute to a double four.
  7. A double three is one move that creates two open threes. The engine tests openness recursively: a three counts only if some legal follow-up move can turn it into an open four with a winning point at each end. If the move that would complete the open four is itself forbidden, that three does not count and the position is not a double three.
  8. Playing on a forbidden point is simply rejected, with a message naming the reason — overline, double four, or double three. The board does not mark forbidden points in advance, so you have to spot them yourself. A rejected move costs you no turn, but it does reveal your intention to your opponent.

Your First Game

Use this order of thought to get through a complete game quickly.

  1. Play your first stone on the center point or right next to it. A central stone can extend in both directions along all four axes, while a stone near the edge has only two or three usable directions — starting on the rim throws away half your potential before the game begins.
  2. Learn the four basic shapes by heart (● your stone, ○ opponent's stone, _ empty). Open three _●●●_ has both ends free and becomes an open four next move, so it must be answered. Blocked three ○●●●_ is sealed at one end and can only ever become a forcing four, so it can wait. Forcing four ○●●●●_ has exactly one point that makes five — block that point and it is dead. Open four _●●●●_ has two winning points and cannot be stopped by a single move, so it wins on sight.
  3. Count broken shapes too. ●●_●● makes five by filling the gap, ●●●_● is a broken four, and _●●_●_ and _●_●●_ are both open threes. Counting only consecutive stones makes you miss about half the threats on the board — this is the single most common source of beginner losses.
  4. Before every move, run the same four checks in order. One: can I make five right now? (If yes, play it.) Two: can my opponent make five next move? (Any forcing four or open four must be blocked first.) Three: does my opponent have an open three? (If unblocked it becomes an open four.) Four: only when none of the above applies do you get to think about your own attack. Build this habit and you will almost never lose to an oversight.
  5. The most basic winning pattern is the "four-three": one move that creates a forcing four and an open three at the same time. Your opponent has to block the four first because it threatens five immediately; once they do, you turn the three into an open four and it can no longer be stopped. Double three and double four work the same way — under Forbidden Moves those two are unavailable to Black but fine for White.
  6. When you defend, prefer the intersection that both blocks your opponent and connects your own stones, so one move does two jobs. Pure defense leaves you more and more passive; the best blocking point is usually also an attacking point for you.

Practical Strategy

Move from knowing the rules to playing with a plan.

  • The core of attacking is creating two threats at once, so that your opponent's single move can only answer one of them. A long line is worthless on its own — if the opponent can keep blocking one end, that line will never reach five. What you actually want is two lines maturing on the same move.
  • A forcing four seizes the initiative: your opponent must respond or you make five. You can use a chain of forcing fours to walk your stones into exactly the positions you need, then land the final stone on the key intersection to create a four-three. But each forcing four burns one of your threat points, so pointless fours drain your winning resources early and thicken your opponent's defensive shape for free.
  • Calculate forcing sequences first: make five, block five, make four, block four. In those positions the reply is unique, so you can push the whole line to its conclusion, see the result, and only then decide whether to enter it. Save the quiet, ambiguous moves for last.
  • Try to make each new stone belong to two or even three potential lines at once — intersections are worth more than segments. A stone where two potential lines cross does the work of two stones, and strong players spend every move hunting for that kind of double-duty point.
  • Under Forbidden Moves, White has a unique way to win: deliberately turn the key point Black needs for defense into a double-three or double-four forbidden point, leaving Black unable to defend there at all. Conversely, when Black attacks, check in advance whether your own shapes will stack into a forbidden move — otherwise a correctly calculated win gets rejected on its final stone.
  • Under Exact Five, watch your own overlines. Once you have four in a row, extending at either end may produce six and win nothing, which effectively kills that line. If a direction is already boxed in toward an overline, switch to another direction early rather than discovering it too late.

Winning and Special Rules

Details that are easy to miss but can change the result.

  • Double three means one move forming two open threes, double four means one move forming two fours, and overline means six or more in one direction. All three are illegal for Black only, and only under Forbidden Moves — they are perfectly legal in Freestyle and Exact Five.
  • The Forbidden Moves ruleset is labeled Preview in the interface: detection uses bounded recursion, checking nested double threes only one level deep, so a handful of extreme shapes may be judged slightly differently than strict tournament Renju would judge them. If you need fully predictable adjudication, choose Freestyle or Exact Five.
  • Your chosen ruleset and AI difficulty are stored locally and restored next time you open the page. Switching rulesets immediately starts a new game, so the current position is not preserved.
  • The most recent stone carries a halo marker so you can see at a glance where your opponent just played, and when the game is won the five stones forming the line are highlighted together, making the winning line obvious.

Common Mistakes

The traps new players fall into most often.

  • Building your own shape while overlooking a forcing four or broken four that is already on the board. In the four-step check, "can my opponent win right now" always comes after your own immediate win and before absolutely everything else.
  • Treating a blocked three like ○●●●_ as an open three and wasting a move defending it — or the reverse, mistaking a broken open three like _●_●●_ for a blocked three and leaving it alone, only to face an open four next move.
  • Playing an attractive-looking Black double three or double four under Forbidden Moves. The move is rejected, you lose the tempo you spent thinking about it, and you have advertised your attacking direction to your opponent.
  • Chasing with a long chain of forcing fours and only discovering at the end that no crossing threat was ever created — you have simply added one defensive stone after another to your opponent's position and run yourself out of moves.
  • Extending a four into six under Exact Five out of habit, expecting a win, and finding that an overline scores nothing while that line is now permanently dead.

Play Gomoku against AI now

Play Now