Strategy · Board Game

Gomoku

Be first to line up 5 stones in a row on this 15×15 board against a tactical AI.

Overview

Fifteen by fifteen squares, two colors of stone, and a single goal: line up exactly five in a row. Gomoku is the cleanest of the five-in-a-row family, and what sets this build apart is that it plays strict exact-five rules, meaning a row of six or longer does not count as a win, so overlines are off the table and the whole game turns on reading threats. The AI is built around that fact. It plays both offense and defense simultaneously, scanning for its own open fours and threes while shutting down yours, which makes it noticeably sharper than a random-placement bot. The board highlights the winning cell when a five completes, an undo button lets you take back a misclick or retry a line, and the win, loss, and draw totals carry across games so you can track how the matchup is trending.

How to Play

Click any intersection on the fifteen-by-fifteen grid to drop your stone; on touch screens it is a tap on the intersection. There is no piece movement, no captures, no removals — once a stone is down it stays for the rest of the game. You and the AI alternate turns, and the first side to claim five intersections in a straight line — horizontal, vertical, or diagonal — wins, with the winning cell lit up so the line is obvious. Remember that the rule is exactly five, so a six-in-a-row does not score, which means you sometimes have to block your own extension to keep a win live. The undo button retracts your last move if you want to try a different shape.

Tips & Strategy

Learn to read threes and fours. An open four — four in a row with both ends free — wins next turn no matter what, so the AI will scramble to block it, and an open three that the opponent ignores becomes an open four on your next move, which is why open threes are the real engine of a winning attack. Build two threats at once: a "double threat" position, where you are threatening two separate lines of three or four, cannot be blocked in a single move and usually ends the game. Because the AI watches both offense and defense, expect it to answer your threes immediately, so set up your attacks so that the forced block still leaves you a follow-up. Tight, central play beats spreading stones across the board, since central stones contribute to lines in more directions.

Controls

Keyboard
Click intersection to place stone
Mouse
Click board intersection
Touch
Tap board intersection

Features

  • 15×15 board
  • Threat-based AI (offensive + defensive)
  • Exact 5-in-a-row win (no overlines)
  • Winning cell highlight
  • Undo last move
  • Win/loss/draw stats