{"abstract":"Removing a dead stone gives the capturer an extra point on top of the recovered area.","category":"Go territory scoring","checks":8,"contract":"Input [board, dead_points, komi_tenths]. Remove dead stones (no prisoners in area scoring), then area = remaining stones + regions bordered by one colour. Return [black, white, margin_tenths].","contract_signature":"x","evaluation_group":"w2-go-territory-scoring-area-dead","failed_approach":"Subtracting dead stones from their owner as well still double counts the swing.","family":"w2-go-territory-scoring-area-dead-prisoner-accounting-in-area-scoring","id":"FA-83336","implementations":{"attempt":{"sha256":"1869c234364d7135bf9296a7a65ec450d87e31bc1d4b82d29df2f1d0bff3eae2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    board, dead, komi = x\n    dd = {tuple(p) for p in dead}\n    g = [[('.' if (r, c) in dd else ch) for c, ch in enumerate(row)] for r, row in enumerate(board)]\n    n = len(g)\n    m = len(g[0])\n    area = {'B': 0, 'W': 0}\n    for row in g:\n        for ch in row:\n            if ch != '.':\n                area[ch] += 1\n    seen = set()\n    for r in range(n):\n        for c in range(m):\n            if g[r][c] != '.' or (r, c) in seen:\n                continue\n            seen.add((r, c))\n            todo = [(r, c)]\n            cnt = 0\n            edge = set()\n            while todo:\n                i, j = todo.pop()\n                cnt += 1\n                for p, q in ((i, j + 1), (i, j - 1), (i + 1, j), (i - 1, j)):\n                    if 0 <= p < n and 0 <= q < m:\n                        if g[p][q] == '.':\n                            if (p, q) not in seen:\n                                seen.add((p, q))\n                                todo.append((p, q))\n                        else:\n                            edge.add(g[p][q])\n            if len(edge) == 1:\n                area[edge.pop()] += cnt\n    for r, c in dd:\n        if board[r][c] != '.':\n            area[board[r][c]] -= 1\n    return [area['B'], area['W'], (area['B'] - area['W']) * 10 - komi]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[['.BW..', 'WBW..', 'WBW..', '.BW.B', 'WBW..', 'WBW.B'], [[2, 1]], 0], [7, 10, -30]], [[['.BW...', '.BW...', '.BW...', 'WBW...', 'WBW...'], [[4, 2]], 0], [5, 6, -10]], [[['...W.BW', '.....BW', 'W....BW', '.....BW', '..W..BW'], [[1, 6], [2, 6]], 0], [5, 6, -10]], [[['.BWB', '.BW.', '.BWB', '.BW.', '.BWB'], [], 0], [13, 5, 80]], [[['.W.BW..', '...BW..', '...BWB.', '...BW..'], [[1, 4], [3, 4]], 0], [5, 3, 20]], [[['.BWBB.', '.BW...', '.BW..B', '.BW...', '.BW...', '.BW..B', '.BW.B.'], [[3, 1]], 5], [12, 7, 45]], [[['..W..BW', '.....BW', '..W..BW', '.....BW', '.W...BW', '...W.BW'], [], 0], [6, 10, -40]], [[['.BW..', '.BW..', '.BWB.', '.BWB.', 'WBW..'], [[4, 2]], 75], [7, 5, -55]]], [[[['.BW....', '.BWB...', '.BW.B..', 'WBW.B..', '.BW.B..', '.BW....'], [[5, 2]], 0], [10, 6, 40]], [[['..BWB', '..BW.', '..BWB', 'W.BW.', '..BW.'], [[4, 2], [3, 3]], 75], [6, 5, -65]], [[['.BW.', '.BW.', '.BW.', '.BW.', 'WBW.', '.BW.', 'WBW.'], [[2, 2], [6, 2]], 75], [7, 7, -75]], [[['..BW', '..BW', 'W.BW', '..BW'], [[0, 2], [2, 3]], 75], [3, 4, -85]], [[['.W.BW.', '...BW.', '...BW.', '...BW.', '.W.BW.', '...BW.'], [[4, 3], [0, 4]], 0], [5, 7, -20]], [[['W..BW.', '...BW.', '...BWB', '...BW.'], [[3, 4], [0, 3]], 75], [4, 4, -75]], [[['.WBW...', '..BW...', '..BW...', 'W.BW...', '..BW...'], [[0, 3], [4, 2]], 75], [4, 6, -95]], [[['..BW', 'W.BW', '..BW', 'W.BW', '..BW'], [], 75], [5, 7, -95]]], [[[['...W.BW', '.....BW', 'W....BW', '.....BW', '..W..BW'], [[1, 6], [2, 6]], 0], [5, 6, -10]], [[['..BW...', '..BW...', '..BW...', '..BW...', '..BWB..', '.WBW...'], [[5, 3]], 5], [7, 6, 5]], [[['...BW', '.W.BW', 'W..BW', '..WBW'], [[3, 4], [0, 4]], 5], [4, 5, -15]], [[['..BW..B', '..BW...', '..BW...', '..BW...'], [], 75], [13, 4, 15]], [[['..BW', '..BW', '.WBW', '..BW', '..BW', '..BW'], [[1, 2]], 5], [5, 7, -25]], [[['W.BW.', '..BW.', 'W.BW.', '..BW.', '..BW.', '..BW.', '.WBW.'], [[6, 1]], 5], [7, 16, -95]], [[['..BW.', '..BW.', '..BW.', '..BW.', '..BW.', '..BW.'], [], 5], [18, 12, 55]], [[['..BW.', '.WBW.', '..BW.', '.WBW.'], [[2, 2], [3, 2]], 5], [2, 10, -85]]], [[[['.BW..', '.BW..', '.BWB.', '.BWB.', 'WBW..'], [[4, 2]], 75], [7, 5, -55]], [[['.WBWB', '..BW.', '..BW.', '..BW.', '..BW.'], [], 0], [6, 6, 0]], [[['...BW.B', '...BWBB', '...BWBB', '...BW..', '...BW..'], [[3, 3], [0, 4]], 5], [9, 4, 45]], [[['.W..BW.', '..W.BW.', '....BW.', '..W.BW.', '...WBW.', '....BW.', '...WBW.'], [[2, 4], [3, 5]], 75], [6, 11, -125]], [[['...BW', '..WBW', '...BW', '..WBW', '...BW'], [[2, 3]], 75], [4, 7, -105]], [[['.WBW', '..BW', '..BW', '..BW', '..BW', '..BW'], [[2, 2], [4, 2]], 5], [4, 7, -35]], [[['WBW..', '.BW..', '.BW..', '.BWBB'], [[1, 2]], 0], [6, 4, 20]], [[['...WBW.', '....BW.', '....BW.', 'W...BW.', '....BW.', '..W.BW.'], [[1, 4]], 5], [5, 15, -105]]], [[[['..BW', '..BW', 'W.BW', '..BW'], [[0, 2], [2, 3]], 75], [3, 4, -85]], [[['...WBW.', '....BW.', '....BW.', 'W...BW.', '....BW.', '..W.BW.'], [[1, 4]], 5], [5, 15, -105]], [[['...BW', 'W..BW', '..WBW', '...BW', '..WBW', '...BW'], [[5, 3]], 0], [5, 9, -40]], [[['..BW.', '..BW.', '..BW.', '..BW.', 'W.BW.', '..BW.', '..BW.'], [], 5], [7, 15, -85]], [[['.BWB', '.BW.', '.BW.', '.BW.'], [], 0], [9, 4, 50]], [[['....', '....', '....', '....'], [], 75], [0, 0, -75]], [[['...', '...', '...'], [], 5], [0, 0, -5]], [[['.B.', 'B.B', '.B.'], [[2, 1], [1, 2]], 0], [9, 0, 90]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"area with dead 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":"17ed8ea7a723c2cb5418530bafe37fb7fcfa298f2240ba31d7ecfeae463ba8f8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    board, dead, komi = x\n    dd = {tuple(p) for p in dead}\n    bonus = {'B': 0, 'W': 0}\n    for r, c in dd:\n        if board[r][c] != '.':\n            bonus['W' if board[r][c] == 'B' else 'B'] += 1\n    g = [[('.' if (r, c) in dd else ch) for c, ch in enumerate(row)] for r, row in enumerate(board)]\n    n = len(g)\n    m = len(g[0])\n    area = {'B': 0, 'W': 0}\n    for row in g:\n        for ch in row:\n            if ch != '.':\n                area[ch] += 1\n    seen = set()\n    for r in range(n):\n        for c in range(m):\n            if g[r][c] != '.' or (r, c) in seen:\n                continue\n            seen.add((r, c))\n            todo = [(r, c)]\n            cnt = 0\n            edge = set()\n            while todo:\n                i, j = todo.pop()\n                cnt += 1\n                for p, q in ((i, j + 1), (i, j - 1), (i + 1, j), (i - 1, j)):\n                    if 0 <= p < n and 0 <= q < m:\n                        if g[p][q] == '.':\n                            if (p, q) not in seen:\n                                seen.add((p, q))\n                                todo.append((p, q))\n                        else:\n                            edge.add(g[p][q])\n            if len(edge) == 1:\n                area[edge.pop()] += cnt\n    area['B'] += bonus['B']\n    area['W'] += bonus['W']\n    return [area['B'], area['W'], (area['B'] - area['W']) * 10 - komi]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[['.BW..', 'WBW..', 'WBW..', '.BW.B', 'WBW..', 'WBW.B'], [[2, 1]], 0], [7, 10, -30]], [[['.BW...', '.BW...', '.BW...', 'WBW...', 'WBW...'], [[4, 2]], 0], [5, 6, -10]], [[['...W.BW', '.....BW', 'W....BW', '.....BW', '..W..BW'], [[1, 6], [2, 6]], 0], [5, 6, -10]], [[['.BWB', '.BW.', '.BWB', '.BW.', '.BWB'], [], 0], [13, 5, 80]], [[['.W.BW..', '...BW..', '...BWB.', '...BW..'], [[1, 4], [3, 4]], 0], [5, 3, 20]], [[['.BWBB.', '.BW...', '.BW..B', '.BW...', '.BW...', '.BW..B', '.BW.B.'], [[3, 1]], 5], [12, 7, 45]], [[['..W..BW', '.....BW', '..W..BW', '.....BW', '.W...BW', '...W.BW'], [], 0], [6, 10, -40]], [[['.BW..', '.BW..', '.BWB.', '.BWB.', 'WBW..'], [[4, 2]], 75], [7, 5, -55]]], [[[['.BW....', '.BWB...', '.BW.B..', 'WBW.B..', '.BW.B..', '.BW....'], [[5, 2]], 0], [10, 6, 40]], [[['..BWB', '..BW.', '..BWB', 'W.BW.', '..BW.'], [[4, 2], [3, 3]], 75], [6, 5, -65]], [[['.BW.', '.BW.', '.BW.', '.BW.', 'WBW.', '.BW.', 'WBW.'], [[2, 2], [6, 2]], 75], [7, 7, -75]], [[['..BW', '..BW', 'W.BW', '..BW'], [[0, 2], [2, 3]], 75], [3, 4, -85]], [[['.W.BW.', '...BW.', '...BW.', '...BW.', '.W.BW.', '...BW.'], [[4, 3], [0, 4]], 0], [5, 7, -20]], [[['W..BW.', '...BW.', '...BWB', '...BW.'], [[3, 4], [0, 3]], 75], [4, 4, -75]], [[['.WBW...', '..BW...', '..BW...', 'W.BW...', '..BW...'], [[0, 3], [4, 2]], 75], [4, 6, -95]], [[['..BW', 'W.BW', '..BW', 'W.BW', '..BW'], [], 75], [5, 7, -95]]], [[[['...W.BW', '.....BW', 'W....BW', '.....BW', '..W..BW'], [[1, 6], [2, 6]], 0], [5, 6, -10]], [[['..BW...', '..BW...', '..BW...', '..BW...', '..BWB..', '.WBW...'], [[5, 3]], 5], [7, 6, 5]], [[['...BW', '.W.BW', 'W..BW', '..WBW'], [[3, 4], [0, 4]], 5], [4, 5, -15]], [[['..BW..B', '..BW...', '..BW...', '..BW...'], [], 75], [13, 4, 15]], [[['..BW', '..BW', '.WBW', '..BW', '..BW', '..BW'], [[1, 2]], 5], [5, 7, -25]], [[['W.BW.', '..BW.', 'W.BW.', '..BW.', '..BW.', '..BW.', '.WBW.'], [[6, 1]], 5], [7, 16, -95]], [[['..BW.', '..BW.', '..BW.', '..BW.', '..BW.', '..BW.'], [], 5], [18, 12, 55]], [[['..BW.', '.WBW.', '..BW.', '.WBW.'], [[2, 2], [3, 2]], 5], [2, 10, -85]]], [[[['.BW..', '.BW..', '.BWB.', '.BWB.', 'WBW..'], [[4, 2]], 75], [7, 5, -55]], [[['.WBWB', '..BW.', '..BW.', '..BW.', '..BW.'], [], 0], [6, 6, 0]], [[['...BW.B', '...BWBB', '...BWBB', '...BW..', '...BW..'], [[3, 3], [0, 4]], 5], [9, 4, 45]], [[['.W..BW.', '..W.BW.', '....BW.', '..W.BW.', '...WBW.', '....BW.', '...WBW.'], [[2, 4], [3, 5]], 75], [6, 11, -125]], [[['...BW', '..WBW', '...BW', '..WBW', '...BW'], [[2, 3]], 75], [4, 7, -105]], [[['.WBW', '..BW', '..BW', '..BW', '..BW', '..BW'], [[2, 2], [4, 2]], 5], [4, 7, -35]], [[['WBW..', '.BW..', '.BW..', '.BWBB'], [[1, 2]], 0], [6, 4, 20]], [[['...WBW.', '....BW.', '....BW.', 'W...BW.', '....BW.', '..W.BW.'], [[1, 4]], 5], [5, 15, -105]]], [[[['..BW', '..BW', 'W.BW', '..BW'], [[0, 2], [2, 3]], 75], [3, 4, -85]], [[['...WBW.', '....BW.', '....BW.', 'W...BW.', '....BW.', '..W.BW.'], [[1, 4]], 5], [5, 15, -105]], [[['...BW', 'W..BW', '..WBW', '...BW', '..WBW', '...BW'], [[5, 3]], 0], [5, 9, -40]], [[['..BW.', '..BW.', '..BW.', '..BW.', 'W.BW.', '..BW.', '..BW.'], [], 5], [7, 15, -85]], [[['.BWB', '.BW.', '.BW.', '.BW.'], [], 0], [9, 4, 50]], [[['....', '....', '....', '....'], [], 75], [0, 0, -75]], [[['...', '...', '...'], [], 5], [0, 0, -5]], [[['.B.', 'B.B', '.B.'], [[2, 1], [1, 2]], 0], [9, 0, 90]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"area with dead 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-area-dead-prisoner-accounting-in-area-scoring","generated_at":"2026-09-29T14:50:20.666935+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.","root_cause":"Territory-scoring prisoner credit is mixed into the area total.","sha256":"21a85f92675f99ac0e85fab488f5c4dfafc1a09d7be31f828bc784a8fab3e15c","title":"Dead stones are also credited as prisoners under area scoring · 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":42.089,"exit_code":1,"observations":[{"actual":[6,10,-40],"check":"area with dead case 0","expected":[7,10,-30],"passed":false},{"actual":[5,5,0],"check":"area with dead case 1","expected":[5,6,-10],"passed":false},{"actual":[5,4,10],"check":"area with dead case 2","expected":[5,6,-10],"passed":false},{"actual":[13,5,80],"check":"area with dead case 3","expected":[13,5,80],"passed":true},{"actual":[5,1,40],"check":"area with dead case 4","expected":[5,3,20],"passed":false},{"actual":[11,7,35],"check":"area with dead case 5","expected":[12,7,45],"passed":false},{"actual":[6,10,-40],"check":"area with dead case 6","expected":[6,10,-40],"passed":true},{"actual":[7,4,-45],"check":"area with dead case 7","expected":[7,5,-55],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"area with dead case 0\", \"actual\": [6, 10, -40], \"expected\": [7, 10, -30], \"passed\": false}, {\"check\": \"area with dead case 1\", \"actual\": [5, 5, 0], \"expected\": [5, 6, -10], \"passed\": false}, {\"check\": \"area with dead case 2\", \"actual\": [5, 4, 10], \"expected\": [5, 6, -10], \"passed\": false}, {\"check\": \"area with dead case 3\", \"actual\": [13, 5, 80], \"expected\": [13, 5, 80], \"passed\": true}, {\"check\": \"area with dead case 4\", \"actual\": [5, 1, 40], \"expected\": [5, 3, 20], \"passed\": false}, {\"check\": \"area with dead case 5\", \"actual\": [11, 7, 35], \"expected\": [12, 7, 45], \"passed\": false}, {\"check\": \"area with dead case 6\", \"actual\": [6, 10, -40], \"expected\": [6, 10, -40], \"passed\": true}, {\"check\": \"area with dead case 7\", \"actual\": [7, 4, -45], \"expected\": [7, 5, -55], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.91,"exit_code":1,"observations":[{"actual":[7,11,-40],"check":"area with dead case 0","expected":[7,10,-30],"passed":false},{"actual":[6,6,0],"check":"area with dead case 1","expected":[5,6,-10],"passed":false},{"actual":[7,6,10],"check":"area with dead case 2","expected":[5,6,-10],"passed":false},{"actual":[13,5,80],"check":"area with dead case 3","expected":[13,5,80],"passed":true},{"actual":[7,3,40],"check":"area with dead case 4","expected":[5,3,20],"passed":false},{"actual":[12,8,35],"check":"area with dead case 5","expected":[12,7,45],"passed":false},{"actual":[6,10,-40],"check":"area with dead case 6","expected":[6,10,-40],"passed":true},{"actual":[8,5,-45],"check":"area with dead case 7","expected":[7,5,-55],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"area with dead case 0\", \"actual\": [7, 11, -40], \"expected\": [7, 10, -30], \"passed\": false}, {\"check\": \"area with dead case 1\", \"actual\": [6, 6, 0], \"expected\": [5, 6, -10], \"passed\": false}, {\"check\": \"area with dead case 2\", \"actual\": [7, 6, 10], \"expected\": [5, 6, -10], \"passed\": false}, {\"check\": \"area with dead case 3\", \"actual\": [13, 5, 80], \"expected\": [13, 5, 80], \"passed\": true}, {\"check\": \"area with dead case 4\", \"actual\": [7, 3, 40], \"expected\": [5, 3, 20], \"passed\": false}, {\"check\": \"area with dead case 5\", \"actual\": [12, 8, 35], \"expected\": [12, 7, 45], \"passed\": false}, {\"check\": \"area with dead case 6\", \"actual\": [6, 10, -40], \"expected\": [6, 10, -40], \"passed\": true}, {\"check\": \"area with dead case 7\", \"actual\": [8, 5, -45], \"expected\": [7, 5, -55], \"passed\": false}], \"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."}}