FAILURE MAP
← Case archive

FA-83131 / Go territory scoring / Open access

Clicking toggles only the clicked stone · case 01

Half of a dead group stays alive after a click.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The toggle flips membership of the single point.

VERIFIED REPAIR

Toggle the entire chain as one unit.

Unsuccessful approach: XOR-ing the chain flips each stone independently, so a partially marked chain becomes inverted rather than uniform.

Case contract

Input [board, dead_points, row, col]. Clicking a stone toggles its whole orthogonally connected chain: if the clicked stone is currently marked, unmark the chain, otherwise mark it. Clicking an empty point changes nothing. Return the sorted distinct dead points.

Why this case matters

Go servers and scoring tools compute this value automatically; a wrong answer changes a game result.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    board, dead, r, c = x
    n = len(board)
    m = len(board[0])
    col = board[r][c]
    marked = {tuple(p) for p in dead}
    if col == '.':
        return sorted([list(p) for p in marked])
    chain = {(r, c)}
    stack = [(r, c)]
    while stack:
        i, j = stack.pop()
        for p, q in ((i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)):
            if 0 <= p < n and 0 <= q < m and board[p][q] == col and (p, q) not in chain:
                chain.add((p, q))
                stack.append((p, q))
    marked ^= {(r, c)}
    return sorted([list(p) for p in marked])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[['.B.', 'B.B', '.B.'], [[1, 0], [1, 2]], 1, 2], [[1, 0]]], [[['.B.', 'B.B', '.B.'], [[1, 2], [0, 1], [1, 0]], 2, 1], [[0, 1], [1, 0], [1, 2], [2, 1]]], [[['B..W', 'B..W', 'B..W', 'B..W'], [[2, 3], [3, 0]], 3, 1], [[2, 3], [3, 0]]], [[['B..W', 'B..W', 'B..W', 'B..W'], [], 1, 1], []], [[['B..W', 'B..W', 'B..W', 'B..W'], [[0, 0]], 3, 0], [[0, 0], [1, 0], [2, 0], [3, 0]]], [[['.BW.', '.BW.', '.BW.', '.BW.'], [[0, 1], [0, 1], [2, 1], [0, 2]], 0, 1], [[0, 2]]], [[['.BW.', '.BW.', '.BW.', '.BW.'], [[0, 2]], 3, 2], [[0, 2], [1, 2], [2, 2], [3, 2]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[1, 0], [3, 2], [1, 0], [0, 2]], 3, 1], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]]], [[[['.BW.', '.BW.', '.BW.', '.BW.'], [], 3, 1], [[0, 1], [1, 1], [2, 1], [3, 1]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [[3, 3], [1, 2]], 3, 1], [[1, 2], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [[4, 2], [4, 2], [1, 2], [0, 2]], 3, 2], [[0, 2], [1, 2], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [], 3, 4], [[3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[2, 2]], 4, 0], [[2, 2]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[2, 3], [3, 0]], 2, 1], [[2, 3], [3, 0]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[3, 2], [3, 1]], 3, 4], [[3, 1], [3, 2], [3, 4]]], [[['BBB.', '.B..', 'B...', 'BBW.'], [[2, 0], [3, 1], [0, 0]], 0, 1], [[0, 0], [0, 1], [0, 2], [1, 1], [2, 0], [3, 1]]]], [[[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [], 3, 4], [[3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['W....', '.....', '.....', '.....', '....B'], [[4, 4], [0, 0]], 0, 0], [[4, 4]]], [[['W....', '.....', '.....', '.....', '....B'], [[4, 4], [4, 4], [0, 0]], 0, 0], [[4, 4]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [], 3, 0], [[3, 0]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[0, 1]], 4, 2], [[0, 1]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[2, 2], [1, 3], [1, 3]], 4, 1], [[1, 3], [2, 2]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[0, 3]], 0, 0], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['BWWW', 'B.WW', 'W.WB', 'WWWW'], [[3, 1], [1, 0], [1, 0]], 2, 0], [[0, 1], [0, 2], [0, 3], [1, 0], [1, 2], [1, 3], [2, 0], [2, 2], [3, 0], [3, 1], [3, 2], [3, 3]]]], [[[['BBBB', 'B..B', 'B..B', 'BBBB'], [], 2, 3], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[1, 0], [3, 2], [1, 0], [0, 2]], 3, 1], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['WWW', 'W.W', 'WWW'], [[0, 1], [1, 2], [1, 2]], 0, 1], []], [[['WWW', 'W.W', 'WWW'], [[0, 1], [0, 0]], 1, 1], [[0, 0], [0, 1]]], [[['WWW', 'W.W', 'WWW'], [[1, 2], [0, 2], [2, 1]], 1, 1], [[0, 2], [1, 2], [2, 1]]], [[['B.W', '...', 'W.B'], [], 2, 2], [[2, 2]]], [[['B.W', '...', 'W.B'], [[2, 2], [0, 2], [0, 0]], 0, 2], [[0, 0], [2, 2]]], [[['BBW', 'B..', 'BB.', 'BBW', 'WBB'], [[1, 0], [2, 1]], 1, 0], []]], [[[['B.W', '...', 'W.B'], [], 0, 2], [[0, 2]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [], 0, 1], [[0, 1]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [], 4, 3], [[4, 3]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [[1, 0], [1, 0]], 4, 3], [[1, 0], [4, 3]]], [[['BW.', 'BW.', 'BW.'], [], 2, 0], [[0, 0], [1, 0], [2, 0]]], [[['BW.', 'BW.', 'BW.'], [[2, 1], [1, 1], [1, 1]], 0, 0], [[0, 0], [1, 0], [1, 1], [2, 0], [2, 1]]], [[['BW.', 'BW.', 'BW.'], [[2, 1], [2, 1]], 0, 1], [[0, 1], [1, 1], [2, 1]]], [[['..WWW', 'WW.WB', '..B..'], [[0, 4], [1, 1], [1, 0]], 0, 3], [[0, 2], [0, 3], [0, 4], [1, 0], [1, 1], [1, 3]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("dead marks case %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
dead marks case 0[[1, 0]][[1, 0]]Passed
dead marks case 1[[0, 1], [1, 0], [1, 2], [2, 1]][[0, 1], [1, 0], [1, 2], [2, 1]]Passed
dead marks case 2[[2, 3], [3, 0]][[2, 3], [3, 0]]Passed
dead marks case 3[][]Passed
dead marks case 4[[0, 0], [3, 0]][[0, 0], [1, 0], [2, 0], [3, 0]]Failed
dead marks case 5[[0, 2], [2, 1]][[0, 2]]Failed
dead marks case 6[[0, 2], [3, 2]][[0, 2], [1, 2], [2, 2], [3, 2]]Failed
dead marks case 7[[0, 2], [1, 0], [3, 1], [3, 2]][[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]Failed

SHA-256 / a84b925cbff4566e03bec7329d352453c53fe5c8d37114fa1ce357f8bed065b5

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    board, dead, r, c = x
    n = len(board)
    m = len(board[0])
    col = board[r][c]
    marked = {tuple(p) for p in dead}
    if col == '.':
        return sorted([list(p) for p in marked])
    chain = {(r, c)}
    stack = [(r, c)]
    while stack:
        i, j = stack.pop()
        for p, q in ((i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)):
            if 0 <= p < n and 0 <= q < m and board[p][q] == col and (p, q) not in chain:
                chain.add((p, q))
                stack.append((p, q))
    marked ^= chain
    return sorted([list(p) for p in marked])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[['.B.', 'B.B', '.B.'], [[1, 0], [1, 2]], 1, 2], [[1, 0]]], [[['.B.', 'B.B', '.B.'], [[1, 2], [0, 1], [1, 0]], 2, 1], [[0, 1], [1, 0], [1, 2], [2, 1]]], [[['B..W', 'B..W', 'B..W', 'B..W'], [[2, 3], [3, 0]], 3, 1], [[2, 3], [3, 0]]], [[['B..W', 'B..W', 'B..W', 'B..W'], [], 1, 1], []], [[['B..W', 'B..W', 'B..W', 'B..W'], [[0, 0]], 3, 0], [[0, 0], [1, 0], [2, 0], [3, 0]]], [[['.BW.', '.BW.', '.BW.', '.BW.'], [[0, 1], [0, 1], [2, 1], [0, 2]], 0, 1], [[0, 2]]], [[['.BW.', '.BW.', '.BW.', '.BW.'], [[0, 2]], 3, 2], [[0, 2], [1, 2], [2, 2], [3, 2]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[1, 0], [3, 2], [1, 0], [0, 2]], 3, 1], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]]], [[[['.BW.', '.BW.', '.BW.', '.BW.'], [], 3, 1], [[0, 1], [1, 1], [2, 1], [3, 1]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [[3, 3], [1, 2]], 3, 1], [[1, 2], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [[4, 2], [4, 2], [1, 2], [0, 2]], 3, 2], [[0, 2], [1, 2], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [], 3, 4], [[3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[2, 2]], 4, 0], [[2, 2]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[2, 3], [3, 0]], 2, 1], [[2, 3], [3, 0]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[3, 2], [3, 1]], 3, 4], [[3, 1], [3, 2], [3, 4]]], [[['BBB.', '.B..', 'B...', 'BBW.'], [[2, 0], [3, 1], [0, 0]], 0, 1], [[0, 0], [0, 1], [0, 2], [1, 1], [2, 0], [3, 1]]]], [[[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [], 3, 4], [[3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['W....', '.....', '.....', '.....', '....B'], [[4, 4], [0, 0]], 0, 0], [[4, 4]]], [[['W....', '.....', '.....', '.....', '....B'], [[4, 4], [4, 4], [0, 0]], 0, 0], [[4, 4]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [], 3, 0], [[3, 0]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[0, 1]], 4, 2], [[0, 1]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[2, 2], [1, 3], [1, 3]], 4, 1], [[1, 3], [2, 2]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[0, 3]], 0, 0], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['BWWW', 'B.WW', 'W.WB', 'WWWW'], [[3, 1], [1, 0], [1, 0]], 2, 0], [[0, 1], [0, 2], [0, 3], [1, 0], [1, 2], [1, 3], [2, 0], [2, 2], [3, 0], [3, 1], [3, 2], [3, 3]]]], [[[['BBBB', 'B..B', 'B..B', 'BBBB'], [], 2, 3], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[1, 0], [3, 2], [1, 0], [0, 2]], 3, 1], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['WWW', 'W.W', 'WWW'], [[0, 1], [1, 2], [1, 2]], 0, 1], []], [[['WWW', 'W.W', 'WWW'], [[0, 1], [0, 0]], 1, 1], [[0, 0], [0, 1]]], [[['WWW', 'W.W', 'WWW'], [[1, 2], [0, 2], [2, 1]], 1, 1], [[0, 2], [1, 2], [2, 1]]], [[['B.W', '...', 'W.B'], [], 2, 2], [[2, 2]]], [[['B.W', '...', 'W.B'], [[2, 2], [0, 2], [0, 0]], 0, 2], [[0, 0], [2, 2]]], [[['BBW', 'B..', 'BB.', 'BBW', 'WBB'], [[1, 0], [2, 1]], 1, 0], []]], [[[['B.W', '...', 'W.B'], [], 0, 2], [[0, 2]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [], 0, 1], [[0, 1]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [], 4, 3], [[4, 3]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [[1, 0], [1, 0]], 4, 3], [[1, 0], [4, 3]]], [[['BW.', 'BW.', 'BW.'], [], 2, 0], [[0, 0], [1, 0], [2, 0]]], [[['BW.', 'BW.', 'BW.'], [[2, 1], [1, 1], [1, 1]], 0, 0], [[0, 0], [1, 0], [1, 1], [2, 0], [2, 1]]], [[['BW.', 'BW.', 'BW.'], [[2, 1], [2, 1]], 0, 1], [[0, 1], [1, 1], [2, 1]]], [[['..WWW', 'WW.WB', '..B..'], [[0, 4], [1, 1], [1, 0]], 0, 3], [[0, 2], [0, 3], [0, 4], [1, 0], [1, 1], [1, 3]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("dead marks case %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
dead marks case 0[[1, 0]][[1, 0]]Passed
dead marks case 1[[0, 1], [1, 0], [1, 2], [2, 1]][[0, 1], [1, 0], [1, 2], [2, 1]]Passed
dead marks case 2[[2, 3], [3, 0]][[2, 3], [3, 0]]Passed
dead marks case 3[][]Passed
dead marks case 4[[1, 0], [2, 0], [3, 0]][[0, 0], [1, 0], [2, 0], [3, 0]]Failed
dead marks case 5[[0, 2], [1, 1], [3, 1]][[0, 2]]Failed
dead marks case 6[[1, 2], [2, 2], [3, 2]][[0, 2], [1, 2], [2, 2], [3, 2]]Failed
dead marks case 7[[0, 0], [0, 1], [0, 3], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 3]][[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]Failed

SHA-256 / bc97dc198b1083a3cdc2612bfa63a6a8abb4884b9871ad7ceeef5d0e3355eda5

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    board, dead, r, c = x
    n = len(board)
    m = len(board[0])
    col = board[r][c]
    marked = {tuple(p) for p in dead}
    if col == '.':
        return sorted([list(p) for p in marked])
    chain = {(r, c)}
    stack = [(r, c)]
    while stack:
        i, j = stack.pop()
        for p, q in ((i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)):
            if 0 <= p < n and 0 <= q < m and board[p][q] == col and (p, q) not in chain:
                chain.add((p, q))
                stack.append((p, q))
    if (r, c) in marked:
        marked -= chain
    else:
        marked |= chain
    return sorted([list(p) for p in marked])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[['.B.', 'B.B', '.B.'], [[1, 0], [1, 2]], 1, 2], [[1, 0]]], [[['.B.', 'B.B', '.B.'], [[1, 2], [0, 1], [1, 0]], 2, 1], [[0, 1], [1, 0], [1, 2], [2, 1]]], [[['B..W', 'B..W', 'B..W', 'B..W'], [[2, 3], [3, 0]], 3, 1], [[2, 3], [3, 0]]], [[['B..W', 'B..W', 'B..W', 'B..W'], [], 1, 1], []], [[['B..W', 'B..W', 'B..W', 'B..W'], [[0, 0]], 3, 0], [[0, 0], [1, 0], [2, 0], [3, 0]]], [[['.BW.', '.BW.', '.BW.', '.BW.'], [[0, 1], [0, 1], [2, 1], [0, 2]], 0, 1], [[0, 2]]], [[['.BW.', '.BW.', '.BW.', '.BW.'], [[0, 2]], 3, 2], [[0, 2], [1, 2], [2, 2], [3, 2]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[1, 0], [3, 2], [1, 0], [0, 2]], 3, 1], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]]], [[[['.BW.', '.BW.', '.BW.', '.BW.'], [], 3, 1], [[0, 1], [1, 1], [2, 1], [3, 1]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [[3, 3], [1, 2]], 3, 1], [[1, 2], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [[4, 2], [4, 2], [1, 2], [0, 2]], 3, 2], [[0, 2], [1, 2], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [], 3, 4], [[3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[2, 2]], 4, 0], [[2, 2]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[2, 3], [3, 0]], 2, 1], [[2, 3], [3, 0]]], [[['B.B.W', '.B.W.', 'B.BW.', 'BBW.W', '..W..'], [[3, 2], [3, 1]], 3, 4], [[3, 1], [3, 2], [3, 4]]], [[['BBB.', '.B..', 'B...', 'BBW.'], [[2, 0], [3, 1], [0, 0]], 0, 1], [[0, 0], [0, 1], [0, 2], [1, 1], [2, 0], [3, 1]]]], [[[['..B..', '..B..', 'BBBBB', 'WWWWW', '..W..'], [], 3, 4], [[3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 2]]], [[['W....', '.....', '.....', '.....', '....B'], [[4, 4], [0, 0]], 0, 0], [[4, 4]]], [[['W....', '.....', '.....', '.....', '....B'], [[4, 4], [4, 4], [0, 0]], 0, 0], [[4, 4]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [], 3, 0], [[3, 0]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[0, 1]], 4, 2], [[0, 1]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[2, 2], [1, 3], [1, 3]], 4, 1], [[1, 3], [2, 2]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[0, 3]], 0, 0], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['BWWW', 'B.WW', 'W.WB', 'WWWW'], [[3, 1], [1, 0], [1, 0]], 2, 0], [[0, 1], [0, 2], [0, 3], [1, 0], [1, 2], [1, 3], [2, 0], [2, 2], [3, 0], [3, 1], [3, 2], [3, 3]]]], [[[['BBBB', 'B..B', 'B..B', 'BBBB'], [], 2, 3], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['BBBB', 'B..B', 'B..B', 'BBBB'], [[1, 0], [3, 2], [1, 0], [0, 2]], 3, 1], [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]], [[['WWW', 'W.W', 'WWW'], [[0, 1], [1, 2], [1, 2]], 0, 1], []], [[['WWW', 'W.W', 'WWW'], [[0, 1], [0, 0]], 1, 1], [[0, 0], [0, 1]]], [[['WWW', 'W.W', 'WWW'], [[1, 2], [0, 2], [2, 1]], 1, 1], [[0, 2], [1, 2], [2, 1]]], [[['B.W', '...', 'W.B'], [], 2, 2], [[2, 2]]], [[['B.W', '...', 'W.B'], [[2, 2], [0, 2], [0, 0]], 0, 2], [[0, 0], [2, 2]]], [[['BBW', 'B..', 'BB.', 'BBW', 'WBB'], [[1, 0], [2, 1]], 1, 0], []]], [[[['B.W', '...', 'W.B'], [], 0, 2], [[0, 2]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [], 0, 1], [[0, 1]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [], 4, 3], [[4, 3]]], [[['.B...', 'B....', '.....', '....W', '...W.'], [[1, 0], [1, 0]], 4, 3], [[1, 0], [4, 3]]], [[['BW.', 'BW.', 'BW.'], [], 2, 0], [[0, 0], [1, 0], [2, 0]]], [[['BW.', 'BW.', 'BW.'], [[2, 1], [1, 1], [1, 1]], 0, 0], [[0, 0], [1, 0], [1, 1], [2, 0], [2, 1]]], [[['BW.', 'BW.', 'BW.'], [[2, 1], [2, 1]], 0, 1], [[0, 1], [1, 1], [2, 1]]], [[['..WWW', 'WW.WB', '..B..'], [[0, 4], [1, 1], [1, 0]], 0, 3], [[0, 2], [0, 3], [0, 4], [1, 0], [1, 1], [1, 3]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("dead marks case %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
dead marks case 0[[1, 0]][[1, 0]]Passed
dead marks case 1[[0, 1], [1, 0], [1, 2], [2, 1]][[0, 1], [1, 0], [1, 2], [2, 1]]Passed
dead marks case 2[[2, 3], [3, 0]][[2, 3], [3, 0]]Passed
dead marks case 3[][]Passed
dead marks case 4[[0, 0], [1, 0], [2, 0], [3, 0]][[0, 0], [1, 0], [2, 0], [3, 0]]Passed
dead marks case 5[[0, 2]][[0, 2]]Passed
dead marks case 6[[0, 2], [1, 2], [2, 2], [3, 2]][[0, 2], [1, 2], [2, 2], [3, 2]]Passed
dead marks case 7[[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]][[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 3], [2, 0], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]Passed

SHA-256 / 29f97d801144b3701b582725ad3324ef8df0a91b637fe5557219e9b295fd7eb0

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:50:18.741770+00:00.

Case digest / 2b4fef242cd06d375c05f33ba41241a4e613771f4e7083fc1f5b326879ec5999