FA-84211 / Sports scoring and tiebreakers / Open access
Leaving one or finishing on a single is not a bust · case 01
A player who leaves 1, or reaches 0 without a double, is left on that score.
ROOT CAUSE
The bust test only fires below zero.
VERIFIED REPAIR
Bust whenever the remaining score is below 2 after the checkout test.
Unsuccessful approach: Busting only below one still allows a player to be left on 1.
Case contract
Double-out darts leg from a remaining score. darts lists thrown darts: S/D/T followed by 1-20, SB (25), DB (50, a double) or M (miss). Turns are three darts. After each dart: reaching exactly 0 with a double (D* or DB) checks out and later darts are ignored; a remaining score below 2 otherwise is a bust, the score reverts to its value at the start of the turn and the turn ends immediately (the next dart in the list starts a new turn). Return [remaining, turns used, checked_out].
Why this case matters
Darts scoring apps must implement bust reversion and double-out exactly.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(start, darts):
def value(d):
if d == 'M':
return 0, False
if d == 'SB':
return 25, False
if d == 'DB':
return 50, True
mult = {'S': 1, 'D': 2, 'T': 3}[d[0]]
return mult * int(d[1:]), d[0] == 'D'
score = start
turns = 0
i = 0
while i < len(darts):
turns += 1
turn_start = score
for k in range(3):
if i >= len(darts):
break
v, dbl = value(darts[i])
i += 1
score -= v
if score == 0 and dbl:
return [0, turns, True]
if score < 0:
score = turn_start
break
return [score, turns, False]
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 checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(3, ['D16', 'D12', 'D19', 'T11', 'D1', 'T17', 'D13']),
[3, 7, False]),
('variant scenario 1', (13, ['S10', 'M', 'T3', 'D11']), [13, 2, False]),
('variant scenario 2', (101, ['D1', 'S18', 'T5', 'T6']), [48, 2, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold', (12, ['S18', 'S16', 'T17', 'T4']), [12, 4, False]),
('regression: bust threshold', (40, ['T1', 'D11', 'D2', 'D5', 'D8']), [11, 3, False]),
('variant scenario 1', (3, ['T17', 'D3']), [3, 2, False]),
('variant scenario 2',
(40, ['T12', 'D8', 'D1', 'D19', 'S1', 'D15', 'T6', 'T16', 'T1']),
[0, 2, True])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold', (3, ['T9', 'D10', 'D2', 'T16', 'T1', 'D20']), [3, 6, False]),
('regression: bust threshold',
(50, ['D3', 'D4', 'T10', 'D17', 'D4', 'D14', 'SB', 'S11', 'S5']),
[6, 7, False]),
('variant scenario 1', (28, ['D6', 'D3', 'D15', 'D20', 'D5']), [18, 3, False]),
('variant scenario 2', (101, ['S7', 'D5', 'S20', 'D5']), [54, 2, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(18, ['S4', 'SB', 'D1', 'T5', 'D20', 'D20', 'S4']),
[14, 5, False]),
('variant scenario 1', (101, ['D5']), [91, 1, False]),
('variant scenario 2', (50, ['T11']), [17, 1, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(3, ['S2', 'D7', 'D7', 'S5', 'D9', 'D13', 'T7', 'T6', 'T7']),
[3, 9, False]),
('variant scenario 1', (101, ['S12', 'T5', 'T18', 'T10', 'T4']), [8, 3, False]),
('variant scenario 2', (53, ['D17', 'S16', 'D6', 'D14', 'T12', 'D4', 'D4']), [37, 3, False])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control checkout on double | [0, 1, True] | [0, 1, True] | Passed |
| boundary finish on single busts | [20, 1, False] | [0, 2, True] | Failed |
| boundary leave one busts | [0, 1, False] | [20, 2, False] | Failed |
| control bull finish | [0, 1, True] | [0, 1, True] | Passed |
| boundary bust mid-turn reverts | [0, 2, True] | [0, 2, True] | Passed |
| control scoring turn | [20, 1, False] | [20, 1, False] | Passed |
| regression: bust threshold | [3, 6, False] | [3, 7, False] | Failed |
| variant scenario 1 | [13, 2, False] | [13, 2, False] | Passed |
| variant scenario 2 | [48, 2, False] | [48, 2, False] | Passed |
SHA-256 / 0c36f6bcdecc48ebe31de59bb02f6118383b72b36ffe75704ddd9c573368de35
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(start, darts):
def value(d):
if d == 'M':
return 0, False
if d == 'SB':
return 25, False
if d == 'DB':
return 50, True
mult = {'S': 1, 'D': 2, 'T': 3}[d[0]]
return mult * int(d[1:]), d[0] == 'D'
score = start
turns = 0
i = 0
while i < len(darts):
turns += 1
turn_start = score
for k in range(3):
if i >= len(darts):
break
v, dbl = value(darts[i])
i += 1
score -= v
if score == 0 and dbl:
return [0, turns, True]
if score < 1:
score = turn_start
break
return [score, turns, False]
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 checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(3, ['D16', 'D12', 'D19', 'T11', 'D1', 'T17', 'D13']),
[3, 7, False]),
('variant scenario 1', (13, ['S10', 'M', 'T3', 'D11']), [13, 2, False]),
('variant scenario 2', (101, ['D1', 'S18', 'T5', 'T6']), [48, 2, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold', (12, ['S18', 'S16', 'T17', 'T4']), [12, 4, False]),
('regression: bust threshold', (40, ['T1', 'D11', 'D2', 'D5', 'D8']), [11, 3, False]),
('variant scenario 1', (3, ['T17', 'D3']), [3, 2, False]),
('variant scenario 2',
(40, ['T12', 'D8', 'D1', 'D19', 'S1', 'D15', 'T6', 'T16', 'T1']),
[0, 2, True])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold', (3, ['T9', 'D10', 'D2', 'T16', 'T1', 'D20']), [3, 6, False]),
('regression: bust threshold',
(50, ['D3', 'D4', 'T10', 'D17', 'D4', 'D14', 'SB', 'S11', 'S5']),
[6, 7, False]),
('variant scenario 1', (28, ['D6', 'D3', 'D15', 'D20', 'D5']), [18, 3, False]),
('variant scenario 2', (101, ['S7', 'D5', 'S20', 'D5']), [54, 2, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(18, ['S4', 'SB', 'D1', 'T5', 'D20', 'D20', 'S4']),
[14, 5, False]),
('variant scenario 1', (101, ['D5']), [91, 1, False]),
('variant scenario 2', (50, ['T11']), [17, 1, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(3, ['S2', 'D7', 'D7', 'S5', 'D9', 'D13', 'T7', 'T6', 'T7']),
[3, 9, False]),
('variant scenario 1', (101, ['S12', 'T5', 'T18', 'T10', 'T4']), [8, 3, False]),
('variant scenario 2', (53, ['D17', 'S16', 'D6', 'D14', 'T12', 'D4', 'D4']), [37, 3, False])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control checkout on double | [0, 1, True] | [0, 1, True] | Passed |
| boundary finish on single busts | [0, 2, True] | [0, 2, True] | Passed |
| boundary leave one busts | [21, 1, False] | [20, 2, False] | Failed |
| control bull finish | [0, 1, True] | [0, 1, True] | Passed |
| boundary bust mid-turn reverts | [0, 2, True] | [0, 2, True] | Passed |
| control scoring turn | [20, 1, False] | [20, 1, False] | Passed |
| regression: bust threshold | [3, 6, False] | [3, 7, False] | Failed |
| variant scenario 1 | [13, 2, False] | [13, 2, False] | Passed |
| variant scenario 2 | [48, 2, False] | [48, 2, False] | Passed |
SHA-256 / e8fa1e69916f981688614b985c8988f2df2a619270f703d05f45f0caef00eb6c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(start, darts):
def value(d):
if d == 'M':
return 0, False
if d == 'SB':
return 25, False
if d == 'DB':
return 50, True
mult = {'S': 1, 'D': 2, 'T': 3}[d[0]]
return mult * int(d[1:]), d[0] == 'D'
score = start
turns = 0
i = 0
while i < len(darts):
turns += 1
turn_start = score
for k in range(3):
if i >= len(darts):
break
v, dbl = value(darts[i])
i += 1
score -= v
if score == 0 and dbl:
return [0, turns, True]
if score < 2:
score = turn_start
break
return [score, turns, False]
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 checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(3, ['D16', 'D12', 'D19', 'T11', 'D1', 'T17', 'D13']),
[3, 7, False]),
('variant scenario 1', (13, ['S10', 'M', 'T3', 'D11']), [13, 2, False]),
('variant scenario 2', (101, ['D1', 'S18', 'T5', 'T6']), [48, 2, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold', (12, ['S18', 'S16', 'T17', 'T4']), [12, 4, False]),
('regression: bust threshold', (40, ['T1', 'D11', 'D2', 'D5', 'D8']), [11, 3, False]),
('variant scenario 1', (3, ['T17', 'D3']), [3, 2, False]),
('variant scenario 2',
(40, ['T12', 'D8', 'D1', 'D19', 'S1', 'D15', 'T6', 'T16', 'T1']),
[0, 2, True])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold', (3, ['T9', 'D10', 'D2', 'T16', 'T1', 'D20']), [3, 6, False]),
('regression: bust threshold',
(50, ['D3', 'D4', 'T10', 'D17', 'D4', 'D14', 'SB', 'S11', 'S5']),
[6, 7, False]),
('variant scenario 1', (28, ['D6', 'D3', 'D15', 'D20', 'D5']), [18, 3, False]),
('variant scenario 2', (101, ['S7', 'D5', 'S20', 'D5']), [54, 2, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(18, ['S4', 'SB', 'D1', 'T5', 'D20', 'D20', 'S4']),
[14, 5, False]),
('variant scenario 1', (101, ['D5']), [91, 1, False]),
('variant scenario 2', (50, ['T11']), [17, 1, False])],
[('control checkout on double', (40, ['D20']), [0, 1, True]),
('boundary finish on single busts', (20, ['S20', 'D10']), [0, 2, True]),
('boundary leave one busts', (21, ['S20', 'S1']), [20, 2, False]),
('control bull finish', (50, ['DB']), [0, 1, True]),
('boundary bust mid-turn reverts', (32, ['S10', 'T20', 'D16']), [0, 2, True]),
('control scoring turn', (101, ['T20', 'S1', 'S20']), [20, 1, False]),
('regression: bust threshold',
(3, ['S2', 'D7', 'D7', 'S5', 'D9', 'D13', 'T7', 'T6', 'T7']),
[3, 9, False]),
('variant scenario 1', (101, ['S12', 'T5', 'T18', 'T10', 'T4']), [8, 3, False]),
('variant scenario 2', (53, ['D17', 'S16', 'D6', 'D14', 'T12', 'D4', 'D4']), [37, 3, False])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control checkout on double | [0, 1, True] | [0, 1, True] | Passed |
| boundary finish on single busts | [0, 2, True] | [0, 2, True] | Passed |
| boundary leave one busts | [20, 2, False] | [20, 2, False] | Passed |
| control bull finish | [0, 1, True] | [0, 1, True] | Passed |
| boundary bust mid-turn reverts | [0, 2, True] | [0, 2, True] | Passed |
| control scoring turn | [20, 1, False] | [20, 1, False] | Passed |
| regression: bust threshold | [3, 7, False] | [3, 7, False] | Passed |
| variant scenario 1 | [13, 2, False] | [13, 2, False] | Passed |
| variant scenario 2 | [48, 2, False] | [48, 2, False] | Passed |
SHA-256 / 29d46aa0de51da6d6414f072f02cd988f7b3c62a7bcae96c7580966d77d40563
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:28.671995+00:00.
Case digest / 75bca6d3e6e218e13a535a4a185bddf848d317654f2f48526c2095648fecde74