FA-86741 / Procedural level generation constraints / Open access
Rotated prefab stamping: Transparent cells overwrite terrain · case 01
Prefab holes erase existing walls.
ROOT CAUSE
Floor, not space, is treated as transparent.
VERIFIED REPAIR
Restore `if t == ' ':` at the transparency step.
Unsuccessful approach: Also treating floor as transparent stops prefabs from carving floors.
Case contract
The prefab (rows of chars, ' ' transparent) is rotated clockwise rot times (rot taken mod 4, negative allowed) and stamped with its top-left at column ox, row oy. If any non-transparent tile would land out of bounds or on a locked 'X' tile, the stamp is rejected and the original grid returned with False; otherwise the new grid with True.
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(grid, prefab, ox, oy, rot):
p = [list(row) for row in prefab]
for _ in range(rot % 4):
p = [list(row) for row in zip(*p[::-1])]
g = [list(row) for row in grid]
for r, line in enumerate(p):
for c, t in enumerate(line):
if t == '.':
continue
y, x = oy + r, ox + c
if not (0 <= y < len(g) and 0 <= x < len(g[0])) or g[y][x] == 'X':
return [grid, False]
g[y][x] = t
return [[''.join(row) for row in g], True]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('regression transparency #1',
[['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],
[['...', '#..', 'X..', '...', '#X.', '..X'], False]),
('fault site transparency #1', [['.#.', '#..'], [' ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),
('regression transparency #2',
[['##.', '..#', '#..', '.X.', '.#X', '#..'], ['.', 'D', '.'], 1, 1, 6],
[['##.', '..#', '#..', '.X.', '.#X', '#..'], False]),
('partial repair boundary #1',
[['......', '...X..', 'X.#...'], [' ', '.', ' '], -1, -1, 4],
[['......', '...X..', 'X.#...'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1', [['.#.', '#..'], [' ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),
('fault site transparency #2',
[['..#X.', '.....', '.....', '.XX#.'], ['##D', '#. ', '.# '], 0, 0, 0],
[['##DX.', '#....', '.#...', '.XX#.'], True]),
('partial repair boundary #1',
[['......', '...X..', 'X.#...'], [' ', '.', ' '], -1, -1, 4],
[['......', '...X..', 'X.#...'], False]),
('regression transparency #1',
[['.....', 'X..X#', 'X.X.X'], ['. .'], 1, 1, 2],
[['.....', 'X..X#', 'X.X.X'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1',
[['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],
[['..###.', '.#D...', '#.....'], True]),
('fault site transparency #2',
[['#.#', '#..', '#..', '#.X', 'X#.'], [' '], 1, 4, 3],
[['#.#', '#..', '#..', '#.X', 'X#.'], True]),
('regression transparency #1',
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], [' ', ' .', 'D.'], 4, 0, 2],
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], False]),
('regression transparency #2',
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], ['D', '.'], 2, 3, -1],
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('regression transparency #1',
[['##.', '..#', '#..', '.X.', '.#X', '#..'], ['.', 'D', '.'], 1, 1, 6],
[['##.', '..#', '#..', '.X.', '.#X', '#..'], False]),
('partial repair boundary #1',
[['.X.', '...', 'X..', '..X', '..#'], ['D.', '. '], 0, -1, 3],
[['.X.', '...', 'X..', '..X', '..#'], False]),
('regression transparency #2',
[['#...#.', '.##X..', '...X#.', '..XX..', '..#X.#'], ['.', '.'], 1, 1, -1],
[['#...#.', '...X..', '...X#.', '..XX..', '..#X.#'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1',
[['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],
[['#X', '..', '..', '#.', '#.'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('regression transparency #1',
[['.....', 'X..X#', 'X.X.X'], ['. .'], 1, 1, 2],
[['.....', 'X..X#', 'X.X.X'], False]),
('regression transparency #2',
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], [' ', ' .', 'D.'], 4, 0, 2],
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], False]),
('regression transparency #3',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('partial repair boundary #1',
[['..', 'X.', '.X', '.#', '.#', '#.'], ['. '], -1, 3, 1],
[['..', 'X.', '.X', '.#', '.#', '#.'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1',
[['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],
[['XX', 'X.', '..', '..', '..'], False])]]
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 |
|---|---|---|---|
| transparent overhang #1 | [['..', '..'], False] | [['#.', '#.'], True] | Failed |
| regression transparency #1 | [['.D.', 'D..', 'X#.', '...', '#X.', '..X'], True] | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | Failed |
| fault site transparency #1 | [['.#.', '#..'], False] | [['DD.', '#..'], True] | Failed |
| regression transparency #2 | [['##.', '..#', '#D.', '.X.', '.#X', '#..'], True] | [['##.', '..#', '#..', '.X.', '.#X', '#..'], False] | Failed |
| partial repair boundary #1 | [['......', '...X..', 'X.#...'], False] | [['......', '...X..', 'X.#...'], False] | Passed |
| quarter turn #1 | [['#...', 'D...'], True] | [['#...', 'D...'], True] | Passed |
| counter-clockwise turn #1 | [['...', '#..'], True] | [['...', '#..'], True] | Passed |
| control #1 | [['.#...#', '.#.#..'], False] | [['.#...#', '.#.#..'], False] | Passed |
SHA-256 / c99cf2efe87b6725d117cf51958db6100a121380edd1d6e162ab134f31a3de6b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(grid, prefab, ox, oy, rot):
p = [list(row) for row in prefab]
for _ in range(rot % 4):
p = [list(row) for row in zip(*p[::-1])]
g = [list(row) for row in grid]
for r, line in enumerate(p):
for c, t in enumerate(line):
if t in ' .':
continue
y, x = oy + r, ox + c
if not (0 <= y < len(g) and 0 <= x < len(g[0])) or g[y][x] == 'X':
return [grid, False]
g[y][x] = t
return [[''.join(row) for row in g], True]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('regression transparency #1',
[['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],
[['...', '#..', 'X..', '...', '#X.', '..X'], False]),
('fault site transparency #1', [['.#.', '#..'], [' ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),
('regression transparency #2',
[['##.', '..#', '#..', '.X.', '.#X', '#..'], ['.', 'D', '.'], 1, 1, 6],
[['##.', '..#', '#..', '.X.', '.#X', '#..'], False]),
('partial repair boundary #1',
[['......', '...X..', 'X.#...'], [' ', '.', ' '], -1, -1, 4],
[['......', '...X..', 'X.#...'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1', [['.#.', '#..'], [' ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),
('fault site transparency #2',
[['..#X.', '.....', '.....', '.XX#.'], ['##D', '#. ', '.# '], 0, 0, 0],
[['##DX.', '#....', '.#...', '.XX#.'], True]),
('partial repair boundary #1',
[['......', '...X..', 'X.#...'], [' ', '.', ' '], -1, -1, 4],
[['......', '...X..', 'X.#...'], False]),
('regression transparency #1',
[['.....', 'X..X#', 'X.X.X'], ['. .'], 1, 1, 2],
[['.....', 'X..X#', 'X.X.X'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1',
[['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],
[['..###.', '.#D...', '#.....'], True]),
('fault site transparency #2',
[['#.#', '#..', '#..', '#.X', 'X#.'], [' '], 1, 4, 3],
[['#.#', '#..', '#..', '#.X', 'X#.'], True]),
('regression transparency #1',
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], [' ', ' .', 'D.'], 4, 0, 2],
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], False]),
('regression transparency #2',
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], ['D', '.'], 2, 3, -1],
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('regression transparency #1',
[['##.', '..#', '#..', '.X.', '.#X', '#..'], ['.', 'D', '.'], 1, 1, 6],
[['##.', '..#', '#..', '.X.', '.#X', '#..'], False]),
('partial repair boundary #1',
[['.X.', '...', 'X..', '..X', '..#'], ['D.', '. '], 0, -1, 3],
[['.X.', '...', 'X..', '..X', '..#'], False]),
('regression transparency #2',
[['#...#.', '.##X..', '...X#.', '..XX..', '..#X.#'], ['.', '.'], 1, 1, -1],
[['#...#.', '...X..', '...X#.', '..XX..', '..#X.#'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1',
[['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],
[['#X', '..', '..', '#.', '#.'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('regression transparency #1',
[['.....', 'X..X#', 'X.X.X'], ['. .'], 1, 1, 2],
[['.....', 'X..X#', 'X.X.X'], False]),
('regression transparency #2',
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], [' ', ' .', 'D.'], 4, 0, 2],
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], False]),
('regression transparency #3',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('partial repair boundary #1',
[['..', 'X.', '.X', '.#', '.#', '#.'], ['. '], -1, 3, 1],
[['..', 'X.', '.X', '.#', '.#', '#.'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1',
[['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],
[['XX', 'X.', '..', '..', '..'], False])]]
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 |
|---|---|---|---|
| transparent overhang #1 | [['#.', '#.'], True] | [['#.', '#.'], True] | Passed |
| regression transparency #1 | [['.D.', 'D..', 'X#.', '...', '#X.', '..X'], True] | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | Failed |
| fault site transparency #1 | [['DD.', '#..'], True] | [['DD.', '#..'], True] | Passed |
| regression transparency #2 | [['##.', '..#', '#D.', '.X.', '.#X', '#..'], True] | [['##.', '..#', '#..', '.X.', '.#X', '#..'], False] | Failed |
| partial repair boundary #1 | [['......', '...X..', 'X.#...'], True] | [['......', '...X..', 'X.#...'], False] | Failed |
| quarter turn #1 | [['#...', 'D...'], True] | [['#...', 'D...'], True] | Passed |
| counter-clockwise turn #1 | [['...', '#..'], True] | [['...', '#..'], True] | Passed |
| control #1 | [['.#...#', '.#.#..'], False] | [['.#...#', '.#.#..'], False] | Passed |
SHA-256 / 1a01a6b67aac360cf284679927f97d398cfc0d68f0b9017f91a61983090ea9e5
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(grid, prefab, ox, oy, rot):
p = [list(row) for row in prefab]
for _ in range(rot % 4):
p = [list(row) for row in zip(*p[::-1])]
g = [list(row) for row in grid]
for r, line in enumerate(p):
for c, t in enumerate(line):
if t == ' ':
continue
y, x = oy + r, ox + c
if not (0 <= y < len(g) and 0 <= x < len(g[0])) or g[y][x] == 'X':
return [grid, False]
g[y][x] = t
return [[''.join(row) for row in g], True]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('regression transparency #1',
[['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],
[['...', '#..', 'X..', '...', '#X.', '..X'], False]),
('fault site transparency #1', [['.#.', '#..'], [' ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),
('regression transparency #2',
[['##.', '..#', '#..', '.X.', '.#X', '#..'], ['.', 'D', '.'], 1, 1, 6],
[['##.', '..#', '#..', '.X.', '.#X', '#..'], False]),
('partial repair boundary #1',
[['......', '...X..', 'X.#...'], [' ', '.', ' '], -1, -1, 4],
[['......', '...X..', 'X.#...'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1', [['.#.', '#..'], [' ', 'DD', '#.'], 0, -1, 4], [['DD.', '#..'], True]),
('fault site transparency #2',
[['..#X.', '.....', '.....', '.XX#.'], ['##D', '#. ', '.# '], 0, 0, 0],
[['##DX.', '#....', '.#...', '.XX#.'], True]),
('partial repair boundary #1',
[['......', '...X..', 'X.#...'], [' ', '.', ' '], -1, -1, 4],
[['......', '...X..', 'X.#...'], False]),
('regression transparency #1',
[['.....', 'X..X#', 'X.X.X'], ['. .'], 1, 1, 2],
[['.....', 'X..X#', 'X.X.X'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1',
[['...#..', '.#....', '#.....'], ['#.', ' .', '#D'], 2, 0, 5],
[['..###.', '.#D...', '#.....'], True]),
('fault site transparency #2',
[['#.#', '#..', '#..', '#.X', 'X#.'], [' '], 1, 4, 3],
[['#.#', '#..', '#..', '#.X', 'X#.'], True]),
('regression transparency #1',
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], [' ', ' .', 'D.'], 4, 0, 2],
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], False]),
('regression transparency #2',
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], ['D', '.'], 2, 3, -1],
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('fault site transparency #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('regression transparency #1',
[['##.', '..#', '#..', '.X.', '.#X', '#..'], ['.', 'D', '.'], 1, 1, 6],
[['##.', '..#', '#..', '.X.', '.#X', '#..'], False]),
('partial repair boundary #1',
[['.X.', '...', 'X..', '..X', '..#'], ['D.', '. '], 0, -1, 3],
[['.X.', '...', 'X..', '..X', '..#'], False]),
('regression transparency #2',
[['#...#.', '.##X..', '...X#.', '..XX..', '..#X.#'], ['.', '.'], 1, 1, -1],
[['#...#.', '...X..', '...X#.', '..XX..', '..#X.#'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1',
[['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],
[['#X', '..', '..', '#.', '#.'], False])],
[('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('regression transparency #1',
[['.....', 'X..X#', 'X.X.X'], ['. .'], 1, 1, 2],
[['.....', 'X..X#', 'X.X.X'], False]),
('regression transparency #2',
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], [' ', ' .', 'D.'], 4, 0, 2],
[['..#.X.', '......', '.#..#.', 'XX.#.#', 'X..#.X'], False]),
('regression transparency #3',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('partial repair boundary #1',
[['..', 'X.', '.X', '.#', '.#', '#.'], ['. '], -1, 3, 1],
[['..', 'X.', '.X', '.#', '.#', '#.'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('control #1',
[['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],
[['XX', 'X.', '..', '..', '..'], False])]]
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 |
|---|---|---|---|
| transparent overhang #1 | [['#.', '#.'], True] | [['#.', '#.'], True] | Passed |
| regression transparency #1 | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | Passed |
| fault site transparency #1 | [['DD.', '#..'], True] | [['DD.', '#..'], True] | Passed |
| regression transparency #2 | [['##.', '..#', '#..', '.X.', '.#X', '#..'], False] | [['##.', '..#', '#..', '.X.', '.#X', '#..'], False] | Passed |
| partial repair boundary #1 | [['......', '...X..', 'X.#...'], False] | [['......', '...X..', 'X.#...'], False] | Passed |
| quarter turn #1 | [['#...', 'D...'], True] | [['#...', 'D...'], True] | Passed |
| counter-clockwise turn #1 | [['...', '#..'], True] | [['...', '#..'], True] | Passed |
| control #1 | [['.#...#', '.#.#..'], False] | [['.#...#', '.#.#..'], False] | Passed |
SHA-256 / 30f2463d1d6f002d123abec125c60364ac56c9737897320cafaae3dca612b583
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:52.430170+00:00.
Case digest / 84865a675d553251a1fc593af1207c28d05c53a8340b12366a744ff7cf503e3f