FA-83146 / Go territory scoring / Open access
Clicking an empty point clears all dead marks · case 01
A misclick during counting resets the dead-stone agreement.
ROOT CAUSE
The empty-point branch returns an empty list.
VERIFIED REPAIR
Return the existing marks unchanged (sorted, distinct).
Unsuccessful approach: Returning the raw input list keeps duplicates and caller order.
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 []
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]]], [[['..B.W', '...W.', 'B..B.', '.B..B', 'W..B.'], [[2, 0], [2, 0]], 2, 1], [[2, 0]]]], [[[['.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]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[0, 1]], 4, 2], [[0, 1]]], [[['.WW.', 'BWWW', 'WW..', 'BWWB', 'W..W'], [[4, 3], [0, 2]], 0, 0], [[0, 2], [4, 3]]]], [[[['W....', '.....', '.....', '.....', '....B'], [], 4, 4], [[4, 4]]], [[['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]]], [[['WWW', 'W.W', 'WWW'], [[1, 2], [0, 2], [2, 1]], 1, 1], [[0, 2], [1, 2], [2, 1]]], [[['BBB.', '.B..', 'B...', 'BBW.'], [[2, 0], [0, 0]], 0, 3], [[0, 0], [2, 0]]]], [[[['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]]], [[['BBBB.', '.BW..', 'B..B.', '..BBB', 'B...B'], [[3, 3], [2, 3]], 3, 1], [[2, 3], [3, 3]]], [[['W..B', '.W.W', 'W..B'], [[0, 0], [2, 3], [1, 3]], 0, 2], [[0, 0], [1, 3], [2, 3]]]], [[[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[2, 2], [1, 3], [1, 3]], 4, 1], [[1, 3], [2, 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]]], [[['.W.BW', '.W..B', 'BBW.W'], [[2, 4], [2, 1], [2, 4]], 1, 2], [[2, 1], [2, 4]]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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]] | Failed |
| 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 | [] | [[2, 0]] | Failed |
SHA-256 / cbcadc9f7ad62e101852fd265f07129fa7bd33983cb5a0a407cf88664584279a
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 dead
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]]], [[['..B.W', '...W.', 'B..B.', '.B..B', 'W..B.'], [[2, 0], [2, 0]], 2, 1], [[2, 0]]]], [[[['.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]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[0, 1]], 4, 2], [[0, 1]]], [[['.WW.', 'BWWW', 'WW..', 'BWWB', 'W..W'], [[4, 3], [0, 2]], 0, 0], [[0, 2], [4, 3]]]], [[[['W....', '.....', '.....', '.....', '....B'], [], 4, 4], [[4, 4]]], [[['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]]], [[['WWW', 'W.W', 'WWW'], [[1, 2], [0, 2], [2, 1]], 1, 1], [[0, 2], [1, 2], [2, 1]]], [[['BBB.', '.B..', 'B...', 'BBW.'], [[2, 0], [0, 0]], 0, 3], [[0, 0], [2, 0]]]], [[[['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]]], [[['BBBB.', '.BW..', 'B..B.', '..BBB', 'B...B'], [[3, 3], [2, 3]], 3, 1], [[2, 3], [3, 3]]], [[['W..B', '.W.W', 'W..B'], [[0, 0], [2, 3], [1, 3]], 0, 2], [[0, 0], [1, 3], [2, 3]]]], [[[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[2, 2], [1, 3], [1, 3]], 4, 1], [[1, 3], [2, 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]]], [[['.W.BW', '.W..B', 'BBW.W'], [[2, 4], [2, 1], [2, 4]], 1, 2], [[2, 1], [2, 4]]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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 | [[2, 0], [2, 0]] | [[2, 0]] | Failed |
SHA-256 / 10f2ea08b89bde7784cd151568c723ddeac3191c70ba8f5a09924b9f0e2a773a
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]]], [[['..B.W', '...W.', 'B..B.', '.B..B', 'W..B.'], [[2, 0], [2, 0]], 2, 1], [[2, 0]]]], [[[['.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]]], [[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[0, 1]], 4, 2], [[0, 1]]], [[['.WW.', 'BWWW', 'WW..', 'BWWB', 'W..W'], [[4, 3], [0, 2]], 0, 0], [[0, 2], [4, 3]]]], [[[['W....', '.....', '.....', '.....', '....B'], [], 4, 4], [[4, 4]]], [[['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]]], [[['WWW', 'W.W', 'WWW'], [[1, 2], [0, 2], [2, 1]], 1, 1], [[0, 2], [1, 2], [2, 1]]], [[['BBB.', '.B..', 'B...', 'BBW.'], [[2, 0], [0, 0]], 0, 3], [[0, 0], [2, 0]]]], [[[['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]]], [[['BBBB.', '.BW..', 'B..B.', '..BBB', 'B...B'], [[3, 3], [2, 3]], 3, 1], [[2, 3], [3, 3]]], [[['W..B', '.W.W', 'W..B'], [[0, 0], [2, 3], [1, 3]], 0, 2], [[0, 0], [1, 3], [2, 3]]]], [[[['.W.B.', 'W.WB.', '.WB..', 'WB...', 'B....'], [[2, 2], [1, 3], [1, 3]], 4, 1], [[1, 3], [2, 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]]], [[['.W.BW', '.W..B', 'BBW.W'], [[2, 4], [2, 1], [2, 4]], 1, 2], [[2, 1], [2, 4]]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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 | [[2, 0]] | [[2, 0]] | Passed |
SHA-256 / 0a5dcc0d0878b5e90558eb2c987decf70a98baeac020657eec401112054ea21f
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.810004+00:00.
Case digest / d87e13d0819208277ca5c678d59744218dd6bff6c2dca755f908d956f144b78e