FAILURE MAP
← Case archive

FA-82956 / Go territory scoring / Open access

Even handicaps get a centre stone · case 01

Six- and eight-stone handicaps receive tengen as an extra stone.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The centre is added for every count of five or more.

VERIFIED REPAIR

Add tengen only for counts 5, 7 and 9.

Unsuccessful approach: Testing odd parity adds tengen to a three-stone handicap.

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 >= 5:
        pts.append([mid, mid])
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[7, 6], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]]], [[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, 2], [[2, 6], [6, 2]]], [[14, 3], [[3, 10], [10, 3], [10, 10]]]], [[[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]]], [[9, 9], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4], [4, 4]]], [[10, 3], [[2, 7], [7, 2], [7, 7]]]], [[[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]]], [[13, 6], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9]]], [[15, 3], [[3, 11], [11, 3], [11, 11]]]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[11, 3], [[2, 8], [8, 2], [8, 8]]], [[15, 8], [[3, 11], [11, 3], [11, 11], [3, 3], [7, 3], [7, 11], [3, 7], [11, 7]]]], [[[7, 6], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]]], [[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]]], [[19, 3], [[3, 15], [15, 3], [15, 15]]]]]
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 fixtureActualExpectedOutcome
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]]Failed
handicap placement case 1[[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]]Failed
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]][[2, 6], [6, 2]]Passed
handicap placement case 7[[3, 10], [10, 3], [10, 10]][[3, 10], [10, 3], [10, 10]]Passed

SHA-256 / 9e522a5b46b496344674a64d3d7e57b37b2f6aaff60d946a3f2cddaca4ec4f5f

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 < 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 % 2 == 1:
        pts.append([mid, mid])
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[7, 6], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]]], [[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, 2], [[2, 6], [6, 2]]], [[14, 3], [[3, 10], [10, 3], [10, 10]]]], [[[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]]], [[9, 9], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4], [4, 4]]], [[10, 3], [[2, 7], [7, 2], [7, 7]]]], [[[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]]], [[13, 6], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9]]], [[15, 3], [[3, 11], [11, 3], [11, 11]]]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[11, 3], [[2, 8], [8, 2], [8, 8]]], [[15, 8], [[3, 11], [11, 3], [11, 11], [3, 3], [7, 3], [7, 11], [3, 7], [11, 7]]]], [[[7, 6], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]]], [[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]]], [[19, 3], [[3, 15], [15, 3], [15, 15]]]]]
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 fixtureActualExpectedOutcome
handicap placement case 0[[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]][[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]]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]][[2, 6], [6, 2]]Passed
handicap placement case 7[[3, 10], [10, 3], [10, 10], [7, 7]][[3, 10], [10, 3], [10, 10]]Failed

SHA-256 / 0718d7ba17580f6c995955f5d77878c7da049e6ef5c68ef1d1fad691ca143084

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, 6], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]]], [[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, 2], [[2, 6], [6, 2]]], [[14, 3], [[3, 10], [10, 3], [10, 10]]]], [[[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]]], [[9, 9], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4], [4, 4]]], [[10, 3], [[2, 7], [7, 2], [7, 7]]]], [[[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]]], [[13, 6], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9]]], [[15, 3], [[3, 11], [11, 3], [11, 11]]]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[11, 3], [[2, 8], [8, 2], [8, 8]]], [[15, 8], [[3, 11], [11, 3], [11, 11], [3, 3], [7, 3], [7, 11], [3, 7], [11, 7]]]], [[[7, 6], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]]], [[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]]], [[19, 3], [[3, 15], [15, 3], [15, 15]]]]]
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 fixtureActualExpectedOutcome
handicap placement case 0[[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]][[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4]]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]][[2, 6], [6, 2]]Passed
handicap placement case 7[[3, 10], [10, 3], [10, 10]][[3, 10], [10, 3], [10, 10]]Passed

SHA-256 / 6bd1a10ae79a5d7f336e351165378c8d571cafd0e9d25a886fd35beaaabbfee6

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.926621+00:00.

Case digest / a7eac975cbfa0079695c7513252c1823caf73e174a6a62826e86f4467b9f36f8