FA-86356 / Procedural level generation constraints / Open access
Room placement with padding: Horizontal neighbours ignore padding · case 01
Side-by-side rooms share a wall with no corridor gap.
ROOT CAUSE
The x-axis overlap test omits the padding term.
THE FAILURE
The x-axis overlap test omits the padding term.
Unsuccessful approach: The inclusive comparison requires one extra tile beyond the stated padding.
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 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 and px < x + w 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 = [[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('regression horizontal padding #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]),
('fault site horizontal padding #1',
[26,
10,
[[2, 4, 3, 4],
[13, 2, 8, 6],
[4, 0, 4, 2],
[17, -1, 5, 2],
[15, 1, 2, 3],
[8, 3, 4, 4],
[18, 7, 3, 3],
[24, 7, 4, 4]],
2],
[0, 1]),
('partial repair boundary #1',
[16,
30,
[[12, 13, 3, 6],
[11, 9, 5, 3],
[1, 0, 5, 3],
[14, 10, 8, 3],
[13, 19, 8, 4],
[6, 14, 5, 6],
[8, 18, 5, 2]],
1],
[0, 5]),
('partial repair boundary #2',
[29,
11,
[[19, 6, 4, 6],
[9, 5, 3, 4],
[1, 1, 3, 2],
[5, 4, 5, 6],
[14, 0, 8, 3],
[1, 8, 5, 6],
[5, 5, 3, 3],
[7, 2, 2, 3]],
1],
[1, 6]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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],
[])],
[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('fault site horizontal padding #1',
[30,
30,
[[19, 17, 4, 6],
[24, 12, 5, 6],
[20, 28, 3, 3],
[26, 18, 2, 3],
[16, 28, 8, 2],
[18, 6, 5, 4],
[6, 6, 2, 2],
[21, 1, 5, 3]],
2],
[0, 5, 7]),
('fault site horizontal padding #2',
[13,
18,
[[3, 0, 4, 3], [1, 4, 2, 6], [10, 15, 5, 6], [11, 15, 4, 2], [0, 4, 2, 4], [2, 9, 3, 4], [6, 8, 4, 3]],
2],
[5]),
('partial repair boundary #1',
[16,
30,
[[12, 13, 3, 6],
[11, 9, 5, 3],
[1, 0, 5, 3],
[14, 10, 8, 3],
[13, 19, 8, 4],
[6, 14, 5, 6],
[8, 18, 5, 2]],
1],
[0, 5]),
('partial repair boundary #2',
[29,
11,
[[19, 6, 4, 6],
[9, 5, 3, 4],
[1, 1, 3, 2],
[5, 4, 5, 6],
[14, 0, 8, 3],
[1, 8, 5, 6],
[5, 5, 3, 3],
[7, 2, 2, 3]],
1],
[1, 6]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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],
[])],
[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('fault site horizontal padding #1',
[12, 21, [[6, 13, 5, 4], [7, 11, 2, 6], [-1, 4, 3, 6], [0, 2, 5, 3], [6, 2, 4, 2], [2, 14, 4, 4]], 2],
[0]),
('fault site horizontal padding #2',
[21,
22,
[[4, 19, 3, 2], [16, 18, 5, 4], [15, 3, 4, 4], [1, 7, 4, 4], [5, 6, 8, 3], [10, 19, 4, 4], [7, 16, 3, 3]],
2],
[2, 3, 6]),
('partial repair boundary #1',
[28,
27,
[[15, 2, 4, 6],
[17, 17, 3, 3],
[0, 24, 4, 2],
[12, 1, 4, 4],
[19, 7, 2, 3],
[10, 6, 8, 6],
[9, 4, 5, 4],
[1, 8, 3, 6]],
1],
[0, 1, 6, 7]),
('partial repair boundary #2',
[14,
11,
[[6, 2, 4, 6],
[11, 0, 2, 6],
[10, 7, 8, 3],
[1, 5, 4, 6],
[7, 6, 8, 4],
[2, 5, 3, 4],
[12, 6, 4, 4],
[3, -1, 8, 2]],
1],
[0, 5]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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],
[])],
[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('fault site horizontal padding #1', [28, 9, [[16, 4, 5, 3], [11, 1, 5, 3]], 2], [0]),
('fault site horizontal padding #2',
[22,
26,
[[0, 18, 5, 2], [11, 4, 3, 6], [19, 1, 5, 6], [5, 6, 8, 2], [2, 10, 8, 3], [19, 5, 4, 2], [20, 7, 3, 3]],
2],
[1]),
('partial repair boundary #1',
[17, 24, [[7, 12, 5, 4], [13, 21, 8, 2], [10, 5, 3, 4], [3, 2, 5, 4], [8, 6, 3, 4]], 2],
[0, 2, 3]),
('partial repair boundary #2',
[13,
18,
[[2, 13, 3, 2], [7, 11, 3, 4], [10, 8, 2, 3], [1, 9, 4, 6], [4, -1, 4, 3], [-1, 5, 3, 2], [0, 15, 2, 2]],
2],
[1, 3]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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])],
[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('fault site horizontal padding #1',
[20, 20, [[2, 4, 3, 6], [5, 9, 4, 4], [8, 6, 5, 2], [-1, 5, 3, 3]], 1],
[0]),
('fault site horizontal padding #2',
[26,
25,
[[21, 4, 3, 6], [9, 18, 3, 4], [9, 5, 3, 3], [24, 5, 3, 4], [4, 3, 5, 6], [20, 6, 3, 6], [1, 17, 2, 4]],
1],
[0, 1, 2]),
('partial repair boundary #1',
[29, 30, [[14, 2, 3, 3], [11, 3, 3, 3], [-1, 22, 3, 2], [19, 28, 5, 6], [15, 19, 5, 3], [14, 6, 4, 3]], 0],
[0, 1, 4, 5]),
('partial repair boundary #2',
[17, 25, [[5, 4, 4, 6], [2, 18, 3, 4], [4, 22, 4, 6], [10, 9, 3, 3], [5, 1, 4, 4]], 1],
[0, 1, 3]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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])]]
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 |
|---|---|---|---|
| rooms exactly pad apart #1 | [0, 1] | [0, 1] | Passed |
| regression horizontal padding #1 | [0, 1] | [0, 2] | Failed |
| fault site horizontal padding #1 | [0, 1, 5] | [0, 1] | Failed |
| partial repair boundary #1 | [0, 5] | [0, 5] | Passed |
| partial repair boundary #2 | [1, 6] | [1, 6] | Passed |
| touching border tile #1 | [0] | [0] | Passed |
| thin corridor room #1 | [1] | [1] | Passed |
| control #1 | [] | [] | Passed |
SHA-256 / 92208be13e09c60f7639d35c86025c34beff7dbe8efa93d5a5b473a02a15e7c0
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 < 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 = [[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('regression horizontal padding #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]),
('fault site horizontal padding #1',
[26,
10,
[[2, 4, 3, 4],
[13, 2, 8, 6],
[4, 0, 4, 2],
[17, -1, 5, 2],
[15, 1, 2, 3],
[8, 3, 4, 4],
[18, 7, 3, 3],
[24, 7, 4, 4]],
2],
[0, 1]),
('partial repair boundary #1',
[16,
30,
[[12, 13, 3, 6],
[11, 9, 5, 3],
[1, 0, 5, 3],
[14, 10, 8, 3],
[13, 19, 8, 4],
[6, 14, 5, 6],
[8, 18, 5, 2]],
1],
[0, 5]),
('partial repair boundary #2',
[29,
11,
[[19, 6, 4, 6],
[9, 5, 3, 4],
[1, 1, 3, 2],
[5, 4, 5, 6],
[14, 0, 8, 3],
[1, 8, 5, 6],
[5, 5, 3, 3],
[7, 2, 2, 3]],
1],
[1, 6]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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],
[])],
[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('fault site horizontal padding #1',
[30,
30,
[[19, 17, 4, 6],
[24, 12, 5, 6],
[20, 28, 3, 3],
[26, 18, 2, 3],
[16, 28, 8, 2],
[18, 6, 5, 4],
[6, 6, 2, 2],
[21, 1, 5, 3]],
2],
[0, 5, 7]),
('fault site horizontal padding #2',
[13,
18,
[[3, 0, 4, 3], [1, 4, 2, 6], [10, 15, 5, 6], [11, 15, 4, 2], [0, 4, 2, 4], [2, 9, 3, 4], [6, 8, 4, 3]],
2],
[5]),
('partial repair boundary #1',
[16,
30,
[[12, 13, 3, 6],
[11, 9, 5, 3],
[1, 0, 5, 3],
[14, 10, 8, 3],
[13, 19, 8, 4],
[6, 14, 5, 6],
[8, 18, 5, 2]],
1],
[0, 5]),
('partial repair boundary #2',
[29,
11,
[[19, 6, 4, 6],
[9, 5, 3, 4],
[1, 1, 3, 2],
[5, 4, 5, 6],
[14, 0, 8, 3],
[1, 8, 5, 6],
[5, 5, 3, 3],
[7, 2, 2, 3]],
1],
[1, 6]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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],
[])],
[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('fault site horizontal padding #1',
[12, 21, [[6, 13, 5, 4], [7, 11, 2, 6], [-1, 4, 3, 6], [0, 2, 5, 3], [6, 2, 4, 2], [2, 14, 4, 4]], 2],
[0]),
('fault site horizontal padding #2',
[21,
22,
[[4, 19, 3, 2], [16, 18, 5, 4], [15, 3, 4, 4], [1, 7, 4, 4], [5, 6, 8, 3], [10, 19, 4, 4], [7, 16, 3, 3]],
2],
[2, 3, 6]),
('partial repair boundary #1',
[28,
27,
[[15, 2, 4, 6],
[17, 17, 3, 3],
[0, 24, 4, 2],
[12, 1, 4, 4],
[19, 7, 2, 3],
[10, 6, 8, 6],
[9, 4, 5, 4],
[1, 8, 3, 6]],
1],
[0, 1, 6, 7]),
('partial repair boundary #2',
[14,
11,
[[6, 2, 4, 6],
[11, 0, 2, 6],
[10, 7, 8, 3],
[1, 5, 4, 6],
[7, 6, 8, 4],
[2, 5, 3, 4],
[12, 6, 4, 4],
[3, -1, 8, 2]],
1],
[0, 5]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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],
[])],
[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('fault site horizontal padding #1', [28, 9, [[16, 4, 5, 3], [11, 1, 5, 3]], 2], [0]),
('fault site horizontal padding #2',
[22,
26,
[[0, 18, 5, 2], [11, 4, 3, 6], [19, 1, 5, 6], [5, 6, 8, 2], [2, 10, 8, 3], [19, 5, 4, 2], [20, 7, 3, 3]],
2],
[1]),
('partial repair boundary #1',
[17, 24, [[7, 12, 5, 4], [13, 21, 8, 2], [10, 5, 3, 4], [3, 2, 5, 4], [8, 6, 3, 4]], 2],
[0, 2, 3]),
('partial repair boundary #2',
[13,
18,
[[2, 13, 3, 2], [7, 11, 3, 4], [10, 8, 2, 3], [1, 9, 4, 6], [4, -1, 4, 3], [-1, 5, 3, 2], [0, 15, 2, 2]],
2],
[1, 3]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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])],
[('rooms exactly pad apart #1', [20, 10, [[1, 1, 4, 4], [6, 1, 4, 4]], 1], [0, 1]),
('fault site horizontal padding #1',
[20, 20, [[2, 4, 3, 6], [5, 9, 4, 4], [8, 6, 5, 2], [-1, 5, 3, 3]], 1],
[0]),
('fault site horizontal padding #2',
[26,
25,
[[21, 4, 3, 6], [9, 18, 3, 4], [9, 5, 3, 3], [24, 5, 3, 4], [4, 3, 5, 6], [20, 6, 3, 6], [1, 17, 2, 4]],
1],
[0, 1, 2]),
('partial repair boundary #1',
[29, 30, [[14, 2, 3, 3], [11, 3, 3, 3], [-1, 22, 3, 2], [19, 28, 5, 6], [15, 19, 5, 3], [14, 6, 4, 3]], 0],
[0, 1, 4, 5]),
('partial repair boundary #2',
[17, 25, [[5, 4, 4, 6], [2, 18, 3, 4], [4, 22, 4, 6], [10, 9, 3, 3], [5, 1, 4, 4]], 1],
[0, 1, 3]),
('touching border tile #1', [10, 10, [[1, 1, 8, 8]], 1], [0]),
('thin corridor room #1', [20, 20, [[2, 2, 2, 9], [2, 2, 5, 5]], 0], [1]),
('control #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])]]
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 |
|---|---|---|---|
| rooms exactly pad apart #1 | [0] | [0, 1] | Failed |
| regression horizontal padding #1 | [0] | [0, 2] | Failed |
| fault site horizontal padding #1 | [0, 1] | [0, 1] | Passed |
| partial repair boundary #1 | [0] | [0, 5] | Failed |
| partial repair boundary #2 | [1] | [1, 6] | Failed |
| touching border tile #1 | [0] | [0] | Passed |
| thin corridor room #1 | [1] | [1] | Passed |
| control #1 | [] | [] | Passed |
SHA-256 / a4c10a98a836930b3942fe012885c32eebca9506c1d0e235e6e806edeae4ce28
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.865252+00:00.
Case digest / bdc6e14bced44a7c337cd3ff0e1ba23d226f20a3fdbafff18ad9bd3710cb0207