⚪ Gomoku

Take turns placing stones with the CPU. Get five in a row — across, down or diagonally — to win.

Loading game…

About Gomoku

Gomoku is a game of five in a row, played by placing stones on the intersections of a grid. It is easy to learn and surprisingly sharp: one missed threat is often the end. You play black and move first against a computer that weighs attack and defence on every move.

How to play

  • The board is a 13x13 grid of intersections. You play black and always place the first stone; the computer plays white.
  • Players take turns placing one stone on any empty intersection. Stones never move and are never captured.
  • Five or more stones of your colour in an unbroken line horizontally, vertically or diagonally wins. Lines longer than five count as well.
  • There are no opening restrictions or forbidden moves for black, unlike the Renju variant.
  • If the whole board fills without a winning line, the game is a draw.
  • The score bar tracks your wins and the computer's wins; your Best is the highest number of wins you have reached.

Controls

  • Click or tap an empty intersection to place a stone.
  • The most recent stone is ringed so you can see where the computer just played, and the winning five are ringed in red.
  • Each point is a button, so Tab and Enter or Space also work, though the mouse or touch is much quicker on a 169-point board.

Tips and strategy

  • An open four, four in a row with both ends empty, cannot be stopped. Aim to create one, and never let the computer get one.
  • An open three, with both ends empty, must usually be blocked at once, because it becomes an open four next move.
  • The strongest attacking move creates two threats at once, such as a four and an open three. The opponent can only answer one.
  • Keep your stones connected and close to the centre. Isolated stones near the edge have fewer lines to grow along.
  • The computer reacts to the strongest single line it sees. Building threats that only combine on your next move can slip past it.

Background

Gomoku comes from Japan, where it has long been played with Go stones on a Go board; its name means roughly five pieces. Because the first player has a large advantage in the unrestricted game, the Renju variant adds rules limiting black's moves, and tournaments often use special opening protocols. Freestyle Gomoku on a 15 by 15 board was shown by Victor Allis in the 1990s to be a first-player win with perfect play. The version here uses a smaller 13 by 13 board and freestyle rules.

Questions

How strong is the computer?
It does not search ahead. For every empty point it scores how strong a white stone and a black stone would be there, weighting attack slightly above defence, and plays the best point. It blocks obvious threats well but can be beaten with double threats.
Does a line of six count?
Yes. Any unbroken line of five or more of your stones wins.
Can I play against a friend?
Not in this version. You always play black against the computer.
Advertisement

More games