Puzzle · Strategy

Gobang

A classic strategy board game where players take turns placing stones to form a line of five.

Overview

Two players, one board, alternating stones, and the simple-sounding task of placing five of your marks in an unbroken line before the other side does. Gobang is the classic five-in-a-row game, and almost all of its depth comes from how a one-move-at-a-time placement rule snowballs into long forcing sequences. There is no movement, no capturing, no dice — only the question of where to put the next stone, and whether that stone quietly builds your own shape while interfering with the opponent's. This version supports both a two-player mode for side-by-side play and an AI opponent when you are on your own, which makes it a good fit for both teaching a newcomer and grinding out a sharper game against the computer. The rules take thirty seconds to explain and considerably longer to master.

How to Play

Each turn you place exactly one stone. With the mouse, click the board where you want it; on a touch screen, tap the spot; with the keyboard, move the cursor with the arrow keys and confirm with Enter or Space. The two-player mode passes the device back and forth between people, while the AI mode has the computer answer immediately after your move. Stones never move once placed, so the only decision each turn is the location, but that decision compounds: an early stone that looked harmless can become the anchor of a winning line ten moves later. The first side to line up five of its own stones — across, down, or diagonally — wins, and the game ends the moment that line appears.

Tips & Strategy

Every stone you place should do two things at once: extend one of your own partial lines and crowd an opponent's potential line. Single-purpose stones lose, because five-in-a-row is a game of who builds the first unstoppable shape, and unstoppable shapes come from stones that pull double duty. Watch for the opponent's open three — three in a row with both ends free — because an unblocked open three becomes an open four, and an open four is almost always game over. When you are on attack, look for a move that creates two separate threats at the same time, since the opponent can only answer one. Keep your stones clustered rather than scattered; a dense cluster can combine into a line in several directions, while isolated stones rarely connect in time.

Controls

Keyboard
Arrow keys to navigateEnter or Space to place stone
Mouse
Click to place stone
Touch
Tap to place stone

Features

  • Classic Gobang gameplay
  • Two-player mode
  • AI opponent
  • Strategic depth
  • Simple rules