FA-82941 / Go territory scoring / Open access
13x13 handicap stones land on the third line · case 01
Handicap on 13x13 uses 3-3 points instead of 4-4 points.
ROOT CAUSE
The star-line switch uses <= 13, grouping 13x13 with the small boards.
VERIFIED REPAIR
Use the third line (index 2) only for boards smaller than 13.
Unsuccessful approach: Moving the threshold below 9 puts 9x9 handicap stones on the fourth line.
Case contract
Input [size, count]. Star line e = 2 (0-based) below 13x13 else 3; f = size-1-e; mid = size//2. Counts outside 2..9 give []. Even boards allow at most 4. Order: [e,f],[f,e],[f,f],[e,e]; counts 6-9 add [mid,e],[mid,f]; 8-9 add [e,mid],[f,mid]; odd counts from 5 add the centre last.
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, count = x
if count < 2 or count > 9:
return []
if size % 2 == 0 and count > 4:
return []
e = 2 if size <= 13 else 3
f = size - 1 - e
mid = size // 2
pts = [[e, f], [f, e], [f, f], [e, e]]
if count >= 4:
pts = pts[:4]
else:
pts = pts[:count]
if count in (6, 7, 8, 9):
pts += [[mid, e], [mid, f]]
if count in (8, 9):
pts += [[e, mid], [f, mid]]
if count in (5, 7, 9):
pts.append([mid, mid])
return pts
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[7, 7], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]]], [[7, 8], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]]], [[7, 9], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]]], [[7, 10], []], [[9, 0], []], [[9, 1], []], [[9, 8], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]]], [[13, 2], [[3, 9], [9, 3]]]], [[[9, 3], [[2, 6], [6, 2], [6, 6]]], [[9, 4], [[2, 6], [6, 2], [6, 6], [2, 2]]], [[9, 5], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 4]]], [[9, 6], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6]]], [[9, 7], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [4, 4]]], [[9, 8], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]]], [[11, 2], [[2, 8], [8, 2]]], [[13, 5], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 6]]]], [[[9, 10], []], [[10, 0], []], [[10, 1], []], [[10, 2], [[2, 7], [7, 2]]], [[10, 3], [[2, 7], [7, 2], [7, 7]]], [[10, 4], [[2, 7], [7, 2], [7, 7], [2, 2]]], [[11, 7], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [5, 5]]], [[13, 8], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9], [3, 6], [9, 6]]]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[12, 4], [[2, 9], [9, 2], [9, 9], [2, 2]]], [[13, 3], [[3, 9], [9, 3], [9, 9]]]], [[[9, 6], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6]]], [[11, 3], [[2, 8], [8, 2], [8, 8]]], [[11, 4], [[2, 8], [8, 2], [8, 8], [2, 2]]], [[11, 5], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 5]]], [[11, 6], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8]]], [[11, 7], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [5, 5]]], [[11, 8], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [2, 5], [8, 5]]], [[13, 6], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("handicap placement 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 |
|---|---|---|---|
| handicap placement case 0 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]] | Passed |
| handicap placement case 1 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]] | Passed |
| handicap placement case 2 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]] | Passed |
| handicap placement case 3 | [] | [] | Passed |
| handicap placement case 4 | [] | [] | Passed |
| handicap placement case 5 | [] | [] | Passed |
| handicap placement case 6 | [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]] | [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]] | Passed |
| handicap placement case 7 | [[2, 10], [10, 2]] | [[3, 9], [9, 3]] | Failed |
SHA-256 / 56c1db50cc69115b9738ff8b0e75e69ff4b008e64e50649619874ba1f2dd534d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
size, count = x
if count < 2 or count > 9:
return []
if size % 2 == 0 and count > 4:
return []
e = 2 if size < 9 else 3
f = size - 1 - e
mid = size // 2
pts = [[e, f], [f, e], [f, f], [e, e]]
if count >= 4:
pts = pts[:4]
else:
pts = pts[:count]
if count in (6, 7, 8, 9):
pts += [[mid, e], [mid, f]]
if count in (8, 9):
pts += [[e, mid], [f, mid]]
if count in (5, 7, 9):
pts.append([mid, mid])
return pts
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[7, 7], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]]], [[7, 8], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]]], [[7, 9], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]]], [[7, 10], []], [[9, 0], []], [[9, 1], []], [[9, 8], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]]], [[13, 2], [[3, 9], [9, 3]]]], [[[9, 3], [[2, 6], [6, 2], [6, 6]]], [[9, 4], [[2, 6], [6, 2], [6, 6], [2, 2]]], [[9, 5], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 4]]], [[9, 6], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6]]], [[9, 7], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [4, 4]]], [[9, 8], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]]], [[11, 2], [[2, 8], [8, 2]]], [[13, 5], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 6]]]], [[[9, 10], []], [[10, 0], []], [[10, 1], []], [[10, 2], [[2, 7], [7, 2]]], [[10, 3], [[2, 7], [7, 2], [7, 7]]], [[10, 4], [[2, 7], [7, 2], [7, 7], [2, 2]]], [[11, 7], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [5, 5]]], [[13, 8], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9], [3, 6], [9, 6]]]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[12, 4], [[2, 9], [9, 2], [9, 9], [2, 2]]], [[13, 3], [[3, 9], [9, 3], [9, 9]]]], [[[9, 6], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6]]], [[11, 3], [[2, 8], [8, 2], [8, 8]]], [[11, 4], [[2, 8], [8, 2], [8, 8], [2, 2]]], [[11, 5], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 5]]], [[11, 6], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8]]], [[11, 7], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [5, 5]]], [[11, 8], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [2, 5], [8, 5]]], [[13, 6], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("handicap placement 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 |
|---|---|---|---|
| handicap placement case 0 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]] | Passed |
| handicap placement case 1 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]] | Passed |
| handicap placement case 2 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]] | Passed |
| handicap placement case 3 | [] | [] | Passed |
| handicap placement case 4 | [] | [] | Passed |
| handicap placement case 5 | [] | [] | Passed |
| handicap placement case 6 | [[3, 5], [5, 3], [5, 5], [3, 3], [4, 3], [4, 5], [3, 4], [5, 4]] | [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]] | Failed |
| handicap placement case 7 | [[3, 9], [9, 3]] | [[3, 9], [9, 3]] | Passed |
SHA-256 / 75b74853aecf277270ad50d864b66168eb22dbce142a7d64cc4c9488f4525cd9
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
size, count = x
if count < 2 or count > 9:
return []
if size % 2 == 0 and count > 4:
return []
e = 2 if size < 13 else 3
f = size - 1 - e
mid = size // 2
pts = [[e, f], [f, e], [f, f], [e, e]]
if count >= 4:
pts = pts[:4]
else:
pts = pts[:count]
if count in (6, 7, 8, 9):
pts += [[mid, e], [mid, f]]
if count in (8, 9):
pts += [[e, mid], [f, mid]]
if count in (5, 7, 9):
pts.append([mid, mid])
return pts
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[7, 7], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]]], [[7, 8], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]]], [[7, 9], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]]], [[7, 10], []], [[9, 0], []], [[9, 1], []], [[9, 8], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]]], [[13, 2], [[3, 9], [9, 3]]]], [[[9, 3], [[2, 6], [6, 2], [6, 6]]], [[9, 4], [[2, 6], [6, 2], [6, 6], [2, 2]]], [[9, 5], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 4]]], [[9, 6], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6]]], [[9, 7], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [4, 4]]], [[9, 8], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]]], [[11, 2], [[2, 8], [8, 2]]], [[13, 5], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 6]]]], [[[9, 10], []], [[10, 0], []], [[10, 1], []], [[10, 2], [[2, 7], [7, 2]]], [[10, 3], [[2, 7], [7, 2], [7, 7]]], [[10, 4], [[2, 7], [7, 2], [7, 7], [2, 2]]], [[11, 7], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [5, 5]]], [[13, 8], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9], [3, 6], [9, 6]]]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[12, 4], [[2, 9], [9, 2], [9, 9], [2, 2]]], [[13, 3], [[3, 9], [9, 3], [9, 9]]]], [[[9, 6], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6]]], [[11, 3], [[2, 8], [8, 2], [8, 8]]], [[11, 4], [[2, 8], [8, 2], [8, 8], [2, 2]]], [[11, 5], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 5]]], [[11, 6], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8]]], [[11, 7], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [5, 5]]], [[11, 8], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [2, 5], [8, 5]]], [[13, 6], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("handicap placement 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 |
|---|---|---|---|
| handicap placement case 0 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]] | Passed |
| handicap placement case 1 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3]] | Passed |
| handicap placement case 2 | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]] | [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]] | Passed |
| handicap placement case 3 | [] | [] | Passed |
| handicap placement case 4 | [] | [] | Passed |
| handicap placement case 5 | [] | [] | Passed |
| handicap placement case 6 | [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]] | [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]] | Passed |
| handicap placement case 7 | [[3, 9], [9, 3]] | [[3, 9], [9, 3]] | Passed |
SHA-256 / a51336eb0d599827f12edfc8453976afdc4a3fbe8d103ee1e4639a5c6981a0f5
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.718401+00:00.
Case digest / 18db7a8709ee5d5900c7ec1ababa8f7b8a7ebab94694b58495e56d146b193375