FA-84651 / Betting odds conversion / Open access
System total stake computed per selection or per line size · case 01
A yankee is charged 4 units instead of 11.
ROOT CAUSE
Total stake multiplies the unit by the number of selections.
VERIFIED REPAIR
Multiply the unit stake by the number of lines.
Unsuccessful approach: Multiplying by the number of line sizes still undercharges.
Case contract
Full-cover system bets. system: trixie (3 selections: doubles and treble), patent (3: singles, doubles, treble), yankee (4: doubles, trebles, fourfold), lucky15 (4: singles through fourfold). Wrong selection count returns "invalid". Every combination is a line staked unit_cents; a line with a losing selection returns 0; void selections count as price 1. Return [lines, total stake, total return rounded down].
Why this case matters
Bookmaker settlement expands system bets into combination lines before pricing each one.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import itertools
import math
N = 1
observations = []
def solve(selections, unit_cents, system):
SYS = {'trixie': (3, [2, 3]), 'patent': (3, [1, 2, 3]), 'yankee': (4, [2, 3, 4]), 'lucky15': (4, [1, 2, 3, 4])}
n, sizes = SYS[system]
if len(selections) != n:
return 'invalid'
lines = [c for k in sizes for c in itertools.combinations(range(n), k)]
ret = Fraction(0)
for combo in lines:
m = Fraction(1)
for i in combo:
price, result = selections[i]
if result == 'lose':
m = Fraction(0)
break
if result == 'win':
m *= Fraction(price)
ret += unit_cents * m
return [len(lines), unit_cents * n, math.floor(ret)]
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 trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['2.81', 'win'], ['4.60', 'lose'], ['2.95', 'lose'], ['1.62', 'lose']], 25, 'lucky15'),
[15, 375, 70]),
('variant scenario 1',
([['5.79', 'lose'], ['3.41', 'void'], ['3.66', 'win']], 25, 'trixie'),
[4, 100, 91]),
('variant scenario 2',
([['3.01', 'lose'], ['4.93', 'win'], ['2.10', 'lose']], 50, 'patent'),
[7, 350, 246])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['4.89', 'win'], ['3.10', 'win'], ['3.26', 'win'], ['3.49', 'lose']], 50, 'yankee'),
[11, 550, 4531]),
('variant scenario 1',
([['2.52', 'win'], ['2.43', 'void'], ['1.54', 'win'], ['5.51', 'void']], 100, 'lucky15'),
[15, 1500, 3476]),
('variant scenario 2',
([['2.97', 'lose'], ['3.94', 'void'], ['1.41', 'win'], ['5.60', 'lose']], 100, 'yankee'),
[11, 1100, 141])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['2.82', 'win'], ['3.33', 'lose'], ['1.68', 'lose'], ['2.92', 'lose']], 100, 'lucky15'),
[15, 1500, 282]),
('variant scenario 1',
([['3.30', 'win'], ['2.92', 'lose'], ['4.87', 'void']], 100, 'patent'),
[7, 700, 760]),
('variant scenario 2',
([['1.96', 'lose'], ['5.37', 'void'], ['3.43', 'void'], ['2.72', 'win']], 50, 'yankee'),
[11, 550, 458])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['3.79', 'lose'], ['4.05', 'win'], ['4.66', 'win'], ['5.16', 'void']], 100, 'yankee'),
[11, 1100, 4645]),
('variant scenario 1',
([['3.13', 'void'], ['4.79', 'win'], ['4.77', 'win'], ['1.56', 'win']], 50, 'yankee'),
[11, 550, 7896]),
('variant scenario 2',
([['5.53', 'lose'], ['4.16', 'win'], ['2.16', 'win'], ['2.29', 'void']], 100, 'lucky15'),
[15, 1500, 3161])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['3.05', 'win'], ['4.52', 'win'], ['3.40', 'win']], 50, 'patent'),
[7, 350, 4868]),
('variant scenario 1',
([['2.02', 'win'], ['2.56', 'win'], ['2.79', 'void'], ['2.20', 'win']], 25, 'lucky15'),
[15, 375, 1695]),
('variant scenario 2',
([['2.95', 'lose'], ['3.69', 'win'], ['3.92', 'win']], 50, 'patent'),
[7, 350, 1103])]]
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 trixie all win | [4, 300, 2000] | [4, 400, 2000] | Failed |
| control yankee line count | [11, 400, 0] | [11, 1100, 0] | Failed |
| boundary void selection | [4, 300, 1700] | [4, 400, 1700] | Failed |
| boundary patent single winner | [7, 300, 500] | [7, 700, 500] | Failed |
| boundary wrong count | invalid | invalid | Passed |
| regression: total stake | [15, 100, 70] | [15, 375, 70] | Failed |
| variant scenario 1 | [4, 75, 91] | [4, 100, 91] | Failed |
| variant scenario 2 | [7, 150, 246] | [7, 350, 246] | Failed |
SHA-256 / 8ad615feca50b086149989ab4d122e2d6e159eac18e97aa40e0b916cb9f02c87
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import itertools
import math
N = 1
observations = []
def solve(selections, unit_cents, system):
SYS = {'trixie': (3, [2, 3]), 'patent': (3, [1, 2, 3]), 'yankee': (4, [2, 3, 4]), 'lucky15': (4, [1, 2, 3, 4])}
n, sizes = SYS[system]
if len(selections) != n:
return 'invalid'
lines = [c for k in sizes for c in itertools.combinations(range(n), k)]
ret = Fraction(0)
for combo in lines:
m = Fraction(1)
for i in combo:
price, result = selections[i]
if result == 'lose':
m = Fraction(0)
break
if result == 'win':
m *= Fraction(price)
ret += unit_cents * m
return [len(lines), unit_cents * len(sizes), math.floor(ret)]
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 trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['2.81', 'win'], ['4.60', 'lose'], ['2.95', 'lose'], ['1.62', 'lose']], 25, 'lucky15'),
[15, 375, 70]),
('variant scenario 1',
([['5.79', 'lose'], ['3.41', 'void'], ['3.66', 'win']], 25, 'trixie'),
[4, 100, 91]),
('variant scenario 2',
([['3.01', 'lose'], ['4.93', 'win'], ['2.10', 'lose']], 50, 'patent'),
[7, 350, 246])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['4.89', 'win'], ['3.10', 'win'], ['3.26', 'win'], ['3.49', 'lose']], 50, 'yankee'),
[11, 550, 4531]),
('variant scenario 1',
([['2.52', 'win'], ['2.43', 'void'], ['1.54', 'win'], ['5.51', 'void']], 100, 'lucky15'),
[15, 1500, 3476]),
('variant scenario 2',
([['2.97', 'lose'], ['3.94', 'void'], ['1.41', 'win'], ['5.60', 'lose']], 100, 'yankee'),
[11, 1100, 141])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['2.82', 'win'], ['3.33', 'lose'], ['1.68', 'lose'], ['2.92', 'lose']], 100, 'lucky15'),
[15, 1500, 282]),
('variant scenario 1',
([['3.30', 'win'], ['2.92', 'lose'], ['4.87', 'void']], 100, 'patent'),
[7, 700, 760]),
('variant scenario 2',
([['1.96', 'lose'], ['5.37', 'void'], ['3.43', 'void'], ['2.72', 'win']], 50, 'yankee'),
[11, 550, 458])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['3.79', 'lose'], ['4.05', 'win'], ['4.66', 'win'], ['5.16', 'void']], 100, 'yankee'),
[11, 1100, 4645]),
('variant scenario 1',
([['3.13', 'void'], ['4.79', 'win'], ['4.77', 'win'], ['1.56', 'win']], 50, 'yankee'),
[11, 550, 7896]),
('variant scenario 2',
([['5.53', 'lose'], ['4.16', 'win'], ['2.16', 'win'], ['2.29', 'void']], 100, 'lucky15'),
[15, 1500, 3161])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['3.05', 'win'], ['4.52', 'win'], ['3.40', 'win']], 50, 'patent'),
[7, 350, 4868]),
('variant scenario 1',
([['2.02', 'win'], ['2.56', 'win'], ['2.79', 'void'], ['2.20', 'win']], 25, 'lucky15'),
[15, 375, 1695]),
('variant scenario 2',
([['2.95', 'lose'], ['3.69', 'win'], ['3.92', 'win']], 50, 'patent'),
[7, 350, 1103])]]
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 trixie all win | [4, 200, 2000] | [4, 400, 2000] | Failed |
| control yankee line count | [11, 300, 0] | [11, 1100, 0] | Failed |
| boundary void selection | [4, 200, 1700] | [4, 400, 1700] | Failed |
| boundary patent single winner | [7, 300, 500] | [7, 700, 500] | Failed |
| boundary wrong count | invalid | invalid | Passed |
| regression: total stake | [15, 100, 70] | [15, 375, 70] | Failed |
| variant scenario 1 | [4, 50, 91] | [4, 100, 91] | Failed |
| variant scenario 2 | [7, 150, 246] | [7, 350, 246] | Failed |
SHA-256 / 02ed6fb52d35b90ef82666beb3dc2f6f0a85435088e6c69479593fce65aeccbf
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import itertools
import math
N = 1
observations = []
def solve(selections, unit_cents, system):
SYS = {'trixie': (3, [2, 3]), 'patent': (3, [1, 2, 3]), 'yankee': (4, [2, 3, 4]), 'lucky15': (4, [1, 2, 3, 4])}
n, sizes = SYS[system]
if len(selections) != n:
return 'invalid'
lines = [c for k in sizes for c in itertools.combinations(range(n), k)]
ret = Fraction(0)
for combo in lines:
m = Fraction(1)
for i in combo:
price, result = selections[i]
if result == 'lose':
m = Fraction(0)
break
if result == 'win':
m *= Fraction(price)
ret += unit_cents * m
return [len(lines), unit_cents * len(lines), math.floor(ret)]
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 trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['2.81', 'win'], ['4.60', 'lose'], ['2.95', 'lose'], ['1.62', 'lose']], 25, 'lucky15'),
[15, 375, 70]),
('variant scenario 1',
([['5.79', 'lose'], ['3.41', 'void'], ['3.66', 'win']], 25, 'trixie'),
[4, 100, 91]),
('variant scenario 2',
([['3.01', 'lose'], ['4.93', 'win'], ['2.10', 'lose']], 50, 'patent'),
[7, 350, 246])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['4.89', 'win'], ['3.10', 'win'], ['3.26', 'win'], ['3.49', 'lose']], 50, 'yankee'),
[11, 550, 4531]),
('variant scenario 1',
([['2.52', 'win'], ['2.43', 'void'], ['1.54', 'win'], ['5.51', 'void']], 100, 'lucky15'),
[15, 1500, 3476]),
('variant scenario 2',
([['2.97', 'lose'], ['3.94', 'void'], ['1.41', 'win'], ['5.60', 'lose']], 100, 'yankee'),
[11, 1100, 141])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['2.82', 'win'], ['3.33', 'lose'], ['1.68', 'lose'], ['2.92', 'lose']], 100, 'lucky15'),
[15, 1500, 282]),
('variant scenario 1',
([['3.30', 'win'], ['2.92', 'lose'], ['4.87', 'void']], 100, 'patent'),
[7, 700, 760]),
('variant scenario 2',
([['1.96', 'lose'], ['5.37', 'void'], ['3.43', 'void'], ['2.72', 'win']], 50, 'yankee'),
[11, 550, 458])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['3.79', 'lose'], ['4.05', 'win'], ['4.66', 'win'], ['5.16', 'void']], 100, 'yankee'),
[11, 1100, 4645]),
('variant scenario 1',
([['3.13', 'void'], ['4.79', 'win'], ['4.77', 'win'], ['1.56', 'win']], 50, 'yankee'),
[11, 550, 7896]),
('variant scenario 2',
([['5.53', 'lose'], ['4.16', 'win'], ['2.16', 'win'], ['2.29', 'void']], 100, 'lucky15'),
[15, 1500, 3161])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: total stake',
([['3.05', 'win'], ['4.52', 'win'], ['3.40', 'win']], 50, 'patent'),
[7, 350, 4868]),
('variant scenario 1',
([['2.02', 'win'], ['2.56', 'win'], ['2.79', 'void'], ['2.20', 'win']], 25, 'lucky15'),
[15, 375, 1695]),
('variant scenario 2',
([['2.95', 'lose'], ['3.69', 'win'], ['3.92', 'win']], 50, 'patent'),
[7, 350, 1103])]]
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 trixie all win | [4, 400, 2000] | [4, 400, 2000] | Passed |
| control yankee line count | [11, 1100, 0] | [11, 1100, 0] | Passed |
| boundary void selection | [4, 400, 1700] | [4, 400, 1700] | Passed |
| boundary patent single winner | [7, 700, 500] | [7, 700, 500] | Passed |
| boundary wrong count | invalid | invalid | Passed |
| regression: total stake | [15, 375, 70] | [15, 375, 70] | Passed |
| variant scenario 1 | [4, 100, 91] | [4, 100, 91] | Passed |
| variant scenario 2 | [7, 350, 246] | [7, 350, 246] | Passed |
SHA-256 / d05a96aa66ea0e7ad41b7466b25f48d3e8f7c4748139e7fad9f95c1b72f70b85
Verification & scope
Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any operator, exchange or regulator rule set. 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:33.067585+00:00.
Case digest / 37af641a053d69d4f714c988bb533e09968612255075e524b7c19a01cbe525ec