{"abstract":"Queen-jack and ace-king receive the low-connector bonus point.","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":"Testing the lower card lets queen-jack keep the bonus.","family":"w2-poker_hand_evaluation-chen-starting-score-straight-bonus-eligibility","id":"FA-82301","implementations":{"attempt":{"sha256":"24e078ae8e1a47e7fc1b02ca2f27d0edc068a3d4abedf2f49cbac499904c5731","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-1\n        s-={0:0,1:1,2:2,3:4}.get(gap,5)\n        if gap<=1 and b<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  ('queen jack suited', ['Qs', 'Js'], 9), ('ace five offsuit', ['Ah', '5d'], 5)],\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), ('jack ten suited', ['Js', 'Ts'], 9)],\n [('ace king suited', ['Ah', 'Kh'], 12), ('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  ('pocket sevens', ['7h', '7s'], 7), ('eight six suited', ['8d', '6d'], 6)],\n [('pocket aces', ['Ah', 'Ad'], 20), ('pocket deuces', ['2h', '2d'], 5),\n  ('ace king suited', ['Ah', 'Kh'], 12), ('queen jack suited', ['Qs', 'Js'], 9),\n  ('nine five offsuit', ['9c', '5d'], 1), ('pocket sevens', ['7h', '7s'], 7),\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), ('ace king suited', ['Ah', 'Kh'], 12),\n  ('seven six suited', ['7h', '6h'], 7), ('nine seven offsuit', ['9h', '7d'], 5),\n  ('queen jack suited', ['Qs', 'Js'], 9), ('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":"7fabeb88101ba77fc3ce2bdaaaa91371cf8f69e5cf3ae187dc38525945dc7350","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-1\n        s-={0:0,1:1,2:2,3:4}.get(gap,5)\n        if gap<=1: 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  ('queen jack suited', ['Qs', 'Js'], 9), ('ace five offsuit', ['Ah', '5d'], 5)],\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), ('jack ten suited', ['Js', 'Ts'], 9)],\n [('ace king suited', ['Ah', 'Kh'], 12), ('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  ('pocket sevens', ['7h', '7s'], 7), ('eight six suited', ['8d', '6d'], 6)],\n [('pocket aces', ['Ah', 'Ad'], 20), ('pocket deuces', ['2h', '2d'], 5),\n  ('ace king suited', ['Ah', 'Kh'], 12), ('queen jack suited', ['Qs', 'Js'], 9),\n  ('nine five offsuit', ['9c', '5d'], 1), ('pocket sevens', ['7h', '7s'], 7),\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), ('ace king suited', ['Ah', 'Kh'], 12),\n  ('seven six suited', ['7h', '6h'], 7), ('nine seven offsuit', ['9h', '7d'], 5),\n  ('queen jack suited', ['Qs', 'Js'], 9), ('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-straight-bonus-eligibility","generated_at":"2026-09-29T14:50:10.778825+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 +1 bonus ignores the requirement that both cards be below a queen.","sha256":"555fcc0a5bd0f838e632128f34ae3a3e2ddee6d32b61343ad804bd80a7a88447","title":"Connector bonus granted to high cards · 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.529,"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":12,"check":"ace king suited","expected":12,"passed":true},{"actual":7,"check":"seven six suited","expected":7,"passed":true},{"actual":5,"check":"nine seven offsuit","expected":5,"passed":true},{"actual":10,"check":"queen jack suited","expected":9,"passed":false},{"actual":5,"check":"ace five offsuit","expected":5,"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\": 12, \"expected\": 12, \"passed\": true}, {\"check\": \"seven six suited\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"nine seven offsuit\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"queen jack suited\", \"actual\": 10, \"expected\": 9, \"passed\": false}, {\"check\": \"ace five offsuit\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.542,"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":13,"check":"ace king suited","expected":12,"passed":false},{"actual":7,"check":"seven six suited","expected":7,"passed":true},{"actual":5,"check":"nine seven offsuit","expected":5,"passed":true},{"actual":10,"check":"queen jack suited","expected":9,"passed":false},{"actual":5,"check":"ace five offsuit","expected":5,"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\": 13, \"expected\": 12, \"passed\": false}, {\"check\": \"seven six suited\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"nine seven offsuit\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"queen jack suited\", \"actual\": 10, \"expected\": 9, \"passed\": false}, {\"check\": \"ace five offsuit\", \"actual\": 5, \"expected\": 5, \"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."}}