FAILURE MAP
← Case archive

FA-82961 / Go territory scoring / Open access

Even-sized boards receive side and centre handicap stones · case 01

A 10x10 board with 5+ handicap gets off-centre "tengen" stones.

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

ROOT CAUSE

The even-board guard is missing, so mid is not a true centre line.

VERIFIED REPAIR

Even boards support at most four corner stones; return [] above that.

Unsuccessful approach: Guarding only centre counts still places asymmetric side stones on even boards for 6 and 8.

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 []
    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], []], [[10, 5], []], [[10, 6], []]], [[[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]]], [[10, 8], []], [[14, 8], []]], [[[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]]], [[12, 6], []], [[14, 6], []]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[12, 8], []], [[12, 9], []]], [[[11, 2], [[2, 8], [8, 2]]], [[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]]], [[12, 6], []], [[14, 7], []]]]
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], [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, 7], [7, 2], [7, 7], [2, 2], [5, 5]][]Failed
handicap placement case 7[[2, 7], [7, 2], [7, 7], [2, 2], [5, 2], [5, 7]][]Failed

SHA-256 / 5a9e2b2f0c38e931d6e3eca734ba883ff5ec173163806bc767903de67efd931f

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 in (5, 7, 9):
        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], []], [[10, 5], []], [[10, 6], []]], [[[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]]], [[10, 8], []], [[14, 8], []]], [[[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]]], [[12, 6], []], [[14, 6], []]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[12, 8], []], [[12, 9], []]], [[[11, 2], [[2, 8], [8, 2]]], [[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]]], [[12, 6], []], [[14, 7], []]]]
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], [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[][]Passed
handicap placement case 7[[2, 7], [7, 2], [7, 7], [2, 2], [5, 2], [5, 7]][]Failed

SHA-256 / a05471d91e8f1409a2afbecef284b3730cf28dc70a16fb553a1347fde6605ae7

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], []], [[10, 5], []], [[10, 6], []]], [[[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]]], [[10, 8], []], [[14, 8], []]], [[[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]]], [[12, 6], []], [[14, 6], []]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[12, 8], []], [[12, 9], []]], [[[11, 2], [[2, 8], [8, 2]]], [[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]]], [[12, 6], []], [[14, 7], []]]]
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], [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[][]Passed
handicap placement case 7[][]Passed

SHA-256 / fadf56e0079a8a9b665c366c0c5180e13414cd4734479ee705a110931448c31d

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

Case digest / 3323c43a2b2e162ce41e5311dc2052822f1d0c91fdc10316685afa3bb163fa94