FA-86736 / Procedural level generation constraints / Open access
Rotated prefab stamping: Negative rotations are ignored · case 01
Counter-clockwise requests leave prefabs unrotated.
ROOT CAUSE
A negative rotation count yields an empty loop.
VERIFIED REPAIR
Restore `range(rot % 4)` at the rotation count step.
Unsuccessful approach: Taking the absolute value turns counter-clockwise into clockwise.
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):
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 = [[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],
[['...', '#..', 'X..', '...', '#X.', '..X'], False]),
('regression rotation count #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('partial repair boundary #1',
[['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],
[['XX', 'X.', '..', '..', '..'], False]),
('regression rotation count #2',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('regression rotation count #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('fault site rotation count #1',
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], ['D', '.'], 2, 3, -1],
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], False]),
('regression rotation count #2',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('partial repair boundary #1',
[['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],
[['.X.', '...', 'X##'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['X#.XX', '....X', '...#.', 'X...#', 'X....'], ['D', 'D'], 1, 0, -1],
[['XDDXX', '....X', '...#.', 'X...#', 'X....'], True]),
('fault site rotation count #2',
[['#...#.', '.##X..', '...X#.', '..XX..', '..#X.#'], ['.', '.'], 1, 1, -1],
[['#...#.', '...X..', '...X#.', '..XX..', '..#X.#'], True]),
('partial repair boundary #1',
[['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],
[['.X.', '...', 'X##'], True]),
('regression rotation count #1', [['..X', 'X..'], [' ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('regression rotation count #1',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('regression rotation count #2', [['..X', 'X..'], [' ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),
('regression rotation count #3',
[['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],
[['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),
('partial repair boundary #1',
[['..', '..', '.X', '..'], [' D.'], 0, 2, -3],
[['..', '..', '.X', '..'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1',
[['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],
[['#X', '..', '..', '#.', '#.'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['..', '..', '..'], [' ', ' ', 'D'], 0, 0, -2],
[['D.', '..', '..'], True]),
('regression rotation count #1',
[['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],
[['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),
('partial repair boundary #1', [['..X.', '#.#.'], ['# '], 0, 0, -3], [['#.X.', '#.#.'], True]),
('regression rotation count #2',
[['.....', '....#', '....X', '#.XX#', '.##..'], ['.##'], 0, 0, -1],
[['#....', '#...#', '....X', '#.XX#', '.##..'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.X.', '...'], ['D#.', 'D #'], -1, -1, -1], [['.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 |
|---|---|---|---|
| counter-clockwise turn #1 | [['#..', '...'], True] | [['...', '#..'], True] | Failed |
| fault site rotation count #1 | [['.D.', '#.D', 'X..', '...', '#X.', '..X'], True] | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | Failed |
| regression rotation count #1 | [['..#', '...', '..#', '#D#'], True] | [['..#', '...', '.D.', '###'], True] | Failed |
| partial repair boundary #1 | [['XX', 'X.', '..', '..', '..'], False] | [['XX', 'X.', '..', '..', '..'], False] | Passed |
| regression rotation count #2 | [['...', '...', '...', 'X..', 'X..', '...'], True] | [['...', '...', '...', 'X..', 'X#.', '...'], True] | Failed |
| quarter turn #1 | [['#...', 'D...'], True] | [['#...', 'D...'], True] | Passed |
| transparent overhang #1 | [['#.', '#.'], True] | [['#.', '#.'], True] | Passed |
| control #1 | [['.#...#', '.#.#..'], False] | [['.#...#', '.#.#..'], False] | Passed |
SHA-256 / 63f12ef84364104764a40f5165aeb0a880c09669af75447fd6ecaff47dd301c3
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(abs(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 = [[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],
[['...', '#..', 'X..', '...', '#X.', '..X'], False]),
('regression rotation count #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('partial repair boundary #1',
[['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],
[['XX', 'X.', '..', '..', '..'], False]),
('regression rotation count #2',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('regression rotation count #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('fault site rotation count #1',
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], ['D', '.'], 2, 3, -1],
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], False]),
('regression rotation count #2',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('partial repair boundary #1',
[['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],
[['.X.', '...', 'X##'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['X#.XX', '....X', '...#.', 'X...#', 'X....'], ['D', 'D'], 1, 0, -1],
[['XDDXX', '....X', '...#.', 'X...#', 'X....'], True]),
('fault site rotation count #2',
[['#...#.', '.##X..', '...X#.', '..XX..', '..#X.#'], ['.', '.'], 1, 1, -1],
[['#...#.', '...X..', '...X#.', '..XX..', '..#X.#'], True]),
('partial repair boundary #1',
[['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],
[['.X.', '...', 'X##'], True]),
('regression rotation count #1', [['..X', 'X..'], [' ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('regression rotation count #1',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('regression rotation count #2', [['..X', 'X..'], [' ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),
('regression rotation count #3',
[['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],
[['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),
('partial repair boundary #1',
[['..', '..', '.X', '..'], [' D.'], 0, 2, -3],
[['..', '..', '.X', '..'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1',
[['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],
[['#X', '..', '..', '#.', '#.'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['..', '..', '..'], [' ', ' ', 'D'], 0, 0, -2],
[['D.', '..', '..'], True]),
('regression rotation count #1',
[['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],
[['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),
('partial repair boundary #1', [['..X.', '#.#.'], ['# '], 0, 0, -3], [['#.X.', '#.#.'], True]),
('regression rotation count #2',
[['.....', '....#', '....X', '#.XX#', '.##..'], ['.##'], 0, 0, -1],
[['#....', '#...#', '....X', '#.XX#', '.##..'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.X.', '...'], ['D#.', 'D #'], -1, -1, -1], [['.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 |
|---|---|---|---|
| counter-clockwise turn #1 | [['.#.', '...'], True] | [['...', '#..'], True] | Failed |
| fault site rotation count #1 | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | Passed |
| regression rotation count #1 | [['..#', '...', '.##', '##D'], True] | [['..#', '...', '.D.', '###'], True] | Failed |
| partial repair boundary #1 | [['XX', 'X.', '..', '..', 'DD'], True] | [['XX', 'X.', '..', '..', '..'], False] | Failed |
| regression rotation count #2 | [['...', '...', '...', 'X#.', 'X#.', '...'], False] | [['...', '...', '...', 'X..', 'X#.', '...'], True] | Failed |
| quarter turn #1 | [['#...', 'D...'], True] | [['#...', 'D...'], True] | Passed |
| transparent overhang #1 | [['#.', '#.'], True] | [['#.', '#.'], True] | Passed |
| control #1 | [['.#...#', '.#.#..'], False] | [['.#...#', '.#.#..'], False] | Passed |
SHA-256 / 42fc94751bb3ed31a0d08171a5d61e389282f1b0679569ba72341bab9f167686
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 = [[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['...', '#..', 'X..', '...', '#X.', '..X'], ['.D.', '#.D'], 0, 0, -1],
[['...', '#..', 'X..', '...', '#X.', '..X'], False]),
('regression rotation count #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('partial repair boundary #1',
[['XX', 'X.', '..', '..', '..'], ['D', 'D', ' '], 0, 4, -3],
[['XX', 'X.', '..', '..', '..'], False]),
('regression rotation count #2',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('regression rotation count #1',
[['..#', '...', '...', '##.'], [' #', 'D#'], 1, 2, -3],
[['..#', '...', '.D.', '###'], True]),
('fault site rotation count #1',
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], ['D', '.'], 2, 3, -1],
[['.....#', '#.#..X', 'X.....', '..#XX.', '.#..X.', '...#X.'], False]),
('regression rotation count #2',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('partial repair boundary #1',
[['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],
[['.X.', '...', 'X##'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['X#.XX', '....X', '...#.', 'X...#', 'X....'], ['D', 'D'], 1, 0, -1],
[['XDDXX', '....X', '...#.', 'X...#', 'X....'], True]),
('fault site rotation count #2',
[['#...#.', '.##X..', '...X#.', '..XX..', '..#X.#'], ['.', '.'], 1, 1, -1],
[['#...#.', '...X..', '...X#.', '..XX..', '..#X.#'], True]),
('partial repair boundary #1',
[['.X.', '...', 'X#.'], ['#', ' '], 2, 2, -1],
[['.X.', '...', 'X##'], True]),
('regression rotation count #1', [['..X', 'X..'], [' ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.#...#', '.#.#..'], [' ', '# '], 1, -1, 6], [['.#...#', '.#.#..'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('regression rotation count #1',
[['...', '...', '...', 'X#.', 'X#.', '...'], ['.', '.', ' '], 1, 3, -1],
[['...', '...', '...', 'X..', 'X#.', '...'], True]),
('regression rotation count #2', [['..X', 'X..'], [' ', 'D. '], 0, -1, -1], [['..X', 'XD.'], True]),
('regression rotation count #3',
[['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],
[['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),
('partial repair boundary #1',
[['..', '..', '.X', '..'], [' D.'], 0, 2, -3],
[['..', '..', '.X', '..'], False]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1',
[['#X', '..', '..', '#.', '#.'], [' D', '.#', '.#'], -1, 2, 3],
[['#X', '..', '..', '#.', '#.'], False])],
[('counter-clockwise turn #1', [['...', '...'], ['#.', '..'], 0, 0, -1], [['...', '#..'], True]),
('fault site rotation count #1',
[['..', '..', '..'], [' ', ' ', 'D'], 0, 0, -2],
[['D.', '..', '..'], True]),
('regression rotation count #1',
[['..X.', '..##', 'XX..', 'X...', '#X..'], ['D', '.'], 1, 1, -3],
[['..X.', '..D#', 'XX..', 'X...', '#X..'], True]),
('partial repair boundary #1', [['..X.', '#.#.'], ['# '], 0, 0, -3], [['#.X.', '#.#.'], True]),
('regression rotation count #2',
[['.....', '....#', '....X', '#.XX#', '.##..'], ['.##'], 0, 0, -1],
[['#....', '#...#', '....X', '#.XX#', '.##..'], True]),
('quarter turn #1', [['....', '....'], ['#D'], 0, 0, 1], [['#...', 'D...'], True]),
('transparent overhang #1', [['..', '..'], [' #', ' #'], -1, 0, 0], [['#.', '#.'], True]),
('control #1', [['.X.', '...'], ['D#.', 'D #'], -1, -1, -1], [['.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 |
|---|---|---|---|
| counter-clockwise turn #1 | [['...', '#..'], True] | [['...', '#..'], True] | Passed |
| fault site rotation count #1 | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | [['...', '#..', 'X..', '...', '#X.', '..X'], False] | Passed |
| regression rotation count #1 | [['..#', '...', '.D.', '###'], True] | [['..#', '...', '.D.', '###'], True] | Passed |
| partial repair boundary #1 | [['XX', 'X.', '..', '..', '..'], False] | [['XX', 'X.', '..', '..', '..'], False] | Passed |
| regression rotation count #2 | [['...', '...', '...', 'X..', 'X#.', '...'], True] | [['...', '...', '...', 'X..', 'X#.', '...'], True] | Passed |
| quarter turn #1 | [['#...', 'D...'], True] | [['#...', 'D...'], True] | Passed |
| transparent overhang #1 | [['#.', '#.'], True] | [['#.', '#.'], True] | Passed |
| control #1 | [['.#...#', '.#.#..'], False] | [['.#...#', '.#.#..'], False] | Passed |
SHA-256 / d6be26948f0246b9d45df224bcecca110a8f2d94853dadb324d3cbe8ded90f0b
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.212382+00:00.
Case digest / cfbe83546e78d40cc1ac6a0fb99d1c2abdd93c0a9abe96284d723b50dd762206