FA-86566 / Procedural level generation constraints / Open access
Encounter difficulty budget: Four copies of one enemy · case 01
Encounters exceed the three-per-type variety rule.
ROOT CAUSE
The per-type cap is strict.
VERIFIED REPAIR
Restore `counts.get(name, 0) >= 3` at the copy limit step.
Unsuccessful approach: A global three-enemy cap truncates mixed encounters.
Case contract
budget = 10 + 5*depth + 10*(depth//5). roster [name, cost, min_depth] with cost >= 1. Repeatedly pick the most expensive unlocked (min_depth <= depth) affordable enemy with fewer than 3 copies already picked, ties broken by name; stop when none qualifies. Returns {picks, left}.
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(depth, roster):
budget = 10 + 5 * depth + depth // 5 * 10
counts = {}
picks = []
while True:
best = None
for name, cost, need in roster:
if need > depth or cost > budget or counts.get(name, 0) > 3:
continue
if best is None or cost > best[1] or (cost == best[1] and name < best[0]):
best = (name, cost)
if best is None:
break
picks.append(best[0])
counts[best[0]] = counts.get(best[0], 0) + 1
budget -= best[1]
return {'picks': picks, 'left': budget}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2}),
('fault site copy limit #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),
('partial repair boundary #1',
[10, [['imp', 2, 10], ['ogre', 5, 10], ['rat', 1, 3], ['bat', 2, 0], ['orc', 5, 3], ['wyrm', 24, 10]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat'], 'left': 0}),
('regression copy limit #2',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]], {'picks': ['bat'], 'left': 7})],
[('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2}),
('fault site copy limit #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),
('regression copy limit #2',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('regression copy limit #3',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [4, [['orc', 10, 10], ['wyrm', 2, 5]]], {'picks': [], 'left': 30}),
('control #2', [0, [['bat', 18, 0]]], {'picks': [], 'left': 10})],
[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('fault site copy limit #1',
[5, [['orc', 10, 1], ['imp', 5, 10]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 15}),
('regression copy limit #2',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('regression copy limit #3',
[9, [['rat', 7, 0], ['ogre', 1, 0]]],
{'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [4, [['orc', 10, 10], ['wyrm', 2, 5]]], {'picks': [], 'left': 30})],
[('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('fault site copy limit #1',
[1, [['imp', 10, 3], ['orc', 2, 0], ['rat', 10, 10], ['wyrm', 15, 5], ['bat', 15, 3]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 9}),
('regression copy limit #1',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('regression copy limit #2',
[10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],
{'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],
{'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1',
[0, [['imp', 10, 1], ['rat', 7, 10], ['orc', 5, 10], ['ogre', 1, 1], ['wyrm', 5, 5]]],
{'picks': [], 'left': 10}),
('control #2', [9, [['ogre', 5, 10]]], {'picks': [], 'left': 65})],
[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[9, [['rat', 7, 0], ['ogre', 1, 0]]],
{'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),
('fault site copy limit #1',
[3, [['orc', 2, 0], ['wyrm', 2, 5]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 19}),
('partial repair boundary #1',
[4, [['rat', 5, 1], ['orc', 8, 0], ['imp', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'rat'], 'left': 1}),
('partial repair boundary #2',
[14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [1, [['wyrm', 8, 10], ['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 0})]]
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 |
|---|---|---|---|
| milestone depth bonus #1 | {'left': 25, 'picks': ['orc', 'orc', 'orc', 'orc']} | {'left': 30, 'picks': ['orc', 'orc', 'orc']} | Failed |
| unlock at depth #1 | {'left': 1, 'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat', 'rat']} | {'left': 2, 'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat']} | Failed |
| regression copy limit #1 | {'left': 1, 'picks': ['imp', 'orc', 'orc', 'orc', 'orc']} | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | Failed |
| fault site copy limit #1 | {'left': 95, 'picks': ['ogre', 'ogre', 'ogre', 'ogre']} | {'left': 100, 'picks': ['ogre', 'ogre', 'ogre']} | Failed |
| partial repair boundary #1 | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | Passed |
| regression copy limit #2 | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'imp', 'ogre', 'ogre']} | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | Failed |
| equal cost tie #1 | {'left': 0, 'picks': ['imp', 'imp']} | {'left': 0, 'picks': ['imp', 'imp']} | Passed |
| control #1 | {'left': 7, 'picks': ['bat']} | {'left': 7, 'picks': ['bat']} | Passed |
SHA-256 / 4cccf7470ed583ae9ba2c98fb9d41ba067ab20425936fd754d7f3a3a6125dddd
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(depth, roster):
budget = 10 + 5 * depth + depth // 5 * 10
counts = {}
picks = []
while True:
best = None
for name, cost, need in roster:
if need > depth or cost > budget or len(picks) >= 3:
continue
if best is None or cost > best[1] or (cost == best[1] and name < best[0]):
best = (name, cost)
if best is None:
break
picks.append(best[0])
counts[best[0]] = counts.get(best[0], 0) + 1
budget -= best[1]
return {'picks': picks, 'left': budget}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2}),
('fault site copy limit #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),
('partial repair boundary #1',
[10, [['imp', 2, 10], ['ogre', 5, 10], ['rat', 1, 3], ['bat', 2, 0], ['orc', 5, 3], ['wyrm', 24, 10]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat'], 'left': 0}),
('regression copy limit #2',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]], {'picks': ['bat'], 'left': 7})],
[('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2}),
('fault site copy limit #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),
('regression copy limit #2',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('regression copy limit #3',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [4, [['orc', 10, 10], ['wyrm', 2, 5]]], {'picks': [], 'left': 30}),
('control #2', [0, [['bat', 18, 0]]], {'picks': [], 'left': 10})],
[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('fault site copy limit #1',
[5, [['orc', 10, 1], ['imp', 5, 10]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 15}),
('regression copy limit #2',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('regression copy limit #3',
[9, [['rat', 7, 0], ['ogre', 1, 0]]],
{'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [4, [['orc', 10, 10], ['wyrm', 2, 5]]], {'picks': [], 'left': 30})],
[('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('fault site copy limit #1',
[1, [['imp', 10, 3], ['orc', 2, 0], ['rat', 10, 10], ['wyrm', 15, 5], ['bat', 15, 3]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 9}),
('regression copy limit #1',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('regression copy limit #2',
[10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],
{'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],
{'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1',
[0, [['imp', 10, 1], ['rat', 7, 10], ['orc', 5, 10], ['ogre', 1, 1], ['wyrm', 5, 5]]],
{'picks': [], 'left': 10}),
('control #2', [9, [['ogre', 5, 10]]], {'picks': [], 'left': 65})],
[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[9, [['rat', 7, 0], ['ogre', 1, 0]]],
{'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),
('fault site copy limit #1',
[3, [['orc', 2, 0], ['wyrm', 2, 5]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 19}),
('partial repair boundary #1',
[4, [['rat', 5, 1], ['orc', 8, 0], ['imp', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'rat'], 'left': 1}),
('partial repair boundary #2',
[14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [1, [['wyrm', 8, 10], ['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 0})]]
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 |
|---|---|---|---|
| milestone depth bonus #1 | {'left': 30, 'picks': ['orc', 'orc', 'orc']} | {'left': 30, 'picks': ['orc', 'orc', 'orc']} | Passed |
| unlock at depth #1 | {'left': 4, 'picks': ['ogre', 'ogre', 'rat']} | {'left': 2, 'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat']} | Failed |
| regression copy limit #1 | {'left': 3, 'picks': ['imp', 'orc', 'orc']} | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | Failed |
| fault site copy limit #1 | {'left': 100, 'picks': ['ogre', 'ogre', 'ogre']} | {'left': 100, 'picks': ['ogre', 'ogre', 'ogre']} | Passed |
| partial repair boundary #1 | {'left': 8, 'picks': ['wyrm', 'wyrm', 'wyrm']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | Failed |
| regression copy limit #2 | {'left': 15, 'picks': ['imp', 'imp', 'imp']} | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | Failed |
| equal cost tie #1 | {'left': 0, 'picks': ['imp', 'imp']} | {'left': 0, 'picks': ['imp', 'imp']} | Passed |
| control #1 | {'left': 7, 'picks': ['bat']} | {'left': 7, 'picks': ['bat']} | Passed |
SHA-256 / 337bd1510703a5a01dd91a138cd96969a689f7dd3a2fe2524b059e375b4b73c1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(depth, roster):
budget = 10 + 5 * depth + depth // 5 * 10
counts = {}
picks = []
while True:
best = None
for name, cost, need in roster:
if need > depth or cost > budget or counts.get(name, 0) >= 3:
continue
if best is None or cost > best[1] or (cost == best[1] and name < best[0]):
best = (name, cost)
if best is None:
break
picks.append(best[0])
counts[best[0]] = counts.get(best[0], 0) + 1
budget -= best[1]
return {'picks': picks, 'left': budget}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2}),
('fault site copy limit #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),
('partial repair boundary #1',
[10, [['imp', 2, 10], ['ogre', 5, 10], ['rat', 1, 3], ['bat', 2, 0], ['orc', 5, 3], ['wyrm', 24, 10]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat'], 'left': 0}),
('regression copy limit #2',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]], {'picks': ['bat'], 'left': 7})],
[('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2}),
('fault site copy limit #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),
('regression copy limit #2',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('regression copy limit #3',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [4, [['orc', 10, 10], ['wyrm', 2, 5]]], {'picks': [], 'left': 30}),
('control #2', [0, [['bat', 18, 0]]], {'picks': [], 'left': 10})],
[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('fault site copy limit #1',
[5, [['orc', 10, 1], ['imp', 5, 10]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 15}),
('regression copy limit #2',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('regression copy limit #3',
[9, [['rat', 7, 0], ['ogre', 1, 0]]],
{'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [4, [['orc', 10, 10], ['wyrm', 2, 5]]], {'picks': [], 'left': 30})],
[('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('fault site copy limit #1',
[1, [['imp', 10, 3], ['orc', 2, 0], ['rat', 10, 10], ['wyrm', 15, 5], ['bat', 15, 3]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 9}),
('regression copy limit #1',
[5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],
{'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),
('regression copy limit #2',
[10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],
{'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],
{'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1',
[0, [['imp', 10, 1], ['rat', 7, 10], ['orc', 5, 10], ['ogre', 1, 1], ['wyrm', 5, 5]]],
{'picks': [], 'left': 10}),
('control #2', [9, [['ogre', 5, 10]]], {'picks': [], 'left': 65})],
[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),
('unlock at depth #1',
[3, [['ogre', 10, 3], ['rat', 1, 0]]],
{'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),
('regression copy limit #1',
[9, [['rat', 7, 0], ['ogre', 1, 0]]],
{'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),
('fault site copy limit #1',
[3, [['orc', 2, 0], ['wyrm', 2, 5]]],
{'picks': ['orc', 'orc', 'orc'], 'left': 19}),
('partial repair boundary #1',
[4, [['rat', 5, 1], ['orc', 8, 0], ['imp', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'rat'], 'left': 1}),
('partial repair boundary #2',
[14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),
('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('control #1', [1, [['wyrm', 8, 10], ['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 0})]]
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 |
|---|---|---|---|
| milestone depth bonus #1 | {'left': 30, 'picks': ['orc', 'orc', 'orc']} | {'left': 30, 'picks': ['orc', 'orc', 'orc']} | Passed |
| unlock at depth #1 | {'left': 2, 'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat']} | {'left': 2, 'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat']} | Passed |
| regression copy limit #1 | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | Passed |
| fault site copy limit #1 | {'left': 100, 'picks': ['ogre', 'ogre', 'ogre']} | {'left': 100, 'picks': ['ogre', 'ogre', 'ogre']} | Passed |
| partial repair boundary #1 | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | Passed |
| regression copy limit #2 | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | Passed |
| equal cost tie #1 | {'left': 0, 'picks': ['imp', 'imp']} | {'left': 0, 'picks': ['imp', 'imp']} | Passed |
| control #1 | {'left': 7, 'picks': ['bat']} | {'left': 7, 'picks': ['bat']} | Passed |
SHA-256 / 8e7142180c0a290199caf5ca8030f8969d41c8ace24b778cae8f5a93a832bb3a
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:50.768271+00:00.
Case digest / b426e8d5b9dc393b208272b1f93e505430bdda2801f45814ed29d35987e73310