FAILURE MAP
← Case archive

FA-81996 / Poker hand evaluation / Open access

Omaha hand plays four hole cards or the bare board · case 01

A single suited hole card makes a flush on a four-flush board, and four aces in hand count as quads.

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

ROOT CAUSE

Candidates are drawn from any five of the hole and board cards, the hold'em rule.

VERIFIED REPAIR

Build candidates from exactly two hole cards and exactly three board cards.

Unsuccessful approach: Adding the five-board-card candidate still lets the board play, which Omaha forbids.

Case contract

Input: {"variant": "plo" (4 hole cards) or "plo5" (5 hole cards), "hole": [...], "board": 3 to 5 cards}. The hand must use exactly two hole cards and exactly three board cards. Return the best category name, or "invalid" for a wrong hole count, a board outside 3-5 cards, or a duplicated card.

Why this case matters

Poker engines settle real money pots from these comparisons; a single misranked hand pays the wrong seat.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import collections
import itertools
N = 1
observations = []
def solve(x):
    R='23456789TJQKA'
    def key5(h):
        vals=sorted((R.index(c[0])+2 for c in h), reverse=True)
        cnt=collections.Counter(vals)
        order=sorted(cnt, key=lambda v:(cnt[v],v), reverse=True)
        shape=sorted(cnt.values(), reverse=True)
        flush=len({c[1] for c in h})==1
        straight=len(cnt)==5 and (vals[0]-vals[4]==4 or vals==[14,5,4,3,2])
        top=5 if vals==[14,5,4,3,2] else vals[0]
        if straight and flush: return (8,[top])
        if shape==[4,1]: return (7,order)
        if shape==[3,2]: return (6,order)
        if flush: return (5,vals)
        if straight: return (4,[top])
        if shape==[3,1,1]: return (3,order)
        if shape==[2,2,1]: return (2,order)
        if shape==[2,1,1,1]: return (1,order)
        return (0,vals)
    
    NAMES=['high card','one pair','two pair','three of a kind','straight','flush','full house','four of a kind','straight flush']
    hole=x['hole']; board=x['board']
    if len(hole)!={'plo':4,'plo5':5}[x['variant']]: return 'invalid'
    if not 3<=len(board)<=5: return 'invalid'
    allc=hole+board
    if len(set(allc))!=len(allc): return 'invalid'
    cands=list(itertools.combinations(hole+board,5))
    return NAMES[max(key5(c) for c in cands)[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'invalid'),
  ('plo with five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},
   'invalid'),
  ('plo5 with four holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),
  ('duplicate across hole and board',
   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('plo with five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},
   'invalid'),
  ('plo5 with four holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),
  ('duplicate across hole and board',
   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate inside hole',
   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate on board',
   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('duplicate inside hole',
   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate on board',
   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('six card board',
   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],
    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],
    'variant': 'plo'},
   'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('full house two pairs in hand',
   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},
   'three of a kind')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'invalid'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('full house two pairs in hand',
   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},
   'three of a kind')]]
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
board flush one suited hole cardflushhigh cardFailed
board straightstraightone pairFailed
real flushflushflushPassed
turn boardone pairone pairPassed
two card boardinvalidinvalidPassed
plo with five holesinvalidinvalidPassed
plo5 with four holesinvalidinvalidPassed
duplicate across hole and boardinvalidinvalidPassed

SHA-256 / cde5cccb35a0a038f69ab9d1dc9fac4fb4a15eb7e8444e8836428e34b3880d0a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import collections
import itertools
N = 1
observations = []
def solve(x):
    R='23456789TJQKA'
    def key5(h):
        vals=sorted((R.index(c[0])+2 for c in h), reverse=True)
        cnt=collections.Counter(vals)
        order=sorted(cnt, key=lambda v:(cnt[v],v), reverse=True)
        shape=sorted(cnt.values(), reverse=True)
        flush=len({c[1] for c in h})==1
        straight=len(cnt)==5 and (vals[0]-vals[4]==4 or vals==[14,5,4,3,2])
        top=5 if vals==[14,5,4,3,2] else vals[0]
        if straight and flush: return (8,[top])
        if shape==[4,1]: return (7,order)
        if shape==[3,2]: return (6,order)
        if flush: return (5,vals)
        if straight: return (4,[top])
        if shape==[3,1,1]: return (3,order)
        if shape==[2,2,1]: return (2,order)
        if shape==[2,1,1,1]: return (1,order)
        return (0,vals)
    
    NAMES=['high card','one pair','two pair','three of a kind','straight','flush','full house','four of a kind','straight flush']
    hole=x['hole']; board=x['board']
    if len(hole)!={'plo':4,'plo5':5}[x['variant']]: return 'invalid'
    if not 3<=len(board)<=5: return 'invalid'
    allc=hole+board
    if len(set(allc))!=len(allc): return 'invalid'
    cands=[hc+bc for hc in itertools.combinations(hole,2) for bc in itertools.combinations(board,3)]+list(itertools.combinations(board,5))
    return NAMES[max(key5(c) for c in cands)[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'invalid'),
  ('plo with five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},
   'invalid'),
  ('plo5 with four holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),
  ('duplicate across hole and board',
   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('plo with five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},
   'invalid'),
  ('plo5 with four holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),
  ('duplicate across hole and board',
   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate inside hole',
   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate on board',
   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('duplicate inside hole',
   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate on board',
   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('six card board',
   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],
    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],
    'variant': 'plo'},
   'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('full house two pairs in hand',
   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},
   'three of a kind')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'invalid'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('full house two pairs in hand',
   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},
   'three of a kind')]]
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
board flush one suited hole cardflushhigh cardFailed
board straightstraightone pairFailed
real flushflushflushPassed
turn boardone pairone pairPassed
two card boardinvalidinvalidPassed
plo with five holesinvalidinvalidPassed
plo5 with four holesinvalidinvalidPassed
duplicate across hole and boardinvalidinvalidPassed

SHA-256 / 8b45e844e4d6b1bf06024833eac44ad68193f1ff6994bc595de97f76826c56f9

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import collections
import itertools
N = 1
observations = []
def solve(x):
    R='23456789TJQKA'
    def key5(h):
        vals=sorted((R.index(c[0])+2 for c in h), reverse=True)
        cnt=collections.Counter(vals)
        order=sorted(cnt, key=lambda v:(cnt[v],v), reverse=True)
        shape=sorted(cnt.values(), reverse=True)
        flush=len({c[1] for c in h})==1
        straight=len(cnt)==5 and (vals[0]-vals[4]==4 or vals==[14,5,4,3,2])
        top=5 if vals==[14,5,4,3,2] else vals[0]
        if straight and flush: return (8,[top])
        if shape==[4,1]: return (7,order)
        if shape==[3,2]: return (6,order)
        if flush: return (5,vals)
        if straight: return (4,[top])
        if shape==[3,1,1]: return (3,order)
        if shape==[2,2,1]: return (2,order)
        if shape==[2,1,1,1]: return (1,order)
        return (0,vals)
    
    NAMES=['high card','one pair','two pair','three of a kind','straight','flush','full house','four of a kind','straight flush']
    hole=x['hole']; board=x['board']
    if len(hole)!={'plo':4,'plo5':5}[x['variant']]: return 'invalid'
    if not 3<=len(board)<=5: return 'invalid'
    allc=hole+board
    if len(set(allc))!=len(allc): return 'invalid'
    cands=[hc+bc for hc in itertools.combinations(hole,2) for bc in itertools.combinations(board,3)]
    return NAMES[max(key5(c) for c in cands)[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'invalid'),
  ('plo with five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},
   'invalid'),
  ('plo5 with four holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),
  ('duplicate across hole and board',
   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('plo with five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},
   'invalid'),
  ('plo5 with four holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),
  ('duplicate across hole and board',
   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate inside hole',
   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate on board',
   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('duplicate inside hole',
   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('duplicate on board',
   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),
  ('six card board',
   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],
    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],
    'variant': 'plo'},
   'invalid')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('four aces in hand',
   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('full house two pairs in hand',
   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},
   'three of a kind')],
 [('board flush one suited hole card',
   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},
   'high card'),
  ('board straight',
   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},
   'one pair'),
  ('real flush',
   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},
   'flush'),
  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'three of a kind'),
  ('turn board',
   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},
   'one pair'),
  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},
   'invalid'),
  ('plo5 five holes',
   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},
   'three of a kind'),
  ('full house two pairs in hand',
   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},
   'three of a kind')]]
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
board flush one suited hole cardhigh cardhigh cardPassed
board straightone pairone pairPassed
real flushflushflushPassed
turn boardone pairone pairPassed
two card boardinvalidinvalidPassed
plo with five holesinvalidinvalidPassed
plo5 with four holesinvalidinvalidPassed
duplicate across hole and boardinvalidinvalidPassed

SHA-256 / 68584bdbf1284f0e4f698641f8e8e1748a017522cdef98c0250d18d04a6396cc

Verification & scope

A deterministic toy model with an explicitly stated contract; card strings are rank+suit (for example "As", "Td"); 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.197521+00:00.

Case digest / 350e9d85f1807d6c2323adea23d4b04afd261cd8632869bac4dfb3f67b400d22