{"abstract":"Nine-seven offsuit scores 2 instead of 3.","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":"int() truncates halves downward.","family":"w2-poker_hand_evaluation-chen-starting-score-final-rounding","id":"FA-82306","implementations":{"attempt":{"sha256":"6230d33449e858c8405d2dddd7ad5d93f19862d0841f3c3266c7982e5373dbfa","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 a<12: s+=1\n    return int(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), ('nine seven offsuit', ['9h', '7d'], 5),\n  ('queen jack suited', ['Qs', 'Js'], 9), ('ace five offsuit', ['Ah', '5d'], 5),\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 [('seven six suited', ['7h', '6h'], 7), ('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), ('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  ('seven six suited', ['7h', '6h'], 7), ('nine seven offsuit', ['9h', '7d'], 5),\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), ('nine five offsuit', ['9c', '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":"7167d5e27441e7aebffb810bfb8ca6c2976d4b3f8e5f46e9bf4491860070fa32","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 a<12: s+=1\n    return round(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), ('nine seven offsuit', ['9h', '7d'], 5),\n  ('queen jack suited', ['Qs', 'Js'], 9), ('ace five offsuit', ['Ah', '5d'], 5),\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 [('seven six suited', ['7h', '6h'], 7), ('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), ('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  ('seven six suited', ['7h', '6h'], 7), ('nine seven offsuit', ['9h', '7d'], 5),\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), ('nine five offsuit', ['9c', '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\"); 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-final-rounding","generated_at":"2026-09-29T14:50:10.819167+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 final score uses round(), which rounds halves to the even neighbour.","sha256":"8b670f0b3b06d74024d74c95753604fb3f4c97da3877581530d0d16dd548102b","title":"Chen score rounded to even instead of up · 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.373,"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":6,"check":"seven six suited","expected":7,"passed":false},{"actual":4,"check":"nine seven offsuit","expected":5,"passed":false},{"actual":9,"check":"queen jack suited","expected":9,"passed":true},{"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\": 6, \"expected\": 7, \"passed\": false}, {\"check\": \"nine seven offsuit\", \"actual\": 4, \"expected\": 5, \"passed\": false}, {\"check\": \"queen jack suited\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"check\": \"ace five offsuit\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.619,"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":6,"check":"seven six suited","expected":7,"passed":false},{"actual":4,"check":"nine seven offsuit","expected":5,"passed":false},{"actual":9,"check":"queen jack suited","expected":9,"passed":true},{"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\": 6, \"expected\": 7, \"passed\": false}, {\"check\": \"nine seven offsuit\", \"actual\": 4, \"expected\": 5, \"passed\": false}, {\"check\": \"queen jack suited\", \"actual\": 9, \"expected\": 9, \"passed\": true}, {\"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."}}