FAILURE MAP
← Case archive

FA-81906 / Poker hand evaluation / Open access

Ace counted high kills the wheel low · case 01

A-2-3-4-5 fails to qualify for low and loses to 7-5-4-3-2.

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

ROOT CAUSE

The low evaluator reuses the high-hand rank table, so the ace is worth 14.

THE FAILURE

The low evaluator reuses the high-hand rank table, so the ace is worth 14.

Unsuccessful approach: Shifting every rank down by one makes the ace 13 and still leaves it the highest card.

Case contract

Input: {"a": five cards, "b": five cards}. Ace-to-five low: aces count 1, straights and flushes are ignored, any paired rank disqualifies, the highest card must be 8 or lower to qualify. Compare qualifying lows from the highest card downward; lower wins. Return "a", "b", "tie", or "none" when neither qualifies.

Why this case matters

Hi-lo split games award half the pot from this low comparison.

1 / The failure

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

N = 1
observations = []
def solve(x):
    R='23456789TJQKA'
    def low(h):
        vals=sorted({R.index(c[0])+2 for c in h}, reverse=True)
        if len(vals)<5: return None
        if vals[0]>8: return None
        return vals
    la,lb=low(x['a']),low(x['b'])
    if la is None and lb is None: return 'none'
    if la is None: return 'b'
    if lb is None: return 'a'
    if la==lb: return 'tie'
    return 'a' if la<lb else 'b'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a')],
 [('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('flush low', {'a': ['2c', '4c', '5c', '6c', '7c'], 'b': ['8d', '6h', '5d', '4s', '2d']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie'),
  ('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
   'none'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a')]]
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
wheel is best lowbaFailed
ace low vs eight lowbbPassed
pair disqualifiesnonenonePassed
eight low qualifiesaaPassed
nine low missesnonenonePassed
compare from top cardnonebFailed
sum trapbbPassed
six-high straight lowaaPassed

SHA-256 / b0bd7d205bc1188de8b1d2a2df56cbcb0401d2ff42505a5fd26eb0997c31dabb

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    R='23456789TJQKA'
    def low(h):
        vals=sorted({R.index(c[0])+1 for c in h}, reverse=True)
        if len(vals)<5: return None
        if vals[0]>8: return None
        return vals
    la,lb=low(x['a']),low(x['b'])
    if la is None and lb is None: return 'none'
    if la is None: return 'b'
    if lb is None: return 'a'
    if la==lb: return 'tie'
    return 'a' if la<lb else 'b'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a')],
 [('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('flush low', {'a': ['2c', '4c', '5c', '6c', '7c'], 'b': ['8d', '6h', '5d', '4s', '2d']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie'),
  ('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
   'none'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a')]]
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
wheel is best lowbaFailed
ace low vs eight lowbbPassed
pair disqualifiesnonenonePassed
eight low qualifiesaaPassed
nine low missesanoneFailed
compare from top cardnonebFailed
sum trapbbPassed
six-high straight lowaaPassed

SHA-256 / c1611583f57a1dc1df97a5fc4238d3959b11797bdc54de2edd673334d40f29e1

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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

Case digest / e4e9fbe038d5418a649a774b1f8acad815943bdb56c4b05cb4b9609b4b085224