FA-86561 / Procedural level generation constraints / Open access
Encounter difficulty budget: Budget cannot be spent to zero · case 01
An enemy costing exactly the remaining budget is skipped.
ROOT CAUSE
Affordability requires strictly more budget than cost.
VERIFIED REPAIR
Restore `cost > budget` at the affordability step.
Unsuccessful approach: Allowing a one-point overspend drives the budget negative.
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 = [[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('regression affordability #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}),
('fault site affordability #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]],
{'picks': ['bat'], 'left': 7}),
('regression affordability #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}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('regression affordability #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 affordability #2',
[1, [['bat', 8, 3], ['rat', 5, 10], ['imp', 2, 1], ['orc', 1, 0], ['ogre', 15, 0], ['wyrm', 1, 1]]],
{'picks': ['ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['rat', 2, 3], ['imp', 8, 0], ['orc', 10, 10], ['ogre', 5, 3], ['bat', 5, 5], ['wyrm', 26, 0]]],
{'picks': ['imp'], 'left': 7}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[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}),
('fault site affordability #2',
[1, [['wyrm', 8, 10], ['ogre', 5, 1]]],
{'picks': ['ogre', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['rat', 2, 3], ['imp', 8, 0], ['orc', 10, 10], ['ogre', 5, 3], ['bat', 5, 5], ['wyrm', 26, 0]]],
{'picks': ['imp'], 'left': 7}),
('regression affordability #1',
[4, [['bat', 15, 3], ['wyrm', 5, 0], ['orc', 2, 3], ['rat', 5, 0], ['imp', 19, 10], ['ogre', 1, 1]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[1, [['wyrm', 8, 3], ['rat', 5, 1]]],
{'picks': ['rat', 'rat', 'rat'], 'left': 0}),
('fault site affordability #2',
[14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1', [1, [['orc', 20, 3], ['wyrm', 8, 0]]], {'picks': ['wyrm'], 'left': 7}),
('partial repair boundary #2',
[1, [['bat', 2, 3], ['imp', 8, 1], ['ogre', 8, 10]]],
{'picks': ['imp'], 'left': 7}),
('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}),
('control #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[9, [['imp', 25, 3], ['bat', 5, 5]]],
{'picks': ['imp', 'imp', 'bat', 'bat', 'bat'], 'left': 0}),
('fault site affordability #2',
[4, [['wyrm', 20, 5], ['orc', 5, 10], ['rat', 10, 10], ['bat', 15, 0]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('regression affordability #1',
[4, [['bat', 1, 0], ['wyrm', 15, 5], ['rat', 20, 1], ['imp', 2, 3], ['orc', 2, 1], ['ogre', 15, 3]]],
{'picks': ['rat', 'imp', 'imp', 'imp', 'orc', 'orc'], 'left': 0}),
('regression affordability #2',
[0, [['imp', 5, 0], ['orc', 15, 10], ['ogre', 10, 10], ['wyrm', 1, 0], ['rat', 16, 1], ['bat', 5, 0]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('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}),
('control #1', [5, [['orc', 10, 1], ['imp', 5, 10]]], {'picks': ['orc', 'orc', 'orc'], 'left': 15})]]
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 |
|---|---|---|---|
| equal cost tie #1 | {'left': 5, 'picks': ['imp']} | {'left': 0, 'picks': ['imp', 'imp']} | Failed |
| regression affordability #1 | {'left': 1, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | Failed |
| fault site affordability #1 | {'left': 5, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre']} | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | Failed |
| partial repair boundary #1 | {'left': 7, 'picks': ['bat']} | {'left': 7, 'picks': ['bat']} | Passed |
| regression affordability #2 | {'left': 1, 'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre']} | Failed |
| 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 |
| control #1 | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | Passed |
SHA-256 / 9ee339edb57e74f8ddc36475334beff6c53cb3d769489f36e3b41bc3e2f91055
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 - 1 > 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 = [[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('regression affordability #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}),
('fault site affordability #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]],
{'picks': ['bat'], 'left': 7}),
('regression affordability #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}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('regression affordability #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 affordability #2',
[1, [['bat', 8, 3], ['rat', 5, 10], ['imp', 2, 1], ['orc', 1, 0], ['ogre', 15, 0], ['wyrm', 1, 1]]],
{'picks': ['ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['rat', 2, 3], ['imp', 8, 0], ['orc', 10, 10], ['ogre', 5, 3], ['bat', 5, 5], ['wyrm', 26, 0]]],
{'picks': ['imp'], 'left': 7}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[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}),
('fault site affordability #2',
[1, [['wyrm', 8, 10], ['ogre', 5, 1]]],
{'picks': ['ogre', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['rat', 2, 3], ['imp', 8, 0], ['orc', 10, 10], ['ogre', 5, 3], ['bat', 5, 5], ['wyrm', 26, 0]]],
{'picks': ['imp'], 'left': 7}),
('regression affordability #1',
[4, [['bat', 15, 3], ['wyrm', 5, 0], ['orc', 2, 3], ['rat', 5, 0], ['imp', 19, 10], ['ogre', 1, 1]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[1, [['wyrm', 8, 3], ['rat', 5, 1]]],
{'picks': ['rat', 'rat', 'rat'], 'left': 0}),
('fault site affordability #2',
[14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1', [1, [['orc', 20, 3], ['wyrm', 8, 0]]], {'picks': ['wyrm'], 'left': 7}),
('partial repair boundary #2',
[1, [['bat', 2, 3], ['imp', 8, 1], ['ogre', 8, 10]]],
{'picks': ['imp'], 'left': 7}),
('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}),
('control #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[9, [['imp', 25, 3], ['bat', 5, 5]]],
{'picks': ['imp', 'imp', 'bat', 'bat', 'bat'], 'left': 0}),
('fault site affordability #2',
[4, [['wyrm', 20, 5], ['orc', 5, 10], ['rat', 10, 10], ['bat', 15, 0]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('regression affordability #1',
[4, [['bat', 1, 0], ['wyrm', 15, 5], ['rat', 20, 1], ['imp', 2, 3], ['orc', 2, 1], ['ogre', 15, 3]]],
{'picks': ['rat', 'imp', 'imp', 'imp', 'orc', 'orc'], 'left': 0}),
('regression affordability #2',
[0, [['imp', 5, 0], ['orc', 15, 10], ['ogre', 10, 10], ['wyrm', 1, 0], ['rat', 16, 1], ['bat', 5, 0]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('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}),
('control #1', [5, [['orc', 10, 1], ['imp', 5, 10]]], {'picks': ['orc', 'orc', 'orc'], 'left': 15})]]
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 |
|---|---|---|---|
| equal cost tie #1 | {'left': 0, 'picks': ['imp', 'imp']} | {'left': 0, 'picks': ['imp', 'imp']} | Passed |
| regression affordability #1 | {'left': -1, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'bat']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | Failed |
| fault site affordability #1 | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | Passed |
| partial repair boundary #1 | {'left': -1, 'picks': ['bat', 'bat']} | {'left': 7, 'picks': ['bat']} | Failed |
| regression affordability #2 | {'left': -1, 'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'bat']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre']} | Failed |
| 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 |
| control #1 | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | Passed |
SHA-256 / 846345397a31ae632d0f50aa6c3e12083728f8a04bc7e09cd11f109015239a3c
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 = [[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('regression affordability #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}),
('fault site affordability #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]],
{'picks': ['bat'], 'left': 7}),
('regression affordability #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}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],
{'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0}),
('regression affordability #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 affordability #2',
[1, [['bat', 8, 3], ['rat', 5, 10], ['imp', 2, 1], ['orc', 1, 0], ['ogre', 15, 0], ['wyrm', 1, 1]]],
{'picks': ['ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['rat', 2, 3], ['imp', 8, 0], ['orc', 10, 10], ['ogre', 5, 3], ['bat', 5, 5], ['wyrm', 26, 0]]],
{'picks': ['imp'], 'left': 7}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[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}),
('fault site affordability #2',
[1, [['wyrm', 8, 10], ['ogre', 5, 1]]],
{'picks': ['ogre', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1',
[1, [['rat', 2, 3], ['imp', 8, 0], ['orc', 10, 10], ['ogre', 5, 3], ['bat', 5, 5], ['wyrm', 26, 0]]],
{'picks': ['imp'], 'left': 7}),
('regression affordability #1',
[4, [['bat', 15, 3], ['wyrm', 5, 0], ['orc', 2, 3], ['rat', 5, 0], ['imp', 19, 10], ['ogre', 1, 1]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('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}),
('control #1',
[1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],
{'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[1, [['wyrm', 8, 3], ['rat', 5, 1]]],
{'picks': ['rat', 'rat', 'rat'], 'left': 0}),
('fault site affordability #2',
[14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],
{'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),
('partial repair boundary #1', [1, [['orc', 20, 3], ['wyrm', 8, 0]]], {'picks': ['wyrm'], 'left': 7}),
('partial repair boundary #2',
[1, [['bat', 2, 3], ['imp', 8, 1], ['ogre', 8, 10]]],
{'picks': ['imp'], 'left': 7}),
('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}),
('control #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100})],
[('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),
('fault site affordability #1',
[9, [['imp', 25, 3], ['bat', 5, 5]]],
{'picks': ['imp', 'imp', 'bat', 'bat', 'bat'], 'left': 0}),
('fault site affordability #2',
[4, [['wyrm', 20, 5], ['orc', 5, 10], ['rat', 10, 10], ['bat', 15, 0]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('regression affordability #1',
[4, [['bat', 1, 0], ['wyrm', 15, 5], ['rat', 20, 1], ['imp', 2, 3], ['orc', 2, 1], ['ogre', 15, 3]]],
{'picks': ['rat', 'imp', 'imp', 'imp', 'orc', 'orc'], 'left': 0}),
('regression affordability #2',
[0, [['imp', 5, 0], ['orc', 15, 10], ['ogre', 10, 10], ['wyrm', 1, 0], ['rat', 16, 1], ['bat', 5, 0]]],
{'picks': ['bat', 'bat'], 'left': 0}),
('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}),
('control #1', [5, [['orc', 10, 1], ['imp', 5, 10]]], {'picks': ['orc', 'orc', 'orc'], 'left': 15})]]
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 |
|---|---|---|---|
| equal cost tie #1 | {'left': 0, 'picks': ['imp', 'imp']} | {'left': 0, 'picks': ['imp', 'imp']} | Passed |
| regression affordability #1 | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat']} | Passed |
| fault site affordability #1 | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | {'left': 0, 'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre']} | Passed |
| partial repair boundary #1 | {'left': 7, 'picks': ['bat']} | {'left': 7, 'picks': ['bat']} | Passed |
| regression affordability #2 | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre']} | {'left': 0, 'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre']} | Passed |
| 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 |
| control #1 | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | {'left': 2, 'picks': ['imp', 'orc', 'orc', 'orc']} | Passed |
SHA-256 / 076631c7f4188c5b0a0edc7da352e09bf2b34d7ee5492a4a856468de3bbe8f6e
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.768845+00:00.
Case digest / 0344f4a1af0126e6cf7ba054df32949ef4a211a9dbcd7ab8f2986bd258c2c1ed