{"abstract":"Handicap 1 games give white an extra point.","category":"Go territory scoring","checks":8,"contract":"Input [rules, handicap, area_b, area_w, komi_tenths]. With handicap >= 2, white receives handicap points under chinese and handicap-1 under aga; other rules none. Return black margin in tenths.","evaluation_group":"w2-go-territory-scoring-handicap-comp","failed_approach":"A strict > 2 guard skips compensation for the two-stone handicap.","family":"w2-go-territory-scoring-handicap-comp-handicap-threshold","id":"FA-83066","implementations":{"attempt":{"sha256":"c71069bf6ebe225b08802ba537f2e8c71e4b965d7ee1a4486ee2487a82deb02b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    rules, h, ab, aw, komi = x\n    comp = 0\n    if h > 2:\n        if rules == 'chinese':\n            comp = h\n        elif rules == 'aga':\n            comp = h - 1\n    return ab * 10 - (aw + comp) * 10 - komi\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[['chinese', 9, 175, 177, 5], -115], [['aga', 4, 151, 193, 65], -515], [['japanese', 2, 192, 168, 5], 235], [['japanese', 6, 150, 163, 0], -130], [['korean', 4, 186, 189, 0], -30], [['japanese', 0, 194, 172, 5], 215], [['chinese', 1, 167, 181, 5], -145], [['chinese', 2, 180, 180, 5], -25]], [[['chinese', 7, 188, 188, 5], -75], [['aga', 8, 157, 153, 0], -30], [['japanese', 9, 154, 170, 65], -225], [['japanese', 5, 174, 162, 5], 115], [['korean', 6, 207, 201, 5], 55], [['korean', 0, 160, 185, 65], -315], [['aga', 2, 170, 188, 75], -265], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 2, 163, 163, 65], -65], [['aga', 0, 154, 183, 75], -365], [['chinese', 0, 190, 164, 75], 185], [['korean', 2, 151, 171, 75], -275], [['chinese', 5, 192, 202, 5], -155], [['korean', 2, 172, 205, 75], -405], [['chinese', 2, 166, 151, 5], 125], [['chinese', 1, 167, 181, 5], -145]], [[['chinese', 6, 206, 204, 65], -105], [['aga', 2, 184, 170, 65], 65], [['korean', 2, 160, 206, 65], -525], [['korean', 7, 159, 177, 0], -180], [['aga', 9, 154, 181, 75], -425], [['japanese', 7, 205, 198, 0], 70], [['aga', 7, 191, 209, 75], -315], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 8, 159, 195, 0], -360], [['korean', 4, 163, 154, 0], 90], [['aga', 7, 202, 195, 65], -55], [['korean', 1, 174, 169, 75], -25], [['korean', 7, 195, 188, 65], 5], [['korean', 8, 166, 205, 5], -395], [['chinese', 1, 167, 181, 5], -145], [['aga', 2, 180, 180, 5], -15]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"compensation case %d\" % i, solve(args), 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":"5046e17361602e02f89786f8efb7ed14fa304de8105c2dfa9725ce188e9c3a07","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    rules, h, ab, aw, komi = x\n    comp = 0\n    if h >= 1:\n        if rules == 'chinese':\n            comp = h\n        elif rules == 'aga':\n            comp = h - 1\n    return ab * 10 - (aw + comp) * 10 - komi\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[['chinese', 9, 175, 177, 5], -115], [['aga', 4, 151, 193, 65], -515], [['japanese', 2, 192, 168, 5], 235], [['japanese', 6, 150, 163, 0], -130], [['korean', 4, 186, 189, 0], -30], [['japanese', 0, 194, 172, 5], 215], [['chinese', 1, 167, 181, 5], -145], [['chinese', 2, 180, 180, 5], -25]], [[['chinese', 7, 188, 188, 5], -75], [['aga', 8, 157, 153, 0], -30], [['japanese', 9, 154, 170, 65], -225], [['japanese', 5, 174, 162, 5], 115], [['korean', 6, 207, 201, 5], 55], [['korean', 0, 160, 185, 65], -315], [['aga', 2, 170, 188, 75], -265], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 2, 163, 163, 65], -65], [['aga', 0, 154, 183, 75], -365], [['chinese', 0, 190, 164, 75], 185], [['korean', 2, 151, 171, 75], -275], [['chinese', 5, 192, 202, 5], -155], [['korean', 2, 172, 205, 75], -405], [['chinese', 2, 166, 151, 5], 125], [['chinese', 1, 167, 181, 5], -145]], [[['chinese', 6, 206, 204, 65], -105], [['aga', 2, 184, 170, 65], 65], [['korean', 2, 160, 206, 65], -525], [['korean', 7, 159, 177, 0], -180], [['aga', 9, 154, 181, 75], -425], [['japanese', 7, 205, 198, 0], 70], [['aga', 7, 191, 209, 75], -315], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 8, 159, 195, 0], -360], [['korean', 4, 163, 154, 0], 90], [['aga', 7, 202, 195, 65], -55], [['korean', 1, 174, 169, 75], -25], [['korean', 7, 195, 188, 65], 5], [['korean', 8, 166, 205, 5], -395], [['chinese', 1, 167, 181, 5], -145], [['aga', 2, 180, 180, 5], -15]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"compensation case %d\" % i, solve(args), 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":"881ce70673ee2f692cfd6cf07a39ab32e2f8c30372279f683646cd78c0078da7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    rules, h, ab, aw, komi = x\n    comp = 0\n    if h >= 2:\n        if rules == 'chinese':\n            comp = h\n        elif rules == 'aga':\n            comp = h - 1\n    return ab * 10 - (aw + comp) * 10 - komi\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[['chinese', 9, 175, 177, 5], -115], [['aga', 4, 151, 193, 65], -515], [['japanese', 2, 192, 168, 5], 235], [['japanese', 6, 150, 163, 0], -130], [['korean', 4, 186, 189, 0], -30], [['japanese', 0, 194, 172, 5], 215], [['chinese', 1, 167, 181, 5], -145], [['chinese', 2, 180, 180, 5], -25]], [[['chinese', 7, 188, 188, 5], -75], [['aga', 8, 157, 153, 0], -30], [['japanese', 9, 154, 170, 65], -225], [['japanese', 5, 174, 162, 5], 115], [['korean', 6, 207, 201, 5], 55], [['korean', 0, 160, 185, 65], -315], [['aga', 2, 170, 188, 75], -265], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 2, 163, 163, 65], -65], [['aga', 0, 154, 183, 75], -365], [['chinese', 0, 190, 164, 75], 185], [['korean', 2, 151, 171, 75], -275], [['chinese', 5, 192, 202, 5], -155], [['korean', 2, 172, 205, 75], -405], [['chinese', 2, 166, 151, 5], 125], [['chinese', 1, 167, 181, 5], -145]], [[['chinese', 6, 206, 204, 65], -105], [['aga', 2, 184, 170, 65], 65], [['korean', 2, 160, 206, 65], -525], [['korean', 7, 159, 177, 0], -180], [['aga', 9, 154, 181, 75], -425], [['japanese', 7, 205, 198, 0], 70], [['aga', 7, 191, 209, 75], -315], [['chinese', 1, 167, 181, 5], -145]], [[['korean', 8, 159, 195, 0], -360], [['korean', 4, 163, 154, 0], 90], [['aga', 7, 202, 195, 65], -55], [['korean', 1, 174, 169, 75], -25], [['korean', 7, 195, 188, 65], 5], [['korean', 8, 166, 205, 5], -395], [['chinese', 1, 167, 181, 5], -145], [['aga', 2, 180, 180, 5], -15]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"compensation case %d\" % i, solve(args), 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":"Small rectangular toy boards given as strings of B, W and dot; a bounded teaching model of one scoring or bookkeeping rule, not a complete rules engine or server implementation. 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-go-territory-scoring-handicap-comp-handicap-threshold","generated_at":"2026-09-29T14:50:18.070390+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Go servers and scoring tools compute this value automatically; a wrong answer changes a game result.","repair":"Compensate only for two or more handicap stones.","root_cause":"The compensation guard starts at one stone.","sha256":"063995203f1e7a5aaad3d2da6e0de978885281cbc53d0f4565686582b3ef9a4a","title":"A one-stone handicap triggers compensation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.449,"exit_code":1,"observations":[{"actual":-115,"check":"compensation case 0","expected":-115,"passed":true},{"actual":-515,"check":"compensation case 1","expected":-515,"passed":true},{"actual":235,"check":"compensation case 2","expected":235,"passed":true},{"actual":-130,"check":"compensation case 3","expected":-130,"passed":true},{"actual":-30,"check":"compensation case 4","expected":-30,"passed":true},{"actual":215,"check":"compensation case 5","expected":215,"passed":true},{"actual":-145,"check":"compensation case 6","expected":-145,"passed":true},{"actual":-5,"check":"compensation case 7","expected":-25,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"compensation case 0\", \"actual\": -115, \"expected\": -115, \"passed\": true}, {\"check\": \"compensation case 1\", \"actual\": -515, \"expected\": -515, \"passed\": true}, {\"check\": \"compensation case 2\", \"actual\": 235, \"expected\": 235, \"passed\": true}, {\"check\": \"compensation case 3\", \"actual\": -130, \"expected\": -130, \"passed\": true}, {\"check\": \"compensation case 4\", \"actual\": -30, \"expected\": -30, \"passed\": true}, {\"check\": \"compensation case 5\", \"actual\": 215, \"expected\": 215, \"passed\": true}, {\"check\": \"compensation case 6\", \"actual\": -145, \"expected\": -145, \"passed\": true}, {\"check\": \"compensation case 7\", \"actual\": -5, \"expected\": -25, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.157,"exit_code":1,"observations":[{"actual":-115,"check":"compensation case 0","expected":-115,"passed":true},{"actual":-515,"check":"compensation case 1","expected":-515,"passed":true},{"actual":235,"check":"compensation case 2","expected":235,"passed":true},{"actual":-130,"check":"compensation case 3","expected":-130,"passed":true},{"actual":-30,"check":"compensation case 4","expected":-30,"passed":true},{"actual":215,"check":"compensation case 5","expected":215,"passed":true},{"actual":-155,"check":"compensation case 6","expected":-145,"passed":false},{"actual":-25,"check":"compensation case 7","expected":-25,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"compensation case 0\", \"actual\": -115, \"expected\": -115, \"passed\": true}, {\"check\": \"compensation case 1\", \"actual\": -515, \"expected\": -515, \"passed\": true}, {\"check\": \"compensation case 2\", \"actual\": 235, \"expected\": 235, \"passed\": true}, {\"check\": \"compensation case 3\", \"actual\": -130, \"expected\": -130, \"passed\": true}, {\"check\": \"compensation case 4\", \"actual\": -30, \"expected\": -30, \"passed\": true}, {\"check\": \"compensation case 5\", \"actual\": 215, \"expected\": 215, \"passed\": true}, {\"check\": \"compensation case 6\", \"actual\": -155, \"expected\": -145, \"passed\": false}, {\"check\": \"compensation case 7\", \"actual\": -25, \"expected\": -25, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":57.683,"exit_code":0,"observations":[{"actual":-115,"check":"compensation case 0","expected":-115,"passed":true},{"actual":-515,"check":"compensation case 1","expected":-515,"passed":true},{"actual":235,"check":"compensation case 2","expected":235,"passed":true},{"actual":-130,"check":"compensation case 3","expected":-130,"passed":true},{"actual":-30,"check":"compensation case 4","expected":-30,"passed":true},{"actual":215,"check":"compensation case 5","expected":215,"passed":true},{"actual":-145,"check":"compensation case 6","expected":-145,"passed":true},{"actual":-25,"check":"compensation case 7","expected":-25,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"compensation case 0\", \"actual\": -115, \"expected\": -115, \"passed\": true}, {\"check\": \"compensation case 1\", \"actual\": -515, \"expected\": -515, \"passed\": true}, {\"check\": \"compensation case 2\", \"actual\": 235, \"expected\": 235, \"passed\": true}, {\"check\": \"compensation case 3\", \"actual\": -130, \"expected\": -130, \"passed\": true}, {\"check\": \"compensation case 4\", \"actual\": -30, \"expected\": -30, \"passed\": true}, {\"check\": \"compensation case 5\", \"actual\": 215, \"expected\": 215, \"passed\": true}, {\"check\": \"compensation case 6\", \"actual\": -145, \"expected\": -145, \"passed\": true}, {\"check\": \"compensation case 7\", \"actual\": -25, \"expected\": -25, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}