On this page
How to play Gomoku
To play Gomoku, take turns with the computer placing one stone at a time on an empty point of the board, and be the first to make five of your stones in a row.
The board and the stones
Gomoku is played on a square board of 15 lines by 15 lines, which makes 225 points where the lines cross. Wikipedia notes that 19 × 19 boards were standard in the past; Play5s uses 15 × 15 only, as the RIF rules do. The stones go on the points, not inside the squares, as on a Go board. The board in this version is drawn as a kaya wood board with slate-black and shell-white stones, and the coordinates, A to O across and 15 to 1 down, run round the edge so that you can name any point.
Black moves first, and by default you play Black. You can also play White, so that the computer opens, or play against a friend on the same screen. Players alternate, one stone per turn. A stone is never moved or taken off, so every move stays on the board until the game ends.
Zoom inPlacing a stone
With a mouse, point at an empty intersection and a pale stone shows where yours will go; click to place it. On a phone, tap an intersection to preview the stone and tap the same point again to place it, which stops you from laying a stone on the wrong point with a fat finger. The start screen has a switch that makes one tap enough.
The computer answers with a short pause. When it is your turn again, the "You" chip is lit. If you cannot decide, the Hint button rings the point that the Normal level would play in your place.
When the game ends
The game ends when one side makes a winning row, or when all 225 points are taken without a winner, which is a draw. The five stones that won are joined by a gold line, and the panel that follows shows your moves and time.
How do you win Gomoku?
You win Gomoku by making an unbroken row of five stones of your colour, across, down or on either diagonal, before your opponent does.
The five stones must touch one after another with no gap and no stone of the other colour between them. Rows can run along the edge of the board, and a row on the last line wins like any other. Wikipedia and the Renju International Federation (RIF) describe the aim the same way.
What happens with a row of six or more stones, called an overline, is the one thing the rules disagree about. In freestyle gomoku a row of five or more wins, which is the rule used by Gomocup, the annual contest for gomoku programs. In standard gomoku, as the RIF writes it, the row must be exactly five stones: if you make six or more the game simply goes on. This version lets you choose, and the choice is described in the next section.
Zoom inFreestyle, standard, Korean and Renju rules
This version has four rule sets that you pick on the start screen: Freestyle (the default), Standard, Korean and Renju, and they differ only in what counts as a win and in which stones may not be played.
The four rule sets
Freestyle: five or more in a row wins, for both sides, and nothing is forbidden. This is the plainest gomoku, the one Wikipedia calls freestyle, and in Japan the plain five-in-a-row game (五目並べ) has no official rule set at all.
Standard: exactly five in a row wins, for both sides. A row of six or more counts for nothing and is not forbidden, which follows the RIF Gomoku rules.
Korean: exactly five in a row wins, and neither side may make a double three (3-3). These are the rules that Korean Wikipedia gives as the usual ones for omok (오목), where six or more does not win and the double three is banned, while Renju restricts only Black.
Renju: the competition game of Japan, and the one with the most restrictions. Black may not make a double three, a double four or an overline, Black wins only with exactly five, and White wins with five or more. The next section explains the three bans.
Zoom inWhich one to choose
Freestyle is the easiest to start with and is the only rule set that goes on the leaderboards. The first player has a large advantage in gomoku: with perfect play Black wins on a 15 × 15 board without restrictions, a result that Victor Allis showed in 1994. Renju takes part of that advantage away by restricting Black.
Standard, Korean and Renju are practice games here: they are fully playable, and their wins are not sent to a leaderboard. The start screen says so before you begin.
Forbidden moves in Renju and Korean gomoku
In Renju Black may not play a stone that makes a double three, a double four or an overline, unless the same stone also makes exactly five, in which case it wins.
A three here means an open three: three stones in a row that one more stone, played where Black is allowed to play, could turn into an open four, a row of four with both ends free. A three blocked on one side does not count. A double three is a stone that makes two such threes at once, a double four is a stone that makes two fours at once, and an overline is six stones or more in an unbroken row. These are the RIF definitions, and the RIF rules add that a double three is still allowed in some cases, for example when at most one of its threes can really become a straight four.
In a real Renju game a Black stone on a forbidden point loses the game if the other side notices. This version does not let you lose that way: the forbidden points are marked with a red cross while it is your turn (as Black in Renju, as either side in the Korean rules), and a tap on one is refused with a message. The computer never plays a forbidden point either. White has no forbidden moves in Renju and wins with an overline.
The Korean rule set bans only the double three, for Black and for White alike, with the same definition of an open three. A four and a three together, the four-three, is allowed in both rule sets, and it is the move that Black wins with.
Zoom inHow the computer plays: Easy, Normal and Hard
The computer has three levels that differ in how many moves ahead it looks and in what it notices, and each reply depends only on the position and on the number of the game.
For every point the computer reads the four lines through it and works out what a stone there would make: a five, a straight four, a four, an open three and so on. It always makes a five when it can, and always blocks the point where you would make one.
Easy looks at the few best points, adds a lot of chance to its choice, and often overlooks an open three of yours, though it still makes a five when it can and blocks yours. Normal looks three moves ahead, counting both sides, searches for a winning chain of fours up to six of its own fours deep, and checks whether you have such a chain. Hard looks five moves ahead and searches for a forced win by fours up to ten fours deep, for itself and for you.
The search is counted in positions, never in seconds, and the computer uses no random numbers except a seed that comes with the game. That means the same moves from you get the same replies from it, which is what lets the leaderboard server play your game again to check it. On Hard the computer usually needs under a second to choose, even on a phone, and then waits a moment so that you can follow its move.
It uses no opening book and no neural network. A line of play that beat it once beats it again from the same position with the same game number; in an ordinary game the number is new each time, so its replies can differ from one game to the next.
Tips for winning Gomoku
The way to win Gomoku is to make two threats with one stone, because the other side can only stop one of them.
- Start near the centre. A stone there has the most room to grow in all four directions.
- Stop every four at once. A four, four stones in a row with a free point at one end, wins next turn if you do not block that point.
- Answer an open three, three stones in a row with free points on both sides, before it becomes an open four. An open four has two winning points and cannot be stopped.
- Look for a four-three: one stone that makes a four and an open three together. The other side has to block the four, and the three then becomes an open four.
- A double three or a double four does the same job in freestyle gomoku. In Renju Black may not make them but White may, and White can also try to make Black run out of safe points; in the Korean rules neither side may make a double three.
- When the other side makes a three, look at the points that block it from both ends. Sometimes one block also builds a row of your own.
- Use Undo when you see a mistake at once: it takes back your move and the reply, and costs one move on the leaderboard.
Daily Game and leaderboards
The leaderboards rank freestyle games that you win as Black by the fewest moves, with one board for each level and one for the Daily Game.
A move is a stone you place, and an Undo counts as a move too, so the number never goes down. Only a win goes on a board. If two players have the same number of moves, the one with fewer seconds ranks higher, and then whoever posted first. Standard, Korean and Renju games, playing White and two-player games are practice.
The Daily Game is the same opponent for everyone: a game on the Normal level that is started with the day's own number, so the same moves from you get the same replies from the computer. The day changes at midnight New York time. It needs a connection because our server hands out the number, and each connection gets one ranked Daily Game result per day, after which it is practice.
The time is measured by our server, from the moment it handed out the game. The nickname is 2 to 12 characters, offensive names are refused, and you do not need an account. When you submit, your moves and nickname are sent to our server, which plays the whole game again with its own copy of the rules and works out every reply of the computer; a game that does not replay to a win is refused.
Controls and saving
You play by tapping or clicking a point to place a stone, and the keyboard works for everything.
- Mouse: point at an empty point to see the stone, click to place it.
- Touch: tap a point to preview the stone, tap the same point again to place it. A switch on the start screen makes one tap enough.
- Keyboard: Tab goes to the board, the arrow keys move the cursor, Enter or Space places a stone. H gives a hint, U or Backspace takes your last move back, N starts a new game, F switches full screen and M switches the sound.
- Hint rings the point that the Normal level would play in your place. Undo takes back your move and the computer's reply, and is not possible after the game has ended.
- The wooden click of a stone and the other sounds can be switched off in the gear (Settings) panel, or with the M key.
- Your game in progress, your options and your best (fewest) moves are saved in this browser on this device. Clearing your browser data removes them.
Where Gomoku and Renju come from
Gomoku is a Japanese game called gomokunarabe (五目並べ), "five points lined up", and it is known in China as wuziqi, in Korea as omok and in Britain once as Go Bang.
According to Wikipedia, records place the game in Japan in the mid-1700s, in the Edo period, and a book on it was printed by 1856. The name is go, five, moku, a counter word for pieces, and narabe, line up. It was played with the stones and board of Go. In the nineteenth century it came to Britain as Go Bang, a name that is said to come from the word for a Go board.
Renju, "connected pearls", was named in 1899 by the journalist Kuroiwa Ruikō, who in the same year found a winning method for the plain game, according to Japanese Wikipedia. It adds the forbidden moves for Black to even out the game. Tournament gomoku today uses opening protocols such as Swap2, which Wikipedia says was adopted for the world championships in 2009; Play5s does not use an opening rule.
Gomoku terms
Gomoku uses a few words that are worth knowing, and most of them come from Renju.
- Five: five stones of one colour in an unbroken row. An overline is six or more.
- Four: four stones in a row that one more stone can turn into five. A straight (open) four can be completed at either end and cannot be stopped.
- Open three: three stones that one more stone can turn into a straight four.
- Double three, double four: a single stone that makes two threes or two fours at once. Four-three is a four and a three together.
- Forbidden point: a point where a side may not play: Black under Renju, either side (the double three) under the Korean rules.
- Freestyle, standard: the rules in which five or more wins, and in which exactly five wins.
Where the rules come from
The rules on this page come from sources that were read on 23 November 2026, and every choice that is specific to Play5s is listed here.
- Wikipedia: Gomoku: the aim, freestyle and standard rules, the overline, Swap2, the first-player advantage, the names and the history.
- Renju International Federation: Gomoku rules: the 15 × 15 board, Black first, exactly five to win, an overline does not end the game, a full board is a draw.
- Renju International Federation: Renju rules: the definitions of three, four, straight four, double three and double four, the forbidden moves for Black and the way a double three is judged.
- Gomocup: the annual contest for gomoku programs, whose freestyle rule is five or more.
- Japanese Wikipedia: 五目並べ and Korean Wikipedia: 오목: the plain game without an official rule set, and the usual Korean rules with the double three banned and six or more void, in contrast to Renju, which restricts only Black.
- thewiki.kr: 오목: a Korean wiki that spells out the general rules, in which the double three is forbidden for both Black and White (read on 23 November 2026).
- The Korean rule set in Play5s forbids the double three only, for Black and for White. Fours are allowed, and a six or more counts for nothing for both sides.
- Play5s does not use any opening rule: Black may play the first stone anywhere, while the RIF Renju rules want it in the middle of the board.
- In a game against the computer a forbidden move is refused, where the RIF rules would let Black lose by playing it.
Gomoku questions
What is Gomoku?
Gomoku, or five in a row, is a board game for two players who take turns placing black and white stones on a 15 × 15 board. The first to make an unbroken row of five stones, across, down or diagonally, wins.
How do you win Gomoku?
Make five of your stones in a row before the other side does. Build two threats at once, such as a four and an open three, because the other side can only block one.
Does six in a row win in Gomoku?
It depends on the rules. In freestyle gomoku five or more wins. In standard gomoku and in the Korean rules exactly five is needed, and in Renju only White wins with six or more. You choose the rules on the start screen.
Who goes first in Gomoku?
Black. By default you play Black, and you can choose White on the start screen so that the computer opens.
Does Black win Gomoku with perfect play?
On a 15 × 15 board without restrictions, yes: Wikipedia reports that Victor Allis showed in 1994 that the first player wins, and that the same winning strategy was confirmed for Renju without opening rules in 2001. That is why Renju restricts Black and tournaments use opening protocols.
What is a forbidden move in Gomoku?
In Renju, Black may not make a double three, a double four or an overline. The Korean rules ban only the double three, for both sides. A forbidden stone that makes exactly five is allowed and wins. In Renju White has no forbidden moves.
What is the difference between Gomoku and Renju?
Renju is gomoku with restrictions on Black: no double three, double four or overline, and Black wins only with exactly five. Plain gomoku has none of these. Renju was named in 1899 and is played in competitions.
Can I play Gomoku against a friend?
Yes. Choose 2 players on the start screen and take turns on the same screen. Those games are practice and are not ranked.
How strong is the computer?
There are three levels. Easy often overlooks an open three. Normal looks three moves ahead and Hard looks five moves ahead, and both look for a forced win by fours. A game needs no connection to play; ranked games and the Daily Game need one to start.
Which games go on the leaderboard?
Freestyle games that you win as Black against the computer, ranked by the fewest moves. There is a board for each level and a Daily Game on the Normal level. Other rules, playing White and two-player games are practice.
What is the Daily Game?
A game on the Normal level that starts from the day's own number, so every player faces the same computer. The day changes at midnight New York time, and each connection gets one ranked Daily Game result per day.
Does Undo count against me?
Yes. Undo takes back your move and the computer's reply, and it counts as a move, so the number of moves on the leaderboard never goes down.
Does the game save my progress?
Yes. Your game in progress, your options and your best moves are saved in this browser on this device. Clearing your browser data removes them. Only games you choose to submit to a leaderboard are sent to our server, with your nickname.
About this version
This Gomoku was built by Play5s to run in any modern web browser. The board and the stones are drawn by Play5s, and the computer follows the fixed rules described on this page. It uses no opening book and no random numbers beyond the seed that comes with each game.
There is nothing to install and no account to create. Your game in progress and your best moves are kept in your browser on this device. Starting a ranked game or the Daily Game asks our server for a number and a ticket; your moves and nickname are sent only when you submit a game to a leaderboard.
The page gives the rules as Wikipedia, the Renju International Federation and Gomocup describe them, and the choices that are specific to this version are listed in the section on where the rules come from.
Read more about Play5s, or see all of our free online board games.