{"abstract":"Encounters contain an extra enemy.","category":"Procedural level generation constraints","checks":8,"contract":"Candidates [row, col] are tried in order until count spawns are chosen. A spawn must be in bounds on a '.' tile, at Chebyshev distance >= min_dist from the player and at Chebyshev distance >= 2 from every chosen spawn (no touching spawns, diagonals included). Returns chosen cells.","evaluation_group":"w2-procedural-level-generation-constraints-spawn-points","failed_approach":"Forcing at least one spawn ignores a zero quota.","family":"w2-procedural-level-generation-constraints-spawn-points-spawn-quota","id":"FA-86446","implementations":{"attempt":{"sha256":"0fdf818404b921504f590f6a43a219dd476b53b9d4d705143ed983fd345de945","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(grid, player, candidates, min_dist, count):\n    chosen = []\n    pr, pc = player\n    for r, c in candidates:\n        if len(chosen) >= max(count, 1):\n            break\n        if not (0 <= r < len(grid) and 0 <= c < len(grid[0])) or grid[r][c] != '.':\n            continue\n        if max(abs(r - pr), abs(c - pc)) < min_dist:\n            continue\n        if any(max(abs(r - a), abs(c - b)) < 2 for a, b in chosen):\n            continue\n        chosen.append([r, c])\n    return chosen\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression spawn quota #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   []),\n  ('regression spawn quota #2',\n   [['...#...', '......~', '~~.....', '..~....', '.~....~', '.....#.'], [5, 2], [[1, 5]], 0, 0],\n   []),\n  ('regression spawn quota #3',\n   [['...', '~..', '...', '..#', '...', '..~'],\n    [0, 0],\n    [[6, 1], [3, 2], [0, 3], [2, -1], [1, 1], [5, 1]],\n    3,\n    0],\n   []),\n  ('regression spawn quota #4',\n   [['~.##.', '..#.~', '.....', '.....', '.#...', '#..~.'], [4, 0], [[2, 1], [1, 0], [-1, 5], [1, 4]], 2, 0],\n   []),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['.#~', '...', '~.#', '#.~', '..#', '#~.'], [3, 1], [[5, 0], [1, 0], [6, -1], [6, -1]], 0, 5],\n   [[1, 0]])],\n [('regression spawn quota #1',\n   [['...', '~..', '...', '..#', '...', '..~'],\n    [0, 0],\n    [[6, 1], [3, 2], [0, 3], [2, -1], [1, 1], [5, 1]],\n    3,\n    0],\n   []),\n  ('regression spawn quota #2',\n   [['~.##.', '..#.~', '.....', '.....', '.#...', '#..~.'], [4, 0], [[2, 1], [1, 0], [-1, 5], [1, 4]], 2, 0],\n   []),\n  ('regression spawn quota #3',\n   [['~...', '~..~', '.~.#', '~.~.', '~.~#', '....'], [4, 2], [[3, 3]], 0, 0],\n   []),\n  ('regression spawn quota #4', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('control #1',\n   [['.#~', '...', '~.#', '#.~', '..#', '#~.'], [3, 1], [[5, 0], [1, 0], [6, -1], [6, -1]], 0, 5],\n   [[1, 0]]),\n  ('control #2',\n   [['....', '.#.~', '..~~', '...#'], [2, 0], [[4, -1], [3, 3], [3, 1], [1, 0], [1, 3]], 0, 2],\n   [[3, 1], [1, 0]])],\n [('fault site spawn quota #1',\n   [['~..~.#.', '.....#.', '.......', '#......', '##....~'],\n    [1, 4],\n    [[5, 0], [2, 0], [1, 6], [-1, 7], [0, 2], [1, 1], [3, 5], [2, 3], [5, 4]],\n    1,\n    3],\n   [[2, 0], [1, 6], [0, 2]]),\n  ('regression spawn quota #1',\n   [['~...', '~..~', '.~.#', '~.~.', '~.~#', '....'], [4, 2], [[3, 3]], 0, 0],\n   []),\n  ('regression spawn quota #2', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('regression spawn quota #3',\n   [['.##...', '.~.#..', '.~...#', '##.~..', '~#...~', '..~.#.', '##...~', '~...#.'],\n    [6, 1],\n    [[0, 5], [6, 2], [8, 3], [5, 3], [3, 5]],\n    0,\n    0],\n   []),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['....', '.#.~', '..~~', '...#'], [2, 0], [[4, -1], [3, 3], [3, 1], [1, 0], [1, 3]], 0, 2],\n   [[3, 1], [1, 0]]),\n  ('control #2',\n   [['...#', '.#..', '#.#~', '~~.~', '~~#.', '~##.', '....', '...#'],\n    [1, 2],\n    [[0, 1], [6, 4], [5, 4], [4, 1], [4, 0], [6, 1], [0, 4], [7, 2], [5, 3], [-1, 1]],\n    3,\n    2],\n   [[6, 1], [5, 3]])],\n [('regression spawn quota #1', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('regression spawn quota #2',\n   [['.##...', '.~.#..', '.~...#', '##.~..', '~#...~', '..~.#.', '##...~', '~...#.'],\n    [6, 1],\n    [[0, 5], [6, 2], [8, 3], [5, 3], [3, 5]],\n    0,\n    0],\n   []),\n  ('regression spawn quota #3', [['...#..', '....#.', '.~##..'], [1, 1], [[0, 1], [2, 1]], 1, 0], []),\n  ('regression spawn quota #4', [['......#.', '..#..~..', '..~~...#'], [2, 2], [[0, 7]], 1, 0], []),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('control #1',\n   [['~......', '......~', '~#.~##.', '.#..~~.', '#..#~#.', '......#'],\n    [3, 2],\n    [[1, 0], [6, 3], [5, 2], [4, 0], [2, 3], [1, 4], [6, 7], [2, 7]],\n    0,\n    5],\n   [[1, 0], [5, 2], [1, 4]]),\n  ('control #2',\n   [['.#.', '...', '#..', '...', '#..', '#.~'], [5, 2], [[2, -1], [5, 2], [1, 3], [2, 0], [6, 0]], 3, 0],\n   [])],\n [('fault site spawn quota #1',\n   [['.~..~.#', '~~..~.~', '.......', '~~.~#~.', '.#.##~~', '#~.#...', '..###~.', '..~.~..'],\n    [2, 0],\n    [[3, 6], [6, 5], [4, 2], [5, 7]],\n    0,\n    1],\n   [[3, 6]]),\n  ('fault site spawn quota #2',\n   [['##.#~..', '..~#..#', '.~.....', '.#~~~.~', '....~..', '~...~.#', '.~.#.~#', '.......'],\n    [0, 0],\n    [[-1, 3], [5, 3], [6, 3], [4, 5], [5, -1], [1, 7], [5, 2]],\n    0,\n    1],\n   [[5, 3]]),\n  ('regression spawn quota #1', [['......#.', '..#..~..', '..~~...#'], [2, 2], [[0, 7]], 1, 0], []),\n  ('regression spawn quota #2',\n   [['.#.#.~~~', '.~...~..', '.......~'],\n    [1, 5],\n    [[0, 5], [3, 7], [1, 2], [0, 2], [0, 7], [1, -1], [1, 1], [2, 2]],\n    0,\n    0],\n   []),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('control #1',\n   [['.#.#~.', '~.....', '.~#...', '......', '..#.#.'], [0, 0], [[1, 1], [5, 0], [3, 3], [-1, 0]], 0, 5],\n   [[1, 1], [3, 3]]),\n  ('control #2', [['..~#...~', '..~#....', '.~.##..#'], [2, 3], [[3, 7], [2, 4]], 2, 5], [])]]\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":"21874372395f8af3362a952b1cf7f1c8c999952611319ca2ff7602e1a5c56834","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(grid, player, candidates, min_dist, count):\n    chosen = []\n    pr, pc = player\n    for r, c in candidates:\n        if len(chosen) > count:\n            break\n        if not (0 <= r < len(grid) and 0 <= c < len(grid[0])) or grid[r][c] != '.':\n            continue\n        if max(abs(r - pr), abs(c - pc)) < min_dist:\n            continue\n        if any(max(abs(r - a), abs(c - b)) < 2 for a, b in chosen):\n            continue\n        chosen.append([r, c])\n    return chosen\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression spawn quota #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   []),\n  ('regression spawn quota #2',\n   [['...#...', '......~', '~~.....', '..~....', '.~....~', '.....#.'], [5, 2], [[1, 5]], 0, 0],\n   []),\n  ('regression spawn quota #3',\n   [['...', '~..', '...', '..#', '...', '..~'],\n    [0, 0],\n    [[6, 1], [3, 2], [0, 3], [2, -1], [1, 1], [5, 1]],\n    3,\n    0],\n   []),\n  ('regression spawn quota #4',\n   [['~.##.', '..#.~', '.....', '.....', '.#...', '#..~.'], [4, 0], [[2, 1], [1, 0], [-1, 5], [1, 4]], 2, 0],\n   []),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['.#~', '...', '~.#', '#.~', '..#', '#~.'], [3, 1], [[5, 0], [1, 0], [6, -1], [6, -1]], 0, 5],\n   [[1, 0]])],\n [('regression spawn quota #1',\n   [['...', '~..', '...', '..#', '...', '..~'],\n    [0, 0],\n    [[6, 1], [3, 2], [0, 3], [2, -1], [1, 1], [5, 1]],\n    3,\n    0],\n   []),\n  ('regression spawn quota #2',\n   [['~.##.', '..#.~', '.....', '.....', '.#...', '#..~.'], [4, 0], [[2, 1], [1, 0], [-1, 5], [1, 4]], 2, 0],\n   []),\n  ('regression spawn quota #3',\n   [['~...', '~..~', '.~.#', '~.~.', '~.~#', '....'], [4, 2], [[3, 3]], 0, 0],\n   []),\n  ('regression spawn quota #4', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('control #1',\n   [['.#~', '...', '~.#', '#.~', '..#', '#~.'], [3, 1], [[5, 0], [1, 0], [6, -1], [6, -1]], 0, 5],\n   [[1, 0]]),\n  ('control #2',\n   [['....', '.#.~', '..~~', '...#'], [2, 0], [[4, -1], [3, 3], [3, 1], [1, 0], [1, 3]], 0, 2],\n   [[3, 1], [1, 0]])],\n [('fault site spawn quota #1',\n   [['~..~.#.', '.....#.', '.......', '#......', '##....~'],\n    [1, 4],\n    [[5, 0], [2, 0], [1, 6], [-1, 7], [0, 2], [1, 1], [3, 5], [2, 3], [5, 4]],\n    1,\n    3],\n   [[2, 0], [1, 6], [0, 2]]),\n  ('regression spawn quota #1',\n   [['~...', '~..~', '.~.#', '~.~.', '~.~#', '....'], [4, 2], [[3, 3]], 0, 0],\n   []),\n  ('regression spawn quota #2', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('regression spawn quota #3',\n   [['.##...', '.~.#..', '.~...#', '##.~..', '~#...~', '..~.#.', '##...~', '~...#.'],\n    [6, 1],\n    [[0, 5], [6, 2], [8, 3], [5, 3], [3, 5]],\n    0,\n    0],\n   []),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['....', '.#.~', '..~~', '...#'], [2, 0], [[4, -1], [3, 3], [3, 1], [1, 0], [1, 3]], 0, 2],\n   [[3, 1], [1, 0]]),\n  ('control #2',\n   [['...#', '.#..', '#.#~', '~~.~', '~~#.', '~##.', '....', '...#'],\n    [1, 2],\n    [[0, 1], [6, 4], [5, 4], [4, 1], [4, 0], [6, 1], [0, 4], [7, 2], [5, 3], [-1, 1]],\n    3,\n    2],\n   [[6, 1], [5, 3]])],\n [('regression spawn quota #1', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('regression spawn quota #2',\n   [['.##...', '.~.#..', '.~...#', '##.~..', '~#...~', '..~.#.', '##...~', '~...#.'],\n    [6, 1],\n    [[0, 5], [6, 2], [8, 3], [5, 3], [3, 5]],\n    0,\n    0],\n   []),\n  ('regression spawn quota #3', [['...#..', '....#.', '.~##..'], [1, 1], [[0, 1], [2, 1]], 1, 0], []),\n  ('regression spawn quota #4', [['......#.', '..#..~..', '..~~...#'], [2, 2], [[0, 7]], 1, 0], []),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('control #1',\n   [['~......', '......~', '~#.~##.', '.#..~~.', '#..#~#.', '......#'],\n    [3, 2],\n    [[1, 0], [6, 3], [5, 2], [4, 0], [2, 3], [1, 4], [6, 7], [2, 7]],\n    0,\n    5],\n   [[1, 0], [5, 2], [1, 4]]),\n  ('control #2',\n   [['.#.', '...', '#..', '...', '#..', '#.~'], [5, 2], [[2, -1], [5, 2], [1, 3], [2, 0], [6, 0]], 3, 0],\n   [])],\n [('fault site spawn quota #1',\n   [['.~..~.#', '~~..~.~', '.......', '~~.~#~.', '.#.##~~', '#~.#...', '..###~.', '..~.~..'],\n    [2, 0],\n    [[3, 6], [6, 5], [4, 2], [5, 7]],\n    0,\n    1],\n   [[3, 6]]),\n  ('fault site spawn quota #2',\n   [['##.#~..', '..~#..#', '.~.....', '.#~~~.~', '....~..', '~...~.#', '.~.#.~#', '.......'],\n    [0, 0],\n    [[-1, 3], [5, 3], [6, 3], [4, 5], [5, -1], [1, 7], [5, 2]],\n    0,\n    1],\n   [[5, 3]]),\n  ('regression spawn quota #1', [['......#.', '..#..~..', '..~~...#'], [2, 2], [[0, 7]], 1, 0], []),\n  ('regression spawn quota #2',\n   [['.#.#.~~~', '.~...~..', '.......~'],\n    [1, 5],\n    [[0, 5], [3, 7], [1, 2], [0, 2], [0, 7], [1, -1], [1, 1], [2, 2]],\n    0,\n    0],\n   []),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('control #1',\n   [['.#.#~.', '~.....', '.~#...', '......', '..#.#.'], [0, 0], [[1, 1], [5, 0], [3, 3], [-1, 0]], 0, 5],\n   [[1, 1], [3, 3]]),\n  ('control #2', [['..~#...~', '..~#....', '.~.##..#'], [2, 3], [[3, 7], [2, 4]], 2, 5], [])]]\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":"ede434474f0b095c9a33379791f0140e84fd78c1d6e00ba4b7ab675cf58a7735","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(grid, player, candidates, min_dist, count):\n    chosen = []\n    pr, pc = player\n    for r, c in candidates:\n        if len(chosen) >= count:\n            break\n        if not (0 <= r < len(grid) and 0 <= c < len(grid[0])) or grid[r][c] != '.':\n            continue\n        if max(abs(r - pr), abs(c - pc)) < min_dist:\n            continue\n        if any(max(abs(r - a), abs(c - b)) < 2 for a, b in chosen):\n            continue\n        chosen.append([r, c])\n    return chosen\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression spawn quota #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   []),\n  ('regression spawn quota #2',\n   [['...#...', '......~', '~~.....', '..~....', '.~....~', '.....#.'], [5, 2], [[1, 5]], 0, 0],\n   []),\n  ('regression spawn quota #3',\n   [['...', '~..', '...', '..#', '...', '..~'],\n    [0, 0],\n    [[6, 1], [3, 2], [0, 3], [2, -1], [1, 1], [5, 1]],\n    3,\n    0],\n   []),\n  ('regression spawn quota #4',\n   [['~.##.', '..#.~', '.....', '.....', '.#...', '#..~.'], [4, 0], [[2, 1], [1, 0], [-1, 5], [1, 4]], 2, 0],\n   []),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['.#~', '...', '~.#', '#.~', '..#', '#~.'], [3, 1], [[5, 0], [1, 0], [6, -1], [6, -1]], 0, 5],\n   [[1, 0]])],\n [('regression spawn quota #1',\n   [['...', '~..', '...', '..#', '...', '..~'],\n    [0, 0],\n    [[6, 1], [3, 2], [0, 3], [2, -1], [1, 1], [5, 1]],\n    3,\n    0],\n   []),\n  ('regression spawn quota #2',\n   [['~.##.', '..#.~', '.....', '.....', '.#...', '#..~.'], [4, 0], [[2, 1], [1, 0], [-1, 5], [1, 4]], 2, 0],\n   []),\n  ('regression spawn quota #3',\n   [['~...', '~..~', '.~.#', '~.~.', '~.~#', '....'], [4, 2], [[3, 3]], 0, 0],\n   []),\n  ('regression spawn quota #4', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('control #1',\n   [['.#~', '...', '~.#', '#.~', '..#', '#~.'], [3, 1], [[5, 0], [1, 0], [6, -1], [6, -1]], 0, 5],\n   [[1, 0]]),\n  ('control #2',\n   [['....', '.#.~', '..~~', '...#'], [2, 0], [[4, -1], [3, 3], [3, 1], [1, 0], [1, 3]], 0, 2],\n   [[3, 1], [1, 0]])],\n [('fault site spawn quota #1',\n   [['~..~.#.', '.....#.', '.......', '#......', '##....~'],\n    [1, 4],\n    [[5, 0], [2, 0], [1, 6], [-1, 7], [0, 2], [1, 1], [3, 5], [2, 3], [5, 4]],\n    1,\n    3],\n   [[2, 0], [1, 6], [0, 2]]),\n  ('regression spawn quota #1',\n   [['~...', '~..~', '.~.#', '~.~.', '~.~#', '....'], [4, 2], [[3, 3]], 0, 0],\n   []),\n  ('regression spawn quota #2', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('regression spawn quota #3',\n   [['.##...', '.~.#..', '.~...#', '##.~..', '~#...~', '..~.#.', '##...~', '~...#.'],\n    [6, 1],\n    [[0, 5], [6, 2], [8, 3], [5, 3], [3, 5]],\n    0,\n    0],\n   []),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['....', '.#.~', '..~~', '...#'], [2, 0], [[4, -1], [3, 3], [3, 1], [1, 0], [1, 3]], 0, 2],\n   [[3, 1], [1, 0]]),\n  ('control #2',\n   [['...#', '.#..', '#.#~', '~~.~', '~~#.', '~##.', '....', '...#'],\n    [1, 2],\n    [[0, 1], [6, 4], [5, 4], [4, 1], [4, 0], [6, 1], [0, 4], [7, 2], [5, 3], [-1, 1]],\n    3,\n    2],\n   [[6, 1], [5, 3]])],\n [('regression spawn quota #1', [['.##.', '#..~', '~...'], [2, 0], [[0, 1], [2, 3], [-1, 1]], 1, 0], []),\n  ('regression spawn quota #2',\n   [['.##...', '.~.#..', '.~...#', '##.~..', '~#...~', '..~.#.', '##...~', '~...#.'],\n    [6, 1],\n    [[0, 5], [6, 2], [8, 3], [5, 3], [3, 5]],\n    0,\n    0],\n   []),\n  ('regression spawn quota #3', [['...#..', '....#.', '.~##..'], [1, 1], [[0, 1], [2, 1]], 1, 0], []),\n  ('regression spawn quota #4', [['......#.', '..#..~..', '..~~...#'], [2, 2], [[0, 7]], 1, 0], []),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('control #1',\n   [['~......', '......~', '~#.~##.', '.#..~~.', '#..#~#.', '......#'],\n    [3, 2],\n    [[1, 0], [6, 3], [5, 2], [4, 0], [2, 3], [1, 4], [6, 7], [2, 7]],\n    0,\n    5],\n   [[1, 0], [5, 2], [1, 4]]),\n  ('control #2',\n   [['.#.', '...', '#..', '...', '#..', '#.~'], [5, 2], [[2, -1], [5, 2], [1, 3], [2, 0], [6, 0]], 3, 0],\n   [])],\n [('fault site spawn quota #1',\n   [['.~..~.#', '~~..~.~', '.......', '~~.~#~.', '.#.##~~', '#~.#...', '..###~.', '..~.~..'],\n    [2, 0],\n    [[3, 6], [6, 5], [4, 2], [5, 7]],\n    0,\n    1],\n   [[3, 6]]),\n  ('fault site spawn quota #2',\n   [['##.#~..', '..~#..#', '.~.....', '.#~~~.~', '....~..', '~...~.#', '.~.#.~#', '.......'],\n    [0, 0],\n    [[-1, 3], [5, 3], [6, 3], [4, 5], [5, -1], [1, 7], [5, 2]],\n    0,\n    1],\n   [[5, 3]]),\n  ('regression spawn quota #1', [['......#.', '..#..~..', '..~~...#'], [2, 2], [[0, 7]], 1, 0], []),\n  ('regression spawn quota #2',\n   [['.#.#.~~~', '.~...~..', '.......~'],\n    [1, 5],\n    [[0, 5], [3, 7], [1, 2], [0, 2], [0, 7], [1, -1], [1, 1], [2, 2]],\n    0,\n    0],\n   []),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('control #1',\n   [['.#.#~.', '~.....', '.~#...', '......', '..#.#.'], [0, 0], [[1, 1], [5, 0], [3, 3], [-1, 0]], 0, 5],\n   [[1, 1], [3, 3]]),\n  ('control #2', [['..~#...~', '..~#....', '.~.##..#'], [2, 3], [[3, 7], [2, 4]], 2, 5], [])]]\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-spawn-points-spawn-quota","generated_at":"2026-09-29T14:50:49.577427+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 `if len(chosen) >= count:` at the spawn quota step.","root_cause":"The quota check is strict.","sha256":"50f09a2d2ce082e0b3e69c01e8785ecc18f5726f93914138e4e61f91518b89fa","title":"Enemy spawn point selection: One spawn too many · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.702,"exit_code":1,"observations":[{"actual":[[7,2]],"check":"regression spawn quota #1","expected":[],"passed":false},{"actual":[[1,5]],"check":"regression spawn quota #2","expected":[],"passed":false},{"actual":[[5,1]],"check":"regression spawn quota #3","expected":[],"passed":false},{"actual":[[2,1]],"check":"regression spawn quota #4","expected":[],"passed":false},{"actual":[[1,2]],"check":"diagonal neighbour spawn #1","expected":[[1,2]],"passed":true},{"actual":[[0,2]],"check":"exact safe radius #1","expected":[[0,2]],"passed":true},{"actual":[[2,0]],"check":"negative index candidate #1","expected":[[2,0]],"passed":true},{"actual":[[1,0]],"check":"control #1","expected":[[1,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression spawn quota #1\", \"actual\": [[7, 2]], \"expected\": [], \"passed\": false}, {\"check\": \"regression spawn quota #2\", \"actual\": [[1, 5]], \"expected\": [], \"passed\": false}, {\"check\": \"regression spawn quota #3\", \"actual\": [[5, 1]], \"expected\": [], \"passed\": false}, {\"check\": \"regression spawn quota #4\", \"actual\": [[2, 1]], \"expected\": [], \"passed\": false}, {\"check\": \"diagonal neighbour spawn #1\", \"actual\": [[1, 2]], \"expected\": [[1, 2]], \"passed\": true}, {\"check\": \"exact safe radius #1\", \"actual\": [[0, 2]], \"expected\": [[0, 2]], \"passed\": true}, {\"check\": \"negative index candidate #1\", \"actual\": [[2, 0]], \"expected\": [[2, 0]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[1, 0]], \"expected\": [[1, 0]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.572,"exit_code":1,"observations":[{"actual":[[7,2]],"check":"regression spawn quota #1","expected":[],"passed":false},{"actual":[[1,5]],"check":"regression spawn quota #2","expected":[],"passed":false},{"actual":[[5,1]],"check":"regression spawn quota #3","expected":[],"passed":false},{"actual":[[2,1]],"check":"regression spawn quota #4","expected":[],"passed":false},{"actual":[[1,2]],"check":"diagonal neighbour spawn #1","expected":[[1,2]],"passed":true},{"actual":[[0,2]],"check":"exact safe radius #1","expected":[[0,2]],"passed":true},{"actual":[[2,0]],"check":"negative index candidate #1","expected":[[2,0]],"passed":true},{"actual":[[1,0]],"check":"control #1","expected":[[1,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression spawn quota #1\", \"actual\": [[7, 2]], \"expected\": [], \"passed\": false}, {\"check\": \"regression spawn quota #2\", \"actual\": [[1, 5]], \"expected\": [], \"passed\": false}, {\"check\": \"regression spawn quota #3\", \"actual\": [[5, 1]], \"expected\": [], \"passed\": false}, {\"check\": \"regression spawn quota #4\", \"actual\": [[2, 1]], \"expected\": [], \"passed\": false}, {\"check\": \"diagonal neighbour spawn #1\", \"actual\": [[1, 2]], \"expected\": [[1, 2]], \"passed\": true}, {\"check\": \"exact safe radius #1\", \"actual\": [[0, 2]], \"expected\": [[0, 2]], \"passed\": true}, {\"check\": \"negative index candidate #1\", \"actual\": [[2, 0]], \"expected\": [[2, 0]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[1, 0]], \"expected\": [[1, 0]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.781,"exit_code":0,"observations":[{"actual":[],"check":"regression spawn quota #1","expected":[],"passed":true},{"actual":[],"check":"regression spawn quota #2","expected":[],"passed":true},{"actual":[],"check":"regression spawn quota #3","expected":[],"passed":true},{"actual":[],"check":"regression spawn quota #4","expected":[],"passed":true},{"actual":[[1,2]],"check":"diagonal neighbour spawn #1","expected":[[1,2]],"passed":true},{"actual":[[0,2]],"check":"exact safe radius #1","expected":[[0,2]],"passed":true},{"actual":[[2,0]],"check":"negative index candidate #1","expected":[[2,0]],"passed":true},{"actual":[[1,0]],"check":"control #1","expected":[[1,0]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression spawn quota #1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression spawn quota #2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression spawn quota #3\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression spawn quota #4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"diagonal neighbour spawn #1\", \"actual\": [[1, 2]], \"expected\": [[1, 2]], \"passed\": true}, {\"check\": \"exact safe radius #1\", \"actual\": [[0, 2]], \"expected\": [[0, 2]], \"passed\": true}, {\"check\": \"negative index candidate #1\", \"actual\": [[2, 0]], \"expected\": [[2, 0]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[1, 0]], \"expected\": [[1, 0]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}