FAILURE MAP
← Case archive

FA-83026 / Go territory scoring / Open access

Void results are not distinguished from malformed values · case 01

RE[Void] (no result, e.g. an annulled game) is reported as unknown.

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

ROOT CAUSE

The Void branch is missing, so the value falls into the malformed-result path.

THE FAILURE

The Void branch is missing, so the value falls into the malformed-result path.

Unsuccessful approach: Mapping Void to a draw awards both players a drawn result for an annulled game.

Case contract

Input an SGF RE string. "0", "Draw", "Jigo" -> ["draw", 0, "score"]; "Void" -> ["void", None, "none"]; C+R/Resign, C+T/Time, C+F/Forfeit (case-insensitive) -> [C, None, reason]; "C+" -> [C, None, "unknown"]; C+digits with optional one-digit fraction -> [C, tenths, "score"]; else unknown.

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):
    s = x.strip()
    if s in ('0', 'Draw', 'Jigo'):
        return ['draw', 0, 'score']
    if len(s) < 2 or s[0] not in 'BW' or s[1] != '+':
        return ['unknown', None, 'none']
    who = s[0]
    rest = s[2:]
    if rest == '':
        return [who, None, 'unknown']
    word = rest.lower()
    for key, reason in (('r', 'resign'), ('t', 'time'), ('f', 'forfeit')):
        if word in (key, reason):
            return [who, None, reason]
    if '.' in rest:
        whole, _, frac = rest.partition('.')
    else:
        whole, frac = rest, '0'
    if not whole.isdigit() or not frac.isdigit() or len(frac) != 1:
        return ['unknown', None, 'none']
    return [who, int(whole) * 10 + int(frac), 'score']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['B+3.5', ['B', 35, 'score']], ['W+0.5', ['W', 5, 'score']], ['W+12', ['W', 120, 'score']], ['B+2.3', ['B', 23, 'score']], ['W+8.2', ['W', 82, 'score']], ['B+1.1', ['B', 11, 'score']], ['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']]], [['W+', ['W', None, 'unknown']], ['0', ['draw', 0, 'score']], ['Draw', ['draw', 0, 'score']], ['Jigo', ['draw', 0, 'score']], ['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']], ['?', ['unknown', None, 'none']], [' B+R ', ['B', None, 'resign']]], [['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']], [' W+7', ['W', 70, 'score']], ['X+3', ['unknown', None, 'none']], ['B-3', ['unknown', None, 'none']], ['B+3.25', ['unknown', None, 'none']], ['W+3.0', ['W', 30, 'score']], ['B+6.0', ['B', 60, 'score']]], [['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']], ['B+Rough', ['unknown', None, 'none']], ['W+Timeout', ['unknown', None, 'none']], ['B+r', ['B', None, 'resign']], ['W+t', ['W', None, 'time']], ['B+100.5', ['B', 1005, 'score']], ['W+4.1', ['W', 41, 'score']]], [['B+R', ['B', None, 'resign']], ['W+Resign', ['W', None, 'resign']], ['B+resign', ['B', None, 'resign']], ['W+T', ['W', None, 'time']], ['B+Time', ['B', None, 'time']], ['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']], ['B+7.', ['unknown', None, 'none']]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("result 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
result case 0['B', 35, 'score']['B', 35, 'score']Passed
result case 1['W', 5, 'score']['W', 5, 'score']Passed
result case 2['W', 120, 'score']['W', 120, 'score']Passed
result case 3['B', 23, 'score']['B', 23, 'score']Passed
result case 4['W', 82, 'score']['W', 82, 'score']Passed
result case 5['B', 11, 'score']['B', 11, 'score']Passed
result case 6['unknown', None, 'none']['void', None, 'none']Failed
result case 7['unknown', None, 'none']['void', None, 'none']Failed

SHA-256 / b886e9be0f390c545cde78bfae321629b465482eb60c0cbe5518d6fa4db89ec6

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    s = x.strip()
    if s in ('0', 'Draw', 'Jigo'):
        return ['draw', 0, 'score']
    if s == 'Void':
        return ['draw', 0, 'score']
    if len(s) < 2 or s[0] not in 'BW' or s[1] != '+':
        return ['unknown', None, 'none']
    who = s[0]
    rest = s[2:]
    if rest == '':
        return [who, None, 'unknown']
    word = rest.lower()
    for key, reason in (('r', 'resign'), ('t', 'time'), ('f', 'forfeit')):
        if word in (key, reason):
            return [who, None, reason]
    if '.' in rest:
        whole, _, frac = rest.partition('.')
    else:
        whole, frac = rest, '0'
    if not whole.isdigit() or not frac.isdigit() or len(frac) != 1:
        return ['unknown', None, 'none']
    return [who, int(whole) * 10 + int(frac), 'score']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['B+3.5', ['B', 35, 'score']], ['W+0.5', ['W', 5, 'score']], ['W+12', ['W', 120, 'score']], ['B+2.3', ['B', 23, 'score']], ['W+8.2', ['W', 82, 'score']], ['B+1.1', ['B', 11, 'score']], ['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']]], [['W+', ['W', None, 'unknown']], ['0', ['draw', 0, 'score']], ['Draw', ['draw', 0, 'score']], ['Jigo', ['draw', 0, 'score']], ['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']], ['?', ['unknown', None, 'none']], [' B+R ', ['B', None, 'resign']]], [['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']], [' W+7', ['W', 70, 'score']], ['X+3', ['unknown', None, 'none']], ['B-3', ['unknown', None, 'none']], ['B+3.25', ['unknown', None, 'none']], ['W+3.0', ['W', 30, 'score']], ['B+6.0', ['B', 60, 'score']]], [['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']], ['B+Rough', ['unknown', None, 'none']], ['W+Timeout', ['unknown', None, 'none']], ['B+r', ['B', None, 'resign']], ['W+t', ['W', None, 'time']], ['B+100.5', ['B', 1005, 'score']], ['W+4.1', ['W', 41, 'score']]], [['B+R', ['B', None, 'resign']], ['W+Resign', ['W', None, 'resign']], ['B+resign', ['B', None, 'resign']], ['W+T', ['W', None, 'time']], ['B+Time', ['B', None, 'time']], ['Void', ['void', None, 'none']], ['Void', ['void', None, 'none']], ['B+7.', ['unknown', None, 'none']]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("result 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
result case 0['B', 35, 'score']['B', 35, 'score']Passed
result case 1['W', 5, 'score']['W', 5, 'score']Passed
result case 2['W', 120, 'score']['W', 120, 'score']Passed
result case 3['B', 23, 'score']['B', 23, 'score']Passed
result case 4['W', 82, 'score']['W', 82, 'score']Passed
result case 5['B', 11, 'score']['B', 11, 'score']Passed
result case 6['draw', 0, 'score']['void', None, 'none']Failed
result case 7['draw', 0, 'score']['void', None, 'none']Failed

SHA-256 / 0a18198dd823e4298d6eea58e6f25da0c7d8d87f3e443f9f419e5658f87d1950

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / f9317e3290f60ba58a0321d66a47fb4377b776ed108b59b2fde1339e6966a906