Rules, threats, and the patterns that win Five in a Row
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.
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.
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.
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.
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.
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.
The PlayVersusAI Gomoku engine scores every candidate square by the attacking and defensive threats it creates, and on higher difficulties searches several moves ahead:
| Difficulty | What to expect |
|---|---|
| Easy | Occasionally misses your winning threats - great for learning shapes. |
| Medium | Always blocks immediate wins and builds its own threats greedily. |
| Hard | Searches ahead; punishes slow moves with forcing sequences. |
| AI Training | Deep search under a time budget - bring your best forks. |
Free to play - no account needed