FAILURE MAP
← Case archive

FA-84241 / Sports scoring and tiebreakers / Open access

Every counting stone of the shot team scores · case 01

A team is credited with stones that lie behind the opponent's closest stone.

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

ROOT CAUSE

The counting predicate ignores the opponent's closest stone.

VERIFIED REPAIR

Only count stones strictly closer than the opponent's best counting stone.

Unsuccessful approach: Counting only the shot stone when the opponent has no stone in the house undercounts.

Case contract

Curling end result. stones rows are [team, distance_mm] from the button to the stone centre; a stone counts only if it touches the house: distance <= 1830 + 145 (house radius plus stone radius). The team with the closest counting stone scores one point for each of its counting stones strictly closer than the opponent's closest counting stone (all its counting stones if the opponent has none). If no stone counts, or the two closest counting stones of different teams are at the same distance, the end is blank and the hammer stays. After a score the hammer goes to the team that did not score. Return [scoring team or None, points, hammer for next end].

Why this case matters

Curling scoreboards compute end scores and hammer possession from measured stone positions.

1 / The failure

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

N = 1
observations = []
def solve(stones, hammer):
    inside = sorted((d, t) for t, d in stones if d <= 1830 + 145)
    tie = bool(inside) and any(d == inside[0][0] and t != inside[0][1] for d, t in inside)
    if not inside or tie:
        return [None, 0, hammer]
    best_d, team = inside[0]
    opp = [d for d, t in inside if t != team]
    limit = min(opp) if opp else None
    points = sum(1 for d, t in inside if t == team and True)
    nxt = 'B' if team == 'A' else 'A'
    return [team, points, nxt]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['A', 406],
     ['B', 399],
     ['B', 898],
     ['A', 2048],
     ['B', 1613],
     ['B', 1262],
     ['B', 412],
     ['B', 1363],
     ['B', 406]],
    'B'),
   ['B', 1, 'A']),
  ('regression: counting limit',
   ([['B', 371], ['B', 1920], ['B', 433], ['A', 2318], ['B', 194], ['B', 118], ['B', 409]], 'A'),
   ['B', 6, 'A']),
  ('variant scenario 1',
   ([['A', 454], ['A', 400], ['B', 1405], ['A', 1720], ['A', 1746]], 'A'),
   ['A', 2, 'B']),
  ('variant scenario 2', ([['B', 598], ['A', 2040], ['A', 127]], 'A'), ['A', 1, 'B'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['A', 432], ['A', 1730], ['B', 1904], ['A', 584], ['B', 2380], ['B', 1638], ['A', 1972]], 'B'),
   ['A', 2, 'B']),
  ('regression: counting limit', ([['B', 1314], ['B', 531]], 'B'), ['B', 2, 'A']),
  ('variant scenario 1', ([['A', 308], ['B', 924]], 'A'), ['A', 1, 'B']),
  ('variant scenario 2',
   ([['B', 1722], ['B', 465], ['A', 1918], ['A', 571], ['B', 1958]], 'A'),
   ['B', 1, 'A'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['B', 318],
     ['A', 2016],
     ['A', 1759],
     ['B', 98],
     ['B', 24],
     ['A', 2032],
     ['B', 1781],
     ['A', 1850]],
    'A'),
   ['B', 3, 'A']),
  ('regression: counting limit', ([['B', 430], ['B', 1878]], 'A'), ['B', 2, 'A']),
  ('variant scenario 1', ([['B', 805]], 'B'), ['B', 1, 'A']),
  ('variant scenario 2',
   ([['A', 1716], ['A', 1304], ['B', 1756], ['B', 36], ['A', 2270]], 'A'),
   ['B', 1, 'A'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit', ([['A', 361], ['A', 240]], 'A'), ['A', 2, 'B']),
  ('regression: counting limit',
   ([['A', 1727], ['A', 392], ['A', 1729], ['B', 732], ['A', 2097]], 'A'),
   ['A', 1, 'B']),
  ('variant scenario 1',
   ([['A', 187], ['B', 456], ['B', 142], ['B', 1993], ['B', 187]], 'A'),
   ['B', 1, 'A']),
  ('variant scenario 2',
   ([['B', 552],
     ['B', 476],
     ['B', 561],
     ['B', 1762],
     ['A', 418],
     ['A', 194],
     ['A', 1127],
     ['B', 1615]],
    'A'),
   ['A', 2, 'B'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['B', 585],
     ['A', 132],
     ['A', 1567],
     ['B', 1729],
     ['A', 948],
     ['B', 121],
     ['A', 523],
     ['B', 910]],
    'B'),
   ['B', 1, 'A']),
  ('regression: counting limit', ([['B', 1969], ['B', 163]], 'B'), ['B', 2, 'A']),
  ('variant scenario 1',
   ([['A', 231],
     ['A', 14],
     ['A', 1952],
     ['A', 2020],
     ['B', 238],
     ['A', 2269],
     ['B', 1723],
     ['B', 231]],
    'B'),
   ['A', 1, 'B']),
  ('variant scenario 2', ([['A', 390]], 'A'), ['A', 1, 'B'])]]
for label, args, expected in cases[N - 1]:
    check(label, run(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
control single shot['A', 1, 'B']['A', 1, 'B']Passed
boundary stone biting house edge['B', 1, 'A']['B', 1, 'A']Passed
boundary stone just outside[None, 0, 'A'][None, 0, 'A']Passed
control steal of two['B', 2, 'A']['B', 2, 'A']Passed
boundary measured tie[None, 0, 'B'][None, 0, 'B']Passed
control empty house[None, 0, 'A'][None, 0, 'A']Passed
regression: counting limit['B', 7, 'A']['B', 1, 'A']Failed
regression: counting limit['B', 6, 'A']['B', 6, 'A']Passed
variant scenario 1['A', 4, 'B']['A', 2, 'B']Failed
variant scenario 2['A', 1, 'B']['A', 1, 'B']Passed

SHA-256 / 94a29ee598530aa8cd308f2e27525162ff349917e8a058d47c292b1c6382764a

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(stones, hammer):
    inside = sorted((d, t) for t, d in stones if d <= 1830 + 145)
    tie = bool(inside) and any(d == inside[0][0] and t != inside[0][1] for d, t in inside)
    if not inside or tie:
        return [None, 0, hammer]
    best_d, team = inside[0]
    opp = [d for d, t in inside if t != team]
    limit = min(opp) if opp else None
    points = sum(1 for d, t in inside if t == team and (d < limit if limit is not None else d == best_d))
    nxt = 'B' if team == 'A' else 'A'
    return [team, points, nxt]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['A', 406],
     ['B', 399],
     ['B', 898],
     ['A', 2048],
     ['B', 1613],
     ['B', 1262],
     ['B', 412],
     ['B', 1363],
     ['B', 406]],
    'B'),
   ['B', 1, 'A']),
  ('regression: counting limit',
   ([['B', 371], ['B', 1920], ['B', 433], ['A', 2318], ['B', 194], ['B', 118], ['B', 409]], 'A'),
   ['B', 6, 'A']),
  ('variant scenario 1',
   ([['A', 454], ['A', 400], ['B', 1405], ['A', 1720], ['A', 1746]], 'A'),
   ['A', 2, 'B']),
  ('variant scenario 2', ([['B', 598], ['A', 2040], ['A', 127]], 'A'), ['A', 1, 'B'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['A', 432], ['A', 1730], ['B', 1904], ['A', 584], ['B', 2380], ['B', 1638], ['A', 1972]], 'B'),
   ['A', 2, 'B']),
  ('regression: counting limit', ([['B', 1314], ['B', 531]], 'B'), ['B', 2, 'A']),
  ('variant scenario 1', ([['A', 308], ['B', 924]], 'A'), ['A', 1, 'B']),
  ('variant scenario 2',
   ([['B', 1722], ['B', 465], ['A', 1918], ['A', 571], ['B', 1958]], 'A'),
   ['B', 1, 'A'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['B', 318],
     ['A', 2016],
     ['A', 1759],
     ['B', 98],
     ['B', 24],
     ['A', 2032],
     ['B', 1781],
     ['A', 1850]],
    'A'),
   ['B', 3, 'A']),
  ('regression: counting limit', ([['B', 430], ['B', 1878]], 'A'), ['B', 2, 'A']),
  ('variant scenario 1', ([['B', 805]], 'B'), ['B', 1, 'A']),
  ('variant scenario 2',
   ([['A', 1716], ['A', 1304], ['B', 1756], ['B', 36], ['A', 2270]], 'A'),
   ['B', 1, 'A'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit', ([['A', 361], ['A', 240]], 'A'), ['A', 2, 'B']),
  ('regression: counting limit',
   ([['A', 1727], ['A', 392], ['A', 1729], ['B', 732], ['A', 2097]], 'A'),
   ['A', 1, 'B']),
  ('variant scenario 1',
   ([['A', 187], ['B', 456], ['B', 142], ['B', 1993], ['B', 187]], 'A'),
   ['B', 1, 'A']),
  ('variant scenario 2',
   ([['B', 552],
     ['B', 476],
     ['B', 561],
     ['B', 1762],
     ['A', 418],
     ['A', 194],
     ['A', 1127],
     ['B', 1615]],
    'A'),
   ['A', 2, 'B'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['B', 585],
     ['A', 132],
     ['A', 1567],
     ['B', 1729],
     ['A', 948],
     ['B', 121],
     ['A', 523],
     ['B', 910]],
    'B'),
   ['B', 1, 'A']),
  ('regression: counting limit', ([['B', 1969], ['B', 163]], 'B'), ['B', 2, 'A']),
  ('variant scenario 1',
   ([['A', 231],
     ['A', 14],
     ['A', 1952],
     ['A', 2020],
     ['B', 238],
     ['A', 2269],
     ['B', 1723],
     ['B', 231]],
    'B'),
   ['A', 1, 'B']),
  ('variant scenario 2', ([['A', 390]], 'A'), ['A', 1, 'B'])]]
for label, args, expected in cases[N - 1]:
    check(label, run(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
control single shot['A', 1, 'B']['A', 1, 'B']Passed
boundary stone biting house edge['B', 1, 'A']['B', 1, 'A']Passed
boundary stone just outside[None, 0, 'A'][None, 0, 'A']Passed
control steal of two['B', 2, 'A']['B', 2, 'A']Passed
boundary measured tie[None, 0, 'B'][None, 0, 'B']Passed
control empty house[None, 0, 'A'][None, 0, 'A']Passed
regression: counting limit['B', 1, 'A']['B', 1, 'A']Passed
regression: counting limit['B', 1, 'A']['B', 6, 'A']Failed
variant scenario 1['A', 2, 'B']['A', 2, 'B']Passed
variant scenario 2['A', 1, 'B']['A', 1, 'B']Passed

SHA-256 / 77c224dae1f381539e9d0ed2a30a9df045e7f064a943187f0a92aa2a6365063c

3 / The verified repair

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

N = 1
observations = []
def solve(stones, hammer):
    inside = sorted((d, t) for t, d in stones if d <= 1830 + 145)
    tie = bool(inside) and any(d == inside[0][0] and t != inside[0][1] for d, t in inside)
    if not inside or tie:
        return [None, 0, hammer]
    best_d, team = inside[0]
    opp = [d for d, t in inside if t != team]
    limit = min(opp) if opp else None
    points = sum(1 for d, t in inside if t == team and (limit is None or d < limit))
    nxt = 'B' if team == 'A' else 'A'
    return [team, points, nxt]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['A', 406],
     ['B', 399],
     ['B', 898],
     ['A', 2048],
     ['B', 1613],
     ['B', 1262],
     ['B', 412],
     ['B', 1363],
     ['B', 406]],
    'B'),
   ['B', 1, 'A']),
  ('regression: counting limit',
   ([['B', 371], ['B', 1920], ['B', 433], ['A', 2318], ['B', 194], ['B', 118], ['B', 409]], 'A'),
   ['B', 6, 'A']),
  ('variant scenario 1',
   ([['A', 454], ['A', 400], ['B', 1405], ['A', 1720], ['A', 1746]], 'A'),
   ['A', 2, 'B']),
  ('variant scenario 2', ([['B', 598], ['A', 2040], ['A', 127]], 'A'), ['A', 1, 'B'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['A', 432], ['A', 1730], ['B', 1904], ['A', 584], ['B', 2380], ['B', 1638], ['A', 1972]], 'B'),
   ['A', 2, 'B']),
  ('regression: counting limit', ([['B', 1314], ['B', 531]], 'B'), ['B', 2, 'A']),
  ('variant scenario 1', ([['A', 308], ['B', 924]], 'A'), ['A', 1, 'B']),
  ('variant scenario 2',
   ([['B', 1722], ['B', 465], ['A', 1918], ['A', 571], ['B', 1958]], 'A'),
   ['B', 1, 'A'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['B', 318],
     ['A', 2016],
     ['A', 1759],
     ['B', 98],
     ['B', 24],
     ['A', 2032],
     ['B', 1781],
     ['A', 1850]],
    'A'),
   ['B', 3, 'A']),
  ('regression: counting limit', ([['B', 430], ['B', 1878]], 'A'), ['B', 2, 'A']),
  ('variant scenario 1', ([['B', 805]], 'B'), ['B', 1, 'A']),
  ('variant scenario 2',
   ([['A', 1716], ['A', 1304], ['B', 1756], ['B', 36], ['A', 2270]], 'A'),
   ['B', 1, 'A'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit', ([['A', 361], ['A', 240]], 'A'), ['A', 2, 'B']),
  ('regression: counting limit',
   ([['A', 1727], ['A', 392], ['A', 1729], ['B', 732], ['A', 2097]], 'A'),
   ['A', 1, 'B']),
  ('variant scenario 1',
   ([['A', 187], ['B', 456], ['B', 142], ['B', 1993], ['B', 187]], 'A'),
   ['B', 1, 'A']),
  ('variant scenario 2',
   ([['B', 552],
     ['B', 476],
     ['B', 561],
     ['B', 1762],
     ['A', 418],
     ['A', 194],
     ['A', 1127],
     ['B', 1615]],
    'A'),
   ['A', 2, 'B'])],
 [('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
  ('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
  ('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
  ('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
  ('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
  ('control empty house', ([], 'A'), [None, 0, 'A']),
  ('regression: counting limit',
   ([['B', 585],
     ['A', 132],
     ['A', 1567],
     ['B', 1729],
     ['A', 948],
     ['B', 121],
     ['A', 523],
     ['B', 910]],
    'B'),
   ['B', 1, 'A']),
  ('regression: counting limit', ([['B', 1969], ['B', 163]], 'B'), ['B', 2, 'A']),
  ('variant scenario 1',
   ([['A', 231],
     ['A', 14],
     ['A', 1952],
     ['A', 2020],
     ['B', 238],
     ['A', 2269],
     ['B', 1723],
     ['B', 231]],
    'B'),
   ['A', 1, 'B']),
  ('variant scenario 2', ([['A', 390]], 'A'), ['A', 1, 'B'])]]
for label, args, expected in cases[N - 1]:
    check(label, run(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
control single shot['A', 1, 'B']['A', 1, 'B']Passed
boundary stone biting house edge['B', 1, 'A']['B', 1, 'A']Passed
boundary stone just outside[None, 0, 'A'][None, 0, 'A']Passed
control steal of two['B', 2, 'A']['B', 2, 'A']Passed
boundary measured tie[None, 0, 'B'][None, 0, 'B']Passed
control empty house[None, 0, 'A'][None, 0, 'A']Passed
regression: counting limit['B', 1, 'A']['B', 1, 'A']Passed
regression: counting limit['B', 6, 'A']['B', 6, 'A']Passed
variant scenario 1['A', 2, 'B']['A', 2, 'B']Passed
variant scenario 2['A', 1, 'B']['A', 1, 'B']Passed

SHA-256 / 571e3eb0dedf01e9180a9031abd375dc2346f6689aba17a8d5b3089b49c1ecee

Verification & scope

Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any governing body rulebook or operator house rules. 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:29.131523+00:00.

Case digest / bc3c5e95a42bf1c32b82483694b8813e4bdd9cacdf83bf8b02b991998eb6b704