FA-82891 / Go territory scoring / Open access
A capturing move into a surrounded point is rejected as suicide · case 01
Taking the last liberty of an enclosing chain is refused although it would capture.
ROOT CAUSE
The own-chain liberty check runs before opponent chains without liberties are removed.
THE FAILURE
The own-chain liberty check runs before opponent chains without liberties are removed.
Unsuccessful approach: Dropping the suicide test entirely accepts genuine suicides and leaves a libertyless chain on the board.
Case contract
Input [board, colour, row, col]. Occupied point -> ["illegal", "occupied"]. Otherwise place the stone, remove every adjacent opponent chain left without liberties, then reject the move as ["illegal", "suicide"] only if the placed chain still has no liberty. Return [new_board, captured_stone_count].
Why this case matters
Go servers and scoring tools compute this value automatically; a wrong answer changes a game result.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
board, color, r, c = x
g = [list(row) for row in board]
n = len(g)
m = len(g[0])
if g[r][c] != '.':
return ['illegal', 'occupied']
opp = 'W' if color == 'B' else 'B'
g[r][c] = color
def group(i, j):
col = g[i][j]
stones = {(i, j)}
libs = set()
stack = [(i, j)]
while stack:
a, b = stack.pop()
for p, q in ((a, b + 1), (a + 1, b), (a, b - 1), (a - 1, b)):
if 0 <= p < n and 0 <= q < m:
if g[p][q] == '.':
libs.add((p, q))
elif g[p][q] == col and (p, q) not in stones:
stones.add((p, q))
stack.append((p, q))
return stones, libs
own, own_libs = group(r, c)
if not own_libs:
return ['illegal', 'suicide']
captured = 0
for p, q in ((r + 1, c), (r - 1, c), (r, c + 1), (r, c - 1)):
if 0 <= p < n and 0 <= q < m and g[p][q] == opp:
stones, libs = group(p, q)
if not libs:
for s, t in stones:
g[s][t] = '.'
captured += len(stones)
stones, libs = group(r, c)
if not libs:
return ['illegal', 'suicide']
return [[''.join(row) for row in g], captured]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[['...', '...', '...'], 'W', 2, 0], [['...', '...', 'W..'], 0]], [[['.B.', 'B.B', '.B.'], 'W', 2, 2], ['illegal', 'suicide']], [[['.B.', 'B.B', '.B.'], 'W', 2, 0], ['illegal', 'suicide']], [[['.B.', 'B.B', '.B.'], 'B', 0, 0], [['BB.', 'B.B', '.B.'], 0]], [[['.B.', 'B.B', '.B.'], 'B', 0, 2], [['.BB', 'B.B', '.B.'], 0]], [[['.B.', 'B.B', '.B.'], 'B', 0, 1], ['illegal', 'occupied']], [[['WWBW', 'WBBW', 'WBB.'], 'W', 2, 3], [['WW.W', 'W..W', 'W..W'], 5]], [[['...', '.BW', '..B', '.BW', 'BB.'], 'W', 4, 2], ['illegal', 'suicide']]], [[[['B..W', 'B..W', 'B..W', 'B..W'], 'B', 1, 1], [['B..W', 'BB.W', 'B..W', 'B..W'], 0]], [[['B..W', 'B..W', 'B..W', 'B..W'], 'W', 0, 2], [['B.WW', 'B..W', 'B..W', 'B..W'], 0]], [[['B..W', 'B..W', 'B..W', 'B..W'], 'B', 0, 1], [['BB.W', 'B..W', 'B..W', 'B..W'], 0]], [[['B..W', 'B..W', 'B..W', 'B..W'], 'B', 2, 0], ['illegal', 'occupied']], [[['.BW.', '.BW.', '.BW.', '.BW.'], 'W', 2, 3], [['.BW.', '.BW.', '.BWW', '.BW.'], 0]], [[['.BW.', '.BW.', '.BW.', '.BW.'], 'W', 0, 0], [['WBW.', '.BW.', '.BW.', '.BW.'], 0]], [[['W.WW.', '...BW', '...W.'], 'B', 2, 4], ['illegal', 'suicide']], [[['WBW', 'BBB', 'BB.'], 'W', 2, 2], [['W.W', '...', '..W'], 6]]], [[[['.BW.', '.BW.', '.BW.', '.BW.'], 'B', 2, 0], [['.BW.', '.BW.', 'BBW.', '.BW.'], 0]], [[['.BW.', '.BW.', '.BW.', '.BW.'], 'B', 0, 2], ['illegal', 'occupied']], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 'B', 0, 0], [['B.B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 0]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 'B', 1, 1], [['..B..', '.BB..', 'BBBBB', 'WWWWW', '..W..'], 0]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 'B', 4, 0], [['..B..', '..B..', 'BBBBB', 'WWWWW', 'B.W..'], 0]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 'B', 0, 1], [['.BB..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 0]], [[['.B.', 'BWB', '...'], 'W', 0, 0], ['illegal', 'suicide']], [[['B.B', 'WBW', '.W.'], 'B', 2, 2], [['B.B', 'WB.', '.WB'], 1]]], [[[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'W', 2, 1], ['illegal', 'suicide']], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'W', 0, 1], ['illegal', 'suicide']], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'B', 4, 3], [['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..WB.'], 0]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'B', 2, 4], [['B.B.W', '.B.W.', 'B.BWB', 'BBW.W', '..W..'], 0]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'B', 3, 2], ['illegal', 'occupied']], [[['W....', '.....', '.....', '.....', '....B'], 'W', 4, 1], [['W....', '.....', '.....', '.....', '.W..B'], 0]], [[['.W.', 'WBW', 'BWB'], 'B', 0, 2], [['.WB', 'WB.', 'BWB'], 1]], [[['BWB', 'W.W', 'BWB'], 'W', 1, 1], ['illegal', 'suicide']]], [[[['W....', '.....', '.....', '.....', '....B'], 'W', 3, 0], [['W....', '.....', '.....', 'W....', '....B'], 0]], [[['W....', '.....', '.....', '.....', '....B'], 'W', 4, 0], [['W....', '.....', '.....', '.....', 'W...B'], 0]], [[['W....', '.....', '.....', '.....', '....B'], 'B', 4, 4], ['illegal', 'occupied']], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], 'W', 0, 2], [['.WWB.', 'W.WB.', '.WB..', 'WB...', 'B....'], 0]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], 'W', 0, 0], [['WW.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], 0]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], 'B', 2, 4], [['.W.B.', 'W.WB.', '.WB.B', 'WB...', 'B....'], 0]], [[['WWW', 'W.W', 'WWW'], 'W', 1, 1], ['illegal', 'suicide']], [[['BWB', 'W.W', 'BWB'], 'B', 1, 1], [['B.B', '.B.', 'B.B'], 4]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("move result case %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| move result case 0 | [['...', '...', 'W..'], 0] | [['...', '...', 'W..'], 0] | Passed |
| move result case 1 | ['illegal', 'suicide'] | ['illegal', 'suicide'] | Passed |
| move result case 2 | ['illegal', 'suicide'] | ['illegal', 'suicide'] | Passed |
| move result case 3 | [['BB.', 'B.B', '.B.'], 0] | [['BB.', 'B.B', '.B.'], 0] | Passed |
| move result case 4 | [['.BB', 'B.B', '.B.'], 0] | [['.BB', 'B.B', '.B.'], 0] | Passed |
| move result case 5 | ['illegal', 'occupied'] | ['illegal', 'occupied'] | Passed |
| move result case 6 | ['illegal', 'suicide'] | [['WW.W', 'W..W', 'W..W'], 5] | Failed |
| move result case 7 | ['illegal', 'suicide'] | ['illegal', 'suicide'] | Passed |
SHA-256 / 2dc3464439bcb10837ec8d94e179acedd0d48ca81c6e2d5f732777a2e32b150a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
board, color, r, c = x
g = [list(row) for row in board]
n = len(g)
m = len(g[0])
if g[r][c] != '.':
return ['illegal', 'occupied']
opp = 'W' if color == 'B' else 'B'
g[r][c] = color
def group(i, j):
col = g[i][j]
stones = {(i, j)}
libs = set()
stack = [(i, j)]
while stack:
a, b = stack.pop()
for p, q in ((a, b + 1), (a + 1, b), (a, b - 1), (a - 1, b)):
if 0 <= p < n and 0 <= q < m:
if g[p][q] == '.':
libs.add((p, q))
elif g[p][q] == col and (p, q) not in stones:
stones.add((p, q))
stack.append((p, q))
return stones, libs
captured = 0
for p, q in ((r + 1, c), (r - 1, c), (r, c + 1), (r, c - 1)):
if 0 <= p < n and 0 <= q < m and g[p][q] == opp:
stones, libs = group(p, q)
if not libs:
for s, t in stones:
g[s][t] = '.'
captured += len(stones)
return [[''.join(row) for row in g], captured]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[['...', '...', '...'], 'W', 2, 0], [['...', '...', 'W..'], 0]], [[['.B.', 'B.B', '.B.'], 'W', 2, 2], ['illegal', 'suicide']], [[['.B.', 'B.B', '.B.'], 'W', 2, 0], ['illegal', 'suicide']], [[['.B.', 'B.B', '.B.'], 'B', 0, 0], [['BB.', 'B.B', '.B.'], 0]], [[['.B.', 'B.B', '.B.'], 'B', 0, 2], [['.BB', 'B.B', '.B.'], 0]], [[['.B.', 'B.B', '.B.'], 'B', 0, 1], ['illegal', 'occupied']], [[['WWBW', 'WBBW', 'WBB.'], 'W', 2, 3], [['WW.W', 'W..W', 'W..W'], 5]], [[['...', '.BW', '..B', '.BW', 'BB.'], 'W', 4, 2], ['illegal', 'suicide']]], [[[['B..W', 'B..W', 'B..W', 'B..W'], 'B', 1, 1], [['B..W', 'BB.W', 'B..W', 'B..W'], 0]], [[['B..W', 'B..W', 'B..W', 'B..W'], 'W', 0, 2], [['B.WW', 'B..W', 'B..W', 'B..W'], 0]], [[['B..W', 'B..W', 'B..W', 'B..W'], 'B', 0, 1], [['BB.W', 'B..W', 'B..W', 'B..W'], 0]], [[['B..W', 'B..W', 'B..W', 'B..W'], 'B', 2, 0], ['illegal', 'occupied']], [[['.BW.', '.BW.', '.BW.', '.BW.'], 'W', 2, 3], [['.BW.', '.BW.', '.BWW', '.BW.'], 0]], [[['.BW.', '.BW.', '.BW.', '.BW.'], 'W', 0, 0], [['WBW.', '.BW.', '.BW.', '.BW.'], 0]], [[['W.WW.', '...BW', '...W.'], 'B', 2, 4], ['illegal', 'suicide']], [[['WBW', 'BBB', 'BB.'], 'W', 2, 2], [['W.W', '...', '..W'], 6]]], [[[['.BW.', '.BW.', '.BW.', '.BW.'], 'B', 2, 0], [['.BW.', '.BW.', 'BBW.', '.BW.'], 0]], [[['.BW.', '.BW.', '.BW.', '.BW.'], 'B', 0, 2], ['illegal', 'occupied']], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 'B', 0, 0], [['B.B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 0]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 'B', 1, 1], [['..B..', '.BB..', 'BBBBB', 'WWWWW', '..W..'], 0]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 'B', 4, 0], [['..B..', '..B..', 'BBBBB', 'WWWWW', 'B.W..'], 0]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 'B', 0, 1], [['.BB..', '..B..', 'BBBBB', 'WWWWW', '..W..'], 0]], [[['.B.', 'BWB', '...'], 'W', 0, 0], ['illegal', 'suicide']], [[['B.B', 'WBW', '.W.'], 'B', 2, 2], [['B.B', 'WB.', '.WB'], 1]]], [[[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'W', 2, 1], ['illegal', 'suicide']], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'W', 0, 1], ['illegal', 'suicide']], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'B', 4, 3], [['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..WB.'], 0]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'B', 2, 4], [['B.B.W', '.B.W.', 'B.BWB', 'BBW.W', '..W..'], 0]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], 'B', 3, 2], ['illegal', 'occupied']], [[['W....', '.....', '.....', '.....', '....B'], 'W', 4, 1], [['W....', '.....', '.....', '.....', '.W..B'], 0]], [[['.W.', 'WBW', 'BWB'], 'B', 0, 2], [['.WB', 'WB.', 'BWB'], 1]], [[['BWB', 'W.W', 'BWB'], 'W', 1, 1], ['illegal', 'suicide']]], [[[['W....', '.....', '.....', '.....', '....B'], 'W', 3, 0], [['W....', '.....', '.....', 'W....', '....B'], 0]], [[['W....', '.....', '.....', '.....', '....B'], 'W', 4, 0], [['W....', '.....', '.....', '.....', 'W...B'], 0]], [[['W....', '.....', '.....', '.....', '....B'], 'B', 4, 4], ['illegal', 'occupied']], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], 'W', 0, 2], [['.WWB.', 'W.WB.', '.WB..', 'WB...', 'B....'], 0]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], 'W', 0, 0], [['WW.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], 0]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], 'B', 2, 4], [['.W.B.', 'W.WB.', '.WB.B', 'WB...', 'B....'], 0]], [[['WWW', 'W.W', 'WWW'], 'W', 1, 1], ['illegal', 'suicide']], [[['BWB', 'W.W', 'BWB'], 'B', 1, 1], [['B.B', '.B.', 'B.B'], 4]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("move result case %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| move result case 0 | [['...', '...', 'W..'], 0] | [['...', '...', 'W..'], 0] | Passed |
| move result case 1 | [['.B.', 'B.B', '.BW'], 0] | ['illegal', 'suicide'] | Failed |
| move result case 2 | [['.B.', 'B.B', 'WB.'], 0] | ['illegal', 'suicide'] | Failed |
| move result case 3 | [['BB.', 'B.B', '.B.'], 0] | [['BB.', 'B.B', '.B.'], 0] | Passed |
| move result case 4 | [['.BB', 'B.B', '.B.'], 0] | [['.BB', 'B.B', '.B.'], 0] | Passed |
| move result case 5 | ['illegal', 'occupied'] | ['illegal', 'occupied'] | Passed |
| move result case 6 | [['WW.W', 'W..W', 'W..W'], 5] | [['WW.W', 'W..W', 'W..W'], 5] | Passed |
| move result case 7 | [['...', '.BW', '..B', '.BW', 'BBW'], 0] | ['illegal', 'suicide'] | Failed |
SHA-256 / 6d8adcab3d3154adfd3ed1a58d98239351d1483b276fb41531b752dfdd1e40f7
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Small rectangular toy boards given as strings of B, W and dot; a bounded teaching model of one scoring or bookkeeping rule, not a complete rules engine or server implementation. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:50:16.411653+00:00.
Case digest / 7cb675a4b58eb8a87c31267e71e1969f5bf35b78fef9ef07f0af988c8491a1e9