FA-86771 / Procedural level generation constraints / Open access
Encounter pacing along the critical path: Only the first checkpoint resets pacing · case 01
Later rest stops do not give breathing room.
ROOT CAUSE
The anchor uses the first checkpoint instead of the latest one before pos.
VERIFIED REPAIR
Restore `anchor = max(anchor, pos // rest_every * rest_every)` at the checkpoint anchor step.
Unsuccessful approach: Overwriting the anchor forgets encounters placed after the checkpoint.
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 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, 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 = [[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [21, [-2, 16], 2, 5], []),
('fault site checkpoint anchor #2', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], []),
('partial repair boundary #1', [39, [34, 15, 35, 19, 4], 2, 4], [15, 19, 34]),
('regression checkpoint anchor #1', [22, [17, 15, -1, 24, 7, 1, -2, 18, 2], 2, 7], [2, 17]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], []),
('fault site checkpoint anchor #2', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('regression checkpoint anchor #1', [15, [3, 15, 2, 13], 2, 5], [2, 13]),
('regression checkpoint anchor #2', [24, [21, 26, 23, 10, 18, 9, 17, 19], 2, 4], [10, 18]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [4, [1, -2, 1], 0, 7], [1]),
('fault site checkpoint anchor #2', [38, [27, 16, 11, 3], 0, 7], [3, 11, 16, 27]),
('regression checkpoint anchor #1', [22, [4, -1, 2, 3, 22], 2, 7], [2, 4]),
('regression checkpoint anchor #2', [23, [13, 20, 7, 12, 21, 15, 11, 19, 5], 2, 7], [5, 11, 13, 19]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [29, [13, 16], 3, 5], [13]),
('regression checkpoint anchor #1', [22, [17, 15, -1, 24, 7, 1, -2, 18, 2], 2, 7], [2, 17]),
('regression checkpoint anchor #2', [14, [5, 13, 6, 10, 8, 8], 3, 7], [5, 10]),
('regression checkpoint anchor #3', [13, [11, 14, 8, 0, 6, 4, 3, 10, 7, 5], 3, 7], [3, 6, 10]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [40, [41, 39, 8, 9, 9, 32, 18, 41], 5, 0], [8, 18, 32])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [14, [11, 0, 11, 6, 13, 15, 15, 3], 5, 7], [6]),
('fault site checkpoint anchor #2', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('regression checkpoint anchor #1', [22, [12, -2, 3, 4, 2, 14, 15, -1, 15, 16], 2, 4], [2, 14]),
('regression checkpoint anchor #2', [34, [32, 28, 21, 18, 3, 26, 15, 19, 3], 3, 5], [3, 18, 28]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('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 |
|---|---|---|---|
| checkpoint resets gap #1 | [7] | [2, 7] | Failed |
| fault site checkpoint anchor #1 | [16] | [] | Failed |
| fault site checkpoint anchor #2 | [11, 25, 30] | [] | Failed |
| partial repair boundary #1 | [15, 19, 34] | [15, 19, 34] | Passed |
| regression checkpoint anchor #1 | [15, 17] | [2, 17] | Failed |
| duplicate proposals #1 | [3, 4] | [3, 4] | Passed |
| last legal tile #1 | [8] | [8] | Passed |
| control #1 | [6, 10, 12, 15, 20] | [6, 10, 12, 15, 20] | Passed |
SHA-256 / 2ca31f1ae334da723c44d7e4503536efe6c468d9f3d7524a6740db110d92e11a
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(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 = 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 = [[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [21, [-2, 16], 2, 5], []),
('fault site checkpoint anchor #2', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], []),
('partial repair boundary #1', [39, [34, 15, 35, 19, 4], 2, 4], [15, 19, 34]),
('regression checkpoint anchor #1', [22, [17, 15, -1, 24, 7, 1, -2, 18, 2], 2, 7], [2, 17]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], []),
('fault site checkpoint anchor #2', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('regression checkpoint anchor #1', [15, [3, 15, 2, 13], 2, 5], [2, 13]),
('regression checkpoint anchor #2', [24, [21, 26, 23, 10, 18, 9, 17, 19], 2, 4], [10, 18]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [4, [1, -2, 1], 0, 7], [1]),
('fault site checkpoint anchor #2', [38, [27, 16, 11, 3], 0, 7], [3, 11, 16, 27]),
('regression checkpoint anchor #1', [22, [4, -1, 2, 3, 22], 2, 7], [2, 4]),
('regression checkpoint anchor #2', [23, [13, 20, 7, 12, 21, 15, 11, 19, 5], 2, 7], [5, 11, 13, 19]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [29, [13, 16], 3, 5], [13]),
('regression checkpoint anchor #1', [22, [17, 15, -1, 24, 7, 1, -2, 18, 2], 2, 7], [2, 17]),
('regression checkpoint anchor #2', [14, [5, 13, 6, 10, 8, 8], 3, 7], [5, 10]),
('regression checkpoint anchor #3', [13, [11, 14, 8, 0, 6, 4, 3, 10, 7, 5], 3, 7], [3, 6, 10]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [40, [41, 39, 8, 9, 9, 32, 18, 41], 5, 0], [8, 18, 32])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [14, [11, 0, 11, 6, 13, 15, 15, 3], 5, 7], [6]),
('fault site checkpoint anchor #2', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('regression checkpoint anchor #1', [22, [12, -2, 3, 4, 2, 14, 15, -1, 15, 16], 2, 4], [2, 14]),
('regression checkpoint anchor #2', [34, [32, 28, 21, 18, 3, 26, 15, 19, 3], 3, 5], [3, 18, 28]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('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 |
|---|---|---|---|
| checkpoint resets gap #1 | [2, 7] | [2, 7] | Passed |
| fault site checkpoint anchor #1 | [] | [] | Passed |
| fault site checkpoint anchor #2 | [] | [] | Passed |
| partial repair boundary #1 | [15, 19, 34, 35] | [15, 19, 34] | Failed |
| regression checkpoint anchor #1 | [2, 17, 18] | [2, 17] | Failed |
| duplicate proposals #1 | [3, 4] | [3, 4] | Passed |
| last legal tile #1 | [8] | [8] | Passed |
| control #1 | [6, 10, 12, 15, 20] | [6, 10, 12, 15, 20] | Passed |
SHA-256 / 12f0c01920aceb8aa08fbdb7a6d0f972a0b5a622de2edae6d16b0d49a43488a7
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 = [[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [21, [-2, 16], 2, 5], []),
('fault site checkpoint anchor #2', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], []),
('partial repair boundary #1', [39, [34, 15, 35, 19, 4], 2, 4], [15, 19, 34]),
('regression checkpoint anchor #1', [22, [17, 15, -1, 24, 7, 1, -2, 18, 2], 2, 7], [2, 17]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [34, [-1, 30, 25, 20, 1, 11, 0], 5, 4], []),
('fault site checkpoint anchor #2', [14, [4, 9, 16, 9, 16, 7, 8, 16, 0, 13], 1, 5], [4, 7, 8, 9]),
('regression checkpoint anchor #1', [15, [3, 15, 2, 13], 2, 5], [2, 13]),
('regression checkpoint anchor #2', [24, [21, 26, 23, 10, 18, 9, 17, 19], 2, 4], [10, 18]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [4, [1, -2, 1], 0, 7], [1]),
('fault site checkpoint anchor #2', [38, [27, 16, 11, 3], 0, 7], [3, 11, 16, 27]),
('regression checkpoint anchor #1', [22, [4, -1, 2, 3, 22], 2, 7], [2, 4]),
('regression checkpoint anchor #2', [23, [13, 20, 7, 12, 21, 15, 11, 19, 5], 2, 7], [5, 11, 13, 19]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [27, [20, 6, 10, 15, 26, -2, 12, 27, -1], 0, 0], [6, 10, 12, 15, 20])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [29, [13, 16], 3, 5], [13]),
('regression checkpoint anchor #1', [22, [17, 15, -1, 24, 7, 1, -2, 18, 2], 2, 7], [2, 17]),
('regression checkpoint anchor #2', [14, [5, 13, 6, 10, 8, 8], 3, 7], [5, 10]),
('regression checkpoint anchor #3', [13, [11, 14, 8, 0, 6, 4, 3, 10, 7, 5], 3, 7], [3, 6, 10]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('control #1', [40, [41, 39, 8, 9, 9, 32, 18, 41], 5, 0], [8, 18, 32])],
[('checkpoint resets gap #1', [20, [2, 6, 7], 2, 5], [2, 7]),
('fault site checkpoint anchor #1', [14, [11, 0, 11, 6, 13, 15, 15, 3], 5, 7], [6]),
('fault site checkpoint anchor #2', [19, [6, 20, 0, 10, 4, 6, 2, 14, 9], 0, 7], [2, 4, 6, 9, 10]),
('regression checkpoint anchor #1', [22, [12, -2, 3, 4, 2, 14, 15, -1, 15, 16], 2, 4], [2, 14]),
('regression checkpoint anchor #2', [34, [32, 28, 21, 18, 3, 26, 15, 19, 3], 3, 5], [3, 18, 28]),
('duplicate proposals #1', [10, [3, 3, 4], 0, 0], [3, 4]),
('last legal tile #1', [10, [8, 9], 1, 0], [8]),
('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 |
|---|---|---|---|
| checkpoint resets gap #1 | [2, 7] | [2, 7] | Passed |
| fault site checkpoint anchor #1 | [] | [] | Passed |
| fault site checkpoint anchor #2 | [] | [] | Passed |
| partial repair boundary #1 | [15, 19, 34] | [15, 19, 34] | Passed |
| regression checkpoint anchor #1 | [2, 17] | [2, 17] | Passed |
| duplicate proposals #1 | [3, 4] | [3, 4] | Passed |
| last legal tile #1 | [8] | [8] | Passed |
| control #1 | [6, 10, 12, 15, 20] | [6, 10, 12, 15, 20] | Passed |
SHA-256 / d006388202eb5ffe1b2ddffd6875a6ac486dd12cc4ceb7e87f017e19bc1418f0
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.717252+00:00.
Case digest / 0bd8ce530f239fc2a33806931d08c263eac377568a1585742ead177a119c7537