We’d like to record which pages get opened, where you arrived from, and roughly where in the world you are. It’s kept for 12 months, it stays with us, and none of it is sent until you say yes. What we’d store

Skip to content

Gomoku guide

How to play Gomoku: rules and strategy for five in a row

Gomoku is five in a row on a grid of crossing lines. The rules take a minute to learn and the strategy takes much longer, which is why people have played it for centuries. This page has the rules exactly as our board plays them, then the shapes that win: the open three, the open four, and the double threat that can't be stopped.

Updated

Play on ScampLabsGomokuFree, no account. Try a move from this guide.Invite a friendMore ways to play

The rules

Two players take turns placing one stone on an empty point, the place where two lines cross. Our board is 13 by 13, which is 169 points. Stones never move and never come off. The first player to get exactly five of their stones in an unbroken row, across, down or slanting, wins.

On a phone you tap where two lines cross and the stone goes to the nearest crossing, so you can't land between points. Player 1 moves first. Against the computer you're Player 1, and on one screen the two players share the board.

If all 169 points fill up and nobody has exactly five, the game is a draw. That almost never happens, because one player nearly always builds a winning line long before the board is full.

Why six in a row doesn't win

In our rules a line has to be exactly five. If you join two groups and make six or more in a row, it doesn't count, and the game carries on. Some versions of Gomoku count six or more as a win, so it's the rule new players trip over.

So before you place the stone that finishes a line, look at both ends. If the stone next to your line on either end is already yours, the new stone makes six. Make the five with a different stone, or build the line somewhere else. The same goes for your opponent, which gives you a way to stop them: sometimes the point they need would make six, and it isn't a threat at all.

Apart from that there are no other restrictions. Both players can place a stone anywhere, including the double threats described below.

The shapes to know

Everything in Gomoku is about how many stones you have in a line and whether the ends are open. An end is open when the point next to it is empty.

  • Three: three in a row. It becomes dangerous when both ends are open, which is called an open three.
  • Open three: three in a row with an empty point at both ends. If you let it be, your opponent turns it into an open four next move, so you have to answer it now.
  • Four: four in a row. If one end is blocked it's a closed four: it threatens to make five at the other end, and your opponent has to block that point at once.
  • Open four: four in a row with both ends open. It can't be stopped, because your opponent can only block one end. Get one and you win.

The double threat

A single threat can always be blocked, so winning means making two at the same time. There are two ways to do it.

Four and three: one stone that makes a four, which has to be blocked, and an open three at the same time. Your opponent blocks the four, and you turn the three into an open four.

Three and three: one stone that makes two open threes. Your opponent can only answer one of them, and the other becomes an open four. Look for a point where two of your lines cross.

Both work the same way, so the plan is the same: spread your stones so that your lines cross, not so they pile up in one line that is easy to block.

Playing well

Start near the centre. A stone in the middle has the most room to build in every direction, and stones near an edge have fewer lines to use. Going first is a real advantage in Gomoku, so if you have it, use it to build.

Block an open three at once, and when you can, block it at the end that helps your own lines. If you have to choose between stopping a three and making your own four, make the four: a four forces your opponent's answer, so you keep the move.

Think about the points where your opponent's lines will cross as well as your own. Take a crossing before they do, and you stop a double threat before it starts.

Playing the computer

There are three levels, and all of them finish their own five when they can and block yours when you have four with one open end. So a plain four never wins against any level. You have to make an open four or a double threat.

Easy otherwise plays a random point next to the stones already on the board. Medium also plays any open four, double four or four-and-three it can make, and otherwise picks the best-scoring point within two squares of a stone. Hard does the same and searches four moves ahead, so a simple trap won't work on it. Against Hard, block every open three early and look for the crossing of two of your lines. If the board is empty, the computer's first stone goes in the centre.

Did you like this guide?

Play Gomoku now

It’s free in your browser, with no sign-up. Play Gomoku against the computer, with a friend on the same screen, or send a friend a link and play online. Or tap Quick match to play someone new.

Play on ScampLabsGomokuFree, no account. Try a move from this guide.Invite a friendMore ways to play