{"abstract":"Off-map candidates spawn on the opposite edge.","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":"Swapping row and column limits breaks non-square maps.","family":"w2-procedural-level-generation-constraints-spawn-points-candidate-bounds","id":"FA-86451","implementations":{"attempt":{"sha256":"d9a263fb4651db455d5b232dd16ef9799c9c52107570cd71658b8b78fea46a7e","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[0]) and 0 <= c < len(grid)) 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 = [[('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['.~.', '#..', '.#.', '...', '..#', '.~.', '#..', '~..'],\n    [0, 2],\n    [[3, 3], [3, 1], [3, 0], [7, -1], [4, 3], [7, 1]],\n    3,\n    2],\n   [[3, 1], [7, 1]]),\n  ('fault site candidate bounds #1',\n   [['~...', '.~..', '.#..', '#.~.', '....', '...#', '..#.', '~~.#'],\n    [5, 2],\n    [[8, 4], [4, -1], [8, -1], [4, 3]],\n    2,\n    1],\n   []),\n  ('partial repair boundary #1',\n   [['~#...~..', '~...~~#.', '~~.#.##~', '~.#.#~#.'],\n    [0, 5],\n    [[2, 8], [1, 0], [2, 1], [3, 7], [2, 1], [-1, 5], [3, 2], [0, 0]],\n    1,\n    3],\n   [[3, 7]]),\n  ('partial repair boundary #2',\n   [['..~...', '#.~...', '.#....'],\n    [0, 5],\n    [[0, 3], [0, 0], [1, 1], [3, 3], [2, 1], [0, 1], [0, 5], [2, 4], [2, 3], [1, 4]],\n    1,\n    3],\n   [[0, 3], [0, 0], [2, 4]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('fault site candidate bounds #1',\n   [['~#.#.', '...~.', '.....', '.....', '~.~.#', '.#...'], [3, 0], [[-1, 2], [6, 2]], 0, 2],\n   []),\n  ('fault site candidate bounds #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 candidate bounds #1',\n   [['.~.', '#..', '.#.', '...', '..#', '.~.', '#..', '~..'],\n    [0, 2],\n    [[3, 3], [3, 1], [3, 0], [7, -1], [4, 3], [7, 1]],\n    3,\n    2],\n   [[3, 1], [7, 1]]),\n  ('partial repair boundary #1',\n   [['..~...', '#.~...', '.#....'],\n    [0, 5],\n    [[0, 3], [0, 0], [1, 1], [3, 3], [2, 1], [0, 1], [0, 5], [2, 4], [2, 3], [1, 4]],\n    1,\n    3],\n   [[0, 3], [0, 0], [2, 4]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('fault site candidate bounds #1',\n   [['~#~~', '.~~.', '~.~.', '....', '.#.~'],\n    [1, 0],\n    [[-1, 2], [-1, 1], [1, 2], [5, 2], [-1, 4], [-1, 2], [2, 0]],\n    2,\n    3],\n   []),\n  ('fault site candidate bounds #2',\n   [['#.~~..', '#.~..~', '......', '#~~.~.', '..~...', '......'],\n    [3, 3],\n    [[5, 6], [-1, 2], [6, 6], [0, 4], [-1, -1], [1, 0], [6, 0], [2, 0]],\n    1,\n    5],\n   [[0, 4], [2, 0]]),\n  ('partial repair boundary #1',\n   [['~...', '....', '~~..', '.#..', '...~', '~.~.', '..~.'],\n    [2, 2],\n    [[3, 3], [3, 2], [2, 0], [6, 3], [7, 2], [7, 1], [7, 2], [0, 3]],\n    3,\n    3],\n   [[6, 3]]),\n  ('regression candidate bounds #1',\n   [['.~....##', '......#.', '~...#..#', '~......~'],\n    [2, 3],\n    [[-1, 3], [0, 1], [1, -1], [1, 2], [2, 5], [1, 3]],\n    2,\n    1],\n   [[2, 5]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['.~....##', '......#.', '~...#..#', '~......~'],\n    [2, 3],\n    [[-1, 3], [0, 1], [1, -1], [1, 2], [2, 5], [1, 3]],\n    2,\n    1],\n   [[2, 5]]),\n  ('fault site candidate bounds #1',\n   [['.#~.', '..#.', '~~..', '..#.', '#...', '.~..', '~...'], [6, 0], [[-1, 3], [5, 4]], 0, 1],\n   []),\n  ('partial repair boundary #1',\n   [['~#.###', '.....~', '#..#..', '......'], [2, 1], [[1, 4], [3, 1], [0, 2], [-1, 1]], 1, 1],\n   [[1, 4]]),\n  ('regression candidate bounds #2',\n   [['...', '.~.', '.~.', '.#.', '...', '..~', '...'],\n    [0, 1],\n    [[3, 2], [7, 1], [4, -1], [1, 1], [1, 0]],\n    3,\n    5],\n   [[3, 2]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 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 [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['...', '.~.', '.~.', '.#.', '...', '..~', '...'],\n    [0, 1],\n    [[3, 2], [7, 1], [4, -1], [1, 1], [1, 0]],\n    3,\n    5],\n   [[3, 2]]),\n  ('fault site candidate bounds #1',\n   [['.....', '..#.~', '...#.', '~....'],\n    [3, 3],\n    [[-1, 4], [1, -1], [1, -1], [0, 1], [1, 1], [4, -1], [0, 4], [4, 4], [3, 2], [1, 5]],\n    2,\n    1],\n   [[0, 1]]),\n  ('partial repair boundary #1',\n   [['...~~...', '#.~....#', '....#...'], [0, 6], [[1, 1], [2, 8], [1, 6], [1, 4]], 2, 5],\n   [[1, 1], [1, 4]]),\n  ('partial repair boundary #2',\n   [['.....', '.#~~~', '.~##.', '.....', '~..~#', '....#', '##.##', '...~~'],\n    [4, 0],\n    [[5, 1], [3, 3], [7, 0], [6, 4], [8, 3], [1, 3], [6, 4]],\n    1,\n    3],\n   [[5, 1], [3, 3], [7, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['...#...', '......~', '~~.....', '..~....', '.~....~', '.....#.'], [5, 2], [[1, 5]], 0, 0],\n   [])]]\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":"e69dc52f3f54cd9d7d21a3e2eef1e7e1e943bacd5ae3f8b27abda5835bf4cf79","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 (r < len(grid) and 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 = [[('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['.~.', '#..', '.#.', '...', '..#', '.~.', '#..', '~..'],\n    [0, 2],\n    [[3, 3], [3, 1], [3, 0], [7, -1], [4, 3], [7, 1]],\n    3,\n    2],\n   [[3, 1], [7, 1]]),\n  ('fault site candidate bounds #1',\n   [['~...', '.~..', '.#..', '#.~.', '....', '...#', '..#.', '~~.#'],\n    [5, 2],\n    [[8, 4], [4, -1], [8, -1], [4, 3]],\n    2,\n    1],\n   []),\n  ('partial repair boundary #1',\n   [['~#...~..', '~...~~#.', '~~.#.##~', '~.#.#~#.'],\n    [0, 5],\n    [[2, 8], [1, 0], [2, 1], [3, 7], [2, 1], [-1, 5], [3, 2], [0, 0]],\n    1,\n    3],\n   [[3, 7]]),\n  ('partial repair boundary #2',\n   [['..~...', '#.~...', '.#....'],\n    [0, 5],\n    [[0, 3], [0, 0], [1, 1], [3, 3], [2, 1], [0, 1], [0, 5], [2, 4], [2, 3], [1, 4]],\n    1,\n    3],\n   [[0, 3], [0, 0], [2, 4]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('fault site candidate bounds #1',\n   [['~#.#.', '...~.', '.....', '.....', '~.~.#', '.#...'], [3, 0], [[-1, 2], [6, 2]], 0, 2],\n   []),\n  ('fault site candidate bounds #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 candidate bounds #1',\n   [['.~.', '#..', '.#.', '...', '..#', '.~.', '#..', '~..'],\n    [0, 2],\n    [[3, 3], [3, 1], [3, 0], [7, -1], [4, 3], [7, 1]],\n    3,\n    2],\n   [[3, 1], [7, 1]]),\n  ('partial repair boundary #1',\n   [['..~...', '#.~...', '.#....'],\n    [0, 5],\n    [[0, 3], [0, 0], [1, 1], [3, 3], [2, 1], [0, 1], [0, 5], [2, 4], [2, 3], [1, 4]],\n    1,\n    3],\n   [[0, 3], [0, 0], [2, 4]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('fault site candidate bounds #1',\n   [['~#~~', '.~~.', '~.~.', '....', '.#.~'],\n    [1, 0],\n    [[-1, 2], [-1, 1], [1, 2], [5, 2], [-1, 4], [-1, 2], [2, 0]],\n    2,\n    3],\n   []),\n  ('fault site candidate bounds #2',\n   [['#.~~..', '#.~..~', '......', '#~~.~.', '..~...', '......'],\n    [3, 3],\n    [[5, 6], [-1, 2], [6, 6], [0, 4], [-1, -1], [1, 0], [6, 0], [2, 0]],\n    1,\n    5],\n   [[0, 4], [2, 0]]),\n  ('partial repair boundary #1',\n   [['~...', '....', '~~..', '.#..', '...~', '~.~.', '..~.'],\n    [2, 2],\n    [[3, 3], [3, 2], [2, 0], [6, 3], [7, 2], [7, 1], [7, 2], [0, 3]],\n    3,\n    3],\n   [[6, 3]]),\n  ('regression candidate bounds #1',\n   [['.~....##', '......#.', '~...#..#', '~......~'],\n    [2, 3],\n    [[-1, 3], [0, 1], [1, -1], [1, 2], [2, 5], [1, 3]],\n    2,\n    1],\n   [[2, 5]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['.~....##', '......#.', '~...#..#', '~......~'],\n    [2, 3],\n    [[-1, 3], [0, 1], [1, -1], [1, 2], [2, 5], [1, 3]],\n    2,\n    1],\n   [[2, 5]]),\n  ('fault site candidate bounds #1',\n   [['.#~.', '..#.', '~~..', '..#.', '#...', '.~..', '~...'], [6, 0], [[-1, 3], [5, 4]], 0, 1],\n   []),\n  ('partial repair boundary #1',\n   [['~#.###', '.....~', '#..#..', '......'], [2, 1], [[1, 4], [3, 1], [0, 2], [-1, 1]], 1, 1],\n   [[1, 4]]),\n  ('regression candidate bounds #2',\n   [['...', '.~.', '.~.', '.#.', '...', '..~', '...'],\n    [0, 1],\n    [[3, 2], [7, 1], [4, -1], [1, 1], [1, 0]],\n    3,\n    5],\n   [[3, 2]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 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 [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['...', '.~.', '.~.', '.#.', '...', '..~', '...'],\n    [0, 1],\n    [[3, 2], [7, 1], [4, -1], [1, 1], [1, 0]],\n    3,\n    5],\n   [[3, 2]]),\n  ('fault site candidate bounds #1',\n   [['.....', '..#.~', '...#.', '~....'],\n    [3, 3],\n    [[-1, 4], [1, -1], [1, -1], [0, 1], [1, 1], [4, -1], [0, 4], [4, 4], [3, 2], [1, 5]],\n    2,\n    1],\n   [[0, 1]]),\n  ('partial repair boundary #1',\n   [['...~~...', '#.~....#', '....#...'], [0, 6], [[1, 1], [2, 8], [1, 6], [1, 4]], 2, 5],\n   [[1, 1], [1, 4]]),\n  ('partial repair boundary #2',\n   [['.....', '.#~~~', '.~##.', '.....', '~..~#', '....#', '##.##', '...~~'],\n    [4, 0],\n    [[5, 1], [3, 3], [7, 0], [6, 4], [8, 3], [1, 3], [6, 4]],\n    1,\n    3],\n   [[5, 1], [3, 3], [7, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['...#...', '......~', '~~.....', '..~....', '.~....~', '.....#.'], [5, 2], [[1, 5]], 0, 0],\n   [])]]\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":"734dad91b1cdd5b01890c3aa4b279fecf33a579f4f4bd7ed5878e98823380e96","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 = [[('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['.~.', '#..', '.#.', '...', '..#', '.~.', '#..', '~..'],\n    [0, 2],\n    [[3, 3], [3, 1], [3, 0], [7, -1], [4, 3], [7, 1]],\n    3,\n    2],\n   [[3, 1], [7, 1]]),\n  ('fault site candidate bounds #1',\n   [['~...', '.~..', '.#..', '#.~.', '....', '...#', '..#.', '~~.#'],\n    [5, 2],\n    [[8, 4], [4, -1], [8, -1], [4, 3]],\n    2,\n    1],\n   []),\n  ('partial repair boundary #1',\n   [['~#...~..', '~...~~#.', '~~.#.##~', '~.#.#~#.'],\n    [0, 5],\n    [[2, 8], [1, 0], [2, 1], [3, 7], [2, 1], [-1, 5], [3, 2], [0, 0]],\n    1,\n    3],\n   [[3, 7]]),\n  ('partial repair boundary #2',\n   [['..~...', '#.~...', '.#....'],\n    [0, 5],\n    [[0, 3], [0, 0], [1, 1], [3, 3], [2, 1], [0, 1], [0, 5], [2, 4], [2, 3], [1, 4]],\n    1,\n    3],\n   [[0, 3], [0, 0], [2, 4]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('fault site candidate bounds #1',\n   [['~#.#.', '...~.', '.....', '.....', '~.~.#', '.#...'], [3, 0], [[-1, 2], [6, 2]], 0, 2],\n   []),\n  ('fault site candidate bounds #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 candidate bounds #1',\n   [['.~.', '#..', '.#.', '...', '..#', '.~.', '#..', '~..'],\n    [0, 2],\n    [[3, 3], [3, 1], [3, 0], [7, -1], [4, 3], [7, 1]],\n    3,\n    2],\n   [[3, 1], [7, 1]]),\n  ('partial repair boundary #1',\n   [['..~...', '#.~...', '.#....'],\n    [0, 5],\n    [[0, 3], [0, 0], [1, 1], [3, 3], [2, 1], [0, 1], [0, 5], [2, 4], [2, 3], [1, 4]],\n    1,\n    3],\n   [[0, 3], [0, 0], [2, 4]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('fault site candidate bounds #1',\n   [['~#~~', '.~~.', '~.~.', '....', '.#.~'],\n    [1, 0],\n    [[-1, 2], [-1, 1], [1, 2], [5, 2], [-1, 4], [-1, 2], [2, 0]],\n    2,\n    3],\n   []),\n  ('fault site candidate bounds #2',\n   [['#.~~..', '#.~..~', '......', '#~~.~.', '..~...', '......'],\n    [3, 3],\n    [[5, 6], [-1, 2], [6, 6], [0, 4], [-1, -1], [1, 0], [6, 0], [2, 0]],\n    1,\n    5],\n   [[0, 4], [2, 0]]),\n  ('partial repair boundary #1',\n   [['~...', '....', '~~..', '.#..', '...~', '~.~.', '..~.'],\n    [2, 2],\n    [[3, 3], [3, 2], [2, 0], [6, 3], [7, 2], [7, 1], [7, 2], [0, 3]],\n    3,\n    3],\n   [[6, 3]]),\n  ('regression candidate bounds #1',\n   [['.~....##', '......#.', '~...#..#', '~......~'],\n    [2, 3],\n    [[-1, 3], [0, 1], [1, -1], [1, 2], [2, 5], [1, 3]],\n    2,\n    1],\n   [[2, 5]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['#.#', '...', '#.#', '.#.', '...', '...', '...', '##.'], [6, 2], [[2, -1], [7, 2]], 0, 0],\n   [])],\n [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['.~....##', '......#.', '~...#..#', '~......~'],\n    [2, 3],\n    [[-1, 3], [0, 1], [1, -1], [1, 2], [2, 5], [1, 3]],\n    2,\n    1],\n   [[2, 5]]),\n  ('fault site candidate bounds #1',\n   [['.#~.', '..#.', '~~..', '..#.', '#...', '.~..', '~...'], [6, 0], [[-1, 3], [5, 4]], 0, 1],\n   []),\n  ('partial repair boundary #1',\n   [['~#.###', '.....~', '#..#..', '......'], [2, 1], [[1, 4], [3, 1], [0, 2], [-1, 1]], 1, 1],\n   [[1, 4]]),\n  ('regression candidate bounds #2',\n   [['...', '.~.', '.~.', '.#.', '...', '..~', '...'],\n    [0, 1],\n    [[3, 2], [7, 1], [4, -1], [1, 1], [1, 0]],\n    3,\n    5],\n   [[3, 2]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 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 [('exact safe radius #1', [['.....', '.....'], [0, 0], [[1, 1], [0, 2]], 2, 2], [[0, 2]]),\n  ('regression candidate bounds #1',\n   [['...', '.~.', '.~.', '.#.', '...', '..~', '...'],\n    [0, 1],\n    [[3, 2], [7, 1], [4, -1], [1, 1], [1, 0]],\n    3,\n    5],\n   [[3, 2]]),\n  ('fault site candidate bounds #1',\n   [['.....', '..#.~', '...#.', '~....'],\n    [3, 3],\n    [[-1, 4], [1, -1], [1, -1], [0, 1], [1, 1], [4, -1], [0, 4], [4, 4], [3, 2], [1, 5]],\n    2,\n    1],\n   [[0, 1]]),\n  ('partial repair boundary #1',\n   [['...~~...', '#.~....#', '....#...'], [0, 6], [[1, 1], [2, 8], [1, 6], [1, 4]], 2, 5],\n   [[1, 1], [1, 4]]),\n  ('partial repair boundary #2',\n   [['.....', '.#~~~', '.~##.', '.....', '~..~#', '....#', '##.##', '...~~'],\n    [4, 0],\n    [[5, 1], [3, 3], [7, 0], [6, 4], [8, 3], [1, 3], [6, 4]],\n    1,\n    3],\n   [[5, 1], [3, 3], [7, 0]]),\n  ('diagonal neighbour spawn #1', [['....', '....', '....'], [0, 0], [[1, 2], [2, 3]], 1, 3], [[1, 2]]),\n  ('negative index candidate #1', [['...', '...', '..#'], [0, 0], [[-1, -1], [2, 0]], 1, 2], [[2, 0]]),\n  ('control #1',\n   [['...#...', '......~', '~~.....', '..~....', '.~....~', '.....#.'], [5, 2], [[1, 5]], 0, 0],\n   [])]]\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-candidate-bounds","generated_at":"2026-09-29T14:50:49.587993+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 `not (0 <= r < len(grid) and 0 <= c < len(grid[0]))` at the candidate bounds step.","root_cause":"The bounds test lacks the lower bound, so negative indices wrap.","sha256":"04ba259f294cb907333d6363d3e242497d0d1d39c6a1b6c559220d9af1e79383","title":"Enemy spawn point selection: Negative candidates wrap around · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.073,"exit_code":1,"observations":[{"actual":[],"check":"exact safe radius #1","expected":[[0,2]],"passed":false},{"actual":[],"check":"regression candidate bounds #1","expected":[[3,1],[7,1]],"passed":false},{"actual":[],"check":"fault site candidate bounds #1","expected":[],"passed":true},{"actual":[],"check":"partial repair boundary #1","expected":[[3,7]],"passed":false},{"actual":[[0,0]],"check":"partial repair boundary #2","expected":[[0,3],[0,0],[2,4]],"passed":false},{"actual":[[1,2]],"check":"diagonal neighbour spawn #1","expected":[[1,2]],"passed":true},{"actual":[[2,0]],"check":"negative index candidate #1","expected":[[2,0]],"passed":true},{"actual":[],"check":"control #1","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact safe radius #1\", \"actual\": [], \"expected\": [[0, 2]], \"passed\": false}, {\"check\": \"regression candidate bounds #1\", \"actual\": [], \"expected\": [[3, 1], [7, 1]], \"passed\": false}, {\"check\": \"fault site candidate bounds #1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": [], \"expected\": [[3, 7]], \"passed\": false}, {\"check\": \"partial repair boundary #2\", \"actual\": [[0, 0]], \"expected\": [[0, 3], [0, 0], [2, 4]], \"passed\": false}, {\"check\": \"diagonal neighbour spawn #1\", \"actual\": [[1, 2]], \"expected\": [[1, 2]], \"passed\": true}, {\"check\": \"negative index candidate #1\", \"actual\": [[2, 0]], \"expected\": [[2, 0]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.091,"exit_code":1,"observations":[{"actual":[[0,2]],"check":"exact safe radius #1","expected":[[0,2]],"passed":true},{"actual":[[3,1],[7,-1]],"check":"regression candidate bounds #1","expected":[[3,1],[7,1]],"passed":false},{"actual":[[4,-1]],"check":"fault site candidate bounds #1","expected":[],"passed":false},{"actual":[[3,7]],"check":"partial repair boundary #1","expected":[[3,7]],"passed":true},{"actual":[[0,3],[0,0],[2,4]],"check":"partial repair boundary #2","expected":[[0,3],[0,0],[2,4]],"passed":true},{"actual":[[1,2]],"check":"diagonal neighbour spawn #1","expected":[[1,2]],"passed":true},{"actual":[[2,0]],"check":"negative index candidate #1","expected":[[2,0]],"passed":true},{"actual":[],"check":"control #1","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact safe radius #1\", \"actual\": [[0, 2]], \"expected\": [[0, 2]], \"passed\": true}, {\"check\": \"regression candidate bounds #1\", \"actual\": [[3, 1], [7, -1]], \"expected\": [[3, 1], [7, 1]], \"passed\": false}, {\"check\": \"fault site candidate bounds #1\", \"actual\": [[4, -1]], \"expected\": [], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [[3, 7]], \"expected\": [[3, 7]], \"passed\": true}, {\"check\": \"partial repair boundary #2\", \"actual\": [[0, 3], [0, 0], [2, 4]], \"expected\": [[0, 3], [0, 0], [2, 4]], \"passed\": true}, {\"check\": \"diagonal neighbour spawn #1\", \"actual\": [[1, 2]], \"expected\": [[1, 2]], \"passed\": true}, {\"check\": \"negative index candidate #1\", \"actual\": [[2, 0]], \"expected\": [[2, 0]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.37,"exit_code":0,"observations":[{"actual":[[0,2]],"check":"exact safe radius #1","expected":[[0,2]],"passed":true},{"actual":[[3,1],[7,1]],"check":"regression candidate bounds #1","expected":[[3,1],[7,1]],"passed":true},{"actual":[],"check":"fault site candidate bounds #1","expected":[],"passed":true},{"actual":[[3,7]],"check":"partial repair boundary #1","expected":[[3,7]],"passed":true},{"actual":[[0,3],[0,0],[2,4]],"check":"partial repair boundary #2","expected":[[0,3],[0,0],[2,4]],"passed":true},{"actual":[[1,2]],"check":"diagonal neighbour spawn #1","expected":[[1,2]],"passed":true},{"actual":[[2,0]],"check":"negative index candidate #1","expected":[[2,0]],"passed":true},{"actual":[],"check":"control #1","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact safe radius #1\", \"actual\": [[0, 2]], \"expected\": [[0, 2]], \"passed\": true}, {\"check\": \"regression candidate bounds #1\", \"actual\": [[3, 1], [7, 1]], \"expected\": [[3, 1], [7, 1]], \"passed\": true}, {\"check\": \"fault site candidate bounds #1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": [[3, 7]], \"expected\": [[3, 7]], \"passed\": true}, {\"check\": \"partial repair boundary #2\", \"actual\": [[0, 3], [0, 0], [2, 4]], \"expected\": [[0, 3], [0, 0], [2, 4]], \"passed\": true}, {\"check\": \"diagonal neighbour spawn #1\", \"actual\": [[1, 2]], \"expected\": [[1, 2]], \"passed\": true}, {\"check\": \"negative index candidate #1\", \"actual\": [[2, 0]], \"expected\": [[2, 0]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}