FA-83171 / Go territory scoring / Open access
One extra black point is worth one point of margin instead of two · case 01
The margin is half of the true difference between black and white areas.
ROOT CAUSE
The margin compares black with half of the board rather than with white area.
VERIFIED REPAIR
margin = 10*(2*black - total) - komi.
Unsuccessful approach: Halving komi keeps the doubling but compares against the wrong compensation.
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 = size * size
margin = 10 * black - 5 * 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, 3, 5], [-755, 'W']], [[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, 3, 5], [-755, 'W']], [[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']], [[13, 163, 5], [1565, 'B']], [[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, 46, 75], [-845, 'W']], [[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, 76, 65], [-235, '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 | [-340, 'W'] | [-615, 'W'] | Failed |
| black count case 1 | [-380, 'W'] | [-755, 'W'] | Failed |
| black count case 2 | [50, 'B'] | [175, 'B'] | Failed |
| black count case 3 | [335, 'B'] | [670, 'B'] | Failed |
| black count case 4 | [235, 'B'] | [470, 'B'] | Failed |
| black count case 5 | [-350, 'W'] | [-635, 'W'] | Failed |
| black count case 6 | [-210, 'W'] | [-345, 'W'] | Failed |
| black count case 7 | [-345, 'W'] | [-690, 'W'] | Failed |
SHA-256 / d5211472dc14e53904ca1f8d523fd135ba8eadaf78b31b1b91a1b3a610526398
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 * size
margin = 20 * black - 10 * total - komi // 2
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, 3, 5], [-755, 'W']], [[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, 3, 5], [-755, 'W']], [[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']], [[13, 163, 5], [1565, 'B']], [[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, 46, 75], [-845, 'W']], [[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, 76, 65], [-235, '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 | [-582, 'W'] | [-615, 'W'] | Failed |
| black count case 1 | [-752, 'W'] | [-755, 'W'] | Failed |
| black count case 2 | [213, 'B'] | [175, 'B'] | Failed |
| black count case 3 | [670, 'B'] | [670, 'B'] | Passed |
| black count case 4 | [470, 'B'] | [470, 'B'] | Passed |
| black count case 5 | [-602, 'W'] | [-635, 'W'] | Failed |
| black count case 6 | [-307, 'W'] | [-345, 'W'] | Failed |
| black count case 7 | [-690, 'W'] | [-690, 'W'] | Passed |
SHA-256 / 1c087736b20a8fa5b9173c07469031c94a68ccdc4d35b9a88dba683fc7891d8e
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, 3, 5], [-755, 'W']], [[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, 3, 5], [-755, 'W']], [[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']], [[13, 163, 5], [1565, 'B']], [[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, 46, 75], [-845, 'W']], [[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, 76, 65], [-235, '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 | [-755, 'W'] | [-755, 'W'] | 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 / 9bc062ab676c86736710969c61713d81c69e21d6da142f1b87749eb4bdeee5fe
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.189564+00:00.
Case digest / b4edfe08fb469ab9223dcbdb308da5aa49d8926a82ddaee42b9ac3c6a13a8b73