Board size:

Lock turn:

Go is the oldest board game that's still being played. Hailing from Zhou dynasty China, before 1000BCE, it's still played today all over the world, both casually and in tournaments. Casual games tend to last anywhere from 20 to 90 minutes, but professional-level games can last six hours or more.

The game's lasting popularity is no doubt due to its simplicity. Two players take turns placing black and white stones on a grid that's 18 squares to a side, on the corners, making the play area 19x19. Beginners often start at smaller board sizes -- 9x9 and 13x13 are the most common -- but professional play is standardized at 19x19. Where you can place stones is limited by only two rules:

  1. When you place a stone, it can't get immediately captured, unless that spot was the last liberty for an enemy's group. This might be a bit confusing at first, but it really isn't -- see below for how capturing works. This is called the suicide rule.
  2. Placing that stone can't return the board to how it was after your last turn. This is called "ko". Some rulesets disallow repetition of any previous board state; this is called "super ko", and not used here.

There's also one courtesy often given, though it isn't a rule. Because black goes first and therefore gains an advantage, it's common for black to place their first stone in the far corner on their right, three spaces away from each of the edges.

A group of stones is just a set of stones that are all connected, though diagonals don't count. One can be captured if there are no free spaces ("liberties") directly adjacent to it; when captured, it's simply removed from the board.

Either player can pass at any time. When both players pass, the game ends, and each player's score is calculated. The player with the greater score wins.

There are two methods of scoring. The first, area scoring, is the one used by Chinese rules, and common in the West. It's significantly simpler than the primary alternative, territory scoring, and because it's the one typically used in the coder's home country, the one used here. In area scoring, each player's score is determined by the number of stones each player has on the board, plus the number of empty spots encircled by that player's stones.

Territory scoring is somewhat similar, but takes into account the notion of prisoners. In brief, your score is the amount of enemy stones you've captured, plus the number of empty spaces your stones encircle, with any "dead" enemy groups removed from the board (and given to you as captured stones). For the sake of brevity, a full description isn't included here; see Wikipedia.