Play Gomoku (Five in a Row) Online Against the Computer or a Friend

Gomoku, also called Five in a Row, is won by building an unbroken line of five stones while stopping your opponent's threats. Play Gomoku (Five in a Row) free in your browser against adjustable AI. No download or account.

Why play Gomoku here?

Three rule sets on one board — Freestyle, Exactly Five and forbidden moves — and a move on a forbidden point is refused with the reason. Hint marks the forcing move; a new puzzle lands daily.

How You WinBe the first to place five of your stones in an unbroken horizontal, vertical, or diagonal line. If the board fills with no such line, the game is a draw.

Board
15 × 15 intersections
First move
Black

How to play Gomoku in one minute

  1. Under Side choose Black, White or 2 players; against the computer, also pick a Level from 1 to 9 — higher numbers play stronger. Black moves first.
  2. Tap an empty intersection to place a stone. Stones never move and are never captured.
  3. The first to line up five of their stones horizontally, vertically or diagonally wins; if all 225 points fill up with no five, the game is a draw.
  4. Three stones in a row with both ends open is an open three: left alone, it becomes an open four that can make five at either end. So when your opponent has an open three or a four, block it first.
  5. The usual way to win is one move that makes two threats at once, such as a four plus an open three (a four-three); your opponent can block only one of them.
  6. Under Rules you can switch to Exactly Five (six or more in a row does not win) or Forbidden Moves (Black may not make a double three, a double four or an overline; White has no limits). Changing the rules starts a new game.

Hint marks a recommended move on the board and shows the search depth and score; Undo takes back the last round. After the game, Review opens it from History move by move, and Analyze finds a forced win you missed or a move that handed your opponent one, and marks a better point on the board.

Playing Gomoku here: common questions

Is Gomoku free to play here? Do I need to download anything or sign up?

It is free, with no download and no account: the board opens in the browser on a computer or a phone. The Gomoku AI runs on your own device, and an unfinished game comes back when you return in the same browser.

Can two people play Gomoku on one device?

Yes. Set Side to 2 players and take turns on the same phone or computer, Black first and at the near side; Undo takes back one move at a time. There is no computer in a two-player game, so the Level row is hidden, and you can switch back to playing the computer mid-game and carry on from the same position. There are no online rooms, so you cannot play someone who is not with you.

Can I play Gomoku against the computer? How do I choose a level?

Yes. Choose Black or White under Side and the computer takes the other colour. There are eight levels and a first visit starts at level 2; start at 1 or 2 if you are new, and move up when you win comfortably. You can change the level mid-game, and the next move uses the new one.

Which AI does the computer use?

A Gomoku search engine written for this site: alpha-beta search with PVS that reads shapes under the rules you chose and searches deeper at higher levels. Hint uses the same engine. Everything runs locally in your browser, with no server involved.

What is the difference between Freestyle, Exactly Five and Forbidden Moves?

Freestyle is the default: five or more in a row wins. Exactly Five needs exactly five, so an overline of six or more does not win. Forbidden Moves limits Black only: Black must make exactly five and may not play a double three, a double four or an overline, while White has no limits, which offsets Black's first-move advantage (this rule set is still marked Preview). A stone on a forbidden point is refused, with the kind of forbidden move named. Changing the rules starts a new game.

Are there Gomoku puzzles to practise?

Yes. Puzzles & practice has more than 300 Gomoku puzzles on fives, open threes, fours and forced wins. Work through them as a level path of 60 stages, or solve the daily puzzle. They are free and need no account.

Can I review a game after it ends?

Yes. Review opens History, where finished and abandoned games on this device can be replayed move by move, with your wins, draws and losses against each AI level. Analyze looks for two kinds of mistake — missing a forced win of your own, or handing your opponent one — and marks a better point on the board. Games are stored only in your browser.

Is there a limit on hints or undos?

No. Hint can be used on any move: it marks a recommended move on the board and shows the search depth and score. Undo takes back the last round against the computer and one move in a two-player game, and can be pressed again to go further back.

How do you win more often at Gomoku?

Open near the centre, where all four directions are free. Before each move check three things: can you make five, can your opponent make five, and does your opponent have an open three; deal with whichever applies first. Attacks come from one move that makes two threats — the four-three is the most common, and under Freestyle Black may also use double threes and double fours. The full rules page covers the shapes and winning patterns, and the puzzles let you practise them one by one.

Is Gomoku the same as Renju or Go?

Gomoku is five in a row, which is what this page plays. Tournament Renju adds special opening rules on top of Black's forbidden moves; the Forbidden Moves option here has the forbidden moves but not the opening rules. Gomoku borrows the board and stones of Go but is an entirely different game, and Go has its own page on this site.

Complete Gomoku (Five in a Row) rules and beginner guide

Gomoku puzzles: one a day, plus a journey from easy to hard

Loading…