FAILURE MAP
← Case archive

FA-86386 / Procedural level generation constraints / Open access

Cave smoothing automaton: Only diagonal neighbours are counted · case 01

Caves smooth into diagonal checkerboards.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The self-exclusion test skips every orthogonal neighbour as well.

VERIFIED REPAIR

Restore `if dr == 0 and dc == 0:` at the self exclusion step.

Unsuccessful approach: Skipping the main diagonal drops two real neighbours.

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 or 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 = [[('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
  ('regression self exclusion #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
  ('regression self exclusion #2',
   [['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['####', '##.#', '##.#', '#..#', '#.##']),
  ('regression self exclusion #3',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..']),
  ('control #2', [['#', '#'], [5, 6, 7, 8], [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],
   ['#.#', '...', '#.#']),
  ('regression self exclusion #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
  ('regression self exclusion #2',
   [['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['####', '##.#', '##.#', '#..#', '#.##']),
  ('regression self exclusion #3',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('regression self exclusion #4',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..'])],
 [('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('fault site self exclusion #1', [['..##.#', '.#####'], [3], [2, 3], True], ['......', '......']),
  ('regression self exclusion #1',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('regression self exclusion #2',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('regression self exclusion #3',
   [['#..#.', '#####', '.#..#', '..##.', '###..', '..#..'], [3], [2, 3], 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], False], ['..', '..', '..', '..']),
  ('control #2', [['..', '..'], [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],
   ['#.#', '...', '#.#']),
  ('fault site self exclusion #1',
   [['..', '##', '#.', '#.', '##', '.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['##', '##', '##', '##', '##', '##']),
  ('regression self exclusion #1',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('regression self exclusion #2',
   [['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.##.', '.##.']),
  ('regression self exclusion #3',
   [['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.....', '.##..', '.#...', '...#.', '.....']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#..##'], [3], [2, 3], True], ['......'])],
 [('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('regression self exclusion #1',
   [['#..#.', '#####', '.#..#', '..##.', '###..', '..#..'], [3], [2, 3], True],
   ['.....', '.....', '.....', '...#.', '.....', '.....']),
  ('regression self exclusion #2',
   [['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.##.', '.##.']),
  ('regression self exclusion #3',
   [['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['##', '##', '..', '##']),
  ('regression self exclusion #4',
   [['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.#...', '####.', '.###.', '...#.', '.....', '.....']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1',
   [['..#', '.#.', '..#', '..#', '##.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], False],
   ['...', '...', '...', '...', '...']),
  ('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 fixtureActualExpectedOutcome
open field corner #1['...', '...', '...']['#.#', '...', '#.#']Failed
dense block #1['...', '.#.', '...']['.#.', '###', '.#.']Failed
regression self exclusion #1['####', '..#.']['....', '....']Failed
regression self exclusion #2['....', '....', '....', '....', '....']['####', '##.#', '##.#', '#..#', '#.##']Failed
regression self exclusion #3['...#', '....', '#...', '##.#']['#..#', '....', '#...', '####']Failed
lone pillar #1['...', '...', '...']['...', '...', '...']Passed
control #1['..', '..']['..', '..']Passed
control #2['#', '#']['#', '#']Passed

SHA-256 / 5021b69334304292f550089c080793a6337414550ce79ae350c0d91800be5a13

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 == dc:
                        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 = [[('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
  ('regression self exclusion #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
  ('regression self exclusion #2',
   [['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['####', '##.#', '##.#', '#..#', '#.##']),
  ('regression self exclusion #3',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..']),
  ('control #2', [['#', '#'], [5, 6, 7, 8], [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],
   ['#.#', '...', '#.#']),
  ('regression self exclusion #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
  ('regression self exclusion #2',
   [['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['####', '##.#', '##.#', '#..#', '#.##']),
  ('regression self exclusion #3',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('regression self exclusion #4',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..'])],
 [('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('fault site self exclusion #1', [['..##.#', '.#####'], [3], [2, 3], True], ['......', '......']),
  ('regression self exclusion #1',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('regression self exclusion #2',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('regression self exclusion #3',
   [['#..#.', '#####', '.#..#', '..##.', '###..', '..#..'], [3], [2, 3], 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], False], ['..', '..', '..', '..']),
  ('control #2', [['..', '..'], [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],
   ['#.#', '...', '#.#']),
  ('fault site self exclusion #1',
   [['..', '##', '#.', '#.', '##', '.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['##', '##', '##', '##', '##', '##']),
  ('regression self exclusion #1',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('regression self exclusion #2',
   [['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.##.', '.##.']),
  ('regression self exclusion #3',
   [['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.....', '.##..', '.#...', '...#.', '.....']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#..##'], [3], [2, 3], True], ['......'])],
 [('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('regression self exclusion #1',
   [['#..#.', '#####', '.#..#', '..##.', '###..', '..#..'], [3], [2, 3], True],
   ['.....', '.....', '.....', '...#.', '.....', '.....']),
  ('regression self exclusion #2',
   [['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.##.', '.##.']),
  ('regression self exclusion #3',
   [['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['##', '##', '..', '##']),
  ('regression self exclusion #4',
   [['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.#...', '####.', '.###.', '...#.', '.....', '.....']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1',
   [['..#', '.#.', '..#', '..#', '##.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], False],
   ['...', '...', '...', '...', '...']),
  ('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 fixtureActualExpectedOutcome
open field corner #1['...', '...', '...']['#.#', '...', '#.#']Failed
dense block #1['.#.', '###', '.#.']['.#.', '###', '.#.']Passed
regression self exclusion #1['..#.', '..#.']['....', '....']Failed
regression self exclusion #2['#...', '##..', '#...', '....', '...#']['####', '##.#', '##.#', '#..#', '#.##']Failed
regression self exclusion #3['...#', '....', '#...', '####']['#..#', '....', '#...', '####']Failed
lone pillar #1['...', '...', '...']['...', '...', '...']Passed
control #1['..', '..']['..', '..']Passed
control #2['#', '#']['#', '#']Passed

SHA-256 / 19c7897048ff048071f155b83076b9527b3cef6c8127ed72f0052cd1a0a5ff4c

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 = [[('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('dense block #1', [['###', '###', '###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['.#.', '###', '.#.']),
  ('regression self exclusion #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
  ('regression self exclusion #2',
   [['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['####', '##.#', '##.#', '#..#', '#.##']),
  ('regression self exclusion #3',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..']),
  ('control #2', [['#', '#'], [5, 6, 7, 8], [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],
   ['#.#', '...', '#.#']),
  ('regression self exclusion #1', [['###.', '#...'], [3], [2, 3], True], ['....', '....']),
  ('regression self exclusion #2',
   [['....', '###.', '##.#', '....', '.#.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['####', '##.#', '##.#', '#..#', '#.##']),
  ('regression self exclusion #3',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('regression self exclusion #4',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#', '..'], [3], [2, 3], False], ['..', '..'])],
 [('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('fault site self exclusion #1', [['..##.#', '.#####'], [3], [2, 3], True], ['......', '......']),
  ('regression self exclusion #1',
   [['...#', '.#..', '#...', '####'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#..#', '....', '#...', '####']),
  ('regression self exclusion #2',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('regression self exclusion #3',
   [['#..#.', '#####', '.#..#', '..##.', '###..', '..#..'], [3], [2, 3], 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], False], ['..', '..', '..', '..']),
  ('control #2', [['..', '..'], [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],
   ['#.#', '...', '#.#']),
  ('fault site self exclusion #1',
   [['..', '##', '#.', '#.', '##', '.#'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['##', '##', '##', '##', '##', '##']),
  ('regression self exclusion #1',
   [['.', '.', '#', '.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['#', '#', '#', '#']),
  ('regression self exclusion #2',
   [['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.##.', '.##.']),
  ('regression self exclusion #3',
   [['.#.#.', '##...', '#.###', '#....', '#..##'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.....', '.##..', '.#...', '...#.', '.....']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1', [['.#..##'], [3], [2, 3], True], ['......'])],
 [('open field corner #1',
   [['...', '...', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], True],
   ['#.#', '...', '#.#']),
  ('regression self exclusion #1',
   [['#..#.', '#####', '.#..#', '..##.', '###..', '..#..'], [3], [2, 3], True],
   ['.....', '.....', '.....', '...#.', '.....', '.....']),
  ('regression self exclusion #2',
   [['###.', '.###'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.##.', '.##.']),
  ('regression self exclusion #3',
   [['##', '#.', '..', '#.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], True],
   ['##', '##', '..', '##']),
  ('regression self exclusion #4',
   [['##.##', '###..', '#.##.', '...##', '#..#.', '##.#.'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False],
   ['.#...', '####.', '.###.', '...#.', '.....', '.....']),
  ('lone pillar #1', [['...', '.#.', '...'], [5, 6, 7, 8], [4, 5, 6, 7, 8], False], ['...', '...', '...']),
  ('control #1',
   [['..#', '.#.', '..#', '..#', '##.'], [6, 7, 8], [3, 4, 5, 6, 7, 8], False],
   ['...', '...', '...', '...', '...']),
  ('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 fixtureActualExpectedOutcome
open field corner #1['#.#', '...', '#.#']['#.#', '...', '#.#']Passed
dense block #1['.#.', '###', '.#.']['.#.', '###', '.#.']Passed
regression self exclusion #1['....', '....']['....', '....']Passed
regression self exclusion #2['####', '##.#', '##.#', '#..#', '#.##']['####', '##.#', '##.#', '#..#', '#.##']Passed
regression self exclusion #3['#..#', '....', '#...', '####']['#..#', '....', '#...', '####']Passed
lone pillar #1['...', '...', '...']['...', '...', '...']Passed
control #1['..', '..']['..', '..']Passed
control #2['#', '#']['#', '#']Passed

SHA-256 / cdcc3d5f8fe02291e2db6778a99ddb40998dec41a3665b0e9b883b235b9d508b

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:48.990005+00:00.

Case digest / 55535ea3dde11ea99729d245250f7cd3846dfe11d6817ebdb09c0d10a7494bd2