Gomoku Guide: Rules, Strategy, Tips, and How to Play Five in a Row Online
Gomoku is a two-player strategy game about making five stones in a straight line. You may know it as Five in a Row, Gobang, or Omok. Unlike Connect 4, stones do not fall: you can play on any empty intersection. Unlike Atari Go, there are no captures. Every stone stays on the board, gradually turning simple lines into overlapping threats.
Play Gomoku online against the CPU at four difficulty levels, or share your device with a friend. The rules take a moment to learn, while the challenge comes from recognizing which threats need attention now and which can wait.
How to Play Gomoku
- The board has 15 rows and 15 columns of intersections, giving you 225 places to play.
- Black moves first. Players alternate placing one stone on an empty intersection.
- Five or more stones of one color in an uninterrupted straight line win. Horizontal, vertical, and both diagonal directions count.
- This page uses freestyle rules: six in a row also wins, and there are no forbidden moves or opening restrictions.
- The board filling up without a winning line ends the game in a draw.
Controls and Settings
Move the mouse over the board to preview your stone, then click an empty intersection. On a touchscreen, press and hold, slide until the preview is on the point you want, then release. Release outside the board to cancel. This gives you a chance to adjust your aim on a small screen.
Use the arrow keys or WASD to move the keyboard cursor, Space or Enter to place a stone, and C to return to the center. Your first movement key shows the cursor at the last move, or at the center on an empty board. Undo and redo use the shortcuts shown beside their buttons; you can customize controls in the game island.
Settings lets you choose your stone color against the CPU. Black moves first; white lets the CPU open. Changing color starts a new game. You can also disable animations or use the faster animation setting. Your saved game includes its undo and redo history, so you can return to a position and keep exploring it.
Playing Against the CPU
Easy plays nearby, plausible moves but sometimes misses threats. It is a good place to learn how lines grow. Medium takes immediate wins, blocks immediate losses, and looks a little further ahead. It can still overlook combinations.
Hard keeps its planning short and occasionally chooses a softer move. Very Hard looks further ahead and searches for forcing sequences of fours. The CPU has a time budget, so the depth it reaches depends on the position. Neither level promises perfect play. Try undoing a mistake and testing another defense to understand why a position worked.
Local Multiplayer
Choose Player 2 in the opponent menu to play a friend on the same device. Choose Player 1’s pieces in Settings; whoever has black moves first. Take turns using the same board; there is no online matchmaking. Undo takes back one stone in this mode. Against the CPU, undo normally takes back the pair of moves needed to return to your turn. If you play white, the CPU's first stone stays in place.
Gomoku Strategy: Build Threats in More Than One Direction
Start Near the Center
Central stones have room to expand in all four directions. A stone near the edge loses some of that flexibility. Your opening does not have to follow a memorized sequence: place stones that can help more than one future line, and avoid scattering isolated stones around the board.
Recognize Open and Closed Lines
An open three has three stones with usable space on both sides. It can become an open four. A closed three has an end blocked by the edge or an opposing stone, which makes it easier to contain. Check the space beyond the immediate ends as well: a line needs enough room to reach five.
An open four is four consecutive stones with both ends empty. It gives you two immediate winning points. The other player can cover only one, so the position wins unless they can finish their own five first. Do not wait for an opponent's open three to become an open four before defending.
Watch Broken Lines
Three stones, a gap, and another stone can win just as quickly as four consecutive stones. Read along the whole line instead of counting only touching stones. Before every move, inspect both diagonals as carefully as the rows and columns: diagonal gaps are easy to miss.
Create Double Threats
A 4-3 combination creates a four in one direction and an open three in another. The four demands a block, giving you time to turn the other line into a stronger threat. A 3-3 creates two open threes at once. These combinations are powerful because one defensive stone may not address both lines. They are legal for both players under the freestyle rules used here.
Look for intersections where two developing lines cross. A useful move may extend a horizontal line while starting a diagonal. Before trusting a double threat, check whether the opponent has an immediate win or a forcing move that changes the order of play.
Attack While Defending
When several blocks are available, prefer a block that also improves your own line. A purely defensive move may hand the initiative back every turn. However, an attractive attack cannot rescue a position if your opponent wins first: check immediate wins, immediate losses, then longer combinations.
Victory by Continuous Fours
A forcing sequence of fours keeps giving the opponent a single urgent task. You make a four, they block, and your next stone makes another four. If the sequence eventually produces two winning points, you finish with five. This is often called VCF, or victory by continuous fours. Very Hard looks for these sequences, but a time-limited search may still miss one.
Common Mistakes and Practice Tips
- Defending too late: block an open three before it becomes an open four with two winning ends.
- Following only one line: check whether your next stone can contribute in a second direction.
- Ignoring the board edge: a promising sequence may have too little room to make five.
- Missing a gap: scan all five-point windows, including broken fours.
- Moving too quickly: pause to check your opponent's next winning point before playing an ambitious attack.
To practice, play a short game on Easy and name the threat created by each move: a two, a three, a four, or a possible crossing. After a loss, undo a few turns and find the earliest point where a quieter block would have prevented the final combination. Increase difficulty when you can reliably spot open fours and broken fours.
History and Background
Five-in-a-row games have a long tradition in East Asia. In Japan, the game became known as gomoku narabe, arranging five stones in a row. The Renju International Federation's history describes its development in Japan and the adoption of the name Renju in 1899. Competitive rules evolved to address the advantage of moving first.
The first-player advantage is more than an opening preference. The International Computer Games Association credits Allis's 1994 work with proving a first-player win in unrestricted freestyle Gomoku on a 15x15 board. That result does not make ordinary games predictable: finding the right forcing continuation can still be difficult for people and limited-time programs.
Related five-in-a-row games are played as Omok in Korea and Caro in Vietnam. Local rules differ, so it is always useful to agree on overlines, blocked ends, and opening rules before playing on a physical board.
Gomoku Variants
- Freestyle: five or more wins. This is the version available on this page.
- Standard: exactly five wins; an overline does not.
- Renju: restrictions on black's overlines and certain double threats help balance the first move.
- Swap and Swap2: opening procedures let players choose or exchange colors after an initial position is offered.
- Caro: regional rules may change how blocked ends and overlines affect a win.
Frequently Asked Questions
Is Gomoku the same as Five in a Row?
Yes. Gomoku is also called Five in a Row, Gobang, or Omok. Get five stones in a row to win.
Does six in a row count?
Here, yes: freestyle rules mean five or more in a row wins.
Who has the advantage in Gomoku?
Black moves first and has a winning strategy with perfect play on an unrestricted 15x15 board. Tournament variants introduce restrictions or special opening procedures to improve balance.
What is an open four?
Four stones in a row with both ends empty. Your opponent can block only one end, so you win next turn unless they win first.
Can Gomoku end in a draw?
Yes. If all 225 intersections fill up without five in a row, the game is a draw. This is rare.
Start a new game, build a line near the center, and watch how each stone changes the threats in all four directions. A well-timed block or crossing move can decide a game long before the fifth stone arrives.
Sound Effects Credits
The sound effects used on the game come from multiple parties. The credits and
respective licenses are listed below:
Disclaimer
This game is a property of Lofi and Games. All code and assets are protected and must
not be redistributed or used without prior permission.