Gomoku

Line up five in a row before the computer does.

How to play Gomoku

Tap an intersection. Make five in a row

Click an empty intersection to place your white stone; the computer answers in black. The first to make an unbroken row of five stones (across, down, or diagonally) wins. Watch the computer’s threats as closely as you build your own.

A solved game that still bites

In 1993 the computer scientist Victor Allis proved that Gomoku on a 15x15 board, with no restriction rules, is a guaranteed win for the first player. You place the white stones here and you move first, so in a strict mathematical sense every game you start is yours to lose. The catch is that perfect play means threading a needle of threats dozens of moves deep. What the proof really tells a human player is where the power sits: the first player wins by attacking, and every quiet, reactive move you make hands your one structural advantage to the computer. Open at or beside the center point (it touches the most possible five-lines) and treat any move that neither creates nor answers a threat as a small concession.

Threats are the whole game

Gomoku looks like tic-tac-toe stretched onto a big board, but winning comes down to one concept: the threat. A line of three or four of your stones that the opponent must answer buys you a free move somewhere else. String two threats together so they cannot both be blocked, and the fifth stone becomes unstoppable. The building block is the open three: three stones in a row with empty points on both ends. Left alone it becomes an open four, which wins on the following move because it threatens to complete five at either end. The computer will block your open threes, so your real aim is the double threat: a single stone that creates two open threes at once, or an open three plus a four.

Building a fork, move by move

Watch how a win actually assembles. Start with two stones side by side: a humble pair, no threat yet, and the computer often answers somewhere else. Extend it to an open three and force a block on one end. Now, instead of pushing the same line, place a stone that starts a second pair crossing through one of your existing stones. You are building two lines that share a stone, and somewhere on the board there is now a single empty point that extends both at once. That point is your fork square. Play it and two open threes exist simultaneously; the computer blocks one, you convert the other into an open four, and nothing stops the five. Stronger players lean on the four-three fork instead (one line making a four, which demands an immediate reply, while another quietly becomes an open three), because unlike a double three, the four half cannot be ignored even for a single move. Chaining forcing fours until a winning fork appears has a name in competitive play: victory by continuous fours. If you take one idea from this page, take this: stones that share lines multiply each other, while stones scattered around the board merely add.

Attack and defence tips

Renju, swaps, and why the pros changed the rules

When you must defend, prefer blocks that also grow one of your own shapes: a stone that stops the computer's three while extending your pair costs nothing. Remember the pecking order too: fours outrank threes, so if the computer builds a plain three while you can make a four, make the four and force it to respond first. Beyond this page the game has a longer story. Gomoku, also called Five in a Row or Gobang, takes its name from the Japanese gomoku narabe (lining up five stones) and is traditionally played on the intersections of a Go board. Because the first player's edge is provably decisive, serious competition reins it in: Renju forbids the first player from playing double threes, double fours, and overlines, while modern championship Gomoku uses swap openings, where one player sets up the opening stones and the other chooses which side to take, an elegant fix, since whoever places the stones has to make them fair. The friendly version here keeps it pure: connect five, first one there wins.

Gomoku leaderboard

Top scores. Log in to compete.

  1. Loading leaderboard…

Gomoku: frequently asked questions

Where do stones go?

On the line intersections, Go-style, not inside the squares.

How does the Hard AI play?

It scores every candidate point by the threats it creates and blocks, and on Hard it looks a move ahead before committing.

What is an open three in Gomoku?

It is a row of three of your stones with an empty point at each end. If ignored it becomes an open four, which wins because you can complete five on either side, so experienced players treat every open three as urgent.

Does the first player have an advantage?

Yes: a decisive one in theory. Freestyle Gomoku was proven a first-player win with perfect play back in 1993. You move first here, so press the advantage by attacking early rather than playing safe.

How do I create a double threat?

Look for a single empty point that would give you two separate open threes, or a three and a four together. The opponent can only block one of them, so the other runs through to five and wins.

Does a row of six or more still count?

In this version an unbroken row of exactly five settles the game the moment it forms. Some strict rule sets rule that an overline of six or more does not count for the first player, but here simply connecting five wins.

Why is the board so much bigger than tic-tac-toe?

The 15x15 grid leaves room for long lines and several simultaneous threats. On a tiny board five in a row would be nearly impossible; that open space is exactly what makes forks and defence interesting.

Where should my first few stones go?

Start at or next to the center point, then keep new stones within one or two intersections of your existing ones. Early stones are not threatening anything yet: they are claiming a patch of board where several of your future lines can overlap and reinforce each other.

Is Gomoku free to play?

Yes. Gomoku is completely free on Inkplay, with no download, no sign-up, and no in-game purchases. Open the page and play instantly on desktop or mobile.

Can I play Gomoku unblocked?

Yes. Gomoku runs entirely in your browser with no download, install, or plugins, so it loads instantly and keeps working even on school or work networks where bigger game sites get blocked.

More games to play

In the mood for more? Try Chess, Tic Tac Toe, Connect Four, Reversi, or browse all board games and the full games list on Inkplay. Gomoku also appears in Strategy Games.

This game has been removed

It's no longer available. Try one of our other games instead.

Browse games