FA-86591 / Procedural level generation constraints / Open access
L-shaped corridor carving: Corner cell carved twice · case 01
The corner appears twice and corridor length is overcounted.
ROOT CAUSE
Cells are appended without a duplicate check.
VERIFIED REPAIR
Restore `if [x, y] not in path:` at the deduplication step.
Unsuccessful approach: Ignoring the first cell still duplicates it when the first leg is a single cell.
Case contract
Carve from centre a [x, y] to b. Horizontal-first walks x from ax to bx on row ay, then y from ay to by on column bx; otherwise y first on column ax, then x on row by. Both legs include their endpoints; returns cells [x, y] in walk order without duplicates.
Why this case matters
Procedural generators silently emit unplayable or unfair levels when a single constraint check uses the wrong boundary, axis, neighborhood or update order; the defect is visible in exact generated geometry.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(a, b, horizontal_first):
ax, ay = a
bx, by = b
path = []
def add(x, y):
if True:
path.append([x, y])
sx = 1 if bx >= ax else -1
sy = 1 if by >= ay else -1
if horizontal_first:
for x in range(ax, bx + sx, sx):
add(x, ay)
for y in range(ay, by + sy, sy):
add(bx, y)
else:
for y in range(ay, by + sy, sy):
add(ax, y)
for x in range(ax, bx + sx, sx):
add(x, by)
return path
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('leftward corridor #1', [[5, 1], [2, 3], True], [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('fault site deduplication #1', [[8, 6], [4, 5], True], [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]]),
('regression deduplication #1', [[8, 1], [8, 3], True], [[8, 1], [8, 2], [8, 3]]),
('regression deduplication #2',
[[8, 7], [1, 7], False],
[[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]]),
('fault site deduplication #2',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('fault site deduplication #3', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]])],
[('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1', [[8, 6], [4, 5], True], [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]]),
('fault site deduplication #2',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('regression deduplication #1',
[[8, 7], [1, 7], False],
[[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]]),
('regression deduplication #2', [[7, 1], [8, 1], False], [[7, 1], [8, 1]]),
('fault site deduplication #3', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]]),
('fault site deduplication #4', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]])],
[('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('fault site deduplication #2', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]]),
('regression deduplication #1',
[[8, 2], [8, 8], True],
[[8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8]]),
('regression deduplication #2', [[7, 4], [7, 1], True], [[7, 4], [7, 3], [7, 2], [7, 1]]),
('fault site deduplication #3', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]]),
('fault site deduplication #4',
[[3, 2], [8, 8], False],
[[3, 2], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8]]),
('fault site deduplication #5',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]])],
[('leftward corridor #1', [[5, 1], [2, 3], True], [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]]),
('fault site deduplication #2',
[[3, 2], [8, 8], False],
[[3, 2], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8]]),
('regression deduplication #1', [[8, 2], [8, 2], True], [[8, 2]]),
('regression deduplication #2', [[4, 4], [8, 4], False], [[4, 4], [5, 4], [6, 4], [7, 4], [8, 4]]),
('fault site deduplication #3',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]]),
('fault site deduplication #4',
[[1, 4], [6, 1], False],
[[1, 4], [1, 3], [1, 2], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1]])],
[('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]]),
('fault site deduplication #2',
[[1, 4], [6, 1], False],
[[1, 4], [1, 3], [1, 2], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1]]),
('regression deduplication #1', [[7, 0], [4, 0], False], [[7, 0], [6, 0], [5, 0], [4, 0]]),
('regression deduplication #2', [[4, 1], [2, 1], False], [[4, 1], [3, 1], [2, 1]]),
('fault site deduplication #3',
[[7, 2], [6, 8], False],
[[7, 2], [7, 3], [7, 4], [7, 5], [7, 6], [7, 7], [7, 8], [6, 8]]),
('fault site deduplication #4',
[[0, 6], [5, 0], False],
[[0, 6], [0, 5], [0, 4], [0, 3], [0, 2], [0, 1], [0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]])]]
for label, args, expected in cases[N-1]:
check(label, 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 |
|---|---|---|---|
| leftward corridor #1 | [[5, 1], [4, 1], [3, 1], [2, 1], [2, 1], [2, 2], [2, 3]] | [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]] | Failed |
| single cell #1 | [[4, 4], [4, 4]] | [[4, 4]] | Failed |
| same column #1 | [[3, 0], [3, 1], [3, 2], [3, 2]] | [[3, 0], [3, 1], [3, 2]] | Failed |
| fault site deduplication #1 | [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 6], [4, 5]] | [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]] | Failed |
| regression deduplication #1 | [[8, 1], [8, 1], [8, 2], [8, 3]] | [[8, 1], [8, 2], [8, 3]] | Failed |
| regression deduplication #2 | [[8, 7], [8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]] | [[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]] | Failed |
| fault site deduplication #2 | [[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]] | [[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]] | Failed |
| fault site deduplication #3 | [[6, 4], [6, 5], [6, 5], [7, 5], [8, 5]] | [[6, 4], [6, 5], [7, 5], [8, 5]] | Failed |
SHA-256 / 920e311c81c27b18e0c53a823b4fb9d60438362ed76b03c0dc0d423cb212c0df
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(a, b, horizontal_first):
ax, ay = a
bx, by = b
path = []
def add(x, y):
if [x, y] not in path[1:]:
path.append([x, y])
sx = 1 if bx >= ax else -1
sy = 1 if by >= ay else -1
if horizontal_first:
for x in range(ax, bx + sx, sx):
add(x, ay)
for y in range(ay, by + sy, sy):
add(bx, y)
else:
for y in range(ay, by + sy, sy):
add(ax, y)
for x in range(ax, bx + sx, sx):
add(x, by)
return path
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('leftward corridor #1', [[5, 1], [2, 3], True], [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('fault site deduplication #1', [[8, 6], [4, 5], True], [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]]),
('regression deduplication #1', [[8, 1], [8, 3], True], [[8, 1], [8, 2], [8, 3]]),
('regression deduplication #2',
[[8, 7], [1, 7], False],
[[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]]),
('fault site deduplication #2',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('fault site deduplication #3', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]])],
[('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1', [[8, 6], [4, 5], True], [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]]),
('fault site deduplication #2',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('regression deduplication #1',
[[8, 7], [1, 7], False],
[[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]]),
('regression deduplication #2', [[7, 1], [8, 1], False], [[7, 1], [8, 1]]),
('fault site deduplication #3', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]]),
('fault site deduplication #4', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]])],
[('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('fault site deduplication #2', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]]),
('regression deduplication #1',
[[8, 2], [8, 8], True],
[[8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8]]),
('regression deduplication #2', [[7, 4], [7, 1], True], [[7, 4], [7, 3], [7, 2], [7, 1]]),
('fault site deduplication #3', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]]),
('fault site deduplication #4',
[[3, 2], [8, 8], False],
[[3, 2], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8]]),
('fault site deduplication #5',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]])],
[('leftward corridor #1', [[5, 1], [2, 3], True], [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]]),
('fault site deduplication #2',
[[3, 2], [8, 8], False],
[[3, 2], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8]]),
('regression deduplication #1', [[8, 2], [8, 2], True], [[8, 2]]),
('regression deduplication #2', [[4, 4], [8, 4], False], [[4, 4], [5, 4], [6, 4], [7, 4], [8, 4]]),
('fault site deduplication #3',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]]),
('fault site deduplication #4',
[[1, 4], [6, 1], False],
[[1, 4], [1, 3], [1, 2], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1]])],
[('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]]),
('fault site deduplication #2',
[[1, 4], [6, 1], False],
[[1, 4], [1, 3], [1, 2], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1]]),
('regression deduplication #1', [[7, 0], [4, 0], False], [[7, 0], [6, 0], [5, 0], [4, 0]]),
('regression deduplication #2', [[4, 1], [2, 1], False], [[4, 1], [3, 1], [2, 1]]),
('fault site deduplication #3',
[[7, 2], [6, 8], False],
[[7, 2], [7, 3], [7, 4], [7, 5], [7, 6], [7, 7], [7, 8], [6, 8]]),
('fault site deduplication #4',
[[0, 6], [5, 0], False],
[[0, 6], [0, 5], [0, 4], [0, 3], [0, 2], [0, 1], [0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]])]]
for label, args, expected in cases[N-1]:
check(label, 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 |
|---|---|---|---|
| leftward corridor #1 | [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]] | [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]] | Passed |
| single cell #1 | [[4, 4], [4, 4]] | [[4, 4]] | Failed |
| same column #1 | [[3, 0], [3, 1], [3, 2]] | [[3, 0], [3, 1], [3, 2]] | Passed |
| fault site deduplication #1 | [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]] | [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]] | Passed |
| regression deduplication #1 | [[8, 1], [8, 1], [8, 2], [8, 3]] | [[8, 1], [8, 2], [8, 3]] | Failed |
| regression deduplication #2 | [[8, 7], [8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]] | [[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]] | Failed |
| fault site deduplication #2 | [[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]] | [[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]] | Passed |
| fault site deduplication #3 | [[6, 4], [6, 5], [7, 5], [8, 5]] | [[6, 4], [6, 5], [7, 5], [8, 5]] | Passed |
SHA-256 / bfa1eb481bd5b8e29150d4f01e2467606a8a93eb96a254b6fccbd0944b6a34ae
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(a, b, horizontal_first):
ax, ay = a
bx, by = b
path = []
def add(x, y):
if [x, y] not in path:
path.append([x, y])
sx = 1 if bx >= ax else -1
sy = 1 if by >= ay else -1
if horizontal_first:
for x in range(ax, bx + sx, sx):
add(x, ay)
for y in range(ay, by + sy, sy):
add(bx, y)
else:
for y in range(ay, by + sy, sy):
add(ax, y)
for x in range(ax, bx + sx, sx):
add(x, by)
return path
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('leftward corridor #1', [[5, 1], [2, 3], True], [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('fault site deduplication #1', [[8, 6], [4, 5], True], [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]]),
('regression deduplication #1', [[8, 1], [8, 3], True], [[8, 1], [8, 2], [8, 3]]),
('regression deduplication #2',
[[8, 7], [1, 7], False],
[[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]]),
('fault site deduplication #2',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('fault site deduplication #3', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]])],
[('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1', [[8, 6], [4, 5], True], [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]]),
('fault site deduplication #2',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('regression deduplication #1',
[[8, 7], [1, 7], False],
[[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]]),
('regression deduplication #2', [[7, 1], [8, 1], False], [[7, 1], [8, 1]]),
('fault site deduplication #3', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]]),
('fault site deduplication #4', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]])],
[('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1',
[[8, 4], [1, 0], True],
[[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]]),
('fault site deduplication #2', [[6, 4], [8, 5], False], [[6, 4], [6, 5], [7, 5], [8, 5]]),
('regression deduplication #1',
[[8, 2], [8, 8], True],
[[8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8]]),
('regression deduplication #2', [[7, 4], [7, 1], True], [[7, 4], [7, 3], [7, 2], [7, 1]]),
('fault site deduplication #3', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]]),
('fault site deduplication #4',
[[3, 2], [8, 8], False],
[[3, 2], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8]]),
('fault site deduplication #5',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]])],
[('leftward corridor #1', [[5, 1], [2, 3], True], [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1', [[6, 2], [8, 0], True], [[6, 2], [7, 2], [8, 2], [8, 1], [8, 0]]),
('fault site deduplication #2',
[[3, 2], [8, 8], False],
[[3, 2], [3, 3], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8], [8, 8]]),
('regression deduplication #1', [[8, 2], [8, 2], True], [[8, 2]]),
('regression deduplication #2', [[4, 4], [8, 4], False], [[4, 4], [5, 4], [6, 4], [7, 4], [8, 4]]),
('fault site deduplication #3',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]]),
('fault site deduplication #4',
[[1, 4], [6, 1], False],
[[1, 4], [1, 3], [1, 2], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1]])],
[('same column #1', [[3, 0], [3, 2], False], [[3, 0], [3, 1], [3, 2]]),
('single cell #1', [[4, 4], [4, 4], True], [[4, 4]]),
('fault site deduplication #1',
[[3, 5], [8, 1], False],
[[3, 5], [3, 4], [3, 3], [3, 2], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]]),
('fault site deduplication #2',
[[1, 4], [6, 1], False],
[[1, 4], [1, 3], [1, 2], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1]]),
('regression deduplication #1', [[7, 0], [4, 0], False], [[7, 0], [6, 0], [5, 0], [4, 0]]),
('regression deduplication #2', [[4, 1], [2, 1], False], [[4, 1], [3, 1], [2, 1]]),
('fault site deduplication #3',
[[7, 2], [6, 8], False],
[[7, 2], [7, 3], [7, 4], [7, 5], [7, 6], [7, 7], [7, 8], [6, 8]]),
('fault site deduplication #4',
[[0, 6], [5, 0], False],
[[0, 6], [0, 5], [0, 4], [0, 3], [0, 2], [0, 1], [0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]])]]
for label, args, expected in cases[N-1]:
check(label, 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 |
|---|---|---|---|
| leftward corridor #1 | [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]] | [[5, 1], [4, 1], [3, 1], [2, 1], [2, 2], [2, 3]] | Passed |
| single cell #1 | [[4, 4]] | [[4, 4]] | Passed |
| same column #1 | [[3, 0], [3, 1], [3, 2]] | [[3, 0], [3, 1], [3, 2]] | Passed |
| fault site deduplication #1 | [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]] | [[8, 6], [7, 6], [6, 6], [5, 6], [4, 6], [4, 5]] | Passed |
| regression deduplication #1 | [[8, 1], [8, 2], [8, 3]] | [[8, 1], [8, 2], [8, 3]] | Passed |
| regression deduplication #2 | [[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]] | [[8, 7], [7, 7], [6, 7], [5, 7], [4, 7], [3, 7], [2, 7], [1, 7]] | Passed |
| fault site deduplication #2 | [[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]] | [[8, 4], [7, 4], [6, 4], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1], [1, 0]] | Passed |
| fault site deduplication #3 | [[6, 4], [6, 5], [7, 5], [8, 5]] | [[6, 4], [6, 5], [7, 5], [8, 5]] | Passed |
SHA-256 / c372840b8b4b044dda9b540984b410e26a53bde4319ee47c0ea5b63776ee2238
Verification & scope
Deterministic toy contract stipulated for this model; integer or exact arithmetic only, not a reproduction of any specific game engine. 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:50.855265+00:00.
Case digest / 3eba8c8870ec6f1dee5a34f4ec9d073ad5b23f76836a161e8d8d5aa469140eb7