A Mathematically Precise, Short and Concisely Commented Set of Go Rules

First of all we need a list of simple definitions:

• Let ℕ denote the set of natural numbers {1, 2, 3, …}.

• Let ℤ denote the set of the integers {…, −2, −1, 0, 1, 2, …}.

• Let n := 19 be the size of the board or grid.

• Let b := ℤ_{n}×ℤ_{n} denote the board, defining a grid of n×n points where the lines of the grid intersect. Mathematically speaking: a graph of n^{2} vertices with edges between nearest neighbor points defined by its canonical metric embedding.

• Let p ∈ b be a point on the board or point in the grid.

• Let W := +1 denote a white stone on a point.

• Let B := −1 denote a black stone on a point.

• Let E := 0 denote an empty point.

• Call {W, E, B} the set of available colors. Hence, each of its elements is also a color. They are regarded as attributes of points.

• Let m ∈ ℕ denote the move number or turn counter.

• Let c(p, m) ∈ {W, E, B} denote the color of a point p after/at move m.

• Let s(m) ∈ {W, E, B}^{n×n} be the state of the whole board after/at move m — it is represented by the colors of all points as an n×n-matrix.

• Let s(0) = (E)_{p∈b} be the empty n×n-matrix, which implies that no handicap stones are given. This can be adjusted by giving adequate komi.

• Let k = \frac{k′}{2} with fixed k′ ∈ ℤ be called the komi.

Some nontrival top-down definitions follow:

• Let t(p, m), the unit of a point (also called the group at a point) at move m, be the set of points at this move which have the color c(p, m) and are adjacent to p.

• A point q is adjacent to a point p if and only if there exists a monochromatic neighborhood path between p and q on the grid.

• Call Γ_{p,q} a monochromatic neighborhood path between two points p, q ∈ b if firstly, Γ_{p,q} ∈ b^{j} for a fixed j ∈ ℕ with Γ_{p,q}(1) = p and Γ_{p,q}(j) = q, this means Γ_{p,q} is a list of j points which starts at p and ends at q, secondly, each point Γ_{p,q}(i) with 1 < i ≤ j is directly neighbouring to Γ_{p,q}(i − 1), and thirdly, c(Γ_{p,q}(i)) = c(p) for all 1 < i ≤ j.

• Call two points p, q ∈ b directly neighboring if |p_{x} − q_{x}| + |p_{y} − q_{y}| = 1 with p = (p_{x}, p_{y}) and q = (q_{x}, q_{y}).

• Call a unit breathless if none of its points is neither E nor a direct neighbor of a point with color E.

• For each m and each p must hold: the unit t(p, m) is not breathless. ‘Is not breathless’ can be rephrased as ‘has at least one liberty’. Remark: the set of units at move m is always a unique classification of the set of all points. This induces a nontrivial mathematical equivalent-relation in b.

• If s(m) = s(m − 1) for any move m, call m a pass.

• After all that, here is a long explanatory definition of how to place a stone. For convenience, we temporarily extend the definition of a move m to include the intermediate move m′. An intermediate move m′ is a negative integer and occurs between two consecutive moves. It can be interpreted as the incomplete move m = −m′ > 0. The definition of c and s had to be extended so that the previous formalism can still be used. If m > 0 then define the intermediate state s(−m) = s(m − 1), except that m does not correspond to a pass, there is exactly one p′ ∈ b such that c(p′, m) = E, but c′ := c(p′, −m) = W if m is even and c′ := c(p′, −m) = B if m is odd. This means: during move m either a black or a white stone is placed at p′ on the grid, provided the move is not a pass. This p′ is then called the point of play and c′ its color. Because the right to place a stone alternates between black and white stones, you can interpret this as if two players named Black and White are taking turns. Exactly one of three cases now holds for s(−m), defining a set R:

There are no breathless units in s(−m) at all. Then define R to be the empty set {}. This occurs, if only one stone is put onto the board and all units still have at least one liberty, so no removal happens. There are breathless units of the color −c′, namely the opponent’s stones. Then define R to be the set of points which belongs to these breathless units. This is the case if opponent’s stones are captured and are removed from the board. There are breathless units of only(!) the color c′, namely the player’s own stones. Then define R to be the set of points which belongs to those breathless units. This is the case of own stones committing suicide and being removed from the board. A single-stone-suicide is identical to a pass move.

Finally, define s(m) = s(−m), except that in s(m) all points which belong also to R are colored empty. Summarizing, s(m) is similar to s(m − 1) in the sense that typically only a stone is placed on an empty point, or rarely, that also one/some unit(s) of stones disappear(s) from the board. Only those which were directly neighboring to the point of play could possibly disappear. From now on, we again restrict the move number m to strictly positive integers.

• A list (s(m))_{m∈{0,1,2,...,ℓ}} is called a Go game of length ℓ ∈ ℕ, provided that

first, if s(m + 1) = s(m) = s(m − 1) for any m then ℓ = m + 1. This means two consecutive passes end the game. Such a game is called a counted game, in contrast to a resigned game, which always has s(ℓ) ≠ s(ℓ − 2)

— in practice ℓ will be > 1. second, if s(m) = s(m′) then either m = m′ or from m up to m′ all moves are passes — in view of the first condition, this has the consequence that |m − m′| ≤ 1 or the game ends at either move m = ℓ or m′ = ℓ. This means that it is forbidden to recreate a whole-board position. This rule avoids cyclic playing and hence the possibility of endless games.

Now we can determine the Winner/Loser of a Go game of length ℓ: If such a game is a

• resigned game and

if ℓ is odd (B has caused s(ℓ)) Black wins and White loses, if ℓ is even (W has caused s(ℓ)) White wins and Black loses.

• counted game, then determine the score := k + ∑_{p∈b} c(p, ℓ); and

if the score is positive White wins and Black loses, if the score is negative Black wins and White loses, if the score is zero the game is a draw.

As you see from the score definition, the aim of both players is to have as many stones of their color as possible on the board at the end of the game. The complicated scoring formula can be replaced in practice by allowing White to remove a number of black stones equal to the komi and then removing a black stone and a white stone simultaneously from the board for as long as possible. When this procedure ends, the color of the stones remaining on the board indicates the winner. No stones remaining indicates a drawn game.

Feel free to formulate other variants of Go rule sets precisely and don’t despair about agreement phases needed in area-scoring rules or even analysis-phases needed in the Japanese territory-scoring rules. :-> Those readers who think all this lacks precision should take account of the following pages only.

Please contact the author under achim@mathematik.uni-bielefeld.de if you notice grammatical mistakes or even logical errors.

Achim Flammenkamp, Bielefeld, 2006-05-26 19:00 UTC+2 boolean operators in descending priority: :=, □, ∼_{m}, =, ≠, ∈, ∉, ∧, ∨, ⇒, ⇔,:⇔

𝔹 := {false ≡ 0, true ≡ 1}  (1)
ℕ := {1, 2, 3, …}  (2)
ℤ := {…, −2, −1, 0, 1, 2, …}  (3)
k′ ∈ ℤ , k := \frac{k′}{2}  (4)
n := 19  (5)
∀ h ∈ ℕ :  ℤ_{h} := {0, 1, …, h − 1}  (6)
G := ℤ_{n} × ℤ_{n}  (7)
W := +1, B := −1, E := 0  (8)
C := {B, E, W }  (9)
S := C^{n×n}  (10)
c : G × S → C  (11)
∀ p ∈ G ∀ σ ∈ S : c(p, σ) := σ_{[p]}  (12)
P(G) := {H : H ⊆ G}  (13)
s : C × P(G) × S → S  (14)
∀ κ ∈ C ∀ τ ∈ P(G) ∀ σ ∈ S : s(κ, τ, σ) := ((q ∉τ) · σ_{[q]} + (q ∈τ) · κ)_{q∈G} (15)
□ : G × G → 𝔹  (16)
∀ p, q ∈ G :  (p_{x}, p_{y}) □ (q_{x}, q_{y}) :⇔ |p_{x} − q_{x}| + |p_{y} − q_{y}| ≤ 1  (17)
t : G × S → P(G)  (18)
∀ q, p ∈ G ∀ σ ∈ S :  q ∈ t(p, σ) ⇔ q = p ∨  (19a)
∃ r ∈ t(p, σ) : q □ r ∧ c(q, σ) = c(p, σ)  (19b)
β : P(G) × S → P(G)  (20)
∀ τ ∈ P(G) ∀ σ ∈ S :  β(τ, σ) := {r ∈ G : ∃ q ∈ τ : q □ r ∧ c(r, σ) = E} (21)
Δ : C × S → P(G)  (22)
∀ κ ∈ C ∀ σ ∈ S :  Δ(κ, σ) := {q ∈ G : β(t(q, σ), σ) = {} ∧ c(q, σ) = κ} (23)
± : ℕ_{0} → {B, W }  (24)
∀ m ∈ ℕ_{0} :  ±m := −1^{m}  (25)
∀ m ∈ ℕ :  ∼_{m}: S × S → 𝔹  (26)

∀ m ∈ ℕ ∀ ρ, σ ∈ S :  ρ ∼_{m} σ :⇔ ρ = σ ∨ ∃ p ∈ G : c(p, σ) = E ∧ (27a)
( ϱ := s(±m, {p}, σ), (  (27b)
s(E, Δ(∓m, ϱ), ϱ) = ρ ∧ Δ(∓m, ϱ) ≠ {} ∨ (27c)
s(E, Δ(±m, ϱ), ϱ) = ρ ∧ Δ(∓m, ϱ) = {} ) ) (27d)
∀ ℓ ∈ ℕ :  Ω_{ℓ} := { (σ_{m})_{m∈ℤ_{ℓ+1}} ∈ S^{ℓ+1} : ∀ m ∈ ℕ_{ℓ} : σ_{m+1} ∼_{m} σ_{m} ∧ (28a)
σ_{0} = (E)_{p∈G} ∧  (28b)
∃m, m′ ∈ ℤ_{l+1} : σ_{m} = σ_{m′} ⇒ |m − m′| = 1 ∨ |m − m′| = 2 ∧ σ_{ℓ} = σ_{\frac{m+m′}{2}} \} (28c)
ψ : S → ℤ  (29)
∀ σ ∈ S : ψ(σ) := k′ + 2 ∑_{p∈G} σ_{[p]}  (30)
Ψ : ⋃_{ℓ∈ℕ} Ω_{ℓ} → C  (31)
∀ ℓ ∈ ℕ ∀ (σ_{m})_{m∈ℤ_{ℓ+1}} ∈ Ω_{ℓ} : Ψ((σ_{m})_{m∈ℤ_{ℓ+1}}) :=  (32a)
(σ_{ℓ−2} = σ_{ℓ}) · sign(ψ(σ_{ℓ})) + (σ_{ℓ−2} ≠ σ_{ℓ}) · ±l  (32b)

1. boolean values

2. natural numbers

3. integers

4. fix the komi k

5. size of grid

6. the subset of ℤ with h elements which are < h and ≥ 0

7. grid, namely the set of grid points

8. Black, White, Empty

9. all possible colors

10. state of grid in the n × n dimensional space of colors

11. function: shows color of point

12. shows color of a point p of grid which is in state σ

13. powerset of G, the set of all subsets

14. function: colors a subset of the grid which is in state σ 15. shows the new state which arises if a subset τ of the grid is colored with κ

16. operator: decides whether two points of the grid are directly neighboring 17.

18. function: shows which unit each point belongs to 19a. 19b. recursive definition! r must be already verified to be in t

20. function: shows the set of liberties of a unit 21.

22. function: shows for a given color all breathless points of the state 23.

24. function: maps the move number to the player’s turn 25.

26. function: decides whether one state can arise from another state 27a. either the states are identical or a point of play exists 27b. defines the intermediate state by coloring p appropriately 27c. if there are breathless opponent units, remove them 27d. if no opponent units are breathless, remove your breathless units 28a. a Go game is a list of states which arise from each predecessor state 28b. the beginning state is the empty grid 28c. if any two states are equal, they are at most 2 moves apart

29. function: gives the value of a state (including komi) 30.

31. function: gives the result, namely the winning color 32a. 32b. it’s either a counted game or a resigned game

Achim Flammenkamp, Bielefeld, 2006-05-26 19:00 UTC+2