Gomoku

Gomoku (Five in a Row) vs Computer or 2 Players

Black and White take turns placing stones on a 15×15 board. The first to line up five stones in a row – horizontally, vertically or diagonally – wins. Play the computer or take turns with a friend on the same screen.

Opponent
Computer level
Your stones
Black's forbidden moves
Black
White

Your record against the computer

LevelWinsLossesDrawsWin rate
  • With forbidden moves on, only Black (who moves first) may not make a double three (two open threes at once), a double four or an overline (six or more in a row). Those points are marked ×. Making exactly five still wins. White has no forbidden moves and also wins with six or more.
  • With forbidden moves off, either player wins with five or more in a row.
  • Easy picks loosely from good-looking moves, Normal plays the best move by its scoring of lines and open ends, and Hard also searches for forced wins with consecutive fours and looks several moves ahead.
  • Everything runs in your browser. Your record is stored only in this browser (localStorage) and is not sent anywhere.

About this tool

Play gomoku (five in a row) free on a 15×15 board in your browser. Challenge the computer at Easy, Normal or Hard – it scores moves by the length of each line and whether its ends are open, and Hard also searches for forced wins with consecutive fours and looks several moves ahead. You can also play a friend on one device. Turn Black's forbidden moves (double three, double four, overline) on or off; when on, forbidden points are marked ×. Undo, a marker on the last move, a highlighted winning line and a win-loss record are included.

How to use

  1. Choose the opponent, the computer level, your stones (Black moves first) and whether Black's forbidden moves are On or Off.
  2. Tap or click an intersection to place a stone. On phones, “Tap twice to place” is on: tap the same point again to confirm.
  3. The first to get five in a row horizontally, vertically or diagonally wins. Press Undo to take back a move.
  4. When the game ends, the winning five glow and the result appears. Press Play again or New game to start over.

Useful for

  • A quick game of five in a row against the computer on your phone
  • Playing a child or friend on one device
  • Learning the renju-style forbidden moves by trying them
  • Practicing winning shapes such as four-three

FAQ

What are forbidden moves in gomoku?

To offset Black's first-move advantage, Black may not make a double three (two open threes at once), a double four, or an overline (six or more in a row). Making exactly five still wins. White has no forbidden moves.

How are double threes detected?

Following renju practice, a three counts only if one more stone could turn it into an open four, and that stone is not itself a forbidden move. With forbidden moves on, those points are marked × on Black's turn and can't be played.

What are the rules with forbidden moves off?

Either player wins with five or more stones in a row. This free-style rule is easier for beginners and children.

How strong is the computer?

Easy chooses loosely from good-looking moves and sometimes misses your four. Normal plays the move with the best attack and defense score. Hard also looks for forced wins with consecutive fours and searches several moves ahead.

Is it free, and is my record sent anywhere?

It's free with no account or app needed. Your record against the computer is stored only in this browser (localStorage).

Contact