FA-83066 / Go territory scoring / Open access
A one-stone handicap triggers compensation · case 01
Handicap 1 games give white an extra point.
ROOT CAUSE
The compensation guard starts at one stone.
VERIFIED REPAIR
Compensate only for two or more handicap stones.
Unsuccessful approach: A strict > 2 guard skips compensation for the two-stone handicap.
Case contract
Input [rules, handicap, area_b, area_w, komi_tenths]. With handicap >= 2, white receives handicap points under chinese and handicap-1 under aga; other rules none. Return black margin in tenths.
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):
rules, h, ab, aw, komi = x
comp = 0
if h >= 1:
if rules == 'chinese':
comp = h
elif rules == 'aga':
comp = h - 1
return ab * 10 - (aw + comp) * 10 - komi
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[['chinese', 9, 175, 177, 5], -115], [['aga', 4, 151, 193, 65], -515], [['japanese', 2, 192, 168, 5], 235], [['japanese', 6, 150, 163, 0], -130], [['korean', 4, 186, 189, 0], -30], [['japanese', 0, 194, 172, 5], 215], [['chinese', 1, 167, 181, 5], -145], [['chinese', 2, 180, 180, 5], -25]], [[['chinese', 7, 188, 188, 5], -75], [['aga', 8, 157, 153, 0], -30], [['japanese', 9, 154, 170, 65], -225], [['japanese', 5, 174, 162, 5], 115], [['korean', 6, 207, 201, 5], 55], [['korean', 0, 160, 185, 65], -315], [['aga', 2, 170, 188, 75], -265], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 2, 163, 163, 65], -65], [['aga', 0, 154, 183, 75], -365], [['chinese', 0, 190, 164, 75], 185], [['korean', 2, 151, 171, 75], -275], [['chinese', 5, 192, 202, 5], -155], [['korean', 2, 172, 205, 75], -405], [['chinese', 2, 166, 151, 5], 125], [['chinese', 1, 167, 181, 5], -145]], [[['chinese', 6, 206, 204, 65], -105], [['aga', 2, 184, 170, 65], 65], [['korean', 2, 160, 206, 65], -525], [['korean', 7, 159, 177, 0], -180], [['aga', 9, 154, 181, 75], -425], [['japanese', 7, 205, 198, 0], 70], [['aga', 7, 191, 209, 75], -315], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 8, 159, 195, 0], -360], [['korean', 4, 163, 154, 0], 90], [['aga', 7, 202, 195, 65], -55], [['korean', 1, 174, 169, 75], -25], [['korean', 7, 195, 188, 65], 5], [['korean', 8, 166, 205, 5], -395], [['chinese', 1, 167, 181, 5], -145], [['aga', 2, 180, 180, 5], -15]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("compensation 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 |
|---|---|---|---|
| compensation case 0 | -115 | -115 | Passed |
| compensation case 1 | -515 | -515 | Passed |
| compensation case 2 | 235 | 235 | Passed |
| compensation case 3 | -130 | -130 | Passed |
| compensation case 4 | -30 | -30 | Passed |
| compensation case 5 | 215 | 215 | Passed |
| compensation case 6 | -155 | -145 | Failed |
| compensation case 7 | -25 | -25 | Passed |
SHA-256 / 5046e17361602e02f89786f8efb7ed14fa304de8105c2dfa9725ce188e9c3a07
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
rules, h, ab, aw, komi = x
comp = 0
if h > 2:
if rules == 'chinese':
comp = h
elif rules == 'aga':
comp = h - 1
return ab * 10 - (aw + comp) * 10 - komi
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[['chinese', 9, 175, 177, 5], -115], [['aga', 4, 151, 193, 65], -515], [['japanese', 2, 192, 168, 5], 235], [['japanese', 6, 150, 163, 0], -130], [['korean', 4, 186, 189, 0], -30], [['japanese', 0, 194, 172, 5], 215], [['chinese', 1, 167, 181, 5], -145], [['chinese', 2, 180, 180, 5], -25]], [[['chinese', 7, 188, 188, 5], -75], [['aga', 8, 157, 153, 0], -30], [['japanese', 9, 154, 170, 65], -225], [['japanese', 5, 174, 162, 5], 115], [['korean', 6, 207, 201, 5], 55], [['korean', 0, 160, 185, 65], -315], [['aga', 2, 170, 188, 75], -265], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 2, 163, 163, 65], -65], [['aga', 0, 154, 183, 75], -365], [['chinese', 0, 190, 164, 75], 185], [['korean', 2, 151, 171, 75], -275], [['chinese', 5, 192, 202, 5], -155], [['korean', 2, 172, 205, 75], -405], [['chinese', 2, 166, 151, 5], 125], [['chinese', 1, 167, 181, 5], -145]], [[['chinese', 6, 206, 204, 65], -105], [['aga', 2, 184, 170, 65], 65], [['korean', 2, 160, 206, 65], -525], [['korean', 7, 159, 177, 0], -180], [['aga', 9, 154, 181, 75], -425], [['japanese', 7, 205, 198, 0], 70], [['aga', 7, 191, 209, 75], -315], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 8, 159, 195, 0], -360], [['korean', 4, 163, 154, 0], 90], [['aga', 7, 202, 195, 65], -55], [['korean', 1, 174, 169, 75], -25], [['korean', 7, 195, 188, 65], 5], [['korean', 8, 166, 205, 5], -395], [['chinese', 1, 167, 181, 5], -145], [['aga', 2, 180, 180, 5], -15]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("compensation 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 |
|---|---|---|---|
| compensation case 0 | -115 | -115 | Passed |
| compensation case 1 | -515 | -515 | Passed |
| compensation case 2 | 235 | 235 | Passed |
| compensation case 3 | -130 | -130 | Passed |
| compensation case 4 | -30 | -30 | Passed |
| compensation case 5 | 215 | 215 | Passed |
| compensation case 6 | -145 | -145 | Passed |
| compensation case 7 | -5 | -25 | Failed |
SHA-256 / c71069bf6ebe225b08802ba537f2e8c71e4b965d7ee1a4486ee2487a82deb02b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
rules, h, ab, aw, komi = x
comp = 0
if h >= 2:
if rules == 'chinese':
comp = h
elif rules == 'aga':
comp = h - 1
return ab * 10 - (aw + comp) * 10 - komi
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[['chinese', 9, 175, 177, 5], -115], [['aga', 4, 151, 193, 65], -515], [['japanese', 2, 192, 168, 5], 235], [['japanese', 6, 150, 163, 0], -130], [['korean', 4, 186, 189, 0], -30], [['japanese', 0, 194, 172, 5], 215], [['chinese', 1, 167, 181, 5], -145], [['chinese', 2, 180, 180, 5], -25]], [[['chinese', 7, 188, 188, 5], -75], [['aga', 8, 157, 153, 0], -30], [['japanese', 9, 154, 170, 65], -225], [['japanese', 5, 174, 162, 5], 115], [['korean', 6, 207, 201, 5], 55], [['korean', 0, 160, 185, 65], -315], [['aga', 2, 170, 188, 75], -265], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 2, 163, 163, 65], -65], [['aga', 0, 154, 183, 75], -365], [['chinese', 0, 190, 164, 75], 185], [['korean', 2, 151, 171, 75], -275], [['chinese', 5, 192, 202, 5], -155], [['korean', 2, 172, 205, 75], -405], [['chinese', 2, 166, 151, 5], 125], [['chinese', 1, 167, 181, 5], -145]], [[['chinese', 6, 206, 204, 65], -105], [['aga', 2, 184, 170, 65], 65], [['korean', 2, 160, 206, 65], -525], [['korean', 7, 159, 177, 0], -180], [['aga', 9, 154, 181, 75], -425], [['japanese', 7, 205, 198, 0], 70], [['aga', 7, 191, 209, 75], -315], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 8, 159, 195, 0], -360], [['korean', 4, 163, 154, 0], 90], [['aga', 7, 202, 195, 65], -55], [['korean', 1, 174, 169, 75], -25], [['korean', 7, 195, 188, 65], 5], [['korean', 8, 166, 205, 5], -395], [['chinese', 1, 167, 181, 5], -145], [['aga', 2, 180, 180, 5], -15]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("compensation 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 |
|---|---|---|---|
| compensation case 0 | -115 | -115 | Passed |
| compensation case 1 | -515 | -515 | Passed |
| compensation case 2 | 235 | 235 | Passed |
| compensation case 3 | -130 | -130 | Passed |
| compensation case 4 | -30 | -30 | Passed |
| compensation case 5 | 215 | 215 | Passed |
| compensation case 6 | -145 | -145 | Passed |
| compensation case 7 | -25 | -25 | Passed |
SHA-256 / 881ce70673ee2f692cfd6cf07a39ab32e2f8c30372279f683646cd78c0078da7
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:18.070390+00:00.
Case digest / 063995203f1e7a5aaad3d2da6e0de978885281cbc53d0f4565686582b3ef9a4a