FA-82066 / Poker hand evaluation / Open access
Empty low side still takes half the pot · case 01
With no qualifying low, evaluation fails dividing the low half among zero winners instead of scooping.
ROOT CAUSE
The branch tests for presence of the low list rather than for any low winner, so an empty list still splits.
VERIFIED REPAIR
Split only when at least one low winner exists; otherwise the high winners scoop.
Unsuccessful approach: A non-negative length test is always true and behaves the same way.
Case contract
Input: {"pot", "high": [winners], "low": [qualifying low winners, possibly empty], "order": [seat order from the button's left]}. With a qualifying low the pot is halved, the odd chip going to the high half; each half is split among its winners with odd chips by seat order. Without a low, high winners scoop. A player winning both halves is paid both. Return {player: chips} sorted.
Why this case matters
Hi-lo games halve and quarter pots; the odd chip and scoop rules are frequent disputes.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
pot=x['pot']; order=x['order']
def split(amount, winners):
k=len(winners); share=amount//k; rem=amount-share*k
out={w:share for w in winners}
for w in [s for s in order if s in winners][:rem]:
out[w]+=1
return out
if x['low'] is not None:
low_half=pot//2; high_half=pot-low_half
parts=[split(high_half,x['high']), split(low_half,x['low'])]
else:
parts=[split(pot,x['high'])]
res={}
for part in parts:
for k,v in part.items():
res[k]=res.get(k,0)+v
return dict(sorted(res.items()))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})]]
for label, args, expected in fixtures[N-1]:
try:
actual = solve(args)
except Exception as exc:
actual = 'error:' + type(exc).__name__
check(label, actual, 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 |
|---|---|---|---|
| odd pot two winners | {'a': 51, 'b': 50} | {'a': 51, 'b': 50} | Passed |
| no low scoop | error:ZeroDivisionError | {'a': 100} | Failed |
| scoop both halves | {'a': 101} | {'a': 101} | Passed |
| quartered low | {'a': 50, 'b': 25, 'c': 25} | {'a': 50, 'b': 25, 'c': 25} | Passed |
| high and shared low with scooper | {'b': 23, 'c': 67} | {'b': 23, 'c': 67} | Passed |
| even pot | {'b': 40, 'c': 40} | {'b': 40, 'c': 40} | Passed |
| odd pot no low split high | error:ZeroDivisionError | {'a': 25, 'b': 26} | Failed |
| small odd pot | {'a': 3, 'c': 4} | {'a': 3, 'c': 4} | Passed |
SHA-256 / aa43083693d183cab8a04b62274d7507d8af3bb18ffd4168d83842e5f04e3b1e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
pot=x['pot']; order=x['order']
def split(amount, winners):
k=len(winners); share=amount//k; rem=amount-share*k
out={w:share for w in winners}
for w in [s for s in order if s in winners][:rem]:
out[w]+=1
return out
if len(x['low'])>=0:
low_half=pot//2; high_half=pot-low_half
parts=[split(high_half,x['high']), split(low_half,x['low'])]
else:
parts=[split(pot,x['high'])]
res={}
for part in parts:
for k,v in part.items():
res[k]=res.get(k,0)+v
return dict(sorted(res.items()))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})]]
for label, args, expected in fixtures[N-1]:
try:
actual = solve(args)
except Exception as exc:
actual = 'error:' + type(exc).__name__
check(label, actual, 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 |
|---|---|---|---|
| odd pot two winners | {'a': 51, 'b': 50} | {'a': 51, 'b': 50} | Passed |
| no low scoop | error:ZeroDivisionError | {'a': 100} | Failed |
| scoop both halves | {'a': 101} | {'a': 101} | Passed |
| quartered low | {'a': 50, 'b': 25, 'c': 25} | {'a': 50, 'b': 25, 'c': 25} | Passed |
| high and shared low with scooper | {'b': 23, 'c': 67} | {'b': 23, 'c': 67} | Passed |
| even pot | {'b': 40, 'c': 40} | {'b': 40, 'c': 40} | Passed |
| odd pot no low split high | error:ZeroDivisionError | {'a': 25, 'b': 26} | Failed |
| small odd pot | {'a': 3, 'c': 4} | {'a': 3, 'c': 4} | Passed |
SHA-256 / 366ee68943a2b933df948b2157abb158752e6f556dbe9aa5351ea4d2653ba846
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
pot=x['pot']; order=x['order']
def split(amount, winners):
k=len(winners); share=amount//k; rem=amount-share*k
out={w:share for w in winners}
for w in [s for s in order if s in winners][:rem]:
out[w]+=1
return out
if x['low']:
low_half=pot//2; high_half=pot-low_half
parts=[split(high_half,x['high']), split(low_half,x['low'])]
else:
parts=[split(pot,x['high'])]
res={}
for part in parts:
for k,v in part.items():
res[k]=res.get(k,0)+v
return dict(sorted(res.items()))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})],
[('odd pot two winners', {'high': ['a'], 'low': ['b'], 'order': ['a', 'b', 'c'], 'pot': 101},
{'a': 51, 'b': 50}),
('no low scoop', {'high': ['a'], 'low': [], 'order': ['a', 'b'], 'pot': 100}, {'a': 100}),
('scoop both halves', {'high': ['a'], 'low': ['a'], 'order': ['a', 'b'], 'pot': 101}, {'a': 101}),
('quartered low', {'high': ['a'], 'low': ['b', 'c'], 'order': ['a', 'b', 'c'], 'pot': 100},
{'a': 50, 'b': 25, 'c': 25}),
('high and shared low with scooper',
{'high': ['c'], 'low': ['c', 'b'], 'order': ['a', 'b', 'c'], 'pot': 90}, {'b': 23, 'c': 67}),
('even pot', {'high': ['b'], 'low': ['c'], 'order': ['a', 'b', 'c'], 'pot': 80},
{'b': 40, 'c': 40}),
('odd pot no low split high', {'high': ['b', 'a'], 'low': [], 'order': ['b', 'a'], 'pot': 51},
{'a': 25, 'b': 26}),
('small odd pot', {'high': ['c'], 'low': ['a'], 'order': ['a', 'b', 'c'], 'pot': 7},
{'a': 3, 'c': 4})]]
for label, args, expected in fixtures[N-1]:
try:
actual = solve(args)
except Exception as exc:
actual = 'error:' + type(exc).__name__
check(label, actual, 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 |
|---|---|---|---|
| odd pot two winners | {'a': 51, 'b': 50} | {'a': 51, 'b': 50} | Passed |
| no low scoop | {'a': 100} | {'a': 100} | Passed |
| scoop both halves | {'a': 101} | {'a': 101} | Passed |
| quartered low | {'a': 50, 'b': 25, 'c': 25} | {'a': 50, 'b': 25, 'c': 25} | Passed |
| high and shared low with scooper | {'b': 23, 'c': 67} | {'b': 23, 'c': 67} | Passed |
| even pot | {'b': 40, 'c': 40} | {'b': 40, 'c': 40} | Passed |
| odd pot no low split high | {'a': 25, 'b': 26} | {'a': 25, 'b': 26} | Passed |
| small odd pot | {'a': 3, 'c': 4} | {'a': 3, 'c': 4} | Passed |
SHA-256 / 97cc244f7b5decd7f2ef226153619642926b0770672ef12b9fcd9f49f39393a6
Verification & scope
A deterministic toy model with an explicitly stated contract; no claim of conformance to any casino or tournament rulebook. 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:08.831807+00:00.
Case digest / 3fc1911be44fe4ecab35061780426aa3d315e4731a884e53781a5e899a7af997