FA-83166 / Go territory scoring / Open access
Black-only counting assumes 361 points on every board · case 01
Small-board games are scored against the 19x19 total.
ROOT CAUSE
The total point count is hard-coded.
VERIFIED REPAIR
Use size*size intersections.
Unsuccessful approach: Counting (size-1)^2 squares instead of intersections still undercounts the board.
Case contract
Input [size, black_area, komi_tenths] for a board with no dame. White area is size^2 - black_area. Return [margin_tenths, winner] where margin = 10*(black - white) - komi and winner is B, W or draw.
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):
size, black, komi = x
total = 361
margin = 20 * black - 10 * total - komi
if margin > 0:
return [margin, 'B']
if margin < 0:
return [margin, 'W']
return [0, 'draw']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[9, 13, 65], [-615, 'W']], [[9, 72, 5], [625, 'B']], [[9, 53, 75], [175, 'B']], [[9, 74, 0], [670, 'B']], [[9, 64, 0], [470, 'B']], [[9, 12, 65], [-635, 'W']], [[9, 27, 75], [-345, 'W']], [[9, 6, 0], [-690, 'W']]], [[[9, 80, 70], [720, 'B']], [[9, 64, 0], [470, 'B']], [[9, 4, 0], [-730, 'W']], [[9, 69, 65], [505, 'B']], [[9, 35, 70], [-180, 'W']], [[9, 21, 75], [-465, 'W']], [[13, 30, 70], [-1160, 'W']], [[13, 163, 5], [1565, 'B']]], [[[9, 72, 5], [625, 'B']], [[9, 4, 0], [-730, 'W']], [[13, 111, 5], [525, 'B']], [[13, 13, 5], [-1435, 'W']], [[13, 7, 70], [-1620, 'W']], [[13, 46, 75], [-845, 'W']], [[13, 56, 75], [-645, 'W']], [[13, 167, 0], [1650, 'B']]], [[[9, 53, 75], [175, 'B']], [[13, 163, 5], [1565, 'B']], [[13, 130, 5], [905, 'B']], [[13, 39, 65], [-975, 'W']], [[13, 76, 65], [-235, 'W']], [[13, 132, 65], [885, 'B']], [[13, 27, 75], [-1225, 'W']], [[13, 107, 65], [385, 'B']]], [[[9, 12, 65], [-635, 'W']], [[13, 46, 75], [-845, 'W']], [[13, 137, 0], [1050, 'B']], [[13, 9, 65], [-1575, 'W']], [[13, 114, 65], [525, 'B']], [[19, 309, 0], [2570, 'B']], [[19, 303, 75], [2375, 'B']], [[19, 77, 5], [-2075, 'W']]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("black count 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 |
|---|---|---|---|
| black count case 0 | [-3415, 'W'] | [-615, 'W'] | Failed |
| black count case 1 | [-2175, 'W'] | [625, 'B'] | Failed |
| black count case 2 | [-2625, 'W'] | [175, 'B'] | Failed |
| black count case 3 | [-2130, 'W'] | [670, 'B'] | Failed |
| black count case 4 | [-2330, 'W'] | [470, 'B'] | Failed |
| black count case 5 | [-3435, 'W'] | [-635, 'W'] | Failed |
| black count case 6 | [-3145, 'W'] | [-345, 'W'] | Failed |
| black count case 7 | [-3490, 'W'] | [-690, 'W'] | Failed |
SHA-256 / 61f667ae698af9a5fc075f9f5d9e6611e41c630fd8d23d505ea68e19278d7110
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
size, black, komi = x
total = (size - 1) * (size - 1)
margin = 20 * black - 10 * total - komi
if margin > 0:
return [margin, 'B']
if margin < 0:
return [margin, 'W']
return [0, 'draw']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[9, 13, 65], [-615, 'W']], [[9, 72, 5], [625, 'B']], [[9, 53, 75], [175, 'B']], [[9, 74, 0], [670, 'B']], [[9, 64, 0], [470, 'B']], [[9, 12, 65], [-635, 'W']], [[9, 27, 75], [-345, 'W']], [[9, 6, 0], [-690, 'W']]], [[[9, 80, 70], [720, 'B']], [[9, 64, 0], [470, 'B']], [[9, 4, 0], [-730, 'W']], [[9, 69, 65], [505, 'B']], [[9, 35, 70], [-180, 'W']], [[9, 21, 75], [-465, 'W']], [[13, 30, 70], [-1160, 'W']], [[13, 163, 5], [1565, 'B']]], [[[9, 72, 5], [625, 'B']], [[9, 4, 0], [-730, 'W']], [[13, 111, 5], [525, 'B']], [[13, 13, 5], [-1435, 'W']], [[13, 7, 70], [-1620, 'W']], [[13, 46, 75], [-845, 'W']], [[13, 56, 75], [-645, 'W']], [[13, 167, 0], [1650, 'B']]], [[[9, 53, 75], [175, 'B']], [[13, 163, 5], [1565, 'B']], [[13, 130, 5], [905, 'B']], [[13, 39, 65], [-975, 'W']], [[13, 76, 65], [-235, 'W']], [[13, 132, 65], [885, 'B']], [[13, 27, 75], [-1225, 'W']], [[13, 107, 65], [385, 'B']]], [[[9, 12, 65], [-635, 'W']], [[13, 46, 75], [-845, 'W']], [[13, 137, 0], [1050, 'B']], [[13, 9, 65], [-1575, 'W']], [[13, 114, 65], [525, 'B']], [[19, 309, 0], [2570, 'B']], [[19, 303, 75], [2375, 'B']], [[19, 77, 5], [-2075, 'W']]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("black count 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 |
|---|---|---|---|
| black count case 0 | [-445, 'W'] | [-615, 'W'] | Failed |
| black count case 1 | [795, 'B'] | [625, 'B'] | Failed |
| black count case 2 | [345, 'B'] | [175, 'B'] | Failed |
| black count case 3 | [840, 'B'] | [670, 'B'] | Failed |
| black count case 4 | [640, 'B'] | [470, 'B'] | Failed |
| black count case 5 | [-465, 'W'] | [-635, 'W'] | Failed |
| black count case 6 | [-175, 'W'] | [-345, 'W'] | Failed |
| black count case 7 | [-520, 'W'] | [-690, 'W'] | Failed |
SHA-256 / ab7fe76d9f2540e47a5c16c19b269daf88f7340e6933c4d74cda81530a4003f3
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
size, black, komi = x
total = size * size
margin = 20 * black - 10 * total - komi
if margin > 0:
return [margin, 'B']
if margin < 0:
return [margin, 'W']
return [0, 'draw']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[9, 13, 65], [-615, 'W']], [[9, 72, 5], [625, 'B']], [[9, 53, 75], [175, 'B']], [[9, 74, 0], [670, 'B']], [[9, 64, 0], [470, 'B']], [[9, 12, 65], [-635, 'W']], [[9, 27, 75], [-345, 'W']], [[9, 6, 0], [-690, 'W']]], [[[9, 80, 70], [720, 'B']], [[9, 64, 0], [470, 'B']], [[9, 4, 0], [-730, 'W']], [[9, 69, 65], [505, 'B']], [[9, 35, 70], [-180, 'W']], [[9, 21, 75], [-465, 'W']], [[13, 30, 70], [-1160, 'W']], [[13, 163, 5], [1565, 'B']]], [[[9, 72, 5], [625, 'B']], [[9, 4, 0], [-730, 'W']], [[13, 111, 5], [525, 'B']], [[13, 13, 5], [-1435, 'W']], [[13, 7, 70], [-1620, 'W']], [[13, 46, 75], [-845, 'W']], [[13, 56, 75], [-645, 'W']], [[13, 167, 0], [1650, 'B']]], [[[9, 53, 75], [175, 'B']], [[13, 163, 5], [1565, 'B']], [[13, 130, 5], [905, 'B']], [[13, 39, 65], [-975, 'W']], [[13, 76, 65], [-235, 'W']], [[13, 132, 65], [885, 'B']], [[13, 27, 75], [-1225, 'W']], [[13, 107, 65], [385, 'B']]], [[[9, 12, 65], [-635, 'W']], [[13, 46, 75], [-845, 'W']], [[13, 137, 0], [1050, 'B']], [[13, 9, 65], [-1575, 'W']], [[13, 114, 65], [525, 'B']], [[19, 309, 0], [2570, 'B']], [[19, 303, 75], [2375, 'B']], [[19, 77, 5], [-2075, 'W']]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("black count 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 |
|---|---|---|---|
| black count case 0 | [-615, 'W'] | [-615, 'W'] | Passed |
| black count case 1 | [625, 'B'] | [625, 'B'] | Passed |
| black count case 2 | [175, 'B'] | [175, 'B'] | Passed |
| black count case 3 | [670, 'B'] | [670, 'B'] | Passed |
| black count case 4 | [470, 'B'] | [470, 'B'] | Passed |
| black count case 5 | [-635, 'W'] | [-635, 'W'] | Passed |
| black count case 6 | [-345, 'W'] | [-345, 'W'] | Passed |
| black count case 7 | [-690, 'W'] | [-690, 'W'] | Passed |
SHA-256 / 5a06f9022103eab7d7f235a8de4a34840cb4c6e1f104f98a55708b29a70983fe
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:19.070690+00:00.
Case digest / 371b692dffa38729f088b79989603e63a643341c6104f48b1fb895c55f4bf38f