About Gomoku

Play Gomoku (Five in a Row) free online. Place stones on the board and connect five in a line to win. Play vs a friend or the computer — no sign-up needed.

How to use

  1. Pick a difficulty using the segment buttons: Easy plays nearby moves with light evaluation, Medium (default) looks 1-2 plies ahead with threat scoring, and Hard uses deeper search and recognizes most open-three and four threats. Switch modes any time and press New Game to start over on a fresh 15x15 board.
  2. Click any empty intersection to place your stone — Black moves first by tradition, then turns alternate. Stones are permanent: once placed they cannot be moved or removed. Use the Undo button to take back your last move and the AI response if you want to try a different line.
  3. Open with a stone near the center (the 8-8 intersection on a 15x15 board). The center has the most potential lines passing through it, giving you a long-term positional edge — it's the Gomoku equivalent of opening with a center pawn in chess.
  4. Watch for threes (three in a row with at least one open end) — these MUST be blocked or extended next turn, or your opponent makes a four. An open three (both ends free) is even more dangerous because blocking only one end still lets the other become an open four.
  5. An open four (four in a row with both ends free) is an immediate win threat — the opponent can only block one end, and you complete five on the other. The defensive priority order is: open four > four > open three > three > two.
  6. Set up double threats (also called forks): a single stone that simultaneously creates two separate threes or fours. Your opponent can only block one, so you complete the other on your next turn. The 4-3 fork (one open four plus an open three) is the most common winning pattern.
  7. Win by connecting exactly five stones in an unbroken horizontal, vertical, or diagonal row. In standard Gomoku rules used here, six or more in a row also counts as a win (some tournament variants require exactly five — this version uses the more permissive freestyle rule). The game ends in a draw if the board fills with no five-in-a-row formed.

Frequently asked questions

What is Gomoku?
Gomoku, also known as Five in a Row or Gobang, is an abstract strategy board game for two players. It is traditionally played with black and white stones on a 15x15 or 19x19 grid (the same board used for Go). Players take turns placing one stone on an empty intersection, and the first player to form an unbroken line of exactly five stones — horizontally, vertically, or diagonally — wins. The game originated in Japan and has been popular across East Asia for centuries. Despite its simple rules, Gomoku has deep strategic complexity.
Can I play against the computer?
Yes — you can choose between playing against a friend on the same device or challenging the built-in computer AI. The computer evaluates threats and opportunities on the board to make competitive moves. Playing against the AI is a great way to practice recognizing attack patterns and defensive formations before facing human opponents. You can start a new game at any time to try different opening strategies.
What are the best strategies for winning at Gomoku?
The strongest Gomoku strategy is creating double threats — positions where you have two separate ways to complete five in a row on a single move. Since your opponent can only block one threat per turn, a double threat guarantees a win. To set these up, focus on building open threes (three stones in a row with both ends empty) because an open three can become an open four on the next move. Also control the center of the board early, as center stones participate in more potential lines. Avoid playing too close to the edges where your options are limited.
Is Gomoku the same as Go?
No — Gomoku and Go are completely different games that happen to use the same board and stones. In Go, players compete to surround territory and capture groups of opponent stones through encirclement, with complex scoring at the end. In Gomoku, the only objective is to place five stones in a row. Go is widely considered one of the most complex strategy games in existence, while Gomoku has simpler rules but still offers significant strategic depth. Both games originated in East Asia and are part of the same family of abstract board games.
Does the first player always win in Gomoku?
On a standard board without restrictions, Black (the first player) has a proven mathematical advantage and can force a win with perfect play. This was demonstrated through computer analysis. Because of this, tournament Gomoku often uses balancing rules like the Swap2 opening protocol, where the first player places two black stones and one white stone, and the second player chooses which color to play. Some rulesets also ban overlines (more than five in a row) or restrict opening moves to level the playing field.
What is an open four in Gomoku?
An open four is a line of four stones in a row where both ends are empty, meaning your opponent cannot block both sides in one move. Creating an open four essentially guarantees you will complete five in a row on your next turn. The strategic goal in Gomoku is to build toward open fours while preventing your opponent from creating them. If you can set up a double open three — two separate open threes created in a single move — your opponent faces an impossible dilemma and you win.
Is Gomoku free to play?
Completely free with no ads, no sign-up, and no downloads. The game runs in your browser on any device — phone, tablet, or desktop. If you enjoy Gomoku, try other strategy games like Chess, Nim, or Mastermind.

Part of ToolFluency’s library of free online tools for Games & Fun. No account needed, no data leaves your device.