{"abstract":"Doors open into solid rock beside the smaller room.","category":"Procedural level generation constraints","checks":8,"contract":"Rooms [x, y, w, h] are interiors separated by one wall tile when x_a + w_a + 1 == x_b (b right of a) or y_a + h_a + 1 == y_b (b below a), checked in both room orders. The door sits in the wall at the middle of the shared span [lo, hi) (lower middle for even spans): column x_a+w_a for side-by-side rooms, row y_a+h_a for stacked rooms. Returns [x, y] or None.","evaluation_group":"w2-procedural-level-generation-constraints-room-door","failed_approach":"Extending the span by one tile allows a door at the corner.","family":"w2-procedural-level-generation-constraints-room-door-shared-span-end","id":"FA-86791","implementations":{"attempt":{"sha256":"8ebe028500787ec7f62ae96dac270cd5f06a49b4fe186a2106e4d64fbcdae7e9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    def door(p, q):\n        px, py, pw, ph = p\n        qx, qy, qw, qh = q\n        if px + pw + 1 == qx:\n            lo = max(py, qy)\n            hi = min(py + ph, qy + qh) + 1\n            if hi - lo >= 1:\n                return [px + pw, lo + (hi - lo - 1) // 2]\n        if py + ph + 1 == qy:\n            lo = max(px, qx)\n            hi = min(px + pw, qx + qw)\n            if hi > lo:\n                return [(lo + hi - 1) // 2, py + ph]\n        return None\n    return door(a, b) or door(b, a)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('regression shared span end #1', [[13, 5, 1, 2], [6, 2, 6, 6]], [12, 5]),\n  ('fault site shared span end #1', [[11, 7, 6, 3], [7, 7, 3, 1]], [10, 7]),\n  ('regression shared span end #2', [[9, 4, 3, 2], [13, 6, 1, 5]], None),\n  ('regression shared span end #3', [[8, 9, 3, 6], [5, 4, 2, 5]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[11, 7, 6, 3], [7, 7, 3, 1]], [10, 7]),\n  ('fault site shared span end #2', [[7, 0, 5, 3], [2, 4, 4, 3]], None),\n  ('regression shared span end #1', [[8, 9, 3, 6], [5, 4, 2, 5]], None),\n  ('regression shared span end #2', [[10, -3, 6, 3], [4, 0, 5, 6]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[7, 1, 1, 5], [9, 7, 2, 4]], None),\n  ('fault site shared span end #2', [[2, 7, 4, 4], [7, 5, 4, 1]], None),\n  ('regression shared span end #1', [[11, 6, 3, 5], [4, 9, 6, 6]], [10, 9]),\n  ('regression shared span end #2', [[11, 14, 1, 4], [6, 9, 4, 5]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[3, 11, 4, 2], [8, 8, 1, 2]], None),\n  ('fault site shared span end #2', [[10, 9, 4, 1], [15, 9, 3, 4]], [14, 9]),\n  ('regression shared span end #1', [[8, 1, 5, 5], [4, 6, 3, 1]], None),\n  ('regression shared span end #2', [[10, 9, 4, 3], [7, 7, 2, 2]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10])],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[3, 5, 4, 5], [8, 0, 3, 2]], None),\n  ('regression shared span end #1', [[9, 4, 3, 2], [13, 6, 1, 5]], None),\n  ('regression shared span end #2', [[6, 7, 6, 6], [0, 13, 5, 3]], None),\n  ('regression shared span end #3', [[10, 6, 6, 3], [5, 9, 4, 2]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[0, 14, 4, 5], [3, 9, 3, 1]], None)]]\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":"57e2ad23c624dfb7e5e5a28fc9d5093037cde9a54025af9b4016405f7b6b3170","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    def door(p, q):\n        px, py, pw, ph = p\n        qx, qy, qw, qh = q\n        if px + pw + 1 == qx:\n            lo = max(py, qy)\n            hi = max(py + ph, qy + qh)\n            if hi - lo >= 1:\n                return [px + pw, lo + (hi - lo - 1) // 2]\n        if py + ph + 1 == qy:\n            lo = max(px, qx)\n            hi = min(px + pw, qx + qw)\n            if hi > lo:\n                return [(lo + hi - 1) // 2, py + ph]\n        return None\n    return door(a, b) or door(b, a)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('regression shared span end #1', [[13, 5, 1, 2], [6, 2, 6, 6]], [12, 5]),\n  ('fault site shared span end #1', [[11, 7, 6, 3], [7, 7, 3, 1]], [10, 7]),\n  ('regression shared span end #2', [[9, 4, 3, 2], [13, 6, 1, 5]], None),\n  ('regression shared span end #3', [[8, 9, 3, 6], [5, 4, 2, 5]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[11, 7, 6, 3], [7, 7, 3, 1]], [10, 7]),\n  ('fault site shared span end #2', [[7, 0, 5, 3], [2, 4, 4, 3]], None),\n  ('regression shared span end #1', [[8, 9, 3, 6], [5, 4, 2, 5]], None),\n  ('regression shared span end #2', [[10, -3, 6, 3], [4, 0, 5, 6]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[7, 1, 1, 5], [9, 7, 2, 4]], None),\n  ('fault site shared span end #2', [[2, 7, 4, 4], [7, 5, 4, 1]], None),\n  ('regression shared span end #1', [[11, 6, 3, 5], [4, 9, 6, 6]], [10, 9]),\n  ('regression shared span end #2', [[11, 14, 1, 4], [6, 9, 4, 5]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[3, 11, 4, 2], [8, 8, 1, 2]], None),\n  ('fault site shared span end #2', [[10, 9, 4, 1], [15, 9, 3, 4]], [14, 9]),\n  ('regression shared span end #1', [[8, 1, 5, 5], [4, 6, 3, 1]], None),\n  ('regression shared span end #2', [[10, 9, 4, 3], [7, 7, 2, 2]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10])],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[3, 5, 4, 5], [8, 0, 3, 2]], None),\n  ('regression shared span end #1', [[9, 4, 3, 2], [13, 6, 1, 5]], None),\n  ('regression shared span end #2', [[6, 7, 6, 6], [0, 13, 5, 3]], None),\n  ('regression shared span end #3', [[10, 6, 6, 3], [5, 9, 4, 2]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[0, 14, 4, 5], [3, 9, 3, 1]], None)]]\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":"0bbc31ec30d6efd0e00f1d44c4bb89d2b20576d4896324ac736e78e15de4bb41","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    def door(p, q):\n        px, py, pw, ph = p\n        qx, qy, qw, qh = q\n        if px + pw + 1 == qx:\n            lo = max(py, qy)\n            hi = min(py + ph, qy + qh)\n            if hi - lo >= 1:\n                return [px + pw, lo + (hi - lo - 1) // 2]\n        if py + ph + 1 == qy:\n            lo = max(px, qx)\n            hi = min(px + pw, qx + qw)\n            if hi > lo:\n                return [(lo + hi - 1) // 2, py + ph]\n        return None\n    return door(a, b) or door(b, a)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('regression shared span end #1', [[13, 5, 1, 2], [6, 2, 6, 6]], [12, 5]),\n  ('fault site shared span end #1', [[11, 7, 6, 3], [7, 7, 3, 1]], [10, 7]),\n  ('regression shared span end #2', [[9, 4, 3, 2], [13, 6, 1, 5]], None),\n  ('regression shared span end #3', [[8, 9, 3, 6], [5, 4, 2, 5]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[11, 7, 6, 3], [7, 7, 3, 1]], [10, 7]),\n  ('fault site shared span end #2', [[7, 0, 5, 3], [2, 4, 4, 3]], None),\n  ('regression shared span end #1', [[8, 9, 3, 6], [5, 4, 2, 5]], None),\n  ('regression shared span end #2', [[10, -3, 6, 3], [4, 0, 5, 6]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[7, 1, 1, 5], [9, 7, 2, 4]], None),\n  ('fault site shared span end #2', [[2, 7, 4, 4], [7, 5, 4, 1]], None),\n  ('regression shared span end #1', [[11, 6, 3, 5], [4, 9, 6, 6]], [10, 9]),\n  ('regression shared span end #2', [[11, 14, 1, 4], [6, 9, 4, 5]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[3, 11, 4, 2], [8, 8, 1, 2]], None),\n  ('fault site shared span end #2', [[10, 9, 4, 1], [15, 9, 3, 4]], [14, 9]),\n  ('regression shared span end #1', [[8, 1, 5, 5], [4, 6, 3, 1]], None),\n  ('regression shared span end #2', [[10, 9, 4, 3], [7, 7, 2, 2]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10])],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site shared span end #1', [[3, 5, 4, 5], [8, 0, 3, 2]], None),\n  ('regression shared span end #1', [[9, 4, 3, 2], [13, 6, 1, 5]], None),\n  ('regression shared span end #2', [[6, 7, 6, 6], [0, 13, 5, 3]], None),\n  ('regression shared span end #3', [[10, 6, 6, 3], [5, 9, 4, 2]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[0, 14, 4, 5], [3, 9, 3, 1]], None)]]\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-room-door-shared-span-end","generated_at":"2026-09-29T14:50:52.803224+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 `hi = min(py + ph, qy + qh)` at the shared span end step.","root_cause":"The shared span ends at the larger room edge.","sha256":"ae7f0db4b21d58bfe5a05e4ff66e5ac438ca0307b1a5558ae3a3d94c056669d4","title":"Door placement between rooms: Door placed beyond the shared wall · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.936,"exit_code":1,"observations":[{"actual":[3,2],"check":"side by side #1","expected":[3,2],"passed":true},{"actual":[12,6],"check":"regression shared span end #1","expected":[12,5],"passed":false},{"actual":[10,7],"check":"fault site shared span end #1","expected":[10,7],"passed":true},{"actual":[12,6],"check":"regression shared span end #2","expected":null,"passed":false},{"actual":[7,9],"check":"regression shared span end #3","expected":null,"passed":false},{"actual":[3,4],"check":"stacked reversed order #1","expected":[3,4],"passed":true},{"actual":null,"check":"rooms touching without wall #1","expected":null,"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"side by side #1\", \"actual\": [3, 2], \"expected\": [3, 2], \"passed\": true}, {\"check\": \"regression shared span end #1\", \"actual\": [12, 6], \"expected\": [12, 5], \"passed\": false}, {\"check\": \"fault site shared span end #1\", \"actual\": [10, 7], \"expected\": [10, 7], \"passed\": true}, {\"check\": \"regression shared span end #2\", \"actual\": [12, 6], \"expected\": null, \"passed\": false}, {\"check\": \"regression shared span end #3\", \"actual\": [7, 9], \"expected\": null, \"passed\": false}, {\"check\": \"stacked reversed order #1\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"rooms touching without wall #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #1\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.086,"exit_code":1,"observations":[{"actual":[3,3],"check":"side by side #1","expected":[3,2],"passed":false},{"actual":[12,6],"check":"regression shared span end #1","expected":[12,5],"passed":false},{"actual":[10,8],"check":"fault site shared span end #1","expected":[10,7],"passed":false},{"actual":[12,8],"check":"regression shared span end #2","expected":null,"passed":false},{"actual":[7,11],"check":"regression shared span end #3","expected":null,"passed":false},{"actual":[3,4],"check":"stacked reversed order #1","expected":[3,4],"passed":true},{"actual":null,"check":"rooms touching without wall #1","expected":null,"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"side by side #1\", \"actual\": [3, 3], \"expected\": [3, 2], \"passed\": false}, {\"check\": \"regression shared span end #1\", \"actual\": [12, 6], \"expected\": [12, 5], \"passed\": false}, {\"check\": \"fault site shared span end #1\", \"actual\": [10, 8], \"expected\": [10, 7], \"passed\": false}, {\"check\": \"regression shared span end #2\", \"actual\": [12, 8], \"expected\": null, \"passed\": false}, {\"check\": \"regression shared span end #3\", \"actual\": [7, 11], \"expected\": null, \"passed\": false}, {\"check\": \"stacked reversed order #1\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"rooms touching without wall #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #1\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.203,"exit_code":0,"observations":[{"actual":[3,2],"check":"side by side #1","expected":[3,2],"passed":true},{"actual":[12,5],"check":"regression shared span end #1","expected":[12,5],"passed":true},{"actual":[10,7],"check":"fault site shared span end #1","expected":[10,7],"passed":true},{"actual":null,"check":"regression shared span end #2","expected":null,"passed":true},{"actual":null,"check":"regression shared span end #3","expected":null,"passed":true},{"actual":[3,4],"check":"stacked reversed order #1","expected":[3,4],"passed":true},{"actual":null,"check":"rooms touching without wall #1","expected":null,"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"side by side #1\", \"actual\": [3, 2], \"expected\": [3, 2], \"passed\": true}, {\"check\": \"regression shared span end #1\", \"actual\": [12, 5], \"expected\": [12, 5], \"passed\": true}, {\"check\": \"fault site shared span end #1\", \"actual\": [10, 7], \"expected\": [10, 7], \"passed\": true}, {\"check\": \"regression shared span end #2\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression shared span end #3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"stacked reversed order #1\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"rooms touching without wall #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #1\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}