{"abstract":"Threes full of aces loses to kings full of deuces, and a pair of deuces with K-Q-J beats a pair of treys.","category":"Poker hand evaluation","checks":8,"contract":"Input: [hand_a, hand_b], each five distinct cards \"Rs\" (ranks 23456789TJQKA, suits cdhs). Return 1 if hand_a wins, -1 if hand_b wins, 0 for a split. Categories rank in the standard order; within a category compare rank groups by (group size, rank) descending; a wheel straight is five-high; suits never break ties.","evaluation_group":"w2-poker_hand_evaluation-heads-up-comparator","failed_approach":"Using (rank, size) as the key still lets rank dominate group size.","family":"w2-poker_hand_evaluation-heads-up-comparator-group-ordering-key","id":"FA-81886","implementations":{"attempt":{"sha256":"7da1de71707099a3e4897a4059bf2403e28acb2b68c1caa1577b1c266f337dc5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport collections\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    def key(h):\n        vals=[R.index(c[0])+2 for c in h]\n        cnt=collections.Counter(vals)\n        groups=sorted(cnt.items(), key=lambda kv:(kv[0],kv[1]), reverse=True)\n        ranks=[v for v,n in groups]\n        shape=[n for v,n in groups]\n        flush=len({c[1] for c in h})==1\n        straight=len(cnt)==5 and (max(vals)-min(vals)==4 or sorted(vals)==[2,3,4,5,14])\n        if straight:\n            ranks=[5] if sorted(vals)==[2,3,4,5,14] else [max(vals)]\n        if straight and flush: cat=8\n        elif shape==[4,1]: cat=7\n        elif shape==[3,2]: cat=6\n        elif flush: cat=5\n        elif straight: cat=4\n        elif shape==[3,1,1]: cat=3\n        elif shape==[2,2,1]: cat=2\n        elif shape==[2,1,1,1]: cat=1\n        else: cat=0\n        return (cat, ranks)\n    a,b=key(x[0]),key(x[1])\n    return (a>b)-(a<b)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('wheel vs six-high straight', [['Ah', '2d', '3c', '4s', '5h'], ['2h', '3d', '4c', '5s', '6h']],\n   -1),\n  ('six-high vs wheel', [['2c', '3h', '4d', '5c', '6s'], ['As', '2c', '3d', '4h', '5d']], 1),\n  ('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('full house trips first', [['3h', '3d', '3c', 'As', 'Ah'], ['Kh', 'Kd', '2c', '2s', '2h']], 1),\n  ('identical ranks different suits',\n   [['Ah', 'Kd', '9c', '7s', '4h'], ['As', 'Kc', '9d', '7h', '4d']], 0),\n  ('split straights', [['9h', 'Td', 'Jc', 'Qs', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 0),\n  ('flush beats straight', [['2h', '7h', '9h', 'Jh', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1)],\n [('identical ranks different suits',\n   [['Ah', 'Kd', '9c', '7s', '4h'], ['As', 'Kc', '9d', '7h', '4d']], 0),\n  ('split straights', [['9h', 'Td', 'Jc', 'Qs', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 0),\n  ('flush beats straight', [['2h', '7h', '9h', 'Jh', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 1),\n  ('straight loses to flush', [['9s', 'Tc', 'Jd', 'Qh', 'Kd'], ['2c', '5c', '8c', 'Tc', 'Qc']], -1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('paired span vs two pair', [['5h', '5d', '6c', '7s', '9h'], ['3h', '3d', '2c', '2s', 'Kh']], -1),\n  ('two pair vs paired span', [['Jh', 'Jd', '2c', '2s', 'Kh'], ['8h', '8d', '6c', '7s', '9h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']],\n   1)],\n [('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('straight loses to flush', [['9s', 'Tc', 'Jd', 'Qh', 'Kd'], ['2c', '5c', '8c', 'Tc', 'Qc']], -1),\n  ('paired span vs two pair', [['5h', '5d', '6c', '7s', '9h'], ['3h', '3d', '2c', '2s', 'Kh']], -1),\n  ('two pair vs paired span', [['Jh', 'Jd', '2c', '2s', 'Kh'], ['8h', '8d', '6c', '7s', '9h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('kicker decides pair', [['Qh', 'Qd', 'Ac', '4s', '2h'], ['Qs', 'Qc', 'Kc', '9s', '8h']], 1),\n  ('trips vs two pair', [['7h', '7d', '7c', '2s', '3h'], ['Ah', 'Ad', 'Kc', 'Ks', '2h']], 1),\n  ('quads vs full house', [['4h', '4d', '4c', '4s', '2h'], ['Ah', 'Ad', 'Ac', 'Ks', 'Kh']], 1)],\n [('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('kicker decides pair', [['Qh', 'Qd', 'Ac', '4s', '2h'], ['Qs', 'Qc', 'Kc', '9s', '8h']], 1),\n  ('trips vs two pair', [['7h', '7d', '7c', '2s', '3h'], ['Ah', 'Ad', 'Kc', 'Ks', '2h']], 1),\n  ('quads vs full house', [['4h', '4d', '4c', '4s', '2h'], ['Ah', 'Ad', 'Ac', 'Ks', 'Kh']], 1),\n  ('high card ace vs king', [['Ah', '9d', '7c', '4s', '2h'], ['Kh', 'Qd', 'Jc', '9s', '7h']], 1),\n  ('broadway vs wheel', [['Th', 'Jd', 'Qc', 'Ks', 'Ah'], ['As', '2c', '3d', '4h', '5d']], 1)],\n [('wheel vs six-high straight', [['Ah', '2d', '3c', '4s', '5h'], ['2h', '3d', '4c', '5s', '6h']],\n   -1),\n  ('six-high vs wheel', [['2c', '3h', '4d', '5c', '6s'], ['As', '2c', '3d', '4h', '5d']], 1),\n  ('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('full house trips first', [['3h', '3d', '3c', 'As', 'Ah'], ['Kh', 'Kd', '2c', '2s', '2h']], 1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('high card ace vs king', [['Ah', '9d', '7c', '4s', '2h'], ['Kh', 'Qd', 'Jc', '9s', '7h']], 1),\n  ('broadway vs wheel', [['Th', 'Jd', 'Qc', 'Ks', 'Ah'], ['As', '2c', '3d', '4h', '5d']], 1)]]\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":"0a17b18326509bd3f7faf991b7ae1b05ba4c1e557344c7f60091953eb6f53e4b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport collections\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    def key(h):\n        vals=[R.index(c[0])+2 for c in h]\n        cnt=collections.Counter(vals)\n        groups=sorted(cnt.items(), key=lambda kv:kv[0], reverse=True)\n        ranks=[v for v,n in groups]\n        shape=[n for v,n in groups]\n        flush=len({c[1] for c in h})==1\n        straight=len(cnt)==5 and (max(vals)-min(vals)==4 or sorted(vals)==[2,3,4,5,14])\n        if straight:\n            ranks=[5] if sorted(vals)==[2,3,4,5,14] else [max(vals)]\n        if straight and flush: cat=8\n        elif shape==[4,1]: cat=7\n        elif shape==[3,2]: cat=6\n        elif flush: cat=5\n        elif straight: cat=4\n        elif shape==[3,1,1]: cat=3\n        elif shape==[2,2,1]: cat=2\n        elif shape==[2,1,1,1]: cat=1\n        else: cat=0\n        return (cat, ranks)\n    a,b=key(x[0]),key(x[1])\n    return (a>b)-(a<b)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('wheel vs six-high straight', [['Ah', '2d', '3c', '4s', '5h'], ['2h', '3d', '4c', '5s', '6h']],\n   -1),\n  ('six-high vs wheel', [['2c', '3h', '4d', '5c', '6s'], ['As', '2c', '3d', '4h', '5d']], 1),\n  ('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('full house trips first', [['3h', '3d', '3c', 'As', 'Ah'], ['Kh', 'Kd', '2c', '2s', '2h']], 1),\n  ('identical ranks different suits',\n   [['Ah', 'Kd', '9c', '7s', '4h'], ['As', 'Kc', '9d', '7h', '4d']], 0),\n  ('split straights', [['9h', 'Td', 'Jc', 'Qs', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 0),\n  ('flush beats straight', [['2h', '7h', '9h', 'Jh', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1)],\n [('identical ranks different suits',\n   [['Ah', 'Kd', '9c', '7s', '4h'], ['As', 'Kc', '9d', '7h', '4d']], 0),\n  ('split straights', [['9h', 'Td', 'Jc', 'Qs', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 0),\n  ('flush beats straight', [['2h', '7h', '9h', 'Jh', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 1),\n  ('straight loses to flush', [['9s', 'Tc', 'Jd', 'Qh', 'Kd'], ['2c', '5c', '8c', 'Tc', 'Qc']], -1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('paired span vs two pair', [['5h', '5d', '6c', '7s', '9h'], ['3h', '3d', '2c', '2s', 'Kh']], -1),\n  ('two pair vs paired span', [['Jh', 'Jd', '2c', '2s', 'Kh'], ['8h', '8d', '6c', '7s', '9h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']],\n   1)],\n [('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('straight loses to flush', [['9s', 'Tc', 'Jd', 'Qh', 'Kd'], ['2c', '5c', '8c', 'Tc', 'Qc']], -1),\n  ('paired span vs two pair', [['5h', '5d', '6c', '7s', '9h'], ['3h', '3d', '2c', '2s', 'Kh']], -1),\n  ('two pair vs paired span', [['Jh', 'Jd', '2c', '2s', 'Kh'], ['8h', '8d', '6c', '7s', '9h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('kicker decides pair', [['Qh', 'Qd', 'Ac', '4s', '2h'], ['Qs', 'Qc', 'Kc', '9s', '8h']], 1),\n  ('trips vs two pair', [['7h', '7d', '7c', '2s', '3h'], ['Ah', 'Ad', 'Kc', 'Ks', '2h']], 1),\n  ('quads vs full house', [['4h', '4d', '4c', '4s', '2h'], ['Ah', 'Ad', 'Ac', 'Ks', 'Kh']], 1)],\n [('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('kicker decides pair', [['Qh', 'Qd', 'Ac', '4s', '2h'], ['Qs', 'Qc', 'Kc', '9s', '8h']], 1),\n  ('trips vs two pair', [['7h', '7d', '7c', '2s', '3h'], ['Ah', 'Ad', 'Kc', 'Ks', '2h']], 1),\n  ('quads vs full house', [['4h', '4d', '4c', '4s', '2h'], ['Ah', 'Ad', 'Ac', 'Ks', 'Kh']], 1),\n  ('high card ace vs king', [['Ah', '9d', '7c', '4s', '2h'], ['Kh', 'Qd', 'Jc', '9s', '7h']], 1),\n  ('broadway vs wheel', [['Th', 'Jd', 'Qc', 'Ks', 'Ah'], ['As', '2c', '3d', '4h', '5d']], 1)],\n [('wheel vs six-high straight', [['Ah', '2d', '3c', '4s', '5h'], ['2h', '3d', '4c', '5s', '6h']],\n   -1),\n  ('six-high vs wheel', [['2c', '3h', '4d', '5c', '6s'], ['As', '2c', '3d', '4h', '5d']], 1),\n  ('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('full house trips first', [['3h', '3d', '3c', 'As', 'Ah'], ['Kh', 'Kd', '2c', '2s', '2h']], 1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('high card ace vs king', [['Ah', '9d', '7c', '4s', '2h'], ['Kh', 'Qd', 'Jc', '9s', '7h']], 1),\n  ('broadway vs wheel', [['Th', 'Jd', 'Qc', 'Ks', 'Ah'], ['As', '2c', '3d', '4h', '5d']], 1)]]\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"},"fixed":{"sha256":"e06a23056c9bc244e8429bef15c20fe74e28af3f6dc35eb6da5473b90898f3f3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport collections\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    def key(h):\n        vals=[R.index(c[0])+2 for c in h]\n        cnt=collections.Counter(vals)\n        groups=sorted(cnt.items(), key=lambda kv:(kv[1],kv[0]), reverse=True)\n        ranks=[v for v,n in groups]\n        shape=[n for v,n in groups]\n        flush=len({c[1] for c in h})==1\n        straight=len(cnt)==5 and (max(vals)-min(vals)==4 or sorted(vals)==[2,3,4,5,14])\n        if straight:\n            ranks=[5] if sorted(vals)==[2,3,4,5,14] else [max(vals)]\n        if straight and flush: cat=8\n        elif shape==[4,1]: cat=7\n        elif shape==[3,2]: cat=6\n        elif flush: cat=5\n        elif straight: cat=4\n        elif shape==[3,1,1]: cat=3\n        elif shape==[2,2,1]: cat=2\n        elif shape==[2,1,1,1]: cat=1\n        else: cat=0\n        return (cat, ranks)\n    a,b=key(x[0]),key(x[1])\n    return (a>b)-(a<b)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('wheel vs six-high straight', [['Ah', '2d', '3c', '4s', '5h'], ['2h', '3d', '4c', '5s', '6h']],\n   -1),\n  ('six-high vs wheel', [['2c', '3h', '4d', '5c', '6s'], ['As', '2c', '3d', '4h', '5d']], 1),\n  ('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('full house trips first', [['3h', '3d', '3c', 'As', 'Ah'], ['Kh', 'Kd', '2c', '2s', '2h']], 1),\n  ('identical ranks different suits',\n   [['Ah', 'Kd', '9c', '7s', '4h'], ['As', 'Kc', '9d', '7h', '4d']], 0),\n  ('split straights', [['9h', 'Td', 'Jc', 'Qs', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 0),\n  ('flush beats straight', [['2h', '7h', '9h', 'Jh', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1)],\n [('identical ranks different suits',\n   [['Ah', 'Kd', '9c', '7s', '4h'], ['As', 'Kc', '9d', '7h', '4d']], 0),\n  ('split straights', [['9h', 'Td', 'Jc', 'Qs', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 0),\n  ('flush beats straight', [['2h', '7h', '9h', 'Jh', 'Kh'], ['9s', 'Tc', 'Jd', 'Qh', 'Kd']], 1),\n  ('straight loses to flush', [['9s', 'Tc', 'Jd', 'Qh', 'Kd'], ['2c', '5c', '8c', 'Tc', 'Qc']], -1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('paired span vs two pair', [['5h', '5d', '6c', '7s', '9h'], ['3h', '3d', '2c', '2s', 'Kh']], -1),\n  ('two pair vs paired span', [['Jh', 'Jd', '2c', '2s', 'Kh'], ['8h', '8d', '6c', '7s', '9h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']],\n   1)],\n [('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('straight loses to flush', [['9s', 'Tc', 'Jd', 'Qh', 'Kd'], ['2c', '5c', '8c', 'Tc', 'Qc']], -1),\n  ('paired span vs two pair', [['5h', '5d', '6c', '7s', '9h'], ['3h', '3d', '2c', '2s', 'Kh']], -1),\n  ('two pair vs paired span', [['Jh', 'Jd', '2c', '2s', 'Kh'], ['8h', '8d', '6c', '7s', '9h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('kicker decides pair', [['Qh', 'Qd', 'Ac', '4s', '2h'], ['Qs', 'Qc', 'Kc', '9s', '8h']], 1),\n  ('trips vs two pair', [['7h', '7d', '7c', '2s', '3h'], ['Ah', 'Ad', 'Kc', 'Ks', '2h']], 1),\n  ('quads vs full house', [['4h', '4d', '4c', '4s', '2h'], ['Ah', 'Ad', 'Ac', 'Ks', 'Kh']], 1)],\n [('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('kicker decides pair', [['Qh', 'Qd', 'Ac', '4s', '2h'], ['Qs', 'Qc', 'Kc', '9s', '8h']], 1),\n  ('trips vs two pair', [['7h', '7d', '7c', '2s', '3h'], ['Ah', 'Ad', 'Kc', 'Ks', '2h']], 1),\n  ('quads vs full house', [['4h', '4d', '4c', '4s', '2h'], ['Ah', 'Ad', 'Ac', 'Ks', 'Kh']], 1),\n  ('high card ace vs king', [['Ah', '9d', '7c', '4s', '2h'], ['Kh', 'Qd', 'Jc', '9s', '7h']], 1),\n  ('broadway vs wheel', [['Th', 'Jd', 'Qc', 'Ks', 'Ah'], ['As', '2c', '3d', '4h', '5d']], 1)],\n [('wheel vs six-high straight', [['Ah', '2d', '3c', '4s', '5h'], ['2h', '3d', '4c', '5s', '6h']],\n   -1),\n  ('six-high vs wheel', [['2c', '3h', '4d', '5c', '6s'], ['As', '2c', '3d', '4h', '5d']], 1),\n  ('pair of twos vs ace high kickers',\n   [['2h', '2d', 'Kc', 'Qs', 'Jh'], ['3h', '3d', '4c', '5s', '7h']], -1),\n  ('full house trips first', [['3h', '3d', '3c', 'As', 'Ah'], ['Kh', 'Kd', '2c', '2s', '2h']], 1),\n  ('paired five-card span', [['5h', '5d', '6c', '7s', '9h'], ['Ah', 'Kd', 'Qc', '8s', '4h']], 1),\n  ('two pair high pair first', [['Kh', 'Kd', '3c', '3s', '9h'], ['Qh', 'Qd', 'Jc', 'Js', '2h']], 1),\n  ('high card ace vs king', [['Ah', '9d', '7c', '4s', '2h'], ['Kh', 'Qd', 'Jc', '9s', '7h']], 1),\n  ('broadway vs wheel', [['Th', 'Jd', 'Qc', 'Ks', 'Ah'], ['As', '2c', '3d', '4h', '5d']], 1)]]\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\", \"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-poker_hand_evaluation-heads-up-comparator-group-ordering-key","generated_at":"2026-09-29T14:50:07.015708+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Poker engines settle real money pots from these comparisons; a single misranked hand pays the wrong seat.","repair":"Order rank groups by group size first and rank second, both descending.","root_cause":"Rank groups are ordered by rank alone, so a high kicker is compared before the made pair or trips.","sha256":"ac484ddde3328f8367fa9a34444dc941009227e5b7460ef1cd23112e6526207b","title":"Kickers are compared before the paired rank · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.019,"exit_code":1,"observations":[{"actual":-1,"check":"wheel vs six-high straight","expected":-1,"passed":true},{"actual":1,"check":"six-high vs wheel","expected":1,"passed":true},{"actual":1,"check":"pair of twos vs ace high kickers","expected":-1,"passed":false},{"actual":1,"check":"full house trips first","expected":1,"passed":true},{"actual":0,"check":"identical ranks different suits","expected":0,"passed":true},{"actual":0,"check":"split straights","expected":0,"passed":true},{"actual":1,"check":"flush beats straight","expected":1,"passed":true},{"actual":-1,"check":"paired five-card span","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"wheel vs six-high straight\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"six-high vs wheel\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"pair of twos vs ace high kickers\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"full house trips first\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"identical ranks different suits\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"split straights\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"flush beats straight\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"paired five-card span\", \"actual\": -1, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.683,"exit_code":1,"observations":[{"actual":-1,"check":"wheel vs six-high straight","expected":-1,"passed":true},{"actual":1,"check":"six-high vs wheel","expected":1,"passed":true},{"actual":1,"check":"pair of twos vs ace high kickers","expected":-1,"passed":false},{"actual":1,"check":"full house trips first","expected":1,"passed":true},{"actual":0,"check":"identical ranks different suits","expected":0,"passed":true},{"actual":0,"check":"split straights","expected":0,"passed":true},{"actual":1,"check":"flush beats straight","expected":1,"passed":true},{"actual":-1,"check":"paired five-card span","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"wheel vs six-high straight\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"six-high vs wheel\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"pair of twos vs ace high kickers\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"full house trips first\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"identical ranks different suits\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"split straights\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"flush beats straight\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"paired five-card span\", \"actual\": -1, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.23,"exit_code":0,"observations":[{"actual":-1,"check":"wheel vs six-high straight","expected":-1,"passed":true},{"actual":1,"check":"six-high vs wheel","expected":1,"passed":true},{"actual":-1,"check":"pair of twos vs ace high kickers","expected":-1,"passed":true},{"actual":1,"check":"full house trips first","expected":1,"passed":true},{"actual":0,"check":"identical ranks different suits","expected":0,"passed":true},{"actual":0,"check":"split straights","expected":0,"passed":true},{"actual":1,"check":"flush beats straight","expected":1,"passed":true},{"actual":1,"check":"paired five-card span","expected":1,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"wheel vs six-high straight\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"six-high vs wheel\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"pair of twos vs ace high kickers\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"full house trips first\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"identical ranks different suits\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"split straights\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"flush beats straight\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"paired five-card span\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}