FAILURE MAP
← Case archive

FA-84216 / Sports scoring and tiebreakers / Open access

Double bull not accepted as a checkout double · case 01

Finishing 50 with the bull is treated as a bust.

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

ROOT CAUSE

The double-bull value is flagged as a single.

VERIFIED REPAIR

Treat DB as a double worth 50.

Unsuccessful approach: Flagging DB as a double but scoring it 25 breaks every bull finish.

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, False
        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: bull double', (50, ['D2', 'DB', 'DB', 'T15', 'D15', 'D11']), [0, 2, True]),
  ('variant scenario 1', (27, ['D1', 'S7', 'SB', 'D11', 'SB', 'S7', 'T3']), [11, 3, False]),
  ('variant scenario 2', (50, ['D4', 'D3', 'D13', 'S7', 'D3', 'S18', 'D3']), [4, 4, 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: bull double', (50, ['D8', 'DB', 'D5', 'D16', 'D4', 'D12', 'D20']), [0, 2, True]),
  ('regression: bull double',
   (50, ['D9', 'T13', 'D11', 'D13', 'D6', 'DB', 'M', 'D5', 'D15']),
   [0, 3, True]),
  ('variant scenario 1', (32, ['D16', 'SB']), [0, 1, True]),
  ('variant scenario 2', (40, ['D18', 'T20', 'T14', 'D12', 'S20']), [40, 3, 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: bull double', (50, ['D9', 'T4', 'D13', 'DB', 'D20', 'T13']), [0, 2, True]),
  ('variant scenario 1', (40, ['D1', 'T4', 'T9', 'DB', 'D9', 'T13']), [40, 3, False]),
  ('variant scenario 2', (3, ['T3', 'SB', 'T5']), [3, 3, 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: bull double',
   (40, ['D8', 'D5', 'D13', 'T4', 'DB', 'D18', 'D11', 'S15']),
   [25, 4, False]),
  ('regression: bull double', (50, ['T20', 'DB', 'D15', 'D13', 'SB']), [0, 2, True]),
  ('variant scenario 1', (31, ['T17']), [31, 1, False]),
  ('variant scenario 2', (32, ['D16']), [0, 1, 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: bull double', (32, ['D6', 'D11', 'DB', 'DB', 'D7', 'D7', 'S17']), [32, 4, False]),
  ('regression: bull double',
   (50, ['DB', 'S13', 'D3', 'S20', 'M', 'D18', 'M', 'T1']),
   [0, 1, True]),
  ('variant scenario 1', (32, ['T7', 'T20', 'D2', 'T20', 'D6', 'D19', 'D12']), [8, 4, False]),
  ('variant scenario 2', (40, ['S3', 'S10', 'D16', 'D1', 'D3', 'D3']), [26, 2, 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 fixtureActualExpectedOutcome
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[50, 1, False][0, 1, True]Failed
boundary bust mid-turn reverts[0, 2, True][0, 2, True]Passed
control scoring turn[20, 1, False][20, 1, False]Passed
regression: bull double[28, 4, False][0, 2, True]Failed
variant scenario 1[11, 3, False][11, 3, False]Passed
variant scenario 2[4, 4, False][4, 4, False]Passed

SHA-256 / 0a800437625b958c5e811a6793c91e470134a5dd5588f8751c4c705bad6f7e1b

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 25, 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: bull double', (50, ['D2', 'DB', 'DB', 'T15', 'D15', 'D11']), [0, 2, True]),
  ('variant scenario 1', (27, ['D1', 'S7', 'SB', 'D11', 'SB', 'S7', 'T3']), [11, 3, False]),
  ('variant scenario 2', (50, ['D4', 'D3', 'D13', 'S7', 'D3', 'S18', 'D3']), [4, 4, 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: bull double', (50, ['D8', 'DB', 'D5', 'D16', 'D4', 'D12', 'D20']), [0, 2, True]),
  ('regression: bull double',
   (50, ['D9', 'T13', 'D11', 'D13', 'D6', 'DB', 'M', 'D5', 'D15']),
   [0, 3, True]),
  ('variant scenario 1', (32, ['D16', 'SB']), [0, 1, True]),
  ('variant scenario 2', (40, ['D18', 'T20', 'T14', 'D12', 'S20']), [40, 3, 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: bull double', (50, ['D9', 'T4', 'D13', 'DB', 'D20', 'T13']), [0, 2, True]),
  ('variant scenario 1', (40, ['D1', 'T4', 'T9', 'DB', 'D9', 'T13']), [40, 3, False]),
  ('variant scenario 2', (3, ['T3', 'SB', 'T5']), [3, 3, 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: bull double',
   (40, ['D8', 'D5', 'D13', 'T4', 'DB', 'D18', 'D11', 'S15']),
   [25, 4, False]),
  ('regression: bull double', (50, ['T20', 'DB', 'D15', 'D13', 'SB']), [0, 2, True]),
  ('variant scenario 1', (31, ['T17']), [31, 1, False]),
  ('variant scenario 2', (32, ['D16']), [0, 1, 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: bull double', (32, ['D6', 'D11', 'DB', 'DB', 'D7', 'D7', 'S17']), [32, 4, False]),
  ('regression: bull double',
   (50, ['DB', 'S13', 'D3', 'S20', 'M', 'D18', 'M', 'T1']),
   [0, 1, True]),
  ('variant scenario 1', (32, ['T7', 'T20', 'D2', 'T20', 'D6', 'D19', 'D12']), [8, 4, False]),
  ('variant scenario 2', (40, ['S3', 'S10', 'D16', 'D1', 'D3', 'D3']), [26, 2, 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 fixtureActualExpectedOutcome
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[25, 1, False][0, 1, True]Failed
boundary bust mid-turn reverts[0, 2, True][0, 2, True]Passed
control scoring turn[20, 1, False][20, 1, False]Passed
regression: bull double[28, 3, False][0, 2, True]Failed
variant scenario 1[11, 3, False][11, 3, False]Passed
variant scenario 2[4, 4, False][4, 4, False]Passed

SHA-256 / fb1f905f0811107f57cbcac17c2ea5e0d0ff3468daf75b938ea6ba50e4e8d17e

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: bull double', (50, ['D2', 'DB', 'DB', 'T15', 'D15', 'D11']), [0, 2, True]),
  ('variant scenario 1', (27, ['D1', 'S7', 'SB', 'D11', 'SB', 'S7', 'T3']), [11, 3, False]),
  ('variant scenario 2', (50, ['D4', 'D3', 'D13', 'S7', 'D3', 'S18', 'D3']), [4, 4, 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: bull double', (50, ['D8', 'DB', 'D5', 'D16', 'D4', 'D12', 'D20']), [0, 2, True]),
  ('regression: bull double',
   (50, ['D9', 'T13', 'D11', 'D13', 'D6', 'DB', 'M', 'D5', 'D15']),
   [0, 3, True]),
  ('variant scenario 1', (32, ['D16', 'SB']), [0, 1, True]),
  ('variant scenario 2', (40, ['D18', 'T20', 'T14', 'D12', 'S20']), [40, 3, 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: bull double', (50, ['D9', 'T4', 'D13', 'DB', 'D20', 'T13']), [0, 2, True]),
  ('variant scenario 1', (40, ['D1', 'T4', 'T9', 'DB', 'D9', 'T13']), [40, 3, False]),
  ('variant scenario 2', (3, ['T3', 'SB', 'T5']), [3, 3, 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: bull double',
   (40, ['D8', 'D5', 'D13', 'T4', 'DB', 'D18', 'D11', 'S15']),
   [25, 4, False]),
  ('regression: bull double', (50, ['T20', 'DB', 'D15', 'D13', 'SB']), [0, 2, True]),
  ('variant scenario 1', (31, ['T17']), [31, 1, False]),
  ('variant scenario 2', (32, ['D16']), [0, 1, 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: bull double', (32, ['D6', 'D11', 'DB', 'DB', 'D7', 'D7', 'S17']), [32, 4, False]),
  ('regression: bull double',
   (50, ['DB', 'S13', 'D3', 'S20', 'M', 'D18', 'M', 'T1']),
   [0, 1, True]),
  ('variant scenario 1', (32, ['T7', 'T20', 'D2', 'T20', 'D6', 'D19', 'D12']), [8, 4, False]),
  ('variant scenario 2', (40, ['S3', 'S10', 'D16', 'D1', 'D3', 'D3']), [26, 2, 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 fixtureActualExpectedOutcome
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: bull double[0, 2, True][0, 2, True]Passed
variant scenario 1[11, 3, False][11, 3, False]Passed
variant scenario 2[4, 4, False][4, 4, False]Passed

SHA-256 / e4aa4a02f0a490d9656ee99b24b700b53cc4e7639dc8d90907e23a7f4d75245a

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

Case digest / 25f6ea33170ee7d49cc9d04f66321096cc4177462a253acdd9335c226c563b43