{"abstract":"Dungeons have twice as many rooms as configured.","category":"Procedural level generation constraints","checks":8,"contract":"Recursively split the rectangle while depth remains. An axis can be split when that side is >= 2*min_size; if neither can, it is a leaf. Split vertically when w > h, or when w == h at even remaining depth; if the chosen axis cannot be split use the other. The first child gets floor(side/2). Returns leaves [x, y, w, h] in left/top-first order.","evaluation_group":"w2-procedural-level-generation-constraints-bsp-split","failed_approach":"Stopping at depth one removes the last configured level.","family":"w2-procedural-level-generation-constraints-bsp-split-depth-exhaustion","id":"FA-86546","implementations":{"attempt":{"sha256":"065f510880f46e2dce3a3696c5b1c317a7c8617431388ca1ba929809425be99a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y, w, h, min_size, depth):\n    out = []\n    def split(x, y, w, h, d):\n        can_v = w >= 2 * min_size\n        can_h = h >= 2 * min_size\n        if d <= 1 or not (can_v or can_h):\n            out.append([x, y, w, h])\n            return\n        vertical = w > h or (w == h and d % 2 == 0)\n        if vertical and not can_v:\n            vertical = False\n        elif not vertical and not can_h:\n            vertical = True\n        if vertical:\n            half = w // 2\n            split(x, y, half, h, d - 1)\n            split(x + half, y, w - half, h, d - 1)\n        else:\n            half = h // 2\n            split(x, y, w, half, d - 1)\n            split(x, y + half, w, h - half, d - 1)\n    split(x, y, w, h, depth)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('exactly splittable #1', [0, 0, 8, 3, 4, 1], [[0, 0, 4, 3], [4, 0, 4, 3]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('regression depth exhaustion #1', [2, 3, 16, 10, 5, 1], [[2, 3, 8, 10], [10, 3, 8, 10]]),\n  ('regression depth exhaustion #2', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('control #1', [5, 1, 1, 10, 4, 2], [[5, 1, 1, 5], [5, 6, 1, 5]]),\n  ('control #2', [1, 4, 9, 1, 3, 4], [[1, 4, 4, 1], [5, 4, 5, 1]])],\n [('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('regression depth exhaustion #1', [2, 3, 16, 10, 5, 1], [[2, 3, 8, 10], [10, 3, 8, 10]]),\n  ('regression depth exhaustion #2', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('partial repair boundary #2',\n   [2, 1, 16, 5, 4, 2],\n   [[2, 1, 4, 5], [6, 1, 4, 5], [10, 1, 4, 5], [14, 1, 4, 5]]),\n  ('control #1', [5, 5, 1, 15, 5, 4], [[5, 5, 1, 7], [5, 12, 1, 8]]),\n  ('control #2', [2, 3, 26, 3, 4, 3], [[2, 3, 6, 3], [8, 3, 7, 3], [15, 3, 6, 3], [21, 3, 7, 3]])],\n [('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('fault site depth exhaustion #1', [5, 1, 24, 20, 4, 0], [[5, 1, 24, 20]]),\n  ('fault site depth exhaustion #2', [5, 0, 15, 27, 5, 0], [[5, 0, 15, 27]]),\n  ('regression depth exhaustion #1', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('control #1', [3, 4, 21, 6, 6, 2], [[3, 4, 10, 6], [13, 4, 11, 6]]),\n  ('control #2', [4, 0, 10, 3, 2, 4], [[4, 0, 2, 3], [6, 0, 3, 3], [9, 0, 2, 3], [11, 0, 3, 3]])],\n [('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('exactly splittable #1', [0, 0, 8, 3, 4, 1], [[0, 0, 4, 3], [4, 0, 4, 3]]),\n  ('regression depth exhaustion #1', [0, 3, 21, 1, 3, 1], [[0, 3, 10, 1], [10, 3, 11, 1]]),\n  ('regression depth exhaustion #2', [4, 2, 16, 17, 2, 1], [[4, 2, 16, 8], [4, 10, 16, 9]]),\n  ('partial repair boundary #1',\n   [2, 1, 16, 5, 4, 2],\n   [[2, 1, 4, 5], [6, 1, 4, 5], [10, 1, 4, 5], [14, 1, 4, 5]]),\n  ('partial repair boundary #2',\n   [3, 2, 2, 18, 2, 3],\n   [[3, 2, 2, 2],\n    [3, 4, 2, 2],\n    [3, 6, 2, 2],\n    [3, 8, 2, 3],\n    [3, 11, 2, 2],\n    [3, 13, 2, 2],\n    [3, 15, 2, 2],\n    [3, 17, 2, 3]]),\n  ('control #1', [2, 3, 15, 3, 3, 3], [[2, 3, 3, 3], [5, 3, 4, 3], [9, 3, 4, 3], [13, 3, 4, 3]]),\n  ('control #2', [3, 5, 26, 4, 5, 4], [[3, 5, 6, 4], [9, 5, 7, 4], [16, 5, 6, 4], [22, 5, 7, 4]])],\n [('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('fault site depth exhaustion #1', [2, 0, 23, 3, 6, 0], [[2, 0, 23, 3]]),\n  ('fault site depth exhaustion #2', [1, 0, 13, 21, 2, 0], [[1, 0, 13, 21]]),\n  ('partial repair boundary #1',\n   [3, 2, 2, 18, 2, 3],\n   [[3, 2, 2, 2],\n    [3, 4, 2, 2],\n    [3, 6, 2, 2],\n    [3, 8, 2, 3],\n    [3, 11, 2, 2],\n    [3, 13, 2, 2],\n    [3, 15, 2, 2],\n    [3, 17, 2, 3]]),\n  ('regression depth exhaustion #1', [4, 2, 16, 17, 2, 1], [[4, 2, 16, 8], [4, 10, 16, 9]]),\n  ('control #1', [5, 5, 9, 8, 3, 4], [[5, 5, 4, 4], [5, 9, 4, 4], [9, 5, 5, 4], [9, 9, 5, 4]]),\n  ('control #2', [2, 0, 2, 1, 3, 3], [[2, 0, 2, 1]])]]\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":"fc1b860b2eeb3edd964cd89679684538416b60785f460eb4f1e5f42d4d0c2c32","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y, w, h, min_size, depth):\n    out = []\n    def split(x, y, w, h, d):\n        can_v = w >= 2 * min_size\n        can_h = h >= 2 * min_size\n        if d < 0 or not (can_v or can_h):\n            out.append([x, y, w, h])\n            return\n        vertical = w > h or (w == h and d % 2 == 0)\n        if vertical and not can_v:\n            vertical = False\n        elif not vertical and not can_h:\n            vertical = True\n        if vertical:\n            half = w // 2\n            split(x, y, half, h, d - 1)\n            split(x + half, y, w - half, h, d - 1)\n        else:\n            half = h // 2\n            split(x, y, w, half, d - 1)\n            split(x, y + half, w, h - half, d - 1)\n    split(x, y, w, h, depth)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('exactly splittable #1', [0, 0, 8, 3, 4, 1], [[0, 0, 4, 3], [4, 0, 4, 3]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('regression depth exhaustion #1', [2, 3, 16, 10, 5, 1], [[2, 3, 8, 10], [10, 3, 8, 10]]),\n  ('regression depth exhaustion #2', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('control #1', [5, 1, 1, 10, 4, 2], [[5, 1, 1, 5], [5, 6, 1, 5]]),\n  ('control #2', [1, 4, 9, 1, 3, 4], [[1, 4, 4, 1], [5, 4, 5, 1]])],\n [('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('regression depth exhaustion #1', [2, 3, 16, 10, 5, 1], [[2, 3, 8, 10], [10, 3, 8, 10]]),\n  ('regression depth exhaustion #2', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('partial repair boundary #2',\n   [2, 1, 16, 5, 4, 2],\n   [[2, 1, 4, 5], [6, 1, 4, 5], [10, 1, 4, 5], [14, 1, 4, 5]]),\n  ('control #1', [5, 5, 1, 15, 5, 4], [[5, 5, 1, 7], [5, 12, 1, 8]]),\n  ('control #2', [2, 3, 26, 3, 4, 3], [[2, 3, 6, 3], [8, 3, 7, 3], [15, 3, 6, 3], [21, 3, 7, 3]])],\n [('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('fault site depth exhaustion #1', [5, 1, 24, 20, 4, 0], [[5, 1, 24, 20]]),\n  ('fault site depth exhaustion #2', [5, 0, 15, 27, 5, 0], [[5, 0, 15, 27]]),\n  ('regression depth exhaustion #1', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('control #1', [3, 4, 21, 6, 6, 2], [[3, 4, 10, 6], [13, 4, 11, 6]]),\n  ('control #2', [4, 0, 10, 3, 2, 4], [[4, 0, 2, 3], [6, 0, 3, 3], [9, 0, 2, 3], [11, 0, 3, 3]])],\n [('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('exactly splittable #1', [0, 0, 8, 3, 4, 1], [[0, 0, 4, 3], [4, 0, 4, 3]]),\n  ('regression depth exhaustion #1', [0, 3, 21, 1, 3, 1], [[0, 3, 10, 1], [10, 3, 11, 1]]),\n  ('regression depth exhaustion #2', [4, 2, 16, 17, 2, 1], [[4, 2, 16, 8], [4, 10, 16, 9]]),\n  ('partial repair boundary #1',\n   [2, 1, 16, 5, 4, 2],\n   [[2, 1, 4, 5], [6, 1, 4, 5], [10, 1, 4, 5], [14, 1, 4, 5]]),\n  ('partial repair boundary #2',\n   [3, 2, 2, 18, 2, 3],\n   [[3, 2, 2, 2],\n    [3, 4, 2, 2],\n    [3, 6, 2, 2],\n    [3, 8, 2, 3],\n    [3, 11, 2, 2],\n    [3, 13, 2, 2],\n    [3, 15, 2, 2],\n    [3, 17, 2, 3]]),\n  ('control #1', [2, 3, 15, 3, 3, 3], [[2, 3, 3, 3], [5, 3, 4, 3], [9, 3, 4, 3], [13, 3, 4, 3]]),\n  ('control #2', [3, 5, 26, 4, 5, 4], [[3, 5, 6, 4], [9, 5, 7, 4], [16, 5, 6, 4], [22, 5, 7, 4]])],\n [('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('fault site depth exhaustion #1', [2, 0, 23, 3, 6, 0], [[2, 0, 23, 3]]),\n  ('fault site depth exhaustion #2', [1, 0, 13, 21, 2, 0], [[1, 0, 13, 21]]),\n  ('partial repair boundary #1',\n   [3, 2, 2, 18, 2, 3],\n   [[3, 2, 2, 2],\n    [3, 4, 2, 2],\n    [3, 6, 2, 2],\n    [3, 8, 2, 3],\n    [3, 11, 2, 2],\n    [3, 13, 2, 2],\n    [3, 15, 2, 2],\n    [3, 17, 2, 3]]),\n  ('regression depth exhaustion #1', [4, 2, 16, 17, 2, 1], [[4, 2, 16, 8], [4, 10, 16, 9]]),\n  ('control #1', [5, 5, 9, 8, 3, 4], [[5, 5, 4, 4], [5, 9, 4, 4], [9, 5, 5, 4], [9, 9, 5, 4]]),\n  ('control #2', [2, 0, 2, 1, 3, 3], [[2, 0, 2, 1]])]]\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":"ad35a00e6ddba972230534228907b29589ca9ed295fd30134da3a51de4e02734","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y, w, h, min_size, depth):\n    out = []\n    def split(x, y, w, h, d):\n        can_v = w >= 2 * min_size\n        can_h = h >= 2 * min_size\n        if d == 0 or not (can_v or can_h):\n            out.append([x, y, w, h])\n            return\n        vertical = w > h or (w == h and d % 2 == 0)\n        if vertical and not can_v:\n            vertical = False\n        elif not vertical and not can_h:\n            vertical = True\n        if vertical:\n            half = w // 2\n            split(x, y, half, h, d - 1)\n            split(x + half, y, w - half, h, d - 1)\n        else:\n            half = h // 2\n            split(x, y, w, half, d - 1)\n            split(x, y + half, w, h - half, d - 1)\n    split(x, y, w, h, depth)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('exactly splittable #1', [0, 0, 8, 3, 4, 1], [[0, 0, 4, 3], [4, 0, 4, 3]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('regression depth exhaustion #1', [2, 3, 16, 10, 5, 1], [[2, 3, 8, 10], [10, 3, 8, 10]]),\n  ('regression depth exhaustion #2', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('control #1', [5, 1, 1, 10, 4, 2], [[5, 1, 1, 5], [5, 6, 1, 5]]),\n  ('control #2', [1, 4, 9, 1, 3, 4], [[1, 4, 4, 1], [5, 4, 5, 1]])],\n [('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('regression depth exhaustion #1', [2, 3, 16, 10, 5, 1], [[2, 3, 8, 10], [10, 3, 8, 10]]),\n  ('regression depth exhaustion #2', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('partial repair boundary #2',\n   [2, 1, 16, 5, 4, 2],\n   [[2, 1, 4, 5], [6, 1, 4, 5], [10, 1, 4, 5], [14, 1, 4, 5]]),\n  ('control #1', [5, 5, 1, 15, 5, 4], [[5, 5, 1, 7], [5, 12, 1, 8]]),\n  ('control #2', [2, 3, 26, 3, 4, 3], [[2, 3, 6, 3], [8, 3, 7, 3], [15, 3, 6, 3], [21, 3, 7, 3]])],\n [('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('fault site depth exhaustion #1', [5, 1, 24, 20, 4, 0], [[5, 1, 24, 20]]),\n  ('fault site depth exhaustion #2', [5, 0, 15, 27, 5, 0], [[5, 0, 15, 27]]),\n  ('regression depth exhaustion #1', [3, 0, 14, 28, 4, 1], [[3, 0, 14, 14], [3, 14, 14, 14]]),\n  ('partial repair boundary #1',\n   [5, 5, 10, 8, 4, 2],\n   [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]]),\n  ('control #1', [3, 4, 21, 6, 6, 2], [[3, 4, 10, 6], [13, 4, 11, 6]]),\n  ('control #2', [4, 0, 10, 3, 2, 4], [[4, 0, 2, 3], [6, 0, 3, 3], [9, 0, 2, 3], [11, 0, 3, 3]])],\n [('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('exactly splittable #1', [0, 0, 8, 3, 4, 1], [[0, 0, 4, 3], [4, 0, 4, 3]]),\n  ('regression depth exhaustion #1', [0, 3, 21, 1, 3, 1], [[0, 3, 10, 1], [10, 3, 11, 1]]),\n  ('regression depth exhaustion #2', [4, 2, 16, 17, 2, 1], [[4, 2, 16, 8], [4, 10, 16, 9]]),\n  ('partial repair boundary #1',\n   [2, 1, 16, 5, 4, 2],\n   [[2, 1, 4, 5], [6, 1, 4, 5], [10, 1, 4, 5], [14, 1, 4, 5]]),\n  ('partial repair boundary #2',\n   [3, 2, 2, 18, 2, 3],\n   [[3, 2, 2, 2],\n    [3, 4, 2, 2],\n    [3, 6, 2, 2],\n    [3, 8, 2, 3],\n    [3, 11, 2, 2],\n    [3, 13, 2, 2],\n    [3, 15, 2, 2],\n    [3, 17, 2, 3]]),\n  ('control #1', [2, 3, 15, 3, 3, 3], [[2, 3, 3, 3], [5, 3, 4, 3], [9, 3, 4, 3], [13, 3, 4, 3]]),\n  ('control #2', [3, 5, 26, 4, 5, 4], [[3, 5, 6, 4], [9, 5, 7, 4], [16, 5, 6, 4], [22, 5, 7, 4]])],\n [('square at even depth #1', [0, 0, 10, 10, 2, 2], [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]]),\n  ('odd width #1', [1, 1, 9, 4, 2, 1], [[1, 1, 4, 4], [5, 1, 5, 4]]),\n  ('fault site depth exhaustion #1', [2, 0, 23, 3, 6, 0], [[2, 0, 23, 3]]),\n  ('fault site depth exhaustion #2', [1, 0, 13, 21, 2, 0], [[1, 0, 13, 21]]),\n  ('partial repair boundary #1',\n   [3, 2, 2, 18, 2, 3],\n   [[3, 2, 2, 2],\n    [3, 4, 2, 2],\n    [3, 6, 2, 2],\n    [3, 8, 2, 3],\n    [3, 11, 2, 2],\n    [3, 13, 2, 2],\n    [3, 15, 2, 2],\n    [3, 17, 2, 3]]),\n  ('regression depth exhaustion #1', [4, 2, 16, 17, 2, 1], [[4, 2, 16, 8], [4, 10, 16, 9]]),\n  ('control #1', [5, 5, 9, 8, 3, 4], [[5, 5, 4, 4], [5, 9, 4, 4], [9, 5, 5, 4], [9, 9, 5, 4]]),\n  ('control #2', [2, 0, 2, 1, 3, 3], [[2, 0, 2, 1]])]]\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-bsp-split-depth-exhaustion","generated_at":"2026-09-29T14:50:50.596026+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 d == 0 or` at the depth exhaustion step.","root_cause":"The recursion stops only after depth becomes negative.","sha256":"998689ebdb16d34302ca958aab4e03d24a49010404190f9390f6aa0823845521","title":"BSP dungeon partition: Partition goes one level too deep · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.156,"exit_code":1,"observations":[{"actual":[[0,0,5,10],[5,0,5,10]],"check":"square at even depth #1","expected":[[0,0,5,5],[0,5,5,5],[5,0,5,5],[5,5,5,5]],"passed":false},{"actual":[[0,0,8,3]],"check":"exactly splittable #1","expected":[[0,0,4,3],[4,0,4,3]],"passed":false},{"actual":[[1,1,9,4]],"check":"odd width #1","expected":[[1,1,4,4],[5,1,5,4]],"passed":false},{"actual":[[2,3,16,10]],"check":"regression depth exhaustion #1","expected":[[2,3,8,10],[10,3,8,10]],"passed":false},{"actual":[[3,0,14,28]],"check":"regression depth exhaustion #2","expected":[[3,0,14,14],[3,14,14,14]],"passed":false},{"actual":[[5,5,5,8],[10,5,5,8]],"check":"partial repair boundary #1","expected":[[5,5,5,4],[5,9,5,4],[10,5,5,4],[10,9,5,4]],"passed":false},{"actual":[[5,1,1,5],[5,6,1,5]],"check":"control #1","expected":[[5,1,1,5],[5,6,1,5]],"passed":true},{"actual":[[1,4,4,1],[5,4,5,1]],"check":"control #2","expected":[[1,4,4,1],[5,4,5,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"square at even depth #1\", \"actual\": [[0, 0, 5, 10], [5, 0, 5, 10]], \"expected\": [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]], \"passed\": false}, {\"check\": \"exactly splittable #1\", \"actual\": [[0, 0, 8, 3]], \"expected\": [[0, 0, 4, 3], [4, 0, 4, 3]], \"passed\": false}, {\"check\": \"odd width #1\", \"actual\": [[1, 1, 9, 4]], \"expected\": [[1, 1, 4, 4], [5, 1, 5, 4]], \"passed\": false}, {\"check\": \"regression depth exhaustion #1\", \"actual\": [[2, 3, 16, 10]], \"expected\": [[2, 3, 8, 10], [10, 3, 8, 10]], \"passed\": false}, {\"check\": \"regression depth exhaustion #2\", \"actual\": [[3, 0, 14, 28]], \"expected\": [[3, 0, 14, 14], [3, 14, 14, 14]], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [[5, 5, 5, 8], [10, 5, 5, 8]], \"expected\": [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]], \"passed\": false}, {\"check\": \"control #1\", \"actual\": [[5, 1, 1, 5], [5, 6, 1, 5]], \"expected\": [[5, 1, 1, 5], [5, 6, 1, 5]], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [[1, 4, 4, 1], [5, 4, 5, 1]], \"expected\": [[1, 4, 4, 1], [5, 4, 5, 1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.933,"exit_code":1,"observations":[{"actual":[[0,0,2,5],[2,0,3,5],[0,5,2,5],[2,5,3,5],[5,0,2,5],[7,0,3,5],[5,5,2,5],[7,5,3,5]],"check":"square at even depth #1","expected":[[0,0,5,5],[0,5,5,5],[5,0,5,5],[5,5,5,5]],"passed":false},{"actual":[[0,0,4,3],[4,0,4,3]],"check":"exactly splittable #1","expected":[[0,0,4,3],[4,0,4,3]],"passed":true},{"actual":[[1,1,2,4],[3,1,2,4],[5,1,2,4],[7,1,3,4]],"check":"odd width #1","expected":[[1,1,4,4],[5,1,5,4]],"passed":false},{"actual":[[2,3,8,5],[2,8,8,5],[10,3,8,5],[10,8,8,5]],"check":"regression depth exhaustion #1","expected":[[2,3,8,10],[10,3,8,10]],"passed":false},{"actual":[[3,0,7,14],[10,0,7,14],[3,14,7,14],[10,14,7,14]],"check":"regression depth exhaustion #2","expected":[[3,0,14,14],[3,14,14,14]],"passed":false},{"actual":[[5,5,5,4],[5,9,5,4],[10,5,5,4],[10,9,5,4]],"check":"partial repair boundary #1","expected":[[5,5,5,4],[5,9,5,4],[10,5,5,4],[10,9,5,4]],"passed":true},{"actual":[[5,1,1,5],[5,6,1,5]],"check":"control #1","expected":[[5,1,1,5],[5,6,1,5]],"passed":true},{"actual":[[1,4,4,1],[5,4,5,1]],"check":"control #2","expected":[[1,4,4,1],[5,4,5,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"square at even depth #1\", \"actual\": [[0, 0, 2, 5], [2, 0, 3, 5], [0, 5, 2, 5], [2, 5, 3, 5], [5, 0, 2, 5], [7, 0, 3, 5], [5, 5, 2, 5], [7, 5, 3, 5]], \"expected\": [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]], \"passed\": false}, {\"check\": \"exactly splittable #1\", \"actual\": [[0, 0, 4, 3], [4, 0, 4, 3]], \"expected\": [[0, 0, 4, 3], [4, 0, 4, 3]], \"passed\": true}, {\"check\": \"odd width #1\", \"actual\": [[1, 1, 2, 4], [3, 1, 2, 4], [5, 1, 2, 4], [7, 1, 3, 4]], \"expected\": [[1, 1, 4, 4], [5, 1, 5, 4]], \"passed\": false}, {\"check\": \"regression depth exhaustion #1\", \"actual\": [[2, 3, 8, 5], [2, 8, 8, 5], [10, 3, 8, 5], [10, 8, 8, 5]], \"expected\": [[2, 3, 8, 10], [10, 3, 8, 10]], \"passed\": false}, {\"check\": \"regression depth exhaustion #2\", \"actual\": [[3, 0, 7, 14], [10, 0, 7, 14], [3, 14, 7, 14], [10, 14, 7, 14]], \"expected\": [[3, 0, 14, 14], [3, 14, 14, 14]], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]], \"expected\": [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[5, 1, 1, 5], [5, 6, 1, 5]], \"expected\": [[5, 1, 1, 5], [5, 6, 1, 5]], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [[1, 4, 4, 1], [5, 4, 5, 1]], \"expected\": [[1, 4, 4, 1], [5, 4, 5, 1]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.322,"exit_code":0,"observations":[{"actual":[[0,0,5,5],[0,5,5,5],[5,0,5,5],[5,5,5,5]],"check":"square at even depth #1","expected":[[0,0,5,5],[0,5,5,5],[5,0,5,5],[5,5,5,5]],"passed":true},{"actual":[[0,0,4,3],[4,0,4,3]],"check":"exactly splittable #1","expected":[[0,0,4,3],[4,0,4,3]],"passed":true},{"actual":[[1,1,4,4],[5,1,5,4]],"check":"odd width #1","expected":[[1,1,4,4],[5,1,5,4]],"passed":true},{"actual":[[2,3,8,10],[10,3,8,10]],"check":"regression depth exhaustion #1","expected":[[2,3,8,10],[10,3,8,10]],"passed":true},{"actual":[[3,0,14,14],[3,14,14,14]],"check":"regression depth exhaustion #2","expected":[[3,0,14,14],[3,14,14,14]],"passed":true},{"actual":[[5,5,5,4],[5,9,5,4],[10,5,5,4],[10,9,5,4]],"check":"partial repair boundary #1","expected":[[5,5,5,4],[5,9,5,4],[10,5,5,4],[10,9,5,4]],"passed":true},{"actual":[[5,1,1,5],[5,6,1,5]],"check":"control #1","expected":[[5,1,1,5],[5,6,1,5]],"passed":true},{"actual":[[1,4,4,1],[5,4,5,1]],"check":"control #2","expected":[[1,4,4,1],[5,4,5,1]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"square at even depth #1\", \"actual\": [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]], \"expected\": [[0, 0, 5, 5], [0, 5, 5, 5], [5, 0, 5, 5], [5, 5, 5, 5]], \"passed\": true}, {\"check\": \"exactly splittable #1\", \"actual\": [[0, 0, 4, 3], [4, 0, 4, 3]], \"expected\": [[0, 0, 4, 3], [4, 0, 4, 3]], \"passed\": true}, {\"check\": \"odd width #1\", \"actual\": [[1, 1, 4, 4], [5, 1, 5, 4]], \"expected\": [[1, 1, 4, 4], [5, 1, 5, 4]], \"passed\": true}, {\"check\": \"regression depth exhaustion #1\", \"actual\": [[2, 3, 8, 10], [10, 3, 8, 10]], \"expected\": [[2, 3, 8, 10], [10, 3, 8, 10]], \"passed\": true}, {\"check\": \"regression depth exhaustion #2\", \"actual\": [[3, 0, 14, 14], [3, 14, 14, 14]], \"expected\": [[3, 0, 14, 14], [3, 14, 14, 14]], \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]], \"expected\": [[5, 5, 5, 4], [5, 9, 5, 4], [10, 5, 5, 4], [10, 9, 5, 4]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[5, 1, 1, 5], [5, 6, 1, 5]], \"expected\": [[5, 1, 1, 5], [5, 6, 1, 5]], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [[1, 4, 4, 1], [5, 4, 5, 1]], \"expected\": [[1, 4, 4, 1], [5, 4, 5, 1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}