FAILURE MAP
← Case archive

FA-82036 / Poker hand evaluation / Open access

Shares paid in raw chips then topped up in units · case 01

Winners receive more chips than the pot holds when the pot is not evenly divisible.

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

ROOT CAUSE

The base share is computed in chips while the remainder is computed in units, so the leftover is paid twice.

VERIFIED REPAIR

Compute the base share in units and convert once by multiplying by the unit.

Unsuccessful approach: Leaving the share in units without multiplying pays a fraction of the pot.

Case contract

Input: {"pot", "winners", "seats" (clockwise), "button", "unit" (smallest chip in play; pot is a multiple of it)}. Split the pot equally in whole units; each leftover unit goes to one winner, starting with the first winner clockwise from the button (the button itself is last). Return {winner: amount} sorted by name.

Why this case matters

Odd-chip placement is where split pots disagree between dealers and software.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    pot=x['pot']; unit=x['unit']; winners=x['winners']; seats=x['seats']
    k=len(winners)
    units=pot//unit
    share=units//k
    rem=units-share*k
    out={w:pot//k for w in winners}
    start=(seats.index(x['button'])+1)%len(seats)
    order=seats[start:]+seats[:start]
    for w in [s for s in order if s in winners][:rem]:
        out[w]+=unit
    return dict(sorted(out.items()))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})]]
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 fixtureActualExpectedOutcome
three-way odd units{'b': 36, 'd': 41, 'e': 36}{'b': 35, 'd': 40, 'e': 35}Failed
two-way one unit{'a': 12, 'c': 17}{'a': 10, 'c': 15}Failed
button is a winner{'a': 4, 'd': 3}{'a': 4, 'd': 3}Passed
even split{'a': 50, 'b': 50}{'a': 50, 'b': 50}Passed
wrap past last seat{'a': 4, 'b': 3, 'e': 4}{'a': 4, 'b': 3, 'e': 4}Passed
four-way three odd{'a': 5, 'b': 4, 'c': 5, 'd': 5}{'a': 5, 'b': 4, 'c': 5, 'd': 5}Passed
button left winner{'b': 3, 'c': 2}{'b': 3, 'c': 2}Passed
winner right of button{'a': 2, 'c': 3}{'a': 2, 'c': 3}Passed

SHA-256 / 0161f6c19c9cb1afd05a208003555a71c8880cb3cb48e89e5884e3f8a17be27d

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']; unit=x['unit']; winners=x['winners']; seats=x['seats']
    k=len(winners)
    units=pot//unit
    share=units//k
    rem=units-share*k
    out={w:share for w in winners}
    start=(seats.index(x['button'])+1)%len(seats)
    order=seats[start:]+seats[:start]
    for w in [s for s in order if s in winners][:rem]:
        out[w]+=unit
    return dict(sorted(out.items()))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})]]
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 fixtureActualExpectedOutcome
three-way odd units{'b': 7, 'd': 12, 'e': 7}{'b': 35, 'd': 40, 'e': 35}Failed
two-way one unit{'a': 2, 'c': 7}{'a': 10, 'c': 15}Failed
button is a winner{'a': 4, 'd': 3}{'a': 4, 'd': 3}Passed
even split{'a': 10, 'b': 10}{'a': 50, 'b': 50}Failed
wrap past last seat{'a': 4, 'b': 3, 'e': 4}{'a': 4, 'b': 3, 'e': 4}Passed
four-way three odd{'a': 5, 'b': 4, 'c': 5, 'd': 5}{'a': 5, 'b': 4, 'c': 5, 'd': 5}Passed
button left winner{'b': 3, 'c': 2}{'b': 3, 'c': 2}Passed
winner right of button{'a': 2, 'c': 3}{'a': 2, 'c': 3}Passed

SHA-256 / 41fefa76ca07b567c724dc9351a61c59af67a9666f248ec4528ecff4f79ecfb1

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']; unit=x['unit']; winners=x['winners']; seats=x['seats']
    k=len(winners)
    units=pot//unit
    share=units//k
    rem=units-share*k
    out={w:share*unit for w in winners}
    start=(seats.index(x['button'])+1)%len(seats)
    order=seats[start:]+seats[:start]
    for w in [s for s in order if s in winners][:rem]:
        out[w]+=unit
    return dict(sorted(out.items()))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('button is a winner',
   {'button': 'd', 'pot': 7, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'd']},
   {'a': 4, 'd': 3}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('wrap past last seat',
   {'button': 'd',
    'pot': 11,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 1,
    'winners': ['a', 'e', 'b']},
   {'a': 4, 'b': 3, 'e': 4}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2})],
 [('three-way odd units',
   {'button': 'c',
    'pot': 110,
    'seats': ['a', 'b', 'c', 'd', 'e'],
    'unit': 5,
    'winners': ['b', 'd', 'e']},
   {'b': 35, 'd': 40, 'e': 35}),
  ('two-way one unit',
   {'button': 'b', 'pot': 25, 'seats': ['a', 'b', 'c', 'd'], 'unit': 5, 'winners': ['a', 'c']},
   {'a': 10, 'c': 15}),
  ('even split',
   {'button': 'c', 'pot': 100, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['a', 'b']},
   {'a': 50, 'b': 50}),
  ('single winner',
   {'button': 'a', 'pot': 35, 'seats': ['a', 'b', 'c'], 'unit': 5, 'winners': ['c']}, {'c': 35}),
  ('four-way three odd',
   {'button': 'b',
    'pot': 19,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 1,
    'winners': ['a', 'b', 'c', 'd']},
   {'a': 5, 'b': 4, 'c': 5, 'd': 5}),
  ('large unit',
   {'button': 'a',
    'pot': 300,
    'seats': ['a', 'b', 'c', 'd', 'e', 'f'],
    'unit': 100,
    'winners': ['f', 'a']},
   {'a': 100, 'f': 200}),
  ('button left winner',
   {'button': 'a', 'pot': 5, 'seats': ['a', 'b', 'c'], 'unit': 1, 'winners': ['b', 'c']},
   {'b': 3, 'c': 2}),
  ('winner right of button',
   {'button': 'b', 'pot': 5, 'seats': ['a', 'b', 'c', 'd'], 'unit': 1, 'winners': ['a', 'c']},
   {'a': 2, 'c': 3})]]
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 fixtureActualExpectedOutcome
three-way odd units{'b': 35, 'd': 40, 'e': 35}{'b': 35, 'd': 40, 'e': 35}Passed
two-way one unit{'a': 10, 'c': 15}{'a': 10, 'c': 15}Passed
button is a winner{'a': 4, 'd': 3}{'a': 4, 'd': 3}Passed
even split{'a': 50, 'b': 50}{'a': 50, 'b': 50}Passed
wrap past last seat{'a': 4, 'b': 3, 'e': 4}{'a': 4, 'b': 3, 'e': 4}Passed
four-way three odd{'a': 5, 'b': 4, 'c': 5, 'd': 5}{'a': 5, 'b': 4, 'c': 5, 'd': 5}Passed
button left winner{'b': 3, 'c': 2}{'b': 3, 'c': 2}Passed
winner right of button{'a': 2, 'c': 3}{'a': 2, 'c': 3}Passed

SHA-256 / dff74d2fd22fab9b8ec58cf17ef129bfe2eb8ff54f065a8ca08ef45d13b95ea0

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

Case digest / d070b803c93deb313770265c11953021c70fa77ea5ffbcd91633d975f488eed8