FA-86401 / Procedural level generation constraints / Open access
Cave smoothing automaton: Birth and survival rules are swapped · case 01
Walls erode and floors fill in with the wrong thresholds.
ROOT CAUSE
Walls are tested against the birth set and floors against survival.
VERIFIED REPAIR
Restore `n in survive if wall else n in birth` at the rule selection step.
Unsuccessful approach: Accepting either set ignores the current cell state.
Case contract
One synchronous step over '#'/'.' rows. For each cell count wall cells among its 8 neighbours (the cell itself excluded); out-of-bounds neighbours count as walls when border_wall. A wall stays a wall when the count is in survive; a floor becomes a wall when the count is in birth. All counts use the input grid.
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, birth, survive, border_wall):
h = len(grid)
w = len(grid[0])
out = []
for r in range(h):
row = []
for c in range(w):
n = 0
for dr in (-1, 0, 1):
for dc in (-1, 0, 1):
if dr == 0 and dc == 0:
continue
rr, cc = r + dr, c + dc
if 0 <= rr < h and 0 <= cc < w:
n += grid[rr][cc] == '#'
elif border_wall:
n += 1
wall = grid[r][c] == '#'
row.append('#' if (n in birth if wall else n in survive) else '.')
out.append(''.join(row))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression rule selection #1',
[['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '##.#', '##.#', '#..#', '#.##']),
('regression rule selection #2',
[['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#..#', '....', '#...', '####']),
('regression rule selection #3',
[['.#', '.#', '##', '#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['..', '..', '..', '..']),
('regression rule selection #4', [['..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['..', '..']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('control #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....'])],
[('regression rule selection #1',
[['.#', '.#', '##', '#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['..', '..', '..', '..']),
('regression rule selection #2', [['..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['..', '..']),
('regression rule selection #3',
[['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.....', '.##..', '.#...', '...#.', '.....']),
('regression rule selection #4',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('control #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
('control #2', [['.#', '..'], [3], [2, 3], False], ['..', '..'])],
[('fault site rule selection #1',
[['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.##.', '.##.']),
('regression rule selection #1',
[['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.....', '.##..', '.#...', '...#.', '.....']),
('regression rule selection #2',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('regression rule selection #3',
[['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.#...', '####.', '.###.', '...#.', '.....', '.....']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..']),
('control #2', [['..##.#', '.#####'], [3], [2, 3], True], ['......', '......'])],
[('regression rule selection #1',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('regression rule selection #2',
[['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.#...', '####.', '.###.', '...#.', '.....', '.....']),
('regression rule selection #3',
[['...##', '.####', '##.##'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#.###', '#####', '#####']),
('regression rule selection #4',
[['..#.', '..##', '##.#', '.###', '....'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '#.##', '####', '#.##', '####']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('control #1', [['#', '#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True], ['#', '#']),
('control #2', [['.#..##'], [3], [2, 3], True], ['......'])],
[('regression rule selection #1',
[['...##', '.####', '##.##'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#.###', '#####', '#####']),
('fault site rule selection #1',
[['#.', '#.', '.#'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '##']),
('regression rule selection #2',
[['..#.', '..##', '##.#', '.###', '....'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '#.##', '####', '#.##', '####']),
('regression rule selection #3',
[['##', '..', '.#', '##', '..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], False],
['..', '..', '..', '..', '..', '..']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('control #1',
[['..', '##', '#.', '#.', '##', '.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['##', '##', '##', '##', '##', '##']),
('control #2', [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['#', '#', '#', '#'])]]
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 |
|---|---|---|---|
| regression rule selection #1 | ['####', '#..#', '#.#.', '#.##', '#.##'] | ['####', '##.#', '##.#', '#..#', '#.##'] | Failed |
| regression rule selection #2 | ['###.', '#..#', '####', '##.#'] | ['#..#', '....', '#...', '####'] | Failed |
| regression rule selection #3 | ['..', '#.', '..', '..'] | ['..', '..', '..', '..'] | Failed |
| regression rule selection #4 | ['##', '##'] | ['..', '..'] | Failed |
| open field corner #1 | ['#.#', '...', '#.#'] | ['#.#', '...', '#.#'] | Passed |
| lone pillar #1 | ['...', '...', '...'] | ['...', '...', '...'] | Passed |
| dense block #1 | ['.#.', '###', '.#.'] | ['.#.', '###', '.#.'] | Passed |
| control #1 | ['....', '....'] | ['....', '....'] | Passed |
SHA-256 / a03a8981dd1a94279601feafd65d820fcb418e439a0373336b7f8faecd6bdc4c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(grid, birth, survive, border_wall):
h = len(grid)
w = len(grid[0])
out = []
for r in range(h):
row = []
for c in range(w):
n = 0
for dr in (-1, 0, 1):
for dc in (-1, 0, 1):
if dr == 0 and dc == 0:
continue
rr, cc = r + dr, c + dc
if 0 <= rr < h and 0 <= cc < w:
n += grid[rr][cc] == '#'
elif border_wall:
n += 1
wall = grid[r][c] == '#'
row.append('#' if (n in survive or n in birth) else '.')
out.append(''.join(row))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression rule selection #1',
[['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '##.#', '##.#', '#..#', '#.##']),
('regression rule selection #2',
[['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#..#', '....', '#...', '####']),
('regression rule selection #3',
[['.#', '.#', '##', '#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['..', '..', '..', '..']),
('regression rule selection #4', [['..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['..', '..']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('control #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....'])],
[('regression rule selection #1',
[['.#', '.#', '##', '#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['..', '..', '..', '..']),
('regression rule selection #2', [['..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['..', '..']),
('regression rule selection #3',
[['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.....', '.##..', '.#...', '...#.', '.....']),
('regression rule selection #4',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('control #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
('control #2', [['.#', '..'], [3], [2, 3], False], ['..', '..'])],
[('fault site rule selection #1',
[['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.##.', '.##.']),
('regression rule selection #1',
[['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.....', '.##..', '.#...', '...#.', '.....']),
('regression rule selection #2',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('regression rule selection #3',
[['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.#...', '####.', '.###.', '...#.', '.....', '.....']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..']),
('control #2', [['..##.#', '.#####'], [3], [2, 3], True], ['......', '......'])],
[('regression rule selection #1',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('regression rule selection #2',
[['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.#...', '####.', '.###.', '...#.', '.....', '.....']),
('regression rule selection #3',
[['...##', '.####', '##.##'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#.###', '#####', '#####']),
('regression rule selection #4',
[['..#.', '..##', '##.#', '.###', '....'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '#.##', '####', '#.##', '####']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('control #1', [['#', '#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True], ['#', '#']),
('control #2', [['.#..##'], [3], [2, 3], True], ['......'])],
[('regression rule selection #1',
[['...##', '.####', '##.##'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#.###', '#####', '#####']),
('fault site rule selection #1',
[['#.', '#.', '.#'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '##']),
('regression rule selection #2',
[['..#.', '..##', '##.#', '.###', '....'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '#.##', '####', '#.##', '####']),
('regression rule selection #3',
[['##', '..', '.#', '##', '..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], False],
['..', '..', '..', '..', '..', '..']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('control #1',
[['..', '##', '#.', '#.', '##', '.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['##', '##', '##', '##', '##', '##']),
('control #2', [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['#', '#', '#', '#'])]]
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 |
|---|---|---|---|
| regression rule selection #1 | ['####', '##.#', '####', '#.##', '#.##'] | ['####', '##.#', '##.#', '#..#', '#.##'] | Failed |
| regression rule selection #2 | ['####', '#..#', '####', '####'] | ['#..#', '....', '#...', '####'] | Failed |
| regression rule selection #3 | ['..', '#.', '..', '..'] | ['..', '..', '..', '..'] | Failed |
| regression rule selection #4 | ['##', '##'] | ['..', '..'] | Failed |
| open field corner #1 | ['#.#', '...', '#.#'] | ['#.#', '...', '#.#'] | Passed |
| lone pillar #1 | ['...', '...', '...'] | ['...', '...', '...'] | Passed |
| dense block #1 | ['.#.', '###', '.#.'] | ['.#.', '###', '.#.'] | Passed |
| control #1 | ['....', '....'] | ['....', '....'] | Passed |
SHA-256 / bae52d76ff84c948e8d87093d63a651e50d1eaf2d302f40750b50c91a8ec7843
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(grid, birth, survive, border_wall):
h = len(grid)
w = len(grid[0])
out = []
for r in range(h):
row = []
for c in range(w):
n = 0
for dr in (-1, 0, 1):
for dc in (-1, 0, 1):
if dr == 0 and dc == 0:
continue
rr, cc = r + dr, c + dc
if 0 <= rr < h and 0 <= cc < w:
n += grid[rr][cc] == '#'
elif border_wall:
n += 1
wall = grid[r][c] == '#'
row.append('#' if (n in survive if wall else n in birth) else '.')
out.append(''.join(row))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression rule selection #1',
[['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '##.#', '##.#', '#..#', '#.##']),
('regression rule selection #2',
[['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#..#', '....', '#...', '####']),
('regression rule selection #3',
[['.#', '.#', '##', '#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['..', '..', '..', '..']),
('regression rule selection #4', [['..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['..', '..']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('control #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....'])],
[('regression rule selection #1',
[['.#', '.#', '##', '#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['..', '..', '..', '..']),
('regression rule selection #2', [['..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['..', '..']),
('regression rule selection #3',
[['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.....', '.##..', '.#...', '...#.', '.....']),
('regression rule selection #4',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('control #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
('control #2', [['.#', '..'], [3], [2, 3], False], ['..', '..'])],
[('fault site rule selection #1',
[['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.##.', '.##.']),
('regression rule selection #1',
[['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.....', '.##..', '.#...', '...#.', '.....']),
('regression rule selection #2',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('regression rule selection #3',
[['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.#...', '####.', '.###.', '...#.', '.....', '.....']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..']),
('control #2', [['..##.#', '.#####'], [3], [2, 3], True], ['......', '......'])],
[('regression rule selection #1',
[['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '..', '##']),
('regression rule selection #2',
[['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
['.#...', '####.', '.###.', '...#.', '.....', '.....']),
('regression rule selection #3',
[['...##', '.####', '##.##'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#.###', '#####', '#####']),
('regression rule selection #4',
[['..#.', '..##', '##.#', '.###', '....'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '#.##', '####', '#.##', '####']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
('control #1', [['#', '#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True], ['#', '#']),
('control #2', [['.#..##'], [3], [2, 3], True], ['......'])],
[('regression rule selection #1',
[['...##', '.####', '##.##'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['#.###', '#####', '#####']),
('fault site rule selection #1',
[['#.', '#.', '.#'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
['##', '##', '##']),
('regression rule selection #2',
[['..#.', '..##', '##.#', '.###', '....'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['####', '#.##', '####', '#.##', '####']),
('regression rule selection #3',
[['##', '..', '.#', '##', '..', '..'], [6, 7, 8], [3, 4, 5, 6, 7, 8], False],
['..', '..', '..', '..', '..', '..']),
('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
('open field corner #1',
[['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['#.#', '...', '#.#']),
('control #1',
[['..', '##', '#.', '#.', '##', '.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
['##', '##', '##', '##', '##', '##']),
('control #2', [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True], ['#', '#', '#', '#'])]]
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 |
|---|---|---|---|
| regression rule selection #1 | ['####', '##.#', '##.#', '#..#', '#.##'] | ['####', '##.#', '##.#', '#..#', '#.##'] | Passed |
| regression rule selection #2 | ['#..#', '....', '#...', '####'] | ['#..#', '....', '#...', '####'] | Passed |
| regression rule selection #3 | ['..', '..', '..', '..'] | ['..', '..', '..', '..'] | Passed |
| regression rule selection #4 | ['..', '..'] | ['..', '..'] | Passed |
| open field corner #1 | ['#.#', '...', '#.#'] | ['#.#', '...', '#.#'] | Passed |
| lone pillar #1 | ['...', '...', '...'] | ['...', '...', '...'] | Passed |
| dense block #1 | ['.#.', '###', '.#.'] | ['.#.', '###', '.#.'] | Passed |
| control #1 | ['....', '....'] | ['....', '....'] | Passed |
SHA-256 / 5b7321e79ac9cdaabc53453a1f97dff1cd893ddfd18e4804abfda76e44bbe466
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:49.281046+00:00.
Case digest / 852cc1a6e48b021fe6fb3875dca9a0203d94a5cb4dd132043025a8b67ba8bc1e