←
Streak 0
Best —

Your turn

Gomoku

Gomoku

Gomoku (Five in a Row) — place stones on a 15×15 board and connect five before the AI does.

How to play

A 15×15 board starts empty. You play black and the AI plays white, and you make the first move in every round.

More: full rules and tips

Tap any empty cell to place a black stone; the AI answers with a white stone a moment later. A small red dot marks the most recent stone, so you can always see where the AI just played. There is no clock, so take as long as you need over each move.

Five or more of your stones in an unbroken line — horizontally, vertically or diagonally — wins the round. No moves are restricted: a line of six also wins, and black may set up any double threat.

A win adds 1 to your streak, and a fresh board appears about a second later with you moving first again. A draw (board full with no winner) keeps your streak. A loss ends the run, and if you had at least one win you can save your streak to the Hall of Fame. Pressing New during a run that already has wins also ends it and brings up the save screen; with a streak of 0 it simply clears the board.

The AI changes how it plays as your streak grows. In the first two rounds (streak 0 and 1) it looks only one move ahead: it completes its own five if it can, blocks yours if you are about to make one, and otherwise scores every empty cell within two spaces of a stone for both colours, taking the one that best extends its own lines while cutting into yours. From a streak of 2 it switches to searching up to three moves ahead, and from a streak of 5 it searches up to five moves ahead within about 0.4 seconds per move — its strongest level.

Goal: longest winning streak.

Tips & strategy

Five in a row is won by threats, not by quietly building your own line. The key shape is the "open three" — three of your stones in a row with both ends free — because it forces the opponent to block or you make four and then five. Conversely, the instant the AI lays an open three, you must block it that turn; ignore it once and you have already lost.

The real winning weapon is the double threat, or fork: a single stone that creates two separate open threes (or an open three plus an open four) at once, so the opponent can only stop one and you complete the other. Play near the centre where lines run in every direction, build threats that also block the AI, and always scan the diagonals, which are the lines players miss most. Disguise your setups and keep two threats brewing at all times.

The one-move AI of the first two rounds still reads that one move for both sides. It weighs each cell for your lines as well as its own, and whenever it has nothing more urgent to do, its stone lands on the cell where one black stone would make two open threes — so a single fork you could play next turn will not survive its reply. What it cannot see is the move after that. Aim for a stone that leaves you two fork points at once: most of the time its reply can spoil only one, and you play the other on your next turn.

A four is a move the AI can never ignore: it first checks whether it can make five itself, then makes sure you cannot. That makes fours your steering wheel — you know exactly where the reply will land, so each one can place a stone that also helps a second line. Before you play a four, check that white has no four of its own on the board; if it does, it will simply complete its five instead of blocking. The AI also breaks ties between equally good moves at random, so the same opening never plays out quite the same way twice — learn shapes, not move orders.