Play Gomoku Online — Free Five in a Row Game
Play Gomoku against our AI or a friend on the same device. Adjust board size, AI difficulty, and enable Renju rules for a balanced challenge.
Quick Rules
- Players alternate placing black and white stones on board intersections.
- The first player to form an unbroken line of exactly five stones wins.
- Lines can be horizontal, vertical, or diagonal.
- With Renju rules enabled, black cannot make double-three, double-four, or overline moves.
Game Modes
Play vs AI
Challenge our computer opponent powered by minimax with alpha-beta pruning. Adjust the AI strength from 1 (beginner) to 10 (expert) to match your skill level. The AI runs in a background thread so the interface stays smooth.
Play vs Friend
Two players take turns on the same device. Perfect for learning together or settling who's the better strategist. All the same customization options are available.
Quick Tips
Start near the center — it gives you more room to extend in every direction.
Create a fork (two threats at once) to guarantee a win.
Always block your opponent when they have three in a row with open ends.
An open four (four in a row with both ends empty) cannot be blocked — aim for it.
Gomoku Glossary
- Open Three — Three stones in a row with both ends empty. One step away from an open four.
- Open Four — Four in a row with both ends empty. Unstoppable — guaranteed win next move.
- Closed Four — Four in a row with one end blocked. Can still win if the opponent doesn't block.
- Fork — A single move that creates two winning threats simultaneously.
- Double Three — A move that creates two open threes at once. Forbidden for black in Renju.
- Double Four — A move that creates two fours at once. Forbidden for black in Renju.
- Overline — Six or more stones in a row. Forbidden for black in Renju; doesn't count as a win.
Frequently Asked Questions
Is this game free to play? +
Yes, completely free with no sign-up required. Just open the page and start playing.
Can I undo a move? +
Yes! Click the Undo button below the board. In AI mode it undoes both your move and the AI's response.
Does the game save my progress? +
Yes, your game is automatically saved to your browser. If you close the tab and come back, your game will be restored.
What board size should I use? +
The standard 15×15 is recommended. Smaller boards (9×9, 11×11) are great for quick games. Larger boards (17×17, 19×19) add more strategic depth.