Go (also known as weiqi, baduk or igo) is played on the intersections of a grid. Black plays first. On your turn, you either place one stone on an empty intersection or pass.
Stones of the same colour that are connected along a line — but not diagonally — form a group. The empty intersections directly adjacent to a group are its liberties. When a group has no liberties left, it is captured: all of its stones are removed from the board at once.
When you place a stone, any opposing group that has no liberties is removed before the liberties of your newly formed group are checked. This is why you may play on your own last liberty when the move captures an opposing group.
Before the first stone is played, you choose which rule set to use: Chinese (OGS) or New Zealand (Tromp-Taylor). This choice is recorded as part of the game, so a saved game is replayed under the rules it was played with, and the external engine is informed of the same choice.
The two rule sets use the same area scoring and the same positional superko rule. They differ mainly in how they treat self-capture, described below.
Chinese (OGS), rather than simply “Chinese”, specifies the interpretation used here. The rules used in Chinese tournaments have a different formulation of the repetition rule. This game follows the rule set used by OGS and KGS, and the external engine is instructed to follow it as well.
Under Chinese (OGS), you may not place a stone if, after any captures, the group it belongs to has no liberties. A move that captures one or more opposing groups is allowed, even if the newly placed stone would otherwise have no liberty, because the captures are removed first.
Under New Zealand (Tromp-Taylor), self-capture is allowed. A stone may therefore be played even when it has no liberty after the move. If it joins a group that also has no liberties, the entire group is removed from the board, and those stones count as prisoners for the opponent. Self-capture is rarely advantageous, but it can occasionally help resolve a repetition, finish a sequence quickly, or play a final move when time is running short.
You may not play a move that recreates a position that has already occurred in the game. The most familiar example is the ko: after capturing a stone, the opponent cannot immediately recapture in a way that recreates the previous position, and must play elsewhere first.
The broader rule, called positional superko, also prevents less obvious repetitions that are not covered by the simple ko rule. Both rule sets use it, so ko and repetition behave the same way whichever rule set you choose.
The bar above the board shows, beside each colour, the number of stones that colour has captured so far. The komi is shown between the two sides. Captures are not part of the final score under area scoring; they are nevertheless useful during the game as an indication of how many opposing stones have been removed.
Once the game is over, the same two positions display the final scores, with the winner and the margin shown in the middle.
The game ends when both players pass consecutively. Both rule sets use area scoring, so the final counting is the same in both cases: your score is the number of your stones remaining on the board plus the number of empty intersections belonging exclusively to your territory.
An empty region that is reached by both colours is neutral and counts for neither player. Captured prisoners are not added to the score under area scoring; their effect is indirect, through the stones they have removed from the board.
White receives komi to compensate for playing second: 7.5 points on a 19x19 board, 6.5 on 13x13, and 5.5 on 9x9. The half point makes a draw impossible.
One consequence is important before you pass. There is no separate step in which the players agree which stones are dead: the board is counted exactly as it stands. Stones that you consider dead but have not captured still count as stones for their owner, so play the position out and capture them before passing.
With area scoring, playing a stone inside your own territory is generally neutral: the stone itself adds one point, but it occupies an intersection that would otherwise have counted as territory. This differs from Japanese territory scoring, where filling your own territory generally loses a point.