FA-86341 / Procedural level generation constraints / Open access
Room placement with padding: One-tile-wide rooms are accepted · case 01
Generated levels contain 2-wide slivers flagged as rooms.
ROOT CAUSE
The size filter rejects a room only when both sides are too small.
VERIFIED REPAIR
Restore `w < 3 or h < 3` at the minimum room size step.
Unsuccessful approach: An area test still accepts long rooms that are two tiles thin.
Case contract
Candidates [x, y, w, h] are tried in order. A room needs w >= 3 and h >= 3, must stay inside a one-tile border (x >= 1, y >= 1, x+w <= width-1, y+h <= height-1) and must keep at least pad empty tiles to every accepted room on both axes (rooms conflict when their pad-expanded extents overlap). Returns indices of accepted candidates.
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(width, height, candidates, pad):
placed = []
out = []
for i, (x, y, w, h) in enumerate(candidates):
if w < 3 and h < 3:
continue
if x < 1 or y < 1 or x + w > width - 1 or y + h > height - 1:
continue
ok = True
for px, py, pw, ph in placed:
if x < px + pw + pad and px < x + w + pad and y < py + ph + pad and py < y + h + pad:
ok = False
break
if ok:
placed.append((x, y, w, h))
out.append(i)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('fault site minimum room size #1',
[13,
21,
[[9, 8, 5, 3], [11, 14, 8, 3], [7, 15, 3, 2], [-1, 10, 8, 6], [0, 3, 3, 3], [10, 0, 5, 6], [8, 13, 2, 4]],
2],
[]),
('regression minimum room size #1',
[30, 11, [[-1, 1, 2, 2], [24, -1, 5, 3], [16, 4, 5, 6], [3, 1, 2, 6], [26, 2, 2, 3], [5, 9, 8, 2]], 0],
[2]),
('regression minimum room size #2',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #3',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[30, 11, [[-1, 1, 2, 2], [24, -1, 5, 3], [16, 4, 5, 6], [3, 1, 2, 6], [26, 2, 2, 3], [5, 9, 8, 2]], 0],
[2]),
('fault site minimum room size #1',
[25,
23,
[[5, 9, 3, 6],
[8, 10, 5, 6],
[9, 14, 5, 4],
[-1, 1, 3, 6],
[-1, 14, 2, 3],
[17, 18, 4, 2],
[4, 20, 3, 4]],
1],
[0, 2]),
('regression minimum room size #2',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #3',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('fault site minimum room size #1',
[19, 27, [[6, 2, 3, 2], [4, 23, 5, 4], [4, 20, 2, 3], [12, 4, 8, 2], [10, 14, 8, 6]], 1],
[4]),
('regression minimum room size #1',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #2',
[24, 17, [[21, 15, 8, 3], [1, 9, 3, 4], [1, 9, 5, 2], [1, 1, 5, 2], [20, 13, 5, 6]], 2],
[1]),
('regression minimum room size #3',
[18, 14, [[11, 10, 3, 2], [16, 1, 2, 4], [11, 10, 5, 2], [4, 10, 5, 3], [9, 4, 8, 3]], 1],
[3, 4]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('regression minimum room size #2',
[24, 17, [[21, 15, 8, 3], [1, 9, 3, 4], [1, 9, 5, 2], [1, 1, 5, 2], [20, 13, 5, 6]], 2],
[1]),
('regression minimum room size #3', [8, 25, [[0, 8, 3, 6], [4, -1, 4, 3], [1, 17, 5, 2]], 1], []),
('regression minimum room size #4',
[29, 9, [[20, 7, 8, 2], [8, 5, 3, 6], [21, 4, 2, 4], [4, 3, 8, 2]], 2],
[]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1',
[11, 28, [[1, 8, 8, 4], [5, 14, 3, 3], [1, 4, 5, 3], [7, 23, 2, 2], [-1, 11, 5, 2]], 2],
[0, 1])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[18, 14, [[11, 10, 3, 2], [16, 1, 2, 4], [11, 10, 5, 2], [4, 10, 5, 3], [9, 4, 8, 3]], 1],
[3, 4]),
('regression minimum room size #2', [8, 25, [[0, 8, 3, 6], [4, -1, 4, 3], [1, 17, 5, 2]], 1], []),
('regression minimum room size #3',
[24, 25, [[12, 19, 2, 4], [3, 10, 5, 6], [19, 19, 5, 3], [13, 6, 2, 6], [6, 23, 8, 2], [10, 14, 3, 3]], 0],
[1, 5]),
('regression minimum room size #4',
[16, 18, [[8, 5, 2, 6], [4, 5, 3, 2], [4, 3, 3, 2], [4, 16, 2, 6], [2, 2, 3, 3], [-1, 1, 3, 3]], 0],
[4]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [26, 13, [[7, 10, 8, 4], [22, -1, 3, 6], [3, 3, 4, 6], [17, 0, 8, 2]], 1], [2])]]
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 |
|---|---|---|---|
| thin corridor room #1 | [0] | [1] | Failed |
| fault site minimum room size #1 | [2] | [] | Failed |
| regression minimum room size #1 | [2, 3, 4] | [2] | Failed |
| regression minimum room size #2 | [0, 1] | [] | Failed |
| regression minimum room size #3 | [0, 1, 5, 6] | [0, 1, 5] | Failed |
| touching border tile #1 | [0] | [0] | Passed |
| rooms exactly pad apart #1 | [0, 1] | [0, 1] | Passed |
| control #1 | [] | [] | Passed |
SHA-256 / e0c3a4e6dee585ea966eb2b5503de1c0b38e3f12e7d97d6366cfa390d56bb478
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(width, height, candidates, pad):
placed = []
out = []
for i, (x, y, w, h) in enumerate(candidates):
if w * h < 9:
continue
if x < 1 or y < 1 or x + w > width - 1 or y + h > height - 1:
continue
ok = True
for px, py, pw, ph in placed:
if x < px + pw + pad and px < x + w + pad and y < py + ph + pad and py < y + h + pad:
ok = False
break
if ok:
placed.append((x, y, w, h))
out.append(i)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('fault site minimum room size #1',
[13,
21,
[[9, 8, 5, 3], [11, 14, 8, 3], [7, 15, 3, 2], [-1, 10, 8, 6], [0, 3, 3, 3], [10, 0, 5, 6], [8, 13, 2, 4]],
2],
[]),
('regression minimum room size #1',
[30, 11, [[-1, 1, 2, 2], [24, -1, 5, 3], [16, 4, 5, 6], [3, 1, 2, 6], [26, 2, 2, 3], [5, 9, 8, 2]], 0],
[2]),
('regression minimum room size #2',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #3',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[30, 11, [[-1, 1, 2, 2], [24, -1, 5, 3], [16, 4, 5, 6], [3, 1, 2, 6], [26, 2, 2, 3], [5, 9, 8, 2]], 0],
[2]),
('fault site minimum room size #1',
[25,
23,
[[5, 9, 3, 6],
[8, 10, 5, 6],
[9, 14, 5, 4],
[-1, 1, 3, 6],
[-1, 14, 2, 3],
[17, 18, 4, 2],
[4, 20, 3, 4]],
1],
[0, 2]),
('regression minimum room size #2',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #3',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('fault site minimum room size #1',
[19, 27, [[6, 2, 3, 2], [4, 23, 5, 4], [4, 20, 2, 3], [12, 4, 8, 2], [10, 14, 8, 6]], 1],
[4]),
('regression minimum room size #1',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #2',
[24, 17, [[21, 15, 8, 3], [1, 9, 3, 4], [1, 9, 5, 2], [1, 1, 5, 2], [20, 13, 5, 6]], 2],
[1]),
('regression minimum room size #3',
[18, 14, [[11, 10, 3, 2], [16, 1, 2, 4], [11, 10, 5, 2], [4, 10, 5, 3], [9, 4, 8, 3]], 1],
[3, 4]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('regression minimum room size #2',
[24, 17, [[21, 15, 8, 3], [1, 9, 3, 4], [1, 9, 5, 2], [1, 1, 5, 2], [20, 13, 5, 6]], 2],
[1]),
('regression minimum room size #3', [8, 25, [[0, 8, 3, 6], [4, -1, 4, 3], [1, 17, 5, 2]], 1], []),
('regression minimum room size #4',
[29, 9, [[20, 7, 8, 2], [8, 5, 3, 6], [21, 4, 2, 4], [4, 3, 8, 2]], 2],
[]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1',
[11, 28, [[1, 8, 8, 4], [5, 14, 3, 3], [1, 4, 5, 3], [7, 23, 2, 2], [-1, 11, 5, 2]], 2],
[0, 1])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[18, 14, [[11, 10, 3, 2], [16, 1, 2, 4], [11, 10, 5, 2], [4, 10, 5, 3], [9, 4, 8, 3]], 1],
[3, 4]),
('regression minimum room size #2', [8, 25, [[0, 8, 3, 6], [4, -1, 4, 3], [1, 17, 5, 2]], 1], []),
('regression minimum room size #3',
[24, 25, [[12, 19, 2, 4], [3, 10, 5, 6], [19, 19, 5, 3], [13, 6, 2, 6], [6, 23, 8, 2], [10, 14, 3, 3]], 0],
[1, 5]),
('regression minimum room size #4',
[16, 18, [[8, 5, 2, 6], [4, 5, 3, 2], [4, 3, 3, 2], [4, 16, 2, 6], [2, 2, 3, 3], [-1, 1, 3, 3]], 0],
[4]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [26, 13, [[7, 10, 8, 4], [22, -1, 3, 6], [3, 3, 4, 6], [17, 0, 8, 2]], 1], [2])]]
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 |
|---|---|---|---|
| thin corridor room #1 | [0] | [1] | Failed |
| fault site minimum room size #1 | [] | [] | Passed |
| regression minimum room size #1 | [2, 3] | [2] | Failed |
| regression minimum room size #2 | [1] | [] | Failed |
| regression minimum room size #3 | [0, 1, 5, 6] | [0, 1, 5] | Failed |
| touching border tile #1 | [0] | [0] | Passed |
| rooms exactly pad apart #1 | [0, 1] | [0, 1] | Passed |
| control #1 | [] | [] | Passed |
SHA-256 / fc1f06c27134ec76d097390345929713883bf6284e1a82318276eb010cc162ac
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(width, height, candidates, pad):
placed = []
out = []
for i, (x, y, w, h) in enumerate(candidates):
if w < 3 or h < 3:
continue
if x < 1 or y < 1 or x + w > width - 1 or y + h > height - 1:
continue
ok = True
for px, py, pw, ph in placed:
if x < px + pw + pad and px < x + w + pad and y < py + ph + pad and py < y + h + pad:
ok = False
break
if ok:
placed.append((x, y, w, h))
out.append(i)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('fault site minimum room size #1',
[13,
21,
[[9, 8, 5, 3], [11, 14, 8, 3], [7, 15, 3, 2], [-1, 10, 8, 6], [0, 3, 3, 3], [10, 0, 5, 6], [8, 13, 2, 4]],
2],
[]),
('regression minimum room size #1',
[30, 11, [[-1, 1, 2, 2], [24, -1, 5, 3], [16, 4, 5, 6], [3, 1, 2, 6], [26, 2, 2, 3], [5, 9, 8, 2]], 0],
[2]),
('regression minimum room size #2',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #3',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[30, 11, [[-1, 1, 2, 2], [24, -1, 5, 3], [16, 4, 5, 6], [3, 1, 2, 6], [26, 2, 2, 3], [5, 9, 8, 2]], 0],
[2]),
('fault site minimum room size #1',
[25,
23,
[[5, 9, 3, 6],
[8, 10, 5, 6],
[9, 14, 5, 4],
[-1, 1, 3, 6],
[-1, 14, 2, 3],
[17, 18, 4, 2],
[4, 20, 3, 4]],
1],
[0, 2]),
('regression minimum room size #2',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #3',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('fault site minimum room size #1',
[19, 27, [[6, 2, 3, 2], [4, 23, 5, 4], [4, 20, 2, 3], [12, 4, 8, 2], [10, 14, 8, 6]], 1],
[4]),
('regression minimum room size #1',
[9, 21, [[1, 11, 2, 4], [1, 3, 5, 2], [3, 3, 8, 6], [-1, 5, 4, 3]], 1],
[]),
('regression minimum room size #2',
[24, 17, [[21, 15, 8, 3], [1, 9, 3, 4], [1, 9, 5, 2], [1, 1, 5, 2], [20, 13, 5, 6]], 2],
[1]),
('regression minimum room size #3',
[18, 14, [[11, 10, 3, 2], [16, 1, 2, 4], [11, 10, 5, 2], [4, 10, 5, 3], [9, 4, 8, 3]], 1],
[3, 4]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [15, 13, [[6, 11, 5, 6], [-1, 3, 2, 4]], 1], [])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[27,
21,
[[17, 14, 4, 3],
[16, 17, 4, 3],
[23, -1, 5, 3],
[21, -1, 4, 4],
[19, 6, 8, 6],
[7, 11, 3, 3],
[3, 2, 5, 2],
[4, -1, 5, 3]],
0],
[0, 1, 5]),
('regression minimum room size #2',
[24, 17, [[21, 15, 8, 3], [1, 9, 3, 4], [1, 9, 5, 2], [1, 1, 5, 2], [20, 13, 5, 6]], 2],
[1]),
('regression minimum room size #3', [8, 25, [[0, 8, 3, 6], [4, -1, 4, 3], [1, 17, 5, 2]], 1], []),
('regression minimum room size #4',
[29, 9, [[20, 7, 8, 2], [8, 5, 3, 6], [21, 4, 2, 4], [4, 3, 8, 2]], 2],
[]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1',
[11, 28, [[1, 8, 8, 4], [5, 14, 3, 3], [1, 4, 5, 3], [7, 23, 2, 2], [-1, 11, 5, 2]], 2],
[0, 1])],
[('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('regression minimum room size #1',
[18, 14, [[11, 10, 3, 2], [16, 1, 2, 4], [11, 10, 5, 2], [4, 10, 5, 3], [9, 4, 8, 3]], 1],
[3, 4]),
('regression minimum room size #2', [8, 25, [[0, 8, 3, 6], [4, -1, 4, 3], [1, 17, 5, 2]], 1], []),
('regression minimum room size #3',
[24, 25, [[12, 19, 2, 4], [3, 10, 5, 6], [19, 19, 5, 3], [13, 6, 2, 6], [6, 23, 8, 2], [10, 14, 3, 3]], 0],
[1, 5]),
('regression minimum room size #4',
[16, 18, [[8, 5, 2, 6], [4, 5, 3, 2], [4, 3, 3, 2], [4, 16, 2, 6], [2, 2, 3, 3], [-1, 1, 3, 3]], 0],
[4]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('control #1', [26, 13, [[7, 10, 8, 4], [22, -1, 3, 6], [3, 3, 4, 6], [17, 0, 8, 2]], 1], [2])]]
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 |
|---|---|---|---|
| thin corridor room #1 | [1] | [1] | Passed |
| fault site minimum room size #1 | [] | [] | Passed |
| regression minimum room size #1 | [2] | [2] | Passed |
| regression minimum room size #2 | [] | [] | Passed |
| regression minimum room size #3 | [0, 1, 5] | [0, 1, 5] | Passed |
| touching border tile #1 | [0] | [0] | Passed |
| rooms exactly pad apart #1 | [0, 1] | [0, 1] | Passed |
| control #1 | [] | [] | Passed |
SHA-256 / e36c20019a3ec35fa031ba2e6c870f86f5c5fa5596d0e90929499e468547881f
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.690556+00:00.
Case digest / 7cf6f5ff6e51517f890526c2145734ede5ded550a89436cc5c23e930bb463672