What Is Gomoku?

Gomoku - literally "five points" in Japanese, and known in English as Five in a Row - is one of the oldest and purest abstract strategy games in the world. Two players take turns placing black and white stones on the intersections of a grid (15x15 in the standard modern game, which is what we use). The first player to line up five or more of their stones in an unbroken row - horizontally, vertically, or diagonally - wins immediately.

The rules take ten seconds to learn, but the game is anything but shallow: because stones never move or get captured, every single placement permanently shapes the battlefield. Games are short, sharp, and tactical, which makes Gomoku a perfect "one more round" game.

The Rules

  • Black moves first, placing one stone per turn on any empty intersection.
  • Stones are permanent - they never move and are never removed.
  • Five in a row wins - horizontal, vertical, or diagonal. On our board, longer lines (overlines) also count as wins.
  • A full board with no five is a draw - extremely rare in practice.

On PlayVersusAI you play black (moving first) against the AI, or either color against a friend in online multiplayer. Serious tournament Gomoku adds opening restrictions for black (the "swap" and "Renju" rules) because moving first is a big advantage - we keep the classic free rules for casual play.

Core Strategy: It's All About Threats

The open three

Three stones in a row with both ends empty (for example _XXX_) is the most important shape in Gomoku. If your opponent ignores it, you extend it to an open four (_XXXX_), which is unstoppable: it threatens five on two different ends, and one move can't block both. An open three therefore forces a response - which means whoever keeps making open threes controls the whole game.

The double threat

Every single threat can be blocked, so single threats never win against decent defense. Winning positions come from double threats: one stone that simultaneously creates two open threes (the classic 3x3 fork), or a four and an open three (4x3). Your opponent can only answer one - the other becomes five. Almost every won game of Gomoku ends with a fork, so learn to spot the crossing points where two of your lines intersect.

Forcing sequences

A four (even a closed one, like OXXXX_) forces your opponent to block immediately - it's a free move for you. Strong players chain forcing fours to drag the opponent around the board, then land the final fork while the opponent is stuck responding. When you have several fours available, look for the order that ends in a double threat.

Shape and spacing

Not all connected stones are equal. Spaced shapes like X_X_X (a "split three") are sneaky - they're harder to see and can complete into fives through the gaps. Meanwhile clumps of stones that share no open lines are dead weight. Before each move, ask: how many different five-lines does this stone participate in? Central intersections join up to 20 lines; corners join only 3, which is why the fight starts in the middle.

Common Mistakes to Avoid

  • Blocking on the wrong side. When you must block a three, prefer the side that also extends one of your own lines - defense and offense in a single stone.
  • Chasing your own line while the opponent builds a fork. Count your opponent's threats every turn, not just your own. If they're one move from a double three, blocking beats attacking.
  • Playing too far from the action. A stone four spaces from every other stone almost never matters. Nearly all strong moves are within two intersections of existing stones.
  • Ignoring diagonals. Most missed blocks are diagonal threats - they're simply harder to see. Scan all four directions before you commit.
  • Building closed lines. A three blocked on one end (OXXX_) needs both of its remaining extensions to survive; it's worth a fraction of an open three. Don't invest in dead shapes.

Playing Against Our AI

The PlayVersusAI Gomoku engine scores every candidate square by the attacking and defensive threats it creates, and on higher difficulties searches several moves ahead:

DifficultyWhat to expect
EasyOccasionally misses your winning threats - great for learning shapes.
MediumAlways blocks immediate wins and builds its own threats greedily.
HardSearches ahead; punishes slow moves with forcing sequences.
AI TrainingDeep search under a time budget - bring your best forks.

Frequently Asked Questions

Is Gomoku the same as Connect 4?
They're cousins, not twins. Connect 4 needs four in a row on a small vertical grid where gravity decides row placement; Gomoku needs five on a large open board where you can play anywhere. Gomoku has vastly more freedom and is considered the deeper game.
Does the first player always win?
With perfect play on free rules, yes - black has a proven winning strategy. That's why professional play uses opening restrictions (Renju rules). Between humans (and against our AI), the first-move edge is real but far from decisive.
What is an "overline"?
Six or more stones in a row. Under strict Renju rules an overline does not win for black; in our casual rules, any line of five or more wins for either player.
Can I play Gomoku against a friend here?
Yes - head to the multiplayer lobby, create a Gomoku match, and share the room code. Moves sync in real time.
Play Gomoku Now

Free to play - no account needed