{"abstract":"A player who folded a pair of aces is named first to act.","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":"Slicing the folded list skips its first entry.","family":"w2-poker_hand_evaluation-stud-first-to-act-folded-players-skipped","id":"FA-82261","implementations":{"attempt":{"sha256":"d099828b5dab4e6f2b83c1d03d1f792250d4a0206837cb1a7ba258d92f4e0eea","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'][1:]: continue\n        k=show(x['hands'][p]['up'])\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 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 [('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  ('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  ('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')],\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  ('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 [('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  ('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')]]\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":"1102948c43fa8526af2163f9b7cb665e88956aade0583acaa1c53b5306552e44","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 not x['hands'][p]['up']: continue\n        k=show(x['hands'][p]['up'])\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 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 [('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  ('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  ('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')],\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  ('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 [('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  ('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')]]\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-folded-players-skipped","generated_at":"2026-09-29T14:50:10.498590+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":"Players are skipped only if they have no up cards; folded players keep their exposed cards in the record.","sha256":"1df531a17eb621225688140560d57e3cc0ddd8b5b84380b0506825131aa03c20","title":"Folded board still acts first · 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":40.776,"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":"b","check":"hidden trips ignored","expected":"b","passed":true},{"actual":"a","check":"tie goes to earlier seat","expected":"a","passed":true},{"actual":"b","check":"tie seat order not name","expected":"b","passed":true},{"actual":"a","check":"folded best board","expected":"b","passed":false},{"actual":"b","check":"two pair beats pair","expected":"b","passed":true},{"actual":"b","check":"higher pair wins","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\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"tie goes to earlier seat\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"tie seat order not name\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"folded best board\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"two pair beats pair\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"higher pair wins\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.351,"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":"b","check":"hidden trips ignored","expected":"b","passed":true},{"actual":"a","check":"tie goes to earlier seat","expected":"a","passed":true},{"actual":"b","check":"tie seat order not name","expected":"b","passed":true},{"actual":"a","check":"folded best board","expected":"b","passed":false},{"actual":"b","check":"two pair beats pair","expected":"b","passed":true},{"actual":"b","check":"higher pair wins","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\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"tie goes to earlier seat\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"tie seat order not name\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"folded best board\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"two pair beats pair\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"higher pair wins\", \"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."}}