{"abstract":"A player with a hidden pair is made to act first over a better board.","category":"Poker hand evaluation","checks":8,"contract":"Input: {\"seats\": [clockwise order from the dealer's left], \"hands\": {player: {\"up\": [...], \"down\": [...]}}, \"folded\": [...]}. On fourth street and later the live player with the best exposed hand acts first. Exposed hands rank by group shape (quads > trips > two pair > pair > no pair), then by group ranks; only up cards count. Exact ties go to the player earliest in seat order.","contract_signature":"x","evaluation_group":"w2-poker_hand_evaluation-stud-first-to-act","failed_approach":"Ranking the down cards alone ignores the board entirely.","family":"w2-poker_hand_evaluation-stud-first-to-act-exposed-cards-only","id":"FA-82251","implementations":{"attempt":{"sha256":"01c914f5c72cd97fbcd262acd05280246d1cd935e9cbdb54f70db1b2a6edc932","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport collections\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    def show(cards):\n        vals=sorted((R.index(c[0])+2 for c in cards), reverse=True)\n        cnt=collections.Counter(vals)\n        order=sorted(cnt, key=lambda v:(cnt[v],v), reverse=True)\n        shape=sorted(cnt.values(), reverse=True)\n        return (shape, order)\n    best=None; who=None\n    for p in x['seats']:\n        if p in x['folded']: continue\n        k=show(x['hands'][p]['down'])\n        if best is None or k>best: best, who = k, p\n    return who\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('pair beats ace king',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['7h', '7d']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['a', 'b', 'c']},\n   'b'),\n  ('hidden pair ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['Ac', 'Kc'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'a'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie seat order not name',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Qh', 'Qd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qs', 'Qc']}},\n    'seats': ['b', 'a']},\n   'b'),\n  ('folded best board',\n   {'folded': ['a'],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('trips beat two pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', 'Kd', 'Qc', 'Qs']},\n              'b': {'down': ['2d', '4d'], 'up': ['3h', '3d', '3s', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('high cards only',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', '9d', '4c']},\n              'b': {'down': ['2d', '4d'], 'up': ['Kc', 'Td', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('three-way tie later seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Jh', '7d']},\n              'b': {'down': ['2d', '4d'], 'up': ['Jc', '7h']},\n              'c': {'down': ['2h', '4h'], 'up': ['Js', '7c']}},\n    'seats': ['b', 'c', 'a']},\n   'b')],\n [('pair beats ace king',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['7h', '7d']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['a', 'b', 'c']},\n   'b'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie goes to earlier seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['As', 'Kc']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['c', 'a', 'b']},\n   'a'),\n  ('two pair beats pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad', 'Kc']},\n              'b': {'down': ['2d', '3d'], 'up': ['5h', '5d', '4c', '4s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('higher pair wins',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['8h', '8d', 'Ac']},\n              'b': {'down': ['2d', '3d'], 'up': ['9h', '9d', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('trips beat two pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', 'Kd', 'Qc', 'Qs']},\n              'b': {'down': ['2d', '4d'], 'up': ['3h', '3d', '3s', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('high cards only',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', '9d', '4c']},\n              'b': {'down': ['2d', '4d'], 'up': ['Kc', 'Td', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('three-way tie later seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Jh', '7d']},\n              'b': {'down': ['2d', '4d'], 'up': ['Jc', '7h']},\n              'c': {'down': ['2h', '4h'], 'up': ['Js', '7c']}},\n    'seats': ['b', 'c', 'a']},\n   'b')],\n [('pair beats ace king',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['7h', '7d']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['a', 'b', 'c']},\n   'b'),\n  ('hidden pair ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['Ac', 'Kc'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'a'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie goes to earlier seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['As', 'Kc']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['c', 'a', 'b']},\n   'a'),\n  ('tie seat order not name',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Qh', 'Qd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qs', 'Qc']}},\n    'seats': ['b', 'a']},\n   'b'),\n  ('folded best board',\n   {'folded': ['a'],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('two pair beats pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad', 'Kc']},\n              'b': {'down': ['2d', '3d'], 'up': ['5h', '5d', '4c', '4s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('higher pair wins',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['8h', '8d', 'Ac']},\n              'b': {'down': ['2d', '3d'], 'up': ['9h', '9d', '2s']}},\n    'seats': ['a', 'b']},\n   'b')],\n [('hidden pair ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['Ac', 'Kc'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'a'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie seat order not name',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Qh', 'Qd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qs', 'Qc']}},\n    'seats': ['b', 'a']},\n   'b'),\n  ('folded best board',\n   {'folded': ['a'],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('two pair beats pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad', 'Kc']},\n              'b': {'down': ['2d', '3d'], 'up': ['5h', '5d', '4c', '4s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('higher pair wins',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['8h', '8d', 'Ac']},\n              'b': {'down': ['2d', '3d'], 'up': ['9h', '9d', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('trips beat two pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', 'Kd', 'Qc', 'Qs']},\n              'b': {'down': ['2d', '4d'], 'up': ['3h', '3d', '3s', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('high cards only',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', '9d', '4c']},\n              'b': {'down': ['2d', '4d'], 'up': ['Kc', 'Td', '2s']}},\n    'seats': ['a', 'b']},\n   'b')],\n [('pair beats ace king',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['7h', '7d']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['a', 'b', 'c']},\n   'b'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie seat order not name',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Qh', 'Qd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qs', 'Qc']}},\n    'seats': ['b', 'a']},\n   'b'),\n  ('folded best board',\n   {'folded': ['a'],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('higher pair wins',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['8h', '8d', 'Ac']},\n              'b': {'down': ['2d', '3d'], 'up': ['9h', '9d', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('trips beat two pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', 'Kd', 'Qc', 'Qs']},\n              'b': {'down': ['2d', '4d'], 'up': ['3h', '3d', '3s', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('high cards only',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', '9d', '4c']},\n              'b': {'down': ['2d', '4d'], 'up': ['Kc', 'Td', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('three-way tie later seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Jh', '7d']},\n              'b': {'down': ['2d', '4d'], 'up': ['Jc', '7h']},\n              'c': {'down': ['2h', '4h'], 'up': ['Js', '7c']}},\n    'seats': ['b', 'c', 'a']},\n   'b')]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"ee1c1d36fca94c845d9373598b247a55d15756459da76a27e68a40b3e2992a41","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport collections\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    def show(cards):\n        vals=sorted((R.index(c[0])+2 for c in cards), reverse=True)\n        cnt=collections.Counter(vals)\n        order=sorted(cnt, key=lambda v:(cnt[v],v), reverse=True)\n        shape=sorted(cnt.values(), reverse=True)\n        return (shape, order)\n    best=None; who=None\n    for p in x['seats']:\n        if p in x['folded']: continue\n        k=show(x['hands'][p]['up']+x['hands'][p]['down'])\n        if best is None or k>best: best, who = k, p\n    return who\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('pair beats ace king',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['7h', '7d']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['a', 'b', 'c']},\n   'b'),\n  ('hidden pair ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['Ac', 'Kc'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'a'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie seat order not name',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Qh', 'Qd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qs', 'Qc']}},\n    'seats': ['b', 'a']},\n   'b'),\n  ('folded best board',\n   {'folded': ['a'],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('trips beat two pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', 'Kd', 'Qc', 'Qs']},\n              'b': {'down': ['2d', '4d'], 'up': ['3h', '3d', '3s', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('high cards only',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', '9d', '4c']},\n              'b': {'down': ['2d', '4d'], 'up': ['Kc', 'Td', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('three-way tie later seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Jh', '7d']},\n              'b': {'down': ['2d', '4d'], 'up': ['Jc', '7h']},\n              'c': {'down': ['2h', '4h'], 'up': ['Js', '7c']}},\n    'seats': ['b', 'c', 'a']},\n   'b')],\n [('pair beats ace king',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['7h', '7d']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['a', 'b', 'c']},\n   'b'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie goes to earlier seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['As', 'Kc']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['c', 'a', 'b']},\n   'a'),\n  ('two pair beats pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad', 'Kc']},\n              'b': {'down': ['2d', '3d'], 'up': ['5h', '5d', '4c', '4s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('higher pair wins',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['8h', '8d', 'Ac']},\n              'b': {'down': ['2d', '3d'], 'up': ['9h', '9d', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('trips beat two pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', 'Kd', 'Qc', 'Qs']},\n              'b': {'down': ['2d', '4d'], 'up': ['3h', '3d', '3s', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('high cards only',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', '9d', '4c']},\n              'b': {'down': ['2d', '4d'], 'up': ['Kc', 'Td', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('three-way tie later seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Jh', '7d']},\n              'b': {'down': ['2d', '4d'], 'up': ['Jc', '7h']},\n              'c': {'down': ['2h', '4h'], 'up': ['Js', '7c']}},\n    'seats': ['b', 'c', 'a']},\n   'b')],\n [('pair beats ace king',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['7h', '7d']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['a', 'b', 'c']},\n   'b'),\n  ('hidden pair ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['Ac', 'Kc'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'a'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie goes to earlier seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['As', 'Kc']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['c', 'a', 'b']},\n   'a'),\n  ('tie seat order not name',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Qh', 'Qd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qs', 'Qc']}},\n    'seats': ['b', 'a']},\n   'b'),\n  ('folded best board',\n   {'folded': ['a'],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('two pair beats pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad', 'Kc']},\n              'b': {'down': ['2d', '3d'], 'up': ['5h', '5d', '4c', '4s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('higher pair wins',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['8h', '8d', 'Ac']},\n              'b': {'down': ['2d', '3d'], 'up': ['9h', '9d', '2s']}},\n    'seats': ['a', 'b']},\n   'b')],\n [('hidden pair ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['Ac', 'Kc'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'a'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie seat order not name',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Qh', 'Qd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qs', 'Qc']}},\n    'seats': ['b', 'a']},\n   'b'),\n  ('folded best board',\n   {'folded': ['a'],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('two pair beats pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad', 'Kc']},\n              'b': {'down': ['2d', '3d'], 'up': ['5h', '5d', '4c', '4s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('higher pair wins',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['8h', '8d', 'Ac']},\n              'b': {'down': ['2d', '3d'], 'up': ['9h', '9d', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('trips beat two pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', 'Kd', 'Qc', 'Qs']},\n              'b': {'down': ['2d', '4d'], 'up': ['3h', '3d', '3s', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('high cards only',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', '9d', '4c']},\n              'b': {'down': ['2d', '4d'], 'up': ['Kc', 'Td', '2s']}},\n    'seats': ['a', 'b']},\n   'b')],\n [('pair beats ace king',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Kd']},\n              'b': {'down': ['2d', '3d'], 'up': ['7h', '7d']},\n              'c': {'down': ['2h', '3h'], 'up': ['9h', '4d']}},\n    'seats': ['a', 'b', 'c']},\n   'b'),\n  ('hidden trips ignored',\n   {'folded': [],\n    'hands': {'a': {'down': ['9c', '9s'], 'up': ['9h', '4d']},\n              'b': {'down': ['5d', '3d'], 'up': ['Th', '2d']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('tie seat order not name',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Qh', 'Qd']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qs', 'Qc']}},\n    'seats': ['b', 'a']},\n   'b'),\n  ('folded best board',\n   {'folded': ['a'],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Ah', 'Ad']},\n              'b': {'down': ['2d', '3d'], 'up': ['Qh', 'Jd']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('higher pair wins',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['8h', '8d', 'Ac']},\n              'b': {'down': ['2d', '3d'], 'up': ['9h', '9d', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('trips beat two pair',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', 'Kd', 'Qc', 'Qs']},\n              'b': {'down': ['2d', '4d'], 'up': ['3h', '3d', '3s', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('high cards only',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Kh', '9d', '4c']},\n              'b': {'down': ['2d', '4d'], 'up': ['Kc', 'Td', '2s']}},\n    'seats': ['a', 'b']},\n   'b'),\n  ('three-way tie later seat',\n   {'folded': [],\n    'hands': {'a': {'down': ['2c', '3c'], 'up': ['Jh', '7d']},\n              'b': {'down': ['2d', '4d'], 'up': ['Jc', '7h']},\n              'c': {'down': ['2h', '4h'], 'up': ['Js', '7c']}},\n    'seats': ['b', 'c', 'a']},\n   'b')]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-poker_hand_evaluation-stud-first-to-act-exposed-cards-only","generated_at":"2026-09-29T14:50:10.324114+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Acting order on later stud streets follows the best board, not position.","root_cause":"The exposed-hand ranking includes the face-down cards.","sha256":"b5c7038002b85228962a129ce77c207edf0d2f017c717d4833f92a0483c2e409","title":"Hole cards influence the stud acting order · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.235,"exit_code":1,"observations":[{"actual":"a","check":"pair beats ace king","expected":"b","passed":false},{"actual":"a","check":"hidden pair ignored","expected":"a","passed":true},{"actual":"a","check":"hidden trips ignored","expected":"b","passed":false},{"actual":"b","check":"tie seat order not name","expected":"b","passed":true},{"actual":"b","check":"folded best board","expected":"b","passed":true},{"actual":"b","check":"trips beat two pair","expected":"b","passed":true},{"actual":"b","check":"high cards only","expected":"b","passed":true},{"actual":"b","check":"three-way tie later seat","expected":"b","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"pair beats ace king\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"hidden pair ignored\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"hidden trips ignored\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"tie seat order not name\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"folded best board\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"trips beat two pair\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"high cards only\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"three-way tie later seat\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.827,"exit_code":1,"observations":[{"actual":"b","check":"pair beats ace king","expected":"b","passed":true},{"actual":"a","check":"hidden pair ignored","expected":"a","passed":true},{"actual":"a","check":"hidden trips ignored","expected":"b","passed":false},{"actual":"b","check":"tie seat order not name","expected":"b","passed":true},{"actual":"b","check":"folded best board","expected":"b","passed":true},{"actual":"b","check":"trips beat two pair","expected":"b","passed":true},{"actual":"b","check":"high cards only","expected":"b","passed":true},{"actual":"b","check":"three-way tie later seat","expected":"b","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"pair beats ace king\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"hidden pair ignored\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"hidden trips ignored\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"tie seat order not name\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"folded best board\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"trips beat two pair\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"high cards only\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"three-way tie later seat\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}