Play Gomoku Online vs AI

Your turn.

Gomoku Is Often Decided Before Five in a Row

Anyone can see the five that ends the game. This page is for the earlier move: it already forces a reply, and five in a row is only what follows. The board is 15×15. The AI uses the open-source Rapfi engine and searches later variations in your browser. The sidebar shows the current depth, node count, speed, and recommended line. When the position gets away from you, hint, undo, and replay take you back to the fork without opening another page.

Ask Four Questions Before You Play

Is there a threat I have to answer now?

If the opponent can make five on the next move, or already has an open four, this turn can only answer. You cannot keep attacking. A three blocked at one end usually still leaves time to compare. Separate “about to win” from “a lot of stones,” and you will stop blocking every long line on sight.

What is my opponent’s strongest reply?

Assume they will not defend the way your plan needs. Look for a forcing four, an open three, or a move elsewhere that already demands an answer. If your stone does not force a reply, they can spend the turn somewhere more urgent.

Where does the sidebar line differ from my two candidates?

Write down two points before you play, then look at the first move of the recommended line. If they disagree, tell whether it is stopping a five on the next move, building a forcing move, or joining a line you had not read. Depth and node count only say how far the search went. They do not replace that comparison.

Where should replay stop?

Do not walk back from the final five. Stop on the move before you were first forced to answer, and see which stone tied two lines together. The hint is for checking that fork, not for placing the next stone for you.

Black and white stones on a wooden 15×15 Gomoku board beside tea

Keep a Second Direction Open in the Opening

The value of playing near the center is that the horizontal, the vertical, and both diagonals can still grow. If the first stones sit tight on one straight line, one block is enough. A new stone should do more than extend the stone in front of you. It should also leave an empty point for another line. Before you play, ask which line it is preparing besides the row you can already see.

A player placing a critical Gomoku stone at a tea table

Choose the AI Level by How Far You Can Read

If you still miss a five the opponent can make on the next move, start on an easier level and make “check the threat first” a habit. Once you can reliably spot an open three and an open four, raise the level so the same miss becomes a move you have to answer. The sidebar line follows the level you picked. A lower level keeps the variation short enough to compare with the two points you wrote down. A higher level will not let an open four pass. The right level still leaves you time to say why you played the stone.

Learn to See a Forcing Four Plus an Open Three

If White only sees Black’s longest row, White often blocks the end of that row. The ringed black stone in the diagram is H8, and the green dot is I8, the point that must be answered. Across the row, E8, F8, G8, and H8 are black, D8 is already white, and only I8 makes five. That is a forcing four. The same move makes an open three down the file: H7, H8, and H9, with H6 and H10 empty. After White plays I8, Black plays H10. The file becomes an open four from H7 to H10, with both H6 and H11 empty, and White cannot stop both ends.

Common Questions

What Gomoku rules does this site use, and does an overline win?

The default is 15×15 freestyle: Black moves first, and five or more in a row wins, including an overline. Settings can switch the game to exact five, where six or more on that line do not win. The same choice applies against the AI, on a shared screen, and in an online room.

How is this AI different from a typical browser Gomoku opponent?

The AI here is the open-source Rapfi engine with a neural network. It works out later variations in your browser as you play, and the sidebar shows the search depth, the recommended line, the node count, and the search speed. A lot of web Gomoku only scores fixed patterns, or it looks only a little way ahead, so the thinking stays hidden. Here you can watch that search.

Why does a position that looks fine collapse on the next move?

It is usually not the final five appearing out of nowhere. An earlier move has already made a forcing four and an open three at the same time. The forcing four has only one point that makes five, so it must be answered first. After that reply the open three is still there, and the next move can become an open four that cannot be stopped at both ends. Stop the replay on that move. Look at the forcing four’s winning point, and at which line still holds the open three.

Does the first move have to be in the center?

No. This site does not require the first move on the center point, and that intersection has no extra score. Farther from the center, fewer lines remain usable later. Closer to the center, you simply have more choices. That does not make the position winning by itself.

How can I use hints, undo, and replay without simply following the answer?

List two candidate points first and say what shape each one makes, then open the hint and compare. If it differs, decide whether it is answering an immediate threat, building a forcing move, or joining a shared intersection. Undo is for going back to the fork and testing the other judgment. Replay should look for the first move that lost the initiative, not only the final five.

If I change the AI strength during a game, does the board reset?

No. The stones stay where they are. The next AI reply and the hint both search at the strength you just picked, not at the strongest setting. On an empty board, the new strength is saved in this browser right away. Once stones are down, it is saved with the next move. Refresh immediately after the change, and the restored game still uses the strength from the last move.

How do I play White so the AI moves first, and can I switch halfway through?

In the sidebar, open Play as and choose White. On an empty board the switch is immediate, and the AI plays the first stone. If this game already has stones and is not finished, the page asks before it restarts. Confirming clears the current game and starts a new one in the color you picked. After a finished game, switching starts a new game directly.

If I refresh or close the page, is this game still there?

The game on this page stays in this browser: the stones already played, the current strength, your color, and a resign or a draw if the game ended that way. Refresh the page or open it again, and you are back in the same game. Clear this site’s data, or open it in another browser or on another device, and that game is gone. The save lives in the browser, not in an account.

What does Think time control?

Think time appears only on a computer, and only on Master. You can pick 2.5, 5, 10, 20, 30, or 60 seconds. The default is 5. Phones, tablets, and the other strengths do not show this control. On those, Master still searches for 5 seconds.

Can I offer a draw or resign on this page, and will the AI always accept a draw?

Both are available. You cannot offer a draw before the first stone. After you offer one, the AI uses its current evaluation. If the position is clearly better for the AI, or it has not produced an evaluation yet, it declines and the game goes on. Otherwise it accepts, and the game is recorded as a draw. Resign asks you to confirm. After you confirm, the game ends at once, your opponent wins, and that result cannot be taken back.