{"abstract":"With identical boards, the player whose name sorts first acts, not the earliest seat.","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":"Scanning seats in reverse keeps the latest seat on ties.","family":"w2-poker_hand_evaluation-stud-first-to-act-tie-resolution-by-seat","id":"FA-82256","implementations":{"attempt":{"sha256":"c9b9e8ac6d448793c256601f79b1ff6e70311844a4818f7c3224046bfeb230df","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 reversed(x['seats']):\n        if p in x['folded']: 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  ('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 [('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  ('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  ('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 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  ('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":"54b8650c0a2e38c86c12ed90f75ff83c09fb9b9c6009b76f9bba494e1c635b87","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 sorted(x['hands']):\n        if p in x['folded']: 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  ('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 [('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  ('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  ('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 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  ('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-tie-resolution-by-seat","generated_at":"2026-09-29T14:50:10.449594+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 scanned in name order, so the strict comparison keeps the alphabetically first tie.","sha256":"b3267d8ea3dd1eb80b998bb705671901b699ed3817371d01e8210b3fc8840ca2","title":"Equal boards resolved alphabetically · 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.784,"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":"b","check":"tie goes to earlier seat","expected":"a","passed":false},{"actual":"a","check":"tie seat order not name","expected":"b","passed":false},{"actual":"b","check":"folded best board","expected":"b","passed":true},{"actual":"b","check":"two pair beats pair","expected":"b","passed":true},{"actual":"a","check":"three-way tie later seat","expected":"b","passed":false}],"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\": \"b\", \"expected\": \"a\", \"passed\": false}, {\"check\": \"tie seat order not name\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"folded best board\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"two pair beats pair\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"three-way tie later seat\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.257,"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":"a","check":"tie seat order not name","expected":"b","passed":false},{"actual":"b","check":"folded best board","expected":"b","passed":true},{"actual":"b","check":"two pair beats pair","expected":"b","passed":true},{"actual":"a","check":"three-way tie later seat","expected":"b","passed":false}],"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\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"folded best board\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"two pair beats pair\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"three-way tie later seat\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}], \"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."}}