FAILURE MAP
← Case archive

FA-82996 / Go territory scoring / Open access

SGF column and row are returned swapped · case 01

Moves are mirrored across the main diagonal.

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

ROOT CAUSE

The result lists the first letter first even though it is the column.

THE FAILURE

The result lists the first letter first even though it is the column.

Unsuccessful approach: Flipping the row vertically mixes SGF top-left origin with GTP bottom-left origin.

Case contract

Input [size, text]. "" is a pass; "tt" is also a pass on boards up to 19x19. Otherwise exactly two lower-case letters: first = column, second = row, both from the top-left. Return [row, col], "pass" or "invalid".

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, text = x
    if text == '':
        return 'pass'
    if text == 'tt' and size <= 19:
        return 'pass'
    if len(text) != 2:
        return 'invalid'
    col = ord(text[0]) - ord('a')
    row = ord(text[1]) - ord('a')
    if not (0 <= col < size and 0 <= row < size):
        return 'invalid'
    return [col, row]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[9, 'ab'], [1, 0]], [[9, 'Aa'], 'invalid'], [[9, 'aA'], 'invalid'], [[9, 'u'], 'invalid'], [[9, 'abc'], 'invalid'], [[9, 'ia'], [0, 8]], [[9, 'ai'], [8, 0]], [[9, 'ia'], [0, 8]]], [[[9, 'ai'], [8, 0]], [[9, 'at'], 'invalid'], [[9, 'pd'], 'invalid'], [[9, 'dp'], 'invalid'], [[9, 'ia'], [0, 8]], [[9, 'ja'], 'invalid'], [[9, 'ai'], [8, 0]], [[13, 'ba'], [0, 1]]], [[[13, 'dd'], [3, 3]], [[13, 'aa'], [0, 0]], [[13, 'ss'], 'invalid'], [[13, 'tt'], 'pass'], [[13, ''], 'pass'], [[13, 'ab'], [1, 0]], [[13, 'ba'], [0, 1]], [[13, 'am'], [12, 0]]], [[[13, 'jj'], [9, 9]], [[13, 'Aa'], 'invalid'], [[13, 'aA'], 'invalid'], [[13, 'u'], 'invalid'], [[13, 'abc'], 'invalid'], [[13, 'ia'], [0, 8]], [[13, 'ai'], [8, 0]], [[19, 'ba'], [0, 1]]], [[[13, 'ta'], 'invalid'], [[13, 'at'], 'invalid'], [[13, 'pd'], 'invalid'], [[13, 'dp'], 'invalid'], [[13, 'ma'], [0, 12]], [[13, 'na'], 'invalid'], [[19, 'ab'], [1, 0]], [[19, 'sa'], [0, 18]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("sgf point 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
sgf point case 0[0, 1][1, 0]Failed
sgf point case 1invalidinvalidPassed
sgf point case 2invalidinvalidPassed
sgf point case 3invalidinvalidPassed
sgf point case 4invalidinvalidPassed
sgf point case 5[8, 0][0, 8]Failed
sgf point case 6[0, 8][8, 0]Failed
sgf point case 7[8, 0][0, 8]Failed

SHA-256 / c687b25366d3107408bdfc3b36a7dbb217affc5f988be629ea1a0bd283b14882

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    size, text = x
    if text == '':
        return 'pass'
    if text == 'tt' and size <= 19:
        return 'pass'
    if len(text) != 2:
        return 'invalid'
    col = ord(text[0]) - ord('a')
    row = ord(text[1]) - ord('a')
    if not (0 <= col < size and 0 <= row < size):
        return 'invalid'
    return [size - 1 - row, col]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[9, 'ab'], [1, 0]], [[9, 'Aa'], 'invalid'], [[9, 'aA'], 'invalid'], [[9, 'u'], 'invalid'], [[9, 'abc'], 'invalid'], [[9, 'ia'], [0, 8]], [[9, 'ai'], [8, 0]], [[9, 'ia'], [0, 8]]], [[[9, 'ai'], [8, 0]], [[9, 'at'], 'invalid'], [[9, 'pd'], 'invalid'], [[9, 'dp'], 'invalid'], [[9, 'ia'], [0, 8]], [[9, 'ja'], 'invalid'], [[9, 'ai'], [8, 0]], [[13, 'ba'], [0, 1]]], [[[13, 'dd'], [3, 3]], [[13, 'aa'], [0, 0]], [[13, 'ss'], 'invalid'], [[13, 'tt'], 'pass'], [[13, ''], 'pass'], [[13, 'ab'], [1, 0]], [[13, 'ba'], [0, 1]], [[13, 'am'], [12, 0]]], [[[13, 'jj'], [9, 9]], [[13, 'Aa'], 'invalid'], [[13, 'aA'], 'invalid'], [[13, 'u'], 'invalid'], [[13, 'abc'], 'invalid'], [[13, 'ia'], [0, 8]], [[13, 'ai'], [8, 0]], [[19, 'ba'], [0, 1]]], [[[13, 'ta'], 'invalid'], [[13, 'at'], 'invalid'], [[13, 'pd'], 'invalid'], [[13, 'dp'], 'invalid'], [[13, 'ma'], [0, 12]], [[13, 'na'], 'invalid'], [[19, 'ab'], [1, 0]], [[19, 'sa'], [0, 18]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("sgf point 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
sgf point case 0[7, 0][1, 0]Failed
sgf point case 1invalidinvalidPassed
sgf point case 2invalidinvalidPassed
sgf point case 3invalidinvalidPassed
sgf point case 4invalidinvalidPassed
sgf point case 5[8, 8][0, 8]Failed
sgf point case 6[0, 0][8, 0]Failed
sgf point case 7[8, 8][0, 8]Failed

SHA-256 / 78e45d97e84a4e1f976654b517e0b74f9c6432e69c0f9ab5d21ade8448acc61b

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

Case digest / 0f0bdd1139e78aeae06e574ba2afc8d63c35aafd85ba45f12577f791262f0fa1