Gomoku vs AI
Play Gomoku — the classic Five in a Row — free in your browser. No download and no sign-up: face four AI levels up to a demanding Master engine, a friend on one screen, or an online room you share with a link.
Gomoku — known around the world as Five in a Row, and sometimes as Gobang, Omok or Wuziqi — is a two-player strategy game played on a 15×15 grid. Players take turns placing stones, and the first to line up five of their own in a row, in any direction, wins. The rules take a minute to learn, but the tactics keep players coming back for years.
Why Play Gomoku Here
Everything runs right in your browser. There is no app to install and no account to create — open the page, the board is ready, and you close the tab when you are done. It works the same on a phone, a tablet or a desktop.
You can play solo against the computer at four strengths — from a gentle Easy up to a tough Master engine — pass-and-play with a friend on one screen, or open an online room and invite someone with a single link. An undo button, a hint, and a stone preview let you check a move before you commit it, and the winning five is highlighted the instant it appears.
How to Play Gomoku Online
Pick a mode: play against our AI at easy, medium, hard or Master, or choose same-device two-player. Black always moves first.
Click any empty intersection to drop your stone. A faint preview shows where the stone will land, so you can place it precisely. The moment a player connects five, the board lights up the winning line — there is no guesswork about who won.
Gomoku Rules
The standard board is 15×15, played with black and white stones. Black moves first, then players alternate placing one stone per turn on any empty intersection. Stones are never moved or removed once placed.
A player wins immediately by forming an unbroken line of five or more of their own stones — horizontally, vertically or diagonally. If the board fills up with no line of five, the game is a draw, though that is rare in practice.
Strategy and Common Shapes
Watch for the 'open three' — three stones with both ends free. Left alone it becomes an open four, which is almost always game-winning, so block your opponent's open threes early.
Strong play revolves around the 'double threat': two separate lines that each threaten five, so a single block cannot stop both. Holding the center gives you more directions to build and is the reason Black's best opening is the middle point.
The Difficulty Levels and the Master AI
Easy plays loosely and lets beginners learn the board. Medium covers the basics — it blocks your fours and builds simple threats. Hard reads open threes and fours and defends far more carefully, which is enough to test most casual players.
Master is a different animal. It searches many moves ahead with an alpha-beta engine, recognises forced wins through continuous fours (VCF) and continuous threats (VCT), and spends a couple of seconds thinking on its turn — you will see an 'AI thinking…' note while it calculates. It will punish loose play, refuse the obvious traps, and chase down double threats relentlessly. If you can beat Master consistently, you are a genuinely strong Gomoku player.
Tips to Win at Gomoku
- Respond to an opponent's open four at once — ignore it and you lose on the next move.
- Build threats that force your opponent to defend, so you keep the initiative.
- Look for moves that create two threats at the same time; one block can't stop both.
- Don't crowd your stones — spacing them out creates more potential lines.
- Stuck on a move? Use the hint button to see a strong point, then plan your own follow-up.
Frequently Asked Questions
Is this Gomoku free to play?
Yes. Gomoku is completely free in your browser, with no download and no sign-up — just open the page and play.
Is Gomoku the same as Five in a Row or Gobang?
Yes. Gomoku, Five in a Row, Gobang, Omok and Wuziqi are all names for the same game: be the first to line up five stones in a row.
Can I play Gomoku against the computer?
Yes. Choose vs AI and pick easy, medium, hard or Master. The harder levels read open threes and fours and defend much more carefully.
How strong is the Master difficulty?
Master searches many moves ahead with an alpha-beta engine and detects forced wins through continuous fours (VCF) and threats (VCT). It thinks for a couple of seconds each turn and is designed to beat most experienced players, so expect a real fight.
Can two people play on one device?
Yes. Same-device two-player mode lets two people take turns on one screen, and you can also open an online room to invite a friend by link.
Do I need to download anything or create an account?
No. It runs entirely in your browser — no install, no registration and no login of any kind.
Can I undo a move or get a hint?
Yes. The undo button takes back your last move and the hint button suggests a strong point when you are unsure.
How many stones in a row do I need to win?
Five or more of your color in an unbroken line, in any direction — horizontal, vertical or diagonal.
Who moves first in Gomoku?
Black always moves first, which gives a small first-move advantage. Centering Black's opening stone is the strongest start.