FAILURE MAP
← Case archive

FA-82951 / Go territory scoring / Open access

Six-stone handicap uses top and bottom side points · case 01

The fifth and sixth stones sit on the top/bottom edges instead of left/right.

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

ROOT CAUSE

The first side pair is built with row and column swapped.

VERIFIED REPAIR

Counts 6-9 add [mid,e] and [mid,f] before the vertical pair.

Unsuccessful approach: Leaving 7 out of the side-point list drops two stones from a seven-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 += [[e, mid], [f, mid]]
    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, 7], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 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]]], [[9, 3], [[2, 6], [6, 2], [6, 6]]]], [[[7, 9], [[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]]], [[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]]], [[19, 7], [[3, 15], [15, 3], [15, 15], [3, 3], [9, 3], [9, 15], [9, 9]]]], [[[9, 8], [[2, 6], [6, 2], [6, 6], [2, 2], [4, 2], [4, 6], [2, 4], [6, 4]]], [[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]]], [[10, 5], []], [[15, 7], [[3, 11], [11, 3], [11, 11], [3, 3], [7, 3], [7, 11], [7, 7]]]], [[[10, 6], []], [[10, 7], []], [[10, 8], []], [[10, 9], []], [[10, 10], []], [[11, 0], []], [[11, 7], [[2, 8], [8, 2], [8, 8], [2, 2], [5, 2], [5, 8], [5, 5]]], [[13, 7], [[3, 9], [9, 3], [9, 9], [3, 3], [6, 3], [6, 9], [6, 6]]]], [[[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]]], [[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 fixtureActualExpectedOutcome
handicap placement case 0[[2, 4], [4, 2], [4, 4], [2, 2], [2, 3], [4, 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], [2, 3], [4, 3], [3, 3]][[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [3, 3]]Failed
handicap placement case 2[[2, 4], [4, 2], [4, 4], [2, 2], [2, 3], [4, 3], [2, 3], [4, 3], [3, 3]][[2, 4], [4, 2], [4, 4], [2, 2], [3, 2], [3, 4], [2, 3], [4, 3], [3, 3]]Failed
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[[2, 6], [6, 2], [6, 6]][[2, 6], [6, 2], [6, 6]]Passed

SHA-256 / 3ae0c3c948718363500387dd2b99805a71f2c4f46dfe5a8d64da5cc348d6a850

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

SHA-256 / 071602c14d24d2941d7afbbb7534f0c5b5110902d280a9d66c30f5c22a3e5797

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

SHA-256 / 287f568dea2fe2d31262fe35bd305f5a621329ef1ddb8ac365906256ca412728

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

Case digest / 6c93c643601ade38506e8182f2e6b5f8ab5a4546a4ed89c71466f9130c41e48a