{"abstract":"Side doors are off-centre toward the bottom.","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":"Centring from the top end picks the other middle tile.","family":"w2-procedural-level-generation-constraints-room-door-door-centring","id":"FA-86801","implementations":{"attempt":{"sha256":"5c5780f64faa56b9d75d3593ab127fccf31331e014fd970051df429d5b4272c8","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, hi - 1 - (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 = [[('regression door centring #1', [[13, 5, 1, 2], [6, 2, 6, 6]], [12, 5]),\n  ('regression door centring #2', [[11, 6, 3, 5], [4, 9, 6, 6]], [10, 9]),\n  ('regression door centring #3', [[7, 5, 6, 6], [5, 9, 1, 3]], [6, 9]),\n  ('regression door centring #4', [[6, 5, 5, 5], [12, 3, 6, 6]], [11, 6]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('regression door centring #1', [[7, 5, 6, 6], [5, 9, 1, 3]], [6, 9]),\n  ('regression door centring #2', [[6, 5, 5, 5], [12, 3, 6, 6]], [11, 6]),\n  ('regression door centring #3', [[8, 4, 4, 6], [3, 4, 4, 6]], [7, 6]),\n  ('regression door centring #4', [[4, 8, 2, 3], [7, 4, 1, 6]], [6, 8]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None),\n  ('control #2', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10])],\n [('regression door centring #1', [[8, 4, 4, 6], [3, 4, 4, 6]], [7, 6]),\n  ('regression door centring #2', [[4, 8, 2, 3], [7, 4, 1, 6]], [6, 8]),\n  ('regression door centring #3', [[12, 1, 3, 5], [10, 2, 1, 2]], [11, 2]),\n  ('regression door centring #4', [[7, 1, 1, 2], [9, 0, 4, 4]], [8, 1]),\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  ('control #2', [[0, 14, 4, 5], [3, 9, 3, 1]], None)],\n [('regression door centring #1', [[12, 1, 3, 5], [10, 2, 1, 2]], [11, 2]),\n  ('regression door centring #2', [[7, 1, 1, 2], [9, 0, 4, 4]], [8, 1]),\n  ('regression door centring #3', [[9, 5, 1, 4], [5, 7, 3, 2]], [8, 7]),\n  ('regression door centring #4', [[7, 6, 6, 2], [14, 5, 4, 4]], [13, 6]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[7, 2, 4, 4], [4, 3, 3, 3]], None),\n  ('control #2', [[2, 9, 3, 5], [5, 15, 1, 5]], None)],\n [('regression door centring #1', [[9, 5, 1, 4], [5, 7, 3, 2]], [8, 7]),\n  ('regression door centring #2', [[7, 6, 6, 2], [14, 5, 4, 4]], [13, 6]),\n  ('regression door centring #3', [[9, 3, 2, 6], [12, 4, 6, 2]], [11, 4]),\n  ('regression door centring #4', [[8, 6, 1, 3], [3, 7, 4, 3]], [7, 7]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('control #1', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('control #2', [[0, 7, 4, 1], [15, 3, 4, 5]], 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":"1bf67ab220f4352c7a888dd032a44efec1aa3b8f04b89526fc173fd9a5445a09","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) // 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 = [[('regression door centring #1', [[13, 5, 1, 2], [6, 2, 6, 6]], [12, 5]),\n  ('regression door centring #2', [[11, 6, 3, 5], [4, 9, 6, 6]], [10, 9]),\n  ('regression door centring #3', [[7, 5, 6, 6], [5, 9, 1, 3]], [6, 9]),\n  ('regression door centring #4', [[6, 5, 5, 5], [12, 3, 6, 6]], [11, 6]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('regression door centring #1', [[7, 5, 6, 6], [5, 9, 1, 3]], [6, 9]),\n  ('regression door centring #2', [[6, 5, 5, 5], [12, 3, 6, 6]], [11, 6]),\n  ('regression door centring #3', [[8, 4, 4, 6], [3, 4, 4, 6]], [7, 6]),\n  ('regression door centring #4', [[4, 8, 2, 3], [7, 4, 1, 6]], [6, 8]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None),\n  ('control #2', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10])],\n [('regression door centring #1', [[8, 4, 4, 6], [3, 4, 4, 6]], [7, 6]),\n  ('regression door centring #2', [[4, 8, 2, 3], [7, 4, 1, 6]], [6, 8]),\n  ('regression door centring #3', [[12, 1, 3, 5], [10, 2, 1, 2]], [11, 2]),\n  ('regression door centring #4', [[7, 1, 1, 2], [9, 0, 4, 4]], [8, 1]),\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  ('control #2', [[0, 14, 4, 5], [3, 9, 3, 1]], None)],\n [('regression door centring #1', [[12, 1, 3, 5], [10, 2, 1, 2]], [11, 2]),\n  ('regression door centring #2', [[7, 1, 1, 2], [9, 0, 4, 4]], [8, 1]),\n  ('regression door centring #3', [[9, 5, 1, 4], [5, 7, 3, 2]], [8, 7]),\n  ('regression door centring #4', [[7, 6, 6, 2], [14, 5, 4, 4]], [13, 6]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[7, 2, 4, 4], [4, 3, 3, 3]], None),\n  ('control #2', [[2, 9, 3, 5], [5, 15, 1, 5]], None)],\n [('regression door centring #1', [[9, 5, 1, 4], [5, 7, 3, 2]], [8, 7]),\n  ('regression door centring #2', [[7, 6, 6, 2], [14, 5, 4, 4]], [13, 6]),\n  ('regression door centring #3', [[9, 3, 2, 6], [12, 4, 6, 2]], [11, 4]),\n  ('regression door centring #4', [[8, 6, 1, 3], [3, 7, 4, 3]], [7, 7]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('control #1', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('control #2', [[0, 7, 4, 1], [15, 3, 4, 5]], 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":"fa431756038bd4d22a03a6b427380496a239739ac034e03eb77eb66e878acc6b","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 = [[('regression door centring #1', [[13, 5, 1, 2], [6, 2, 6, 6]], [12, 5]),\n  ('regression door centring #2', [[11, 6, 3, 5], [4, 9, 6, 6]], [10, 9]),\n  ('regression door centring #3', [[7, 5, 6, 6], [5, 9, 1, 3]], [6, 9]),\n  ('regression door centring #4', [[6, 5, 5, 5], [12, 3, 6, 6]], [11, 6]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('regression door centring #1', [[7, 5, 6, 6], [5, 9, 1, 3]], [6, 9]),\n  ('regression door centring #2', [[6, 5, 5, 5], [12, 3, 6, 6]], [11, 6]),\n  ('regression door centring #3', [[8, 4, 4, 6], [3, 4, 4, 6]], [7, 6]),\n  ('regression door centring #4', [[4, 8, 2, 3], [7, 4, 1, 6]], [6, 8]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None),\n  ('control #2', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10])],\n [('regression door centring #1', [[8, 4, 4, 6], [3, 4, 4, 6]], [7, 6]),\n  ('regression door centring #2', [[4, 8, 2, 3], [7, 4, 1, 6]], [6, 8]),\n  ('regression door centring #3', [[12, 1, 3, 5], [10, 2, 1, 2]], [11, 2]),\n  ('regression door centring #4', [[7, 1, 1, 2], [9, 0, 4, 4]], [8, 1]),\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  ('control #2', [[0, 14, 4, 5], [3, 9, 3, 1]], None)],\n [('regression door centring #1', [[12, 1, 3, 5], [10, 2, 1, 2]], [11, 2]),\n  ('regression door centring #2', [[7, 1, 1, 2], [9, 0, 4, 4]], [8, 1]),\n  ('regression door centring #3', [[9, 5, 1, 4], [5, 7, 3, 2]], [8, 7]),\n  ('regression door centring #4', [[7, 6, 6, 2], [14, 5, 4, 4]], [13, 6]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[7, 2, 4, 4], [4, 3, 3, 3]], None),\n  ('control #2', [[2, 9, 3, 5], [5, 15, 1, 5]], None)],\n [('regression door centring #1', [[9, 5, 1, 4], [5, 7, 3, 2]], [8, 7]),\n  ('regression door centring #2', [[7, 6, 6, 2], [14, 5, 4, 4]], [13, 6]),\n  ('regression door centring #3', [[9, 3, 2, 6], [12, 4, 6, 2]], [11, 4]),\n  ('regression door centring #4', [[8, 6, 1, 3], [3, 7, 4, 3]], [7, 7]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('control #1', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('control #2', [[0, 7, 4, 1], [15, 3, 4, 5]], 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-door-centring","generated_at":"2026-09-29T14:50:52.814747+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 `lo + (hi - lo - 1) // 2` at the door centring step.","root_cause":"The middle index rounds up for even spans.","sha256":"4e9d25ba575dec3f810c5fe719cccbbff58de7732c12a8979efcbd3cba4ef437","title":"Door placement between rooms: Even spans take the upper middle · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.588,"exit_code":1,"observations":[{"actual":[12,6],"check":"regression door centring #1","expected":[12,5],"passed":false},{"actual":[10,10],"check":"regression door centring #2","expected":[10,9],"passed":false},{"actual":[6,10],"check":"regression door centring #3","expected":[6,9],"passed":false},{"actual":[11,7],"check":"regression door centring #4","expected":[11,6],"passed":false},{"actual":[3,2],"check":"side by side #1","expected":[3,2],"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression door centring #1\", \"actual\": [12, 6], \"expected\": [12, 5], \"passed\": false}, {\"check\": \"regression door centring #2\", \"actual\": [10, 10], \"expected\": [10, 9], \"passed\": false}, {\"check\": \"regression door centring #3\", \"actual\": [6, 10], \"expected\": [6, 9], \"passed\": false}, {\"check\": \"regression door centring #4\", \"actual\": [11, 7], \"expected\": [11, 6], \"passed\": false}, {\"check\": \"side by side #1\", \"actual\": [3, 2], \"expected\": [3, 2], \"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\": false}\n"},"broken":{"elapsed_ms":38.695,"exit_code":1,"observations":[{"actual":[12,6],"check":"regression door centring #1","expected":[12,5],"passed":false},{"actual":[10,10],"check":"regression door centring #2","expected":[10,9],"passed":false},{"actual":[6,10],"check":"regression door centring #3","expected":[6,9],"passed":false},{"actual":[11,7],"check":"regression door centring #4","expected":[11,6],"passed":false},{"actual":[3,2],"check":"side by side #1","expected":[3,2],"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression door centring #1\", \"actual\": [12, 6], \"expected\": [12, 5], \"passed\": false}, {\"check\": \"regression door centring #2\", \"actual\": [10, 10], \"expected\": [10, 9], \"passed\": false}, {\"check\": \"regression door centring #3\", \"actual\": [6, 10], \"expected\": [6, 9], \"passed\": false}, {\"check\": \"regression door centring #4\", \"actual\": [11, 7], \"expected\": [11, 6], \"passed\": false}, {\"check\": \"side by side #1\", \"actual\": [3, 2], \"expected\": [3, 2], \"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\": false}\n"},"fixed":{"elapsed_ms":38.34,"exit_code":0,"observations":[{"actual":[12,5],"check":"regression door centring #1","expected":[12,5],"passed":true},{"actual":[10,9],"check":"regression door centring #2","expected":[10,9],"passed":true},{"actual":[6,9],"check":"regression door centring #3","expected":[6,9],"passed":true},{"actual":[11,6],"check":"regression door centring #4","expected":[11,6],"passed":true},{"actual":[3,2],"check":"side by side #1","expected":[3,2],"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\": \"regression door centring #1\", \"actual\": [12, 5], \"expected\": [12, 5], \"passed\": true}, {\"check\": \"regression door centring #2\", \"actual\": [10, 9], \"expected\": [10, 9], \"passed\": true}, {\"check\": \"regression door centring #3\", \"actual\": [6, 9], \"expected\": [6, 9], \"passed\": true}, {\"check\": \"regression door centring #4\", \"actual\": [11, 6], \"expected\": [11, 6], \"passed\": true}, {\"check\": \"side by side #1\", \"actual\": [3, 2], \"expected\": [3, 2], \"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"}