Rules of Gomoku
How to play, how to win, and the exact rules used on this site
The rules in five points
- Two players, X and O. X always makes the first move, then the players alternate, one stone per turn.
- Place a stone on any empty cell. There are no restrictions on where you may play.
- Stones stay where they are. Nothing is moved, captured or removed for the rest of the game.
- Five in a row wins. The first player with five of their own stones in an unbroken line - horizontal, vertical or diagonal - wins immediately.
- A full board is a draw. If every cell is filled and nobody has five in a row, the game is drawn.
What counts as a winning line
The five stones must be next to each other with no gaps and no opposing stone between them. Lines can run in four directions: across, down, and along either diagonal.
O
O
O
X
X
X
X
X
X
X
O
O
O
On this site a line of six or more also wins. This is the “freestyle” rule. Some tournament rule sets require exactly five and treat longer lines (called overlines) as nothing special; those differences are explained on the rule sets page.
Rules used on Gomoku Online
| Rule | How it works here |
|---|---|
| Who moves first | X. Against the computer you are always X and the computer is O. |
| Winning line | Five or more in a row in any of the four directions. |
| Forbidden moves | None. Double threes, double fours and overlines are all allowed for both players. |
| Draw | Declared when the board is completely full with no winner. |
| Square boards | 10×10, 15×15 and 20×20. |
| Special boards | Triangle (10 rows, 100 cells) and Cheese (12×12 with 10 random holes). See Boards. |
| Time limit | None in local games. An online game is abandoned after five minutes without a move. |
Game modes
- vs CPU - you play X against the computer at Easy, Medium or Hard difficulty. The computer replies as soon as you move, and its last stone is highlighted so you can see where it played.
- vs Player - two people share one screen and take turns. The status line above the board shows whose move it is.
- Online - you create a room and get a link. Send it to a friend; when they open it, the game starts. The player who created the room is X. No account is needed for either player.
Common beginner questions about the rules
- Do I have to play next to another stone? No. Any empty cell is legal, although playing far from the action is rarely useful.
- Can a line bend or wrap around the edge? No. A line is straight and stops at the edge of the board.
- Does one stone count for two lines? Yes. A stone can be part of a horizontal line and a diagonal line at the same time. Using one stone for two threats is the heart of the game - see strategy.
- Is there an advantage to moving first? Yes, a significant one. With no restrictions on the first player, strong play by X is very hard to stop. The openings page shows a simple way to even this out when two people play on one device.