{"abstract":"Every fifth floor is barely harder than the one before.","category":"Procedural level generation constraints","checks":8,"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}.","evaluation_group":"w2-procedural-level-generation-constraints-difficulty-budget","failed_approach":"Multiplying the base budget by milestones explodes deep floors.","family":"w2-procedural-level-generation-constraints-difficulty-budget-milestone-bonus","id":"FA-86551","implementations":{"attempt":{"sha256":"ce13838d9f1ec42ae3dd8f49675730254fc58fc405d2051b1a25c86c900dc75f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(depth, roster):\n    budget = (10 + 5 * depth) * (1 + depth // 5)\n    counts = {}\n    picks = []\n    while True:\n        best = None\n        for name, cost, need in roster:\n            if need > depth or cost > budget or counts.get(name, 0) >= 3:\n                continue\n            if best is None or cost > best[1] or (cost == best[1] and name < best[0]):\n                best = (name, cost)\n        if best is None:\n            break\n        picks.append(best[0])\n        counts[best[0]] = counts.get(best[0], 0) + 1\n        budget -= best[1]\n    return {'picks': picks, 'left': budget}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [10, [['imp', 2, 10], ['ogre', 5, 10], ['rat', 1, 3], ['bat', 2, 0], ['orc', 5, 3], ['wyrm', 24, 10]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat'], 'left': 0}),\n  ('regression milestone bonus #2', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),\n  ('regression milestone bonus #3',\n   [5, [['orc', 10, 1], ['imp', 5, 10]]],\n   {'picks': ['orc', 'orc', 'orc'], 'left': 15}),\n  ('regression milestone bonus #4',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),\n  ('regression milestone bonus #2',\n   [5, [['orc', 10, 1], ['imp', 5, 10]]],\n   {'picks': ['orc', 'orc', 'orc'], 'left': 15}),\n  ('regression milestone bonus #3',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4',\n   [9, [['rat', 7, 0], ['ogre', 1, 0]]],\n   {'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2',\n   [9, [['rat', 7, 0], ['ogre', 1, 0]]],\n   {'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),\n  ('regression milestone bonus #3',\n   [10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],\n   {'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4',\n   [9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],\n   {'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],\n   {'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2',\n   [9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],\n   {'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),\n  ('regression milestone bonus #3',\n   [14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],\n   {'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4', [20, [['orc', 2, 5]]], {'picks': ['orc', 'orc', 'orc'], 'left': 144}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1', [1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]], {'picks': ['bat'], 'left': 7})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],\n   {'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2', [20, [['orc', 2, 5]]], {'picks': ['orc', 'orc', 'orc'], 'left': 144}),\n  ('regression milestone bonus #3',\n   [20, [['orc', 5, 5], ['rat', 10, 0], ['ogre', 9, 1], ['imp', 5, 1], ['bat', 5, 3], ['wyrm', 1, 0]]],\n   {'picks': ['rat',\n              'rat',\n              'rat',\n              'ogre',\n              'ogre',\n              'ogre',\n              'bat',\n              'bat',\n              'bat',\n              'imp',\n              'imp',\n              'imp',\n              'orc',\n              'orc',\n              'orc',\n              'wyrm',\n              'wyrm',\n              'wyrm'],\n    'left': 45}),\n  ('regression milestone bonus #4',\n   [9, [['imp', 25, 3], ['bat', 5, 5]]],\n   {'picks': ['imp', 'imp', 'bat', 'bat', 'bat'], 'left': 0}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],\n   {'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0})]]\nfor label, args, expected in cases[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"cd3e9a099fe0d819de27aeb249585ff83021a0e243eb85ad3c108f6454c6322d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(depth, roster):\n    budget = 10 + 5 * depth + depth // 5\n    counts = {}\n    picks = []\n    while True:\n        best = None\n        for name, cost, need in roster:\n            if need > depth or cost > budget or counts.get(name, 0) >= 3:\n                continue\n            if best is None or cost > best[1] or (cost == best[1] and name < best[0]):\n                best = (name, cost)\n        if best is None:\n            break\n        picks.append(best[0])\n        counts[best[0]] = counts.get(best[0], 0) + 1\n        budget -= best[1]\n    return {'picks': picks, 'left': budget}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [10, [['imp', 2, 10], ['ogre', 5, 10], ['rat', 1, 3], ['bat', 2, 0], ['orc', 5, 3], ['wyrm', 24, 10]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat'], 'left': 0}),\n  ('regression milestone bonus #2', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),\n  ('regression milestone bonus #3',\n   [5, [['orc', 10, 1], ['imp', 5, 10]]],\n   {'picks': ['orc', 'orc', 'orc'], 'left': 15}),\n  ('regression milestone bonus #4',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),\n  ('regression milestone bonus #2',\n   [5, [['orc', 10, 1], ['imp', 5, 10]]],\n   {'picks': ['orc', 'orc', 'orc'], 'left': 15}),\n  ('regression milestone bonus #3',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4',\n   [9, [['rat', 7, 0], ['ogre', 1, 0]]],\n   {'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2',\n   [9, [['rat', 7, 0], ['ogre', 1, 0]]],\n   {'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),\n  ('regression milestone bonus #3',\n   [10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],\n   {'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4',\n   [9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],\n   {'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],\n   {'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2',\n   [9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],\n   {'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),\n  ('regression milestone bonus #3',\n   [14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],\n   {'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4', [20, [['orc', 2, 5]]], {'picks': ['orc', 'orc', 'orc'], 'left': 144}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1', [1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]], {'picks': ['bat'], 'left': 7})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],\n   {'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2', [20, [['orc', 2, 5]]], {'picks': ['orc', 'orc', 'orc'], 'left': 144}),\n  ('regression milestone bonus #3',\n   [20, [['orc', 5, 5], ['rat', 10, 0], ['ogre', 9, 1], ['imp', 5, 1], ['bat', 5, 3], ['wyrm', 1, 0]]],\n   {'picks': ['rat',\n              'rat',\n              'rat',\n              'ogre',\n              'ogre',\n              'ogre',\n              'bat',\n              'bat',\n              'bat',\n              'imp',\n              'imp',\n              'imp',\n              'orc',\n              'orc',\n              'orc',\n              'wyrm',\n              'wyrm',\n              'wyrm'],\n    'left': 45}),\n  ('regression milestone bonus #4',\n   [9, [['imp', 25, 3], ['bat', 5, 5]]],\n   {'picks': ['imp', 'imp', 'bat', 'bat', 'bat'], 'left': 0}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],\n   {'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0})]]\nfor label, args, expected in cases[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"adba2be2c226594de6a8d95290fe2fc053961d22b2d72e656e7ef9910213f8e7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(depth, roster):\n    budget = 10 + 5 * depth + depth // 5 * 10\n    counts = {}\n    picks = []\n    while True:\n        best = None\n        for name, cost, need in roster:\n            if need > depth or cost > budget or counts.get(name, 0) >= 3:\n                continue\n            if best is None or cost > best[1] or (cost == best[1] and name < best[0]):\n                best = (name, cost)\n        if best is None:\n            break\n        picks.append(best[0])\n        counts[best[0]] = counts.get(best[0], 0) + 1\n        budget -= best[1]\n    return {'picks': picks, 'left': budget}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [10, [['imp', 2, 10], ['ogre', 5, 10], ['rat', 1, 3], ['bat', 2, 0], ['orc', 5, 3], ['wyrm', 24, 10]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'ogre', 'bat', 'rat'], 'left': 0}),\n  ('regression milestone bonus #2', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),\n  ('regression milestone bonus #3',\n   [5, [['orc', 10, 1], ['imp', 5, 10]]],\n   {'picks': ['orc', 'orc', 'orc'], 'left': 15}),\n  ('regression milestone bonus #4',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1', [15, [['ogre', 5, 1]]], {'picks': ['ogre', 'ogre', 'ogre'], 'left': 100}),\n  ('regression milestone bonus #2',\n   [5, [['orc', 10, 1], ['imp', 5, 10]]],\n   {'picks': ['orc', 'orc', 'orc'], 'left': 15}),\n  ('regression milestone bonus #3',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4',\n   [9, [['rat', 7, 0], ['ogre', 1, 0]]],\n   {'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [5, [['bat', 8, 1], ['orc', 15, 10], ['wyrm', 10, 1], ['ogre', 1, 3], ['rat', 1, 3], ['imp', 2, 0]]],\n   {'picks': ['wyrm', 'wyrm', 'wyrm', 'bat', 'imp', 'imp', 'imp', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2',\n   [9, [['rat', 7, 0], ['ogre', 1, 0]]],\n   {'picks': ['rat', 'rat', 'rat', 'ogre', 'ogre', 'ogre'], 'left': 41}),\n  ('regression milestone bonus #3',\n   [10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],\n   {'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4',\n   [9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],\n   {'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [1, [['imp', 10, 1], ['bat', 10, 10], ['orc', 1, 0]]],\n   {'picks': ['imp', 'orc', 'orc', 'orc'], 'left': 2})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [10, [['imp', 15, 10], ['ogre', 5, 1], ['orc', 5, 5], ['rat', 5, 0], ['wyrm', 10, 1]]],\n   {'picks': ['imp', 'imp', 'imp', 'wyrm', 'wyrm', 'wyrm', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2',\n   [9, [['bat', 26, 5], ['rat', 11, 10], ['ogre', 5, 0], ['imp', 5, 0]]],\n   {'picks': ['bat', 'bat', 'imp', 'imp'], 'left': 3}),\n  ('regression milestone bonus #3',\n   [14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],\n   {'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #4', [20, [['orc', 2, 5]]], {'picks': ['orc', 'orc', 'orc'], 'left': 144}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1', [1, [['orc', 5, 3], ['bat', 8, 1], ['wyrm', 8, 0]]], {'picks': ['bat'], 'left': 7})],\n [('milestone depth bonus #1', [5, [['orc', 5, 0]]], {'picks': ['orc', 'orc', 'orc'], 'left': 30}),\n  ('regression milestone bonus #1',\n   [14, [['orc', 30, 1], ['bat', 15, 5], ['ogre', 5, 0], ['rat', 5, 5]]],\n   {'picks': ['orc', 'orc', 'orc', 'ogre', 'ogre'], 'left': 0}),\n  ('regression milestone bonus #2', [20, [['orc', 2, 5]]], {'picks': ['orc', 'orc', 'orc'], 'left': 144}),\n  ('regression milestone bonus #3',\n   [20, [['orc', 5, 5], ['rat', 10, 0], ['ogre', 9, 1], ['imp', 5, 1], ['bat', 5, 3], ['wyrm', 1, 0]]],\n   {'picks': ['rat',\n              'rat',\n              'rat',\n              'ogre',\n              'ogre',\n              'ogre',\n              'bat',\n              'bat',\n              'bat',\n              'imp',\n              'imp',\n              'imp',\n              'orc',\n              'orc',\n              'orc',\n              'wyrm',\n              'wyrm',\n              'wyrm'],\n    'left': 45}),\n  ('regression milestone bonus #4',\n   [9, [['imp', 25, 3], ['bat', 5, 5]]],\n   {'picks': ['imp', 'imp', 'bat', 'bat', 'bat'], 'left': 0}),\n  ('unlock at depth #1',\n   [3, [['ogre', 10, 3], ['rat', 1, 0]]],\n   {'picks': ['ogre', 'ogre', 'rat', 'rat', 'rat'], 'left': 2}),\n  ('equal cost tie #1', [0, [['orc', 5, 0], ['imp', 5, 0]]], {'picks': ['imp', 'imp'], 'left': 0}),\n  ('control #1',\n   [4, [['rat', 5, 5], ['ogre', 5, 0], ['wyrm', 5, 1], ['imp', 5, 3]]],\n   {'picks': ['imp', 'imp', 'imp', 'ogre', 'ogre', 'ogre'], 'left': 0})]]\nfor label, args, expected in cases[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-procedural-level-generation-constraints-difficulty-budget-milestone-bonus","generated_at":"2026-09-29T14:50:50.606570+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"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.","repair":"Restore `10 + 5 * depth + depth // 5 * 10` at the milestone bonus step.","root_cause":"The milestone bonus is added without its x10 scale.","sha256":"af800500968b4a6681e7f74cfd2a81cc72b24fd0595d8d9ab583378c9a58461a","title":"Encounter difficulty budget: Milestone floors add almost nothing · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.025,"exit_code":1,"observations":[{"actual":{"left":55,"picks":["orc","orc","orc"]},"check":"milestone depth bonus #1","expected":{"left":30,"picks":["orc","orc","orc"]},"passed":false},{"actual":{"left":63,"picks":["wyrm","wyrm","wyrm","ogre","ogre","ogre","orc","orc","orc","bat","bat","bat","imp","imp","imp","rat","rat","rat"]},"check":"regression milestone bonus #1","expected":{"left":0,"picks":["wyrm","wyrm","wyrm","ogre","bat","rat"]},"passed":false},{"actual":{"left":325,"picks":["ogre","ogre","ogre"]},"check":"regression milestone bonus #2","expected":{"left":100,"picks":["ogre","ogre","ogre"]},"passed":false},{"actual":{"left":40,"picks":["orc","orc","orc"]},"check":"regression milestone bonus #3","expected":{"left":15,"picks":["orc","orc","orc"]},"passed":false},{"actual":{"left":4,"picks":["wyrm","wyrm","wyrm","bat","bat","bat","imp","imp","imp","ogre","ogre","ogre","rat","rat","rat"]},"check":"regression milestone bonus #4","expected":{"left":0,"picks":["wyrm","wyrm","wyrm","bat","imp","imp","imp","ogre"]},"passed":false},{"actual":{"left":2,"picks":["ogre","ogre","rat","rat","rat"]},"check":"unlock at depth #1","expected":{"left":2,"picks":["ogre","ogre","rat","rat","rat"]},"passed":true},{"actual":{"left":0,"picks":["imp","imp"]},"check":"equal cost tie #1","expected":{"left":0,"picks":["imp","imp"]},"passed":true},{"actual":{"left":2,"picks":["imp","orc","orc","orc"]},"check":"control #1","expected":{"left":2,"picks":["imp","orc","orc","orc"]},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"milestone depth bonus #1\", \"actual\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 55}, \"expected\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 30}, \"passed\": false}, {\"check\": \"regression milestone bonus #1\", \"actual\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"ogre\", \"ogre\", \"ogre\", \"orc\", \"orc\", \"orc\", \"bat\", \"bat\", \"bat\", \"imp\", \"imp\", \"imp\", \"rat\", \"rat\", \"rat\"], \"left\": 63}, \"expected\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"ogre\", \"bat\", \"rat\"], \"left\": 0}, \"passed\": false}, {\"check\": \"regression milestone bonus #2\", \"actual\": {\"picks\": [\"ogre\", \"ogre\", \"ogre\"], \"left\": 325}, \"expected\": {\"picks\": [\"ogre\", \"ogre\", \"ogre\"], \"left\": 100}, \"passed\": false}, {\"check\": \"regression milestone bonus #3\", \"actual\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 40}, \"expected\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 15}, \"passed\": false}, {\"check\": \"regression milestone bonus #4\", \"actual\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"bat\", \"bat\", \"bat\", \"imp\", \"imp\", \"imp\", \"ogre\", \"ogre\", \"ogre\", \"rat\", \"rat\", \"rat\"], \"left\": 4}, \"expected\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"bat\", \"imp\", \"imp\", \"imp\", \"ogre\"], \"left\": 0}, \"passed\": false}, {\"check\": \"unlock at depth #1\", \"actual\": {\"picks\": [\"ogre\", \"ogre\", \"rat\", \"rat\", \"rat\"], \"left\": 2}, \"expected\": {\"picks\": [\"ogre\", \"ogre\", \"rat\", \"rat\", \"rat\"], \"left\": 2}, \"passed\": true}, {\"check\": \"equal cost tie #1\", \"actual\": {\"picks\": [\"imp\", \"imp\"], \"left\": 0}, \"expected\": {\"picks\": [\"imp\", \"imp\"], \"left\": 0}, \"passed\": true}, {\"check\": \"control #1\", \"actual\": {\"picks\": [\"imp\", \"orc\", \"orc\", \"orc\"], \"left\": 2}, \"expected\": {\"picks\": [\"imp\", \"orc\", \"orc\", \"orc\"], \"left\": 2}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.518,"exit_code":1,"observations":[{"actual":{"left":21,"picks":["orc","orc","orc"]},"check":"milestone depth bonus #1","expected":{"left":30,"picks":["orc","orc","orc"]},"passed":false},{"actual":{"left":0,"picks":["wyrm","wyrm","ogre","ogre","bat","bat"]},"check":"regression milestone bonus #1","expected":{"left":0,"picks":["wyrm","wyrm","wyrm","ogre","bat","rat"]},"passed":false},{"actual":{"left":73,"picks":["ogre","ogre","ogre"]},"check":"regression milestone bonus #2","expected":{"left":100,"picks":["ogre","ogre","ogre"]},"passed":false},{"actual":{"left":6,"picks":["orc","orc","orc"]},"check":"regression milestone bonus #3","expected":{"left":15,"picks":["orc","orc","orc"]},"passed":false},{"actual":{"left":0,"picks":["wyrm","wyrm","wyrm","imp","imp","imp"]},"check":"regression milestone bonus #4","expected":{"left":0,"picks":["wyrm","wyrm","wyrm","bat","imp","imp","imp","ogre"]},"passed":false},{"actual":{"left":2,"picks":["ogre","ogre","rat","rat","rat"]},"check":"unlock at depth #1","expected":{"left":2,"picks":["ogre","ogre","rat","rat","rat"]},"passed":true},{"actual":{"left":0,"picks":["imp","imp"]},"check":"equal cost tie #1","expected":{"left":0,"picks":["imp","imp"]},"passed":true},{"actual":{"left":2,"picks":["imp","orc","orc","orc"]},"check":"control #1","expected":{"left":2,"picks":["imp","orc","orc","orc"]},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"milestone depth bonus #1\", \"actual\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 21}, \"expected\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 30}, \"passed\": false}, {\"check\": \"regression milestone bonus #1\", \"actual\": {\"picks\": [\"wyrm\", \"wyrm\", \"ogre\", \"ogre\", \"bat\", \"bat\"], \"left\": 0}, \"expected\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"ogre\", \"bat\", \"rat\"], \"left\": 0}, \"passed\": false}, {\"check\": \"regression milestone bonus #2\", \"actual\": {\"picks\": [\"ogre\", \"ogre\", \"ogre\"], \"left\": 73}, \"expected\": {\"picks\": [\"ogre\", \"ogre\", \"ogre\"], \"left\": 100}, \"passed\": false}, {\"check\": \"regression milestone bonus #3\", \"actual\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 6}, \"expected\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 15}, \"passed\": false}, {\"check\": \"regression milestone bonus #4\", \"actual\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"imp\", \"imp\", \"imp\"], \"left\": 0}, \"expected\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"bat\", \"imp\", \"imp\", \"imp\", \"ogre\"], \"left\": 0}, \"passed\": false}, {\"check\": \"unlock at depth #1\", \"actual\": {\"picks\": [\"ogre\", \"ogre\", \"rat\", \"rat\", \"rat\"], \"left\": 2}, \"expected\": {\"picks\": [\"ogre\", \"ogre\", \"rat\", \"rat\", \"rat\"], \"left\": 2}, \"passed\": true}, {\"check\": \"equal cost tie #1\", \"actual\": {\"picks\": [\"imp\", \"imp\"], \"left\": 0}, \"expected\": {\"picks\": [\"imp\", \"imp\"], \"left\": 0}, \"passed\": true}, {\"check\": \"control #1\", \"actual\": {\"picks\": [\"imp\", \"orc\", \"orc\", \"orc\"], \"left\": 2}, \"expected\": {\"picks\": [\"imp\", \"orc\", \"orc\", \"orc\"], \"left\": 2}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.159,"exit_code":0,"observations":[{"actual":{"left":30,"picks":["orc","orc","orc"]},"check":"milestone depth bonus #1","expected":{"left":30,"picks":["orc","orc","orc"]},"passed":true},{"actual":{"left":0,"picks":["wyrm","wyrm","wyrm","ogre","bat","rat"]},"check":"regression milestone bonus #1","expected":{"left":0,"picks":["wyrm","wyrm","wyrm","ogre","bat","rat"]},"passed":true},{"actual":{"left":100,"picks":["ogre","ogre","ogre"]},"check":"regression milestone bonus #2","expected":{"left":100,"picks":["ogre","ogre","ogre"]},"passed":true},{"actual":{"left":15,"picks":["orc","orc","orc"]},"check":"regression milestone bonus #3","expected":{"left":15,"picks":["orc","orc","orc"]},"passed":true},{"actual":{"left":0,"picks":["wyrm","wyrm","wyrm","bat","imp","imp","imp","ogre"]},"check":"regression milestone bonus #4","expected":{"left":0,"picks":["wyrm","wyrm","wyrm","bat","imp","imp","imp","ogre"]},"passed":true},{"actual":{"left":2,"picks":["ogre","ogre","rat","rat","rat"]},"check":"unlock at depth #1","expected":{"left":2,"picks":["ogre","ogre","rat","rat","rat"]},"passed":true},{"actual":{"left":0,"picks":["imp","imp"]},"check":"equal cost tie #1","expected":{"left":0,"picks":["imp","imp"]},"passed":true},{"actual":{"left":2,"picks":["imp","orc","orc","orc"]},"check":"control #1","expected":{"left":2,"picks":["imp","orc","orc","orc"]},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"milestone depth bonus #1\", \"actual\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 30}, \"expected\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 30}, \"passed\": true}, {\"check\": \"regression milestone bonus #1\", \"actual\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"ogre\", \"bat\", \"rat\"], \"left\": 0}, \"expected\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"ogre\", \"bat\", \"rat\"], \"left\": 0}, \"passed\": true}, {\"check\": \"regression milestone bonus #2\", \"actual\": {\"picks\": [\"ogre\", \"ogre\", \"ogre\"], \"left\": 100}, \"expected\": {\"picks\": [\"ogre\", \"ogre\", \"ogre\"], \"left\": 100}, \"passed\": true}, {\"check\": \"regression milestone bonus #3\", \"actual\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 15}, \"expected\": {\"picks\": [\"orc\", \"orc\", \"orc\"], \"left\": 15}, \"passed\": true}, {\"check\": \"regression milestone bonus #4\", \"actual\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"bat\", \"imp\", \"imp\", \"imp\", \"ogre\"], \"left\": 0}, \"expected\": {\"picks\": [\"wyrm\", \"wyrm\", \"wyrm\", \"bat\", \"imp\", \"imp\", \"imp\", \"ogre\"], \"left\": 0}, \"passed\": true}, {\"check\": \"unlock at depth #1\", \"actual\": {\"picks\": [\"ogre\", \"ogre\", \"rat\", \"rat\", \"rat\"], \"left\": 2}, \"expected\": {\"picks\": [\"ogre\", \"ogre\", \"rat\", \"rat\", \"rat\"], \"left\": 2}, \"passed\": true}, {\"check\": \"equal cost tie #1\", \"actual\": {\"picks\": [\"imp\", \"imp\"], \"left\": 0}, \"expected\": {\"picks\": [\"imp\", \"imp\"], \"left\": 0}, \"passed\": true}, {\"check\": \"control #1\", \"actual\": {\"picks\": [\"imp\", \"orc\", \"orc\", \"orc\"], \"left\": 2}, \"expected\": {\"picks\": [\"imp\", \"orc\", \"orc\", \"orc\"], \"left\": 2}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}