FA-82061 / Poker hand evaluation / Open access
Odd chip of a hi-lo pot goes to the low half · case 01
In an odd pot the low winner gets the extra chip.
ROOT CAUSE
The halving floors the high half and gives the remainder to low.
VERIFIED REPAIR
Floor the low half and give the remainder to the high half.
Unsuccessful approach: Flooring both halves drops the odd chip entirely.
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']:
high_half=pot//2; low_half=pot-high_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': 50, 'b': 51} | {'a': 51, 'b': 50} | Failed |
| 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': 4, 'c': 3} | {'a': 3, 'c': 4} | Failed |
SHA-256 / 71992b56bbdd7b7327d5f490360aabc5756af8dbf8fd24910062d81ed24989a6
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 x['low']:
low_half=high_half=pot//2
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': 50, 'b': 50} | {'a': 51, 'b': 50} | Failed |
| no low scoop | {'a': 100} | {'a': 100} | Passed |
| scoop both halves | {'a': 100} | {'a': 101} | Failed |
| 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': 3} | {'a': 3, 'c': 4} | Failed |
SHA-256 / 61e0fa7d885904935f4632032a06222cd6cc4c3018f0c8799438edbc2c6dea03
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.792293+00:00.
Case digest / 93cd3e0b99c0d706af7b1d18310784c032b02e9f2687850b92ed0ed9ee304d70