FAILURE MAP
← Case archive

FA-83241 / Go territory scoring / Open access

Timeouts are treated as ordinary moves · case 01

A game lost on time continues and may later end by passes.

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

ROOT CAUSE

The timeout branch is missing.

VERIFIED REPAIR

End the game on timeout with the opponent winning.

Unsuccessful approach: Ending on timeout without a winner loses the result.

Case contract

Input list of "C:action" tokens. Two consecutive passes by different players end the game ["score", None, index]; any board move clears a pending pass; "resign"/"timeout" end it with the opponent as winner ["resign"/"time", winner, index]. Otherwise ["playing", None, len(moves)].

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):
    moves = x
    prev_pass = None
    for idx, mv in enumerate(moves):
        who, _, act = mv.partition(':')
        other = 'W' if who == 'B' else 'B'
        if act == 'resign':
            return ['resign', other, idx]
        if act == 'pass':
            if prev_pass is not None and prev_pass != who:
                return ['score', None, idx]
            prev_pass = who
        else:
            prev_pass = None
    return ['playing', None, len(moves)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[['B:cc', 'W:cc', 'B:timeout', 'W:timeout'], ['time', 'W', 2]], [['B:resign', 'W:pass', 'W:resign', 'B:resign', 'B:qq', 'W:cc'], ['resign', 'W', 0]], [['B:timeout', 'W:pass', 'B:cc', 'B:cc'], ['time', 'W', 0]], [['B:timeout', 'W:pass', 'W:pass', 'W:pass'], ['time', 'W', 0]], [['B:timeout', 'W:cc'], ['time', 'W', 0]], [['B:timeout', 'W:resign'], ['time', 'W', 0]], [['B:pass'], ['playing', None, 1]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]]], [[['B:timeout', 'W:cc'], ['time', 'W', 0]], [['W:cc', 'B:pass', 'B:dd', 'W:cc', 'B:resign'], ['resign', 'W', 4]], [['B:pass'], ['playing', None, 1]], [['B:resign'], ['resign', 'W', 0]], [['B:resign', 'B:cc', 'W:timeout', 'W:pass', 'B:cc'], ['resign', 'W', 0]], [['B:cc', 'W:pass', 'B:dd', 'B:resign'], ['resign', 'W', 3]], [[], ['playing', None, 0]], [['B:timeout', 'B:qq'], ['time', 'W', 0]]], [[['B:pass', 'W:qq'], ['playing', None, 2]], [['B:resign', 'W:pass'], ['resign', 'W', 0]], [['B:pass', 'W:cc', 'W:pass', 'B:cc'], ['playing', None, 4]], [['B:pass', 'W:qq'], ['playing', None, 2]], [['B:pass', 'B:dd', 'B:qq'], ['playing', None, 3]], [['W:pass'], ['playing', None, 1]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]], [['B:qq', 'B:timeout', 'B:timeout', 'W:qq', 'B:cc'], ['time', 'W', 1]]], [[['B:resign', 'W:pass', 'B:pass', 'W:dd'], ['resign', 'W', 0]], [['B:pass', 'W:qq', 'B:resign', 'W:pass', 'B:resign'], ['resign', 'W', 2]], [['B:dd', 'W:pass', 'B:pass', 'W:cc', 'B:cc'], ['score', None, 2]], [['B:dd', 'W:resign', 'B:dd', 'W:dd'], ['resign', 'B', 1]], [['W:qq', 'W:timeout', 'B:dd', 'W:pass', 'B:cc', 'W:qq'], ['time', 'B', 1]], [['B:dd'], ['playing', None, 1]], [['B:qq', 'B:timeout'], ['time', 'W', 1]], [['B:timeout', 'W:qq', 'B:dd', 'W:cc', 'B:dd'], ['time', 'W', 0]]], [[['W:cc', 'W:resign'], ['resign', 'B', 1]], [['B:dd', 'B:cc', 'B:cc', 'W:resign'], ['resign', 'B', 3]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]], [['B:timeout'], ['time', 'W', 0]], [['B:pass', 'W:pass', 'B:pass', 'W:resign', 'B:pass', 'W:dd'], ['score', None, 1]], [['W:timeout', 'W:cc', 'B:cc', 'W:pass', 'B:dd', 'W:qq'], ['time', 'B', 0]], [['W:timeout', 'W:resign', 'B:pass', 'W:timeout', 'B:pass', 'W:pass'], ['time', 'B', 0]], [['B:timeout', 'W:dd', 'B:pass', 'W:qq'], ['time', 'W', 0]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("game end 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
game end case 0['playing', None, 4]['time', 'W', 2]Failed
game end case 1['resign', 'W', 0]['resign', 'W', 0]Passed
game end case 2['playing', None, 4]['time', 'W', 0]Failed
game end case 3['playing', None, 4]['time', 'W', 0]Failed
game end case 4['playing', None, 2]['time', 'W', 0]Failed
game end case 5['resign', 'B', 1]['time', 'W', 0]Failed
game end case 6['playing', None, 1]['playing', None, 1]Passed
game end case 7['playing', None, 4]['time', 'W', 1]Failed

SHA-256 / 460f4c0c6b562104f6e2f739fbd85043209d8ce8c3662a6c4854b0c2e2631db1

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    moves = x
    prev_pass = None
    for idx, mv in enumerate(moves):
        who, _, act = mv.partition(':')
        other = 'W' if who == 'B' else 'B'
        if act == 'resign':
            return ['resign', other, idx]
        if act == 'timeout':
            return ['time', None, idx]
        if act == 'pass':
            if prev_pass is not None and prev_pass != who:
                return ['score', None, idx]
            prev_pass = who
        else:
            prev_pass = None
    return ['playing', None, len(moves)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[['B:cc', 'W:cc', 'B:timeout', 'W:timeout'], ['time', 'W', 2]], [['B:resign', 'W:pass', 'W:resign', 'B:resign', 'B:qq', 'W:cc'], ['resign', 'W', 0]], [['B:timeout', 'W:pass', 'B:cc', 'B:cc'], ['time', 'W', 0]], [['B:timeout', 'W:pass', 'W:pass', 'W:pass'], ['time', 'W', 0]], [['B:timeout', 'W:cc'], ['time', 'W', 0]], [['B:timeout', 'W:resign'], ['time', 'W', 0]], [['B:pass'], ['playing', None, 1]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]]], [[['B:timeout', 'W:cc'], ['time', 'W', 0]], [['W:cc', 'B:pass', 'B:dd', 'W:cc', 'B:resign'], ['resign', 'W', 4]], [['B:pass'], ['playing', None, 1]], [['B:resign'], ['resign', 'W', 0]], [['B:resign', 'B:cc', 'W:timeout', 'W:pass', 'B:cc'], ['resign', 'W', 0]], [['B:cc', 'W:pass', 'B:dd', 'B:resign'], ['resign', 'W', 3]], [[], ['playing', None, 0]], [['B:timeout', 'B:qq'], ['time', 'W', 0]]], [[['B:pass', 'W:qq'], ['playing', None, 2]], [['B:resign', 'W:pass'], ['resign', 'W', 0]], [['B:pass', 'W:cc', 'W:pass', 'B:cc'], ['playing', None, 4]], [['B:pass', 'W:qq'], ['playing', None, 2]], [['B:pass', 'B:dd', 'B:qq'], ['playing', None, 3]], [['W:pass'], ['playing', None, 1]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]], [['B:qq', 'B:timeout', 'B:timeout', 'W:qq', 'B:cc'], ['time', 'W', 1]]], [[['B:resign', 'W:pass', 'B:pass', 'W:dd'], ['resign', 'W', 0]], [['B:pass', 'W:qq', 'B:resign', 'W:pass', 'B:resign'], ['resign', 'W', 2]], [['B:dd', 'W:pass', 'B:pass', 'W:cc', 'B:cc'], ['score', None, 2]], [['B:dd', 'W:resign', 'B:dd', 'W:dd'], ['resign', 'B', 1]], [['W:qq', 'W:timeout', 'B:dd', 'W:pass', 'B:cc', 'W:qq'], ['time', 'B', 1]], [['B:dd'], ['playing', None, 1]], [['B:qq', 'B:timeout'], ['time', 'W', 1]], [['B:timeout', 'W:qq', 'B:dd', 'W:cc', 'B:dd'], ['time', 'W', 0]]], [[['W:cc', 'W:resign'], ['resign', 'B', 1]], [['B:dd', 'B:cc', 'B:cc', 'W:resign'], ['resign', 'B', 3]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]], [['B:timeout'], ['time', 'W', 0]], [['B:pass', 'W:pass', 'B:pass', 'W:resign', 'B:pass', 'W:dd'], ['score', None, 1]], [['W:timeout', 'W:cc', 'B:cc', 'W:pass', 'B:dd', 'W:qq'], ['time', 'B', 0]], [['W:timeout', 'W:resign', 'B:pass', 'W:timeout', 'B:pass', 'W:pass'], ['time', 'B', 0]], [['B:timeout', 'W:dd', 'B:pass', 'W:qq'], ['time', 'W', 0]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("game end 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
game end case 0['time', None, 2]['time', 'W', 2]Failed
game end case 1['resign', 'W', 0]['resign', 'W', 0]Passed
game end case 2['time', None, 0]['time', 'W', 0]Failed
game end case 3['time', None, 0]['time', 'W', 0]Failed
game end case 4['time', None, 0]['time', 'W', 0]Failed
game end case 5['time', None, 0]['time', 'W', 0]Failed
game end case 6['playing', None, 1]['playing', None, 1]Passed
game end case 7['time', None, 1]['time', 'W', 1]Failed

SHA-256 / 0e14c80aaf93856eaa70668751ba5349dc5fffa3066d60b3f9a51b2c85b45feb

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    moves = x
    prev_pass = None
    for idx, mv in enumerate(moves):
        who, _, act = mv.partition(':')
        other = 'W' if who == 'B' else 'B'
        if act == 'resign':
            return ['resign', other, idx]
        if act == 'timeout':
            return ['time', other, idx]
        if act == 'pass':
            if prev_pass is not None and prev_pass != who:
                return ['score', None, idx]
            prev_pass = who
        else:
            prev_pass = None
    return ['playing', None, len(moves)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[['B:cc', 'W:cc', 'B:timeout', 'W:timeout'], ['time', 'W', 2]], [['B:resign', 'W:pass', 'W:resign', 'B:resign', 'B:qq', 'W:cc'], ['resign', 'W', 0]], [['B:timeout', 'W:pass', 'B:cc', 'B:cc'], ['time', 'W', 0]], [['B:timeout', 'W:pass', 'W:pass', 'W:pass'], ['time', 'W', 0]], [['B:timeout', 'W:cc'], ['time', 'W', 0]], [['B:timeout', 'W:resign'], ['time', 'W', 0]], [['B:pass'], ['playing', None, 1]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]]], [[['B:timeout', 'W:cc'], ['time', 'W', 0]], [['W:cc', 'B:pass', 'B:dd', 'W:cc', 'B:resign'], ['resign', 'W', 4]], [['B:pass'], ['playing', None, 1]], [['B:resign'], ['resign', 'W', 0]], [['B:resign', 'B:cc', 'W:timeout', 'W:pass', 'B:cc'], ['resign', 'W', 0]], [['B:cc', 'W:pass', 'B:dd', 'B:resign'], ['resign', 'W', 3]], [[], ['playing', None, 0]], [['B:timeout', 'B:qq'], ['time', 'W', 0]]], [[['B:pass', 'W:qq'], ['playing', None, 2]], [['B:resign', 'W:pass'], ['resign', 'W', 0]], [['B:pass', 'W:cc', 'W:pass', 'B:cc'], ['playing', None, 4]], [['B:pass', 'W:qq'], ['playing', None, 2]], [['B:pass', 'B:dd', 'B:qq'], ['playing', None, 3]], [['W:pass'], ['playing', None, 1]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]], [['B:qq', 'B:timeout', 'B:timeout', 'W:qq', 'B:cc'], ['time', 'W', 1]]], [[['B:resign', 'W:pass', 'B:pass', 'W:dd'], ['resign', 'W', 0]], [['B:pass', 'W:qq', 'B:resign', 'W:pass', 'B:resign'], ['resign', 'W', 2]], [['B:dd', 'W:pass', 'B:pass', 'W:cc', 'B:cc'], ['score', None, 2]], [['B:dd', 'W:resign', 'B:dd', 'W:dd'], ['resign', 'B', 1]], [['W:qq', 'W:timeout', 'B:dd', 'W:pass', 'B:cc', 'W:qq'], ['time', 'B', 1]], [['B:dd'], ['playing', None, 1]], [['B:qq', 'B:timeout'], ['time', 'W', 1]], [['B:timeout', 'W:qq', 'B:dd', 'W:cc', 'B:dd'], ['time', 'W', 0]]], [[['W:cc', 'W:resign'], ['resign', 'B', 1]], [['B:dd', 'B:cc', 'B:cc', 'W:resign'], ['resign', 'B', 3]], [['W:pass', 'B:timeout', 'B:cc', 'W:dd'], ['time', 'W', 1]], [['B:timeout'], ['time', 'W', 0]], [['B:pass', 'W:pass', 'B:pass', 'W:resign', 'B:pass', 'W:dd'], ['score', None, 1]], [['W:timeout', 'W:cc', 'B:cc', 'W:pass', 'B:dd', 'W:qq'], ['time', 'B', 0]], [['W:timeout', 'W:resign', 'B:pass', 'W:timeout', 'B:pass', 'W:pass'], ['time', 'B', 0]], [['B:timeout', 'W:dd', 'B:pass', 'W:qq'], ['time', 'W', 0]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("game end 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
game end case 0['time', 'W', 2]['time', 'W', 2]Passed
game end case 1['resign', 'W', 0]['resign', 'W', 0]Passed
game end case 2['time', 'W', 0]['time', 'W', 0]Passed
game end case 3['time', 'W', 0]['time', 'W', 0]Passed
game end case 4['time', 'W', 0]['time', 'W', 0]Passed
game end case 5['time', 'W', 0]['time', 'W', 0]Passed
game end case 6['playing', None, 1]['playing', None, 1]Passed
game end case 7['time', 'W', 1]['time', 'W', 1]Passed

SHA-256 / 818fada11da63f31130b0738288b67de0f1e034c4f5a48d32938dddfe4502f8e

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

Case digest / b70029b1af1d11edde0db0abab57e82277a210cfe19ee557fae215f083128350