FA-86761 / Procedural level generation constraints / Open access
Encounter pacing along the critical path: Proposals processed in input order · case 01
Gaps are checked against later positions, spacing encounters backwards.
ROOT CAUSE
Proposals are neither sorted nor deduplicated.
VERIFIED REPAIR
Restore `sorted(set(encounters))` at the proposal normalisation step.
Unsuccessful approach: Sorting without dedup accepts duplicate encounters when min_gap is zero.
Case contract
Proposed positions are deduplicated and taken ascending. A position is legal when 1 <= pos <= length-2, is not a rest checkpoint (pos % rest_every == 0 when rest_every > 0), and lies at least min_gap after the anchor: the later of the last accepted encounter (initially the start, 0) and the last checkpoint at or before pos. Returns accepted positions.
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(length, encounters, min_gap, rest_every):
out = []
last = 0
for pos in encounters:
if pos < 1 or pos > length - 2:
continue
if rest_every and pos % rest_every == 0:
continue
anchor = last
if rest_every:
anchor = max(anchor, pos // rest_every * rest_every)
if pos - anchor < min_gap:
continue
out.append(pos)
last = pos
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1',
[27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0],
[6, 10, 12, 15, 20]),
('fault site proposal normalisation #2', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),
('regression proposal normalisation #2', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('fault site proposal normalisation #2', [40, [41, 39, 8, 9, 9, 32, 18, 41], 5, 0], [8, 18, 32]),
('regression proposal normalisation #1', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('regression proposal normalisation #2', [20, [16, 11, 18, 18, -2, 4, 21, 19, 21], 0, 0], [4, 11, 16, 18]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [39, [34, 15, 35, 19, 4], 2, 4], [15, 19, 34]),
('fault site proposal normalisation #2', [37, [27, 33, 11, 14, 7], 0, 7], [11, 27, 33]),
('regression proposal normalisation #1', [30, [4, 23, 32, 22, 22, -1, 9, 2], 0, 0], [2, 4, 9, 22, 23]),
('regression proposal normalisation #2', [39, [36, 36, 16, 30, 0, 39, 8], 0, 5], [8, 16, 36]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),
('fault site proposal normalisation #1', [38, [27, 16, 11, 3], 0, 7], [3, 11, 16, 27]),
('partial repair boundary #1', [22, [23, 22, 5, 11, 5], 0, 0], [5, 11]),
('partial repair boundary #2', [14, [1, 12, 0, 1], 0, 0], [1, 12]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [36, [32, 33, 13], 2, 0], [13, 32]),
('fault site proposal normalisation #2', [29, [-2, 26, 19], 3, 0], [19, 26]),
('regression proposal normalisation #1', [15, [2, 8, 8, 11], 0, 5], [2, 8, 11]),
('regression proposal normalisation #2', [30, [17, 13, 17, -2, -2, 9, 32, 23], 0, 7], [9, 13, 17, 23]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [40, [3, 4], 3, 0], [3])]]
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 |
|---|---|---|---|
| duplicate proposals #1 | [3, 3, 4] | [3, 4] | Failed |
| fault site proposal normalisation #1 | [20] | [6, 10, 12, 15, 20] | Failed |
| fault site proposal normalisation #2 | [4, 9] | [4, 7, 8, 9] | Failed |
| regression proposal normalisation #1 | [1, 1] | [1] | Failed |
| regression proposal normalisation #2 | [6, 10] | [2, 4, 6, 9, 10] | Failed |
| last legal tile #1 | [8] | [8] | Passed |
| checkpoint resets gap #1 | [2, 7] | [2, 7] | Passed |
| control #1 | [] | [] | Passed |
SHA-256 / 91b15f9f484c189b918beb917b22a5c6b1ca9d3d4e5c837cdc373dd3d84ec2bd
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(length, encounters, min_gap, rest_every):
out = []
last = 0
for pos in sorted(encounters):
if pos < 1 or pos > length - 2:
continue
if rest_every and pos % rest_every == 0:
continue
anchor = last
if rest_every:
anchor = max(anchor, pos // rest_every * rest_every)
if pos - anchor < min_gap:
continue
out.append(pos)
last = pos
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1',
[27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0],
[6, 10, 12, 15, 20]),
('fault site proposal normalisation #2', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),
('regression proposal normalisation #2', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('fault site proposal normalisation #2', [40, [41, 39, 8, 9, 9, 32, 18, 41], 5, 0], [8, 18, 32]),
('regression proposal normalisation #1', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('regression proposal normalisation #2', [20, [16, 11, 18, 18, -2, 4, 21, 19, 21], 0, 0], [4, 11, 16, 18]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [39, [34, 15, 35, 19, 4], 2, 4], [15, 19, 34]),
('fault site proposal normalisation #2', [37, [27, 33, 11, 14, 7], 0, 7], [11, 27, 33]),
('regression proposal normalisation #1', [30, [4, 23, 32, 22, 22, -1, 9, 2], 0, 0], [2, 4, 9, 22, 23]),
('regression proposal normalisation #2', [39, [36, 36, 16, 30, 0, 39, 8], 0, 5], [8, 16, 36]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),
('fault site proposal normalisation #1', [38, [27, 16, 11, 3], 0, 7], [3, 11, 16, 27]),
('partial repair boundary #1', [22, [23, 22, 5, 11, 5], 0, 0], [5, 11]),
('partial repair boundary #2', [14, [1, 12, 0, 1], 0, 0], [1, 12]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [36, [32, 33, 13], 2, 0], [13, 32]),
('fault site proposal normalisation #2', [29, [-2, 26, 19], 3, 0], [19, 26]),
('regression proposal normalisation #1', [15, [2, 8, 8, 11], 0, 5], [2, 8, 11]),
('regression proposal normalisation #2', [30, [17, 13, 17, -2, -2, 9, 32, 23], 0, 7], [9, 13, 17, 23]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [40, [3, 4], 3, 0], [3])]]
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 |
|---|---|---|---|
| duplicate proposals #1 | [3, 3, 4] | [3, 4] | Failed |
| fault site proposal normalisation #1 | [6, 10, 12, 15, 20] | [6, 10, 12, 15, 20] | Passed |
| fault site proposal normalisation #2 | [4, 7, 8, 9] | [4, 7, 8, 9] | Passed |
| regression proposal normalisation #1 | [1, 1] | [1] | Failed |
| regression proposal normalisation #2 | [2, 4, 6, 6, 9, 10] | [2, 4, 6, 9, 10] | Failed |
| last legal tile #1 | [8] | [8] | Passed |
| checkpoint resets gap #1 | [2, 7] | [2, 7] | Passed |
| control #1 | [] | [] | Passed |
SHA-256 / c994992985b97d92ab7815acccadd3bb0a93a8634bfe31722af3e41088bd2706
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(length, encounters, min_gap, rest_every):
out = []
last = 0
for pos in sorted(set(encounters)):
if pos < 1 or pos > length - 2:
continue
if rest_every and pos % rest_every == 0:
continue
anchor = last
if rest_every:
anchor = max(anchor, pos // rest_every * rest_every)
if pos - anchor < min_gap:
continue
out.append(pos)
last = pos
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1',
[27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0],
[6, 10, 12, 15, 20]),
('fault site proposal normalisation #2', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),
('regression proposal normalisation #2', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('fault site proposal normalisation #2', [40, [41, 39, 8, 9, 9, 32, 18, 41], 5, 0], [8, 18, 32]),
('regression proposal normalisation #1', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('regression proposal normalisation #2', [20, [16, 11, 18, 18, -2, 4, 21, 19, 21], 0, 0], [4, 11, 16, 18]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [39, [34, 15, 35, 19, 4], 2, 4], [15, 19, 34]),
('fault site proposal normalisation #2', [37, [27, 33, 11, 14, 7], 0, 7], [11, 27, 33]),
('regression proposal normalisation #1', [30, [4, 23, 32, 22, 22, -1, 9, 2], 0, 0], [2, 4, 9, 22, 23]),
('regression proposal normalisation #2', [39, [36, 36, 16, 30, 0, 39, 8], 0, 5], [8, 16, 36]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [21, [-2, 16], 2, 5], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('regression proposal normalisation #1', [4, [1, -2, 1], 0, 7], [1]),
('fault site proposal normalisation #1', [38, [27, 16, 11, 3], 0, 7], [3, 11, 16, 27]),
('partial repair boundary #1', [22, [23, 22, 5, 11, 5], 0, 0], [5, 11]),
('partial repair boundary #2', [14, [1, 12, 0, 1], 0, 0], [1, 12]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], [])],
[('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('fault site proposal normalisation #1', [36, [32, 33, 13], 2, 0], [13, 32]),
('fault site proposal normalisation #2', [29, [-2, 26, 19], 3, 0], [19, 26]),
('regression proposal normalisation #1', [15, [2, 8, 8, 11], 0, 5], [2, 8, 11]),
('regression proposal normalisation #2', [30, [17, 13, 17, -2, -2, 9, 32, 23], 0, 7], [9, 13, 17, 23]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('control #1', [40, [3, 4], 3, 0], [3])]]
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 |
|---|---|---|---|
| duplicate proposals #1 | [3, 4] | [3, 4] | Passed |
| fault site proposal normalisation #1 | [6, 10, 12, 15, 20] | [6, 10, 12, 15, 20] | Passed |
| fault site proposal normalisation #2 | [4, 7, 8, 9] | [4, 7, 8, 9] | Passed |
| regression proposal normalisation #1 | [1] | [1] | Passed |
| regression proposal normalisation #2 | [2, 4, 6, 9, 10] | [2, 4, 6, 9, 10] | Passed |
| last legal tile #1 | [8] | [8] | Passed |
| checkpoint resets gap #1 | [2, 7] | [2, 7] | Passed |
| control #1 | [] | [] | Passed |
SHA-256 / c48b55b02cc78bb951b3035c2b8c19c67fd7a69ff13acf50a28d8eba4878709d
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.561731+00:00.
Case digest / faec22a173f0979ed04637cb206032345a9bc6c19ebf03cf941d479b5b6202ed