Rules guide

Gomoku rules

Gomoku rules explained: the 15x15 board, Black moves first, five in a row across, down or diagonally, overlines, draws, and the variants renju and swap2.

Updated 9 min readBy the Pass and Play Games team

Play Gomoku nowFree · 2 players on one device or vs the computer · works offlinePlay Gomoku

Gomoku is a game for two players on a board of 15 by 15 lines. One player has black stones, the other white, and they take turns placing one stone on an empty point where two lines cross. Black moves first. The first player to make an unbroken line of five stones across, down or diagonally wins. Stones are never moved or captured. This guide explains each rule, the difference between freestyle and exactly-five play, the variants renju and swap2, where the game comes from, and the exact rules this site uses.

Watch: how to play Gomoku

How to Play Gomoku: Five in a Row Rules Explained

Video, 4:24Watch on YouTube

Chapters

Gomoku at a glance

Feature Details
Players 2 (or 1 against the computer)
Typical time 5 to 15 minutes per game
Ages About 6 and up
Equipment A grid of 15×15 lines and two colors of stones (or a pencil and squared paper)
Other names Five in a Row, Gobang, Wuziqi, Omok, Gomokunarabe

The appeal is that the rules fit in one sentence, yet the game rewards careful reading of the board. Every stone you place can extend your own lines and block your opponent’s at the same time.

How to Play Gomoku (Rules)

The goal

Be the first player to place five of your own stones in an unbroken line. That is the whole objective: nothing is counted at the end, and there are no points for long lines or blocked stones. The first winning line ends the game at once, even if the opponent was about to win on the next move.

The 15×15 board and the stones

The board is a square grid of 15 horizontal and 15 vertical lines. Stones are placed on the points where lines cross, including the points along the edges and in the corners, so there are 15 × 15 = 225 places to play. The board starts empty. One player has a supply of black stones, the other white; neither side ever runs out.

ABCDEFGHIJKLMNO123456789101112131415
The 15×15 board: 225 points, columns A–O, rows 1–15. The center point is H8.

To describe positions, players use coordinates. The columns are lettered A to O from left to right and the rows are numbered 1 to 15 from the bottom, so the center point is H8 and the top left corner is A15. The five small dots are star points (D4, L4, D12, L12 and H8). They have no effect on the rules; they just help your eye find its way around a large board.

A stone is placed on an intersection and stays there for the rest of the game. There are no captures, unlike in Go, and no stones are ever removed or slid to another point. (On this site Undo takes back the last move, which is handy for slips; agree beforehand whether it is allowed in a serious game.)

Taking turns: Black moves first

  1. Black places one stone on any empty point. Most players start in or near the center.
  2. White places one stone on any other empty point.
  3. Players keep alternating, one stone per turn, until someone makes five in a row or the board is full.

You must place a stone on your turn; there is no passing. You may use any empty point, anywhere on the board. You may never place a stone on top of another one, and you may never place two stones in one turn.

Moving first is a serious advantage, so decide fairly who plays Black and swap colors after every game. On this site Black always moves first, and Rematch swaps the colors so each player gets Black in turn.

How to win: five across, down or diagonally

A winning line is five neighboring points in one straight line, all holding your stones. It can run in any of four directions:

  1. Across: five points in a row, such as D12 to H12.
  2. Down: five points in a column, such as L9 to L13.
  3. Diagonally, falling: such as D9, E8, F7, G6, H5.
  4. Diagonally, rising: such as I3, J4, K5, L6, M7.
CDEFGHIJKLM131211109876543
Five in a row counts in all four directions: across (D12–H12), down (L9–L13) and along both diagonals (D9–H5 and I3–M7).

Gaps break a line: four black stones with an empty point between them are not five until Black fills the gap, and if White fills it first, that line can never win. A line also stops at the edge of the board; it never wraps around to the other side. Blocked ends don’t matter once the five is complete.

CDEFGHIJK2345678910
A diagonal five, E4 to I8. Blocked ends don't matter once the five is complete.

Overlines: six or more in a row

A line of six or more stones of one color is called an overline. There are two common ways to treat it:

  • Freestyle (five or more wins). Any unbroken line of at least five wins, so an overline wins too. This is the default on this site.
  • Exactly five. Only a line of exactly five wins. An overline does not count, the game continues, and those stones simply stay on the board. On this site you can choose it in the setup as Exactly five.
BCDEFGHIJ678910
An overline: six black stones from C8 to H8. It wins under freestyle rules, not under exactly five.

Under the exactly-five rule the same move can still win if it also makes an exact five in another direction. For example, a stone that completes an overline across and an exact five down wins through the line down. The rule applies equally to Black and White.

Draw

If all 225 points are filled and nobody has a winning line, the game is a draw. This almost never happens on a 15×15 board, but it is part of the rules, and it becomes a little more likely under the exactly-five rule, when lines that grow to six stop counting.

Because games are fairly short, most people play a series and count wins. Since Black has the advantage, the fairest series alternates colors every game, which is what Rematch does here. The game-over screen keeps a running score for your session.

Gomoku Rule Variants

Five-in-a-row games come in several flavors. These are the ones you are most likely to meet.

Freestyle

Five or more in a row wins, for both players, with no restrictions on where you play. This is the version most people learn first and the default on this site.

Standard (exactly five)

As above, but only a line of exactly five wins; overlines do not count for either player. It slightly reduces Black’s attacking options, because some lines that would grow into six stop being threats.

Renju

The tournament variant, played on a 15×15 board and governed by the Renju International Federation. It balances Black’s first-move advantage with restrictions that apply to Black only: Black may not make a double three (two open threes with one stone), a double four, or an overline. White has no restrictions and even wins with an overline. Renju also fixes how the first few stones are placed, using special opening rules.

Swap and Swap2

Opening rules that make the game fair without changing the rest of the rules. In the simple swap rule, one player places the first three stones (two black and one white), and the other player then chooses which color to play. In swap2, used in modern Gomoku tournaments, the second player has three choices after those three stones: take Black, take White and place the next stone, or place two more stones (one of each color) and hand the choice of color back.

Which rules this site uses

This site uses freestyle Gomoku on a 15×15 board: Black moves first, there are no opening restrictions or swap rules, five or more in a row wins, and a full board is a draw. You can switch the overline rule to Exactly five in the setup. Rematches swap colors so both players get the first move equally often. Gomoku was traditionally played on a 19×19 Go board, and some players still prefer the extra space, but the rules are the same on any size.

History of Gomoku

Games about lining up stones on a grid are old and widespread, and Gomoku’s own history is easiest to follow in Japan. Its origins there are usually traced to the mid-1700s, during the Edo period, and the earliest book about it that can be verified was published in 1856. The Japanese name, Gomokunarabe (五目並べ), means roughly “lining up five”: go is five, moku is a word used for counting stones, and narabe means placing in a row. Gomoku is the short form.

The game reached Britain in the nineteenth century as Go Bang, a name said to come from goban, the Japanese word for a Go board, and Gobang is still a common English name. In China the game is Wuziqi (五子棋), literally “five-piece game”, and in Korea it is Omok (오목), a name built the same way as the Japanese one. In English it is often simply called Five in a Row, and many people first meet it with a pencil on squared paper.

In 1899 the Japanese journalist Kuroiwa Ruikō proposed the name renju, “connected pearls”, and over the following decades Japanese players added the restrictions on Black that define renju today. Computers later confirmed why such rules were needed: in 1994 L. Victor Allis showed that Black can force a win in both freestyle and exactly-five Gomoku on a 15×15 board, and in 2001 János Wágner and István Virág showed the same for renju without its opening rules. Modern tournaments therefore rely on opening protocols, and tournament Gomoku adopted swap2 in 2009.

Common mistakes and rule disputes

“A four with a gap is a five.” It is not. All five points must be filled with your stones, with no empty point and no opponent stone in between.

“Diagonals don’t count.” They do. Diagonal lines win exactly like rows and columns, and they are the ones people miss most often.

“Six in a row doesn’t win.” It depends on the rule you agreed on. In freestyle Gomoku, the default here, it wins. Under the exactly-five rule it does not. Settle this before the game starts.

“You have to block my three.” You don’t have to do anything; any empty point is a legal move. Ignoring an open three is usually a mistake, though, because it can become a four that is open at both ends, and that cannot be stopped.

“I get another turn because I blocked you.” Blocking earns nothing extra. Players always alternate one stone at a time.

Glossary

  • Point: an intersection of two lines, where a stone can be placed.
  • Five: an unbroken line of five stones of one color; it wins.
  • Overline: an unbroken line of six or more stones of one color.
  • Four: four stones that need only one more stone to make five.
  • Open four (straight four): four in a row with both ends empty, so there are two winning points and the opponent can block only one.
  • Open three: three stones that can become an open four with one more stone, for example three in a row with both ends free.
  • Broken three: an open three with a gap, such as X X . X.
  • Double threat: one stone that creates two threats at once, such as a four and an open three (a “4-3 fork”).
  • Freestyle: the rule where five or more in a row wins.
  • Renju: the tournament variant with restrictions for Black.
  • Swap / swap2: opening rules that let the second player choose a color after the first stones are placed.

Play it now

The rules take a minute; the tactics take a lot longer. Open Gomoku to play with a friend on one device or against the computer on Easy, Medium or Hard. When you know the rules, our Gomoku strategy tutorial explains open threes, fours and the 4-3 fork with a full sample game. If you would rather start smaller, Tic-Tac-Toe uses the same idea with three in a row on a 3×3 grid, and pen and paper games lists more games for a grid and a pencil.

Frequently asked questions

Something else? Ask us.

How many stones in a row do you need to win Gomoku?

Five. The first player to place five of their own stones in an unbroken line across, down or diagonally wins. Under the freestyle rule a line of six or more also wins; under the exactly-five rule it does not, and the game goes on.

Can you win Gomoku diagonally?

Yes. A five along either diagonal wins exactly like a five across or down. Diagonal lines are the ones players miss most often, so check both diagonals through your opponent's last stone before every move.

Does a gap break the line?

Yes. Five in a row means five neighboring points in one straight line, all holding your stones. Four stones with an empty point in the middle are not a five until the gap is filled, and a gap filled by your opponent ends that line for good.

Can stones be captured or moved in Gomoku?

No. Unlike Go, Gomoku has no captures, and stones never move. Once a stone is placed, it stays on that point until the end of the game, which is why every placement matters.

Is it fair that Black always moves first?

Not entirely. Moving first is a big advantage: in 1994 L. Victor Allis showed by computer search that Black can always force a win in both freestyle and exactly-five Gomoku on a 15x15 board without opening rules. Casual players alternate colors between games; tournaments use renju restrictions or opening rules such as swap2 to even things out.

What is an overline?

An overline is an unbroken line of six or more stones of one color. In freestyle Gomoku it wins like a five. Under the exactly-five rule it does not count, and in renju it is a forbidden move for Black but a win for White.

What size is a Gomoku board?

The usual board today has 15 lines in each direction, giving 225 points. Gomoku was traditionally played on a 19x19 Go board, and some people still use one. This site uses 15x15, which also fits a phone screen.

What happens if the board fills up?

If every point is occupied and nobody has made a winning line, the game is a draw. On a 15x15 board this is very rare, because one player almost always completes a five long before the board is full.

Next: learn to play well

All articles

Other rules guides

Add to your Home Screen

Install Pass and Play Games so it opens like an app and works offline.

  1. Tap the Share button in Safari’s toolbar.
  2. Scroll down and tap Add to Home Screen .
  3. Tap Add. The games now open from your Home Screen.

Settings

Saved in this browser only.

Theme

Playing

Display and accessibility

Motion

Reduce turns off sliding and fading. Match device follows your phone or computer.

Your data

Players, scores, word packs, saved games and these settings stay in this browser.

Some browsers clear saved data after a while. A backup keeps it safe.