{"abstract":"Seven-six suited loses a point and the connector bonus logic misfires.","category":"Poker hand evaluation","checks":8,"contract":"Input: two hole cards. Chen score: highest card points A=10, K=8, Q=7, J=6, else half its rank (2..10). Pairs double the points with a minimum of 5. Suited adds 2. Gap between ranks (cards strictly between) subtracts 0, 1, 2, 4 for gaps 0-3 and 5 for 4+. Add 1 for gap 0 or 1 when both cards are below a queen. Round the final score up.","contract_signature":"x","evaluation_group":"w2-poker_hand_evaluation-chen-starting-score","failed_approach":"Subtracting two treats one-gappers as connectors and connectors as negative gaps.","family":"w2-poker_hand_evaluation-chen-starting-score-gap-measurement","id":"FA-82296","implementations":{"attempt":{"sha256":"7113d924e40b4b0771e569362f0d858cbc6a393d1081a66296cf68ad21ed3ccf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    pts={14:10,13:8,12:7,11:6}\n    a,b=sorted((R.index(c[0])+2 for c in x), reverse=True)\n    s=pts.get(a, a/2)\n    if a==b:\n        s=max(s*2,5)\n    else:\n        if x[0][1]==x[1][1]: s+=2\n        gap=a-b-2\n        s-={0:0,1:1,2:2,3:4}.get(gap,5)\n        if gap<=1 and a<12: s+=1\n    return math.ceil(s)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('pocket aces', ['Ah', 'Ad'], 20), ('pocket deuces', ['2h', '2d'], 5),\n  ('pocket fives', ['5h', '5d'], 5), ('ace king suited', ['Ah', 'Kh'], 12),\n  ('seven six suited', ['7h', '6h'], 7), ('nine seven offsuit', ['9h', '7d'], 5),\n  ('ace five offsuit', ['Ah', '5d'], 5), ('pocket sevens', ['7h', '7s'], 7)],\n [('ace king suited', ['Ah', 'Kh'], 12), ('seven six suited', ['7h', '6h'], 7),\n  ('nine seven offsuit', ['9h', '7d'], 5), ('queen jack suited', ['Qs', 'Js'], 9),\n  ('ace five offsuit', ['Ah', '5d'], 5), ('king nine suited', ['Kc', '9c'], 6),\n  ('ten nine offsuit', ['Th', '9d'], 6), ('pocket sevens', ['7h', '7s'], 7)],\n [('seven six suited', ['7h', '6h'], 7), ('nine seven offsuit', ['9h', '7d'], 5),\n  ('queen jack suited', ['Qs', 'Js'], 9), ('king nine suited', ['Kc', '9c'], 6),\n  ('ten nine offsuit', ['Th', '9d'], 6), ('jack ten suited', ['Js', 'Ts'], 9),\n  ('nine five offsuit', ['9c', '5d'], 1), ('eight six suited', ['8d', '6d'], 6)],\n [('pocket aces', ['Ah', 'Ad'], 20), ('queen jack suited', ['Qs', 'Js'], 9),\n  ('king nine suited', ['Kc', '9c'], 6), ('ten nine offsuit', ['Th', '9d'], 6),\n  ('jack ten suited', ['Js', 'Ts'], 9), ('nine five offsuit', ['9c', '5d'], 1),\n  ('eight six suited', ['8d', '6d'], 6), ('jack nine offsuit', ['Jh', '9c'], 6)],\n [('pocket aces', ['Ah', 'Ad'], 20), ('pocket deuces', ['2h', '2d'], 5),\n  ('pocket fives', ['5h', '5d'], 5), ('king nine suited', ['Kc', '9c'], 6),\n  ('ten nine offsuit', ['Th', '9d'], 6), ('nine five offsuit', ['9c', '5d'], 1),\n  ('eight six suited', ['8d', '6d'], 6), ('jack nine offsuit', ['Jh', '9c'], 6)]]\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":"191bb69b6f6c8ed4806ca529c6bff5d0692106add83166b3dae13e298d6cf604","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    pts={14:10,13:8,12:7,11:6}\n    a,b=sorted((R.index(c[0])+2 for c in x), reverse=True)\n    s=pts.get(a, a/2)\n    if a==b:\n        s=max(s*2,5)\n    else:\n        if x[0][1]==x[1][1]: s+=2\n        gap=a-b\n        s-={0:0,1:1,2:2,3:4}.get(gap,5)\n        if gap<=1 and a<12: s+=1\n    return math.ceil(s)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('pocket aces', ['Ah', 'Ad'], 20), ('pocket deuces', ['2h', '2d'], 5),\n  ('pocket fives', ['5h', '5d'], 5), ('ace king suited', ['Ah', 'Kh'], 12),\n  ('seven six suited', ['7h', '6h'], 7), ('nine seven offsuit', ['9h', '7d'], 5),\n  ('ace five offsuit', ['Ah', '5d'], 5), ('pocket sevens', ['7h', '7s'], 7)],\n [('ace king suited', ['Ah', 'Kh'], 12), ('seven six suited', ['7h', '6h'], 7),\n  ('nine seven offsuit', ['9h', '7d'], 5), ('queen jack suited', ['Qs', 'Js'], 9),\n  ('ace five offsuit', ['Ah', '5d'], 5), ('king nine suited', ['Kc', '9c'], 6),\n  ('ten nine offsuit', ['Th', '9d'], 6), ('pocket sevens', ['7h', '7s'], 7)],\n [('seven six suited', ['7h', '6h'], 7), ('nine seven offsuit', ['9h', '7d'], 5),\n  ('queen jack suited', ['Qs', 'Js'], 9), ('king nine suited', ['Kc', '9c'], 6),\n  ('ten nine offsuit', ['Th', '9d'], 6), ('jack ten suited', ['Js', 'Ts'], 9),\n  ('nine five offsuit', ['9c', '5d'], 1), ('eight six suited', ['8d', '6d'], 6)],\n [('pocket aces', ['Ah', 'Ad'], 20), ('queen jack suited', ['Qs', 'Js'], 9),\n  ('king nine suited', ['Kc', '9c'], 6), ('ten nine offsuit', ['Th', '9d'], 6),\n  ('jack ten suited', ['Js', 'Ts'], 9), ('nine five offsuit', ['9c', '5d'], 1),\n  ('eight six suited', ['8d', '6d'], 6), ('jack nine offsuit', ['Jh', '9c'], 6)],\n [('pocket aces', ['Ah', 'Ad'], 20), ('pocket deuces', ['2h', '2d'], 5),\n  ('pocket fives', ['5h', '5d'], 5), ('king nine suited', ['Kc', '9c'], 6),\n  ('ten nine offsuit', ['Th', '9d'], 6), ('nine five offsuit', ['9c', '5d'], 1),\n  ('eight six suited', ['8d', '6d'], 6), ('jack nine offsuit', ['Jh', '9c'], 6)]]\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-chen-starting-score-gap-measurement","generated_at":"2026-09-29T14:50:10.779434+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Starting-hand heuristics in training tools and bots use this scoring.","root_cause":"The gap is the rank difference rather than the number of ranks strictly between the cards.","sha256":"616d89b00680709694e824b4997cfc42f10c835f20e7991c58675f10d1c5fdc9","title":"Connectors penalized as one-gappers · 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":39.208,"exit_code":1,"observations":[{"actual":20,"check":"pocket aces","expected":20,"passed":true},{"actual":5,"check":"pocket deuces","expected":5,"passed":true},{"actual":5,"check":"pocket fives","expected":5,"passed":true},{"actual":7,"check":"ace king suited","expected":12,"passed":false},{"actual":2,"check":"seven six suited","expected":7,"passed":false},{"actual":6,"check":"nine seven offsuit","expected":5,"passed":false},{"actual":5,"check":"ace five offsuit","expected":5,"passed":true},{"actual":7,"check":"pocket sevens","expected":7,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"pocket aces\", \"actual\": 20, \"expected\": 20, \"passed\": true}, {\"check\": \"pocket deuces\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"pocket fives\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"ace king suited\", \"actual\": 7, \"expected\": 12, \"passed\": false}, {\"check\": \"seven six suited\", \"actual\": 2, \"expected\": 7, \"passed\": false}, {\"check\": \"nine seven offsuit\", \"actual\": 6, \"expected\": 5, \"passed\": false}, {\"check\": \"ace five offsuit\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"pocket sevens\", \"actual\": 7, \"expected\": 7, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.267,"exit_code":1,"observations":[{"actual":20,"check":"pocket aces","expected":20,"passed":true},{"actual":5,"check":"pocket deuces","expected":5,"passed":true},{"actual":5,"check":"pocket fives","expected":5,"passed":true},{"actual":11,"check":"ace king suited","expected":12,"passed":false},{"actual":6,"check":"seven six suited","expected":7,"passed":false},{"actual":3,"check":"nine seven offsuit","expected":5,"passed":false},{"actual":5,"check":"ace five offsuit","expected":5,"passed":true},{"actual":7,"check":"pocket sevens","expected":7,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"pocket aces\", \"actual\": 20, \"expected\": 20, \"passed\": true}, {\"check\": \"pocket deuces\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"pocket fives\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"ace king suited\", \"actual\": 11, \"expected\": 12, \"passed\": false}, {\"check\": \"seven six suited\", \"actual\": 6, \"expected\": 7, \"passed\": false}, {\"check\": \"nine seven offsuit\", \"actual\": 3, \"expected\": 5, \"passed\": false}, {\"check\": \"ace five offsuit\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"pocket sevens\", \"actual\": 7, \"expected\": 7, \"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."}}