The Go Board

A track of P72 · Reading a Position.

The go board and its first rule: stones on the intersections, a group's liberties counted by a flood fill, and the capture of a group that has none.

Go has one kind of piece, a stone, and one idea that everything rests on: a stone stays on the board only while it has an empty point beside it. This track starts there.

The first lesson counts the liberties of a stone and of a group, and shows the capture of a group whose last liberty is filled, on a 9 × 9 board; its exercises count liberties with a flood fill. The lessons that follow add ko, the capture that may not be answered at once, counting a finished game to see who won, and the coordinates and records go players use to write a game down.

The track is written for someone who has never played. Each lesson draws every position it talks about on a board, so a rule is always seen on stones; the exercises are short Python functions on a board written as a list of rows, and the flood fill they build is the same search the later lessons use to count territory.

Libertiesempty neighboursGroupsstones share libertiesCapturelast liberty filled
Stones, groups and capture: the rule every later go lesson builds on.
The Go Board — TransformerLab