{"abstract":"Vertically stacked rooms are only connected by coincidence.","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.","contract_signature":"a, b","evaluation_group":"w2-procedural-level-generation-constraints-room-door","failed_approach":"Dropping the wall tile connects touching stacked rooms.","family":"w2-procedural-level-generation-constraints-room-door-stacked-axis","id":"FA-86816","implementations":{"attempt":{"sha256":"56811f4c5db43ae13e1fed2d42bb4bf099eb9f361f15efd4b75149e1b73b0520","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 == 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 = [[('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('fault site stacked axis #1', [[10, 3, 5, 4], [8, 0, 3, 1]], None),\n  ('fault site stacked axis #2', [[2, 2, 6, 1], [4, 5, 3, 5]], None),\n  ('partial repair boundary #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None),\n  ('partial repair boundary #2', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('fault site stacked axis #1', [[2, 2, 6, 1], [4, 5, 3, 5]], None),\n  ('regression stacked axis #1', [[7, 4, 5, 3], [10, 8, 1, 4]], [10, 7]),\n  ('partial repair boundary #1', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('partial repair boundary #2', [[10, 6, 5, 3], [14, 9, 2, 3]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('regression stacked axis #1', [[10, 11, 6, 4], [7, 7, 6, 3]], [11, 10]),\n  ('regression stacked axis #2', [[7, 11, 4, 3], [7, 4, 5, 6]], [8, 10]),\n  ('partial repair boundary #1', [[5, 5, 2, 5], [5, 1, 6, 3]], [5, 4]),\n  ('partial repair boundary #2', [[3, 9, 6, 5], [2, 4, 4, 5]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('regression stacked axis #1', [[7, 6, 5, 5], [3, 0, 6, 5]], [7, 5]),\n  ('regression stacked axis #2', [[4, 13, 5, 2], [3, 9, 2, 3]], [4, 12]),\n  ('partial repair boundary #1', [[9, 6, 5, 2], [9, 9, 3, 6]], [10, 8]),\n  ('regression stacked axis #3', [[7, 4, 5, 3], [10, 8, 1, 4]], [10, 7]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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)],\n [('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('regression stacked axis #1', [[9, 5, 4, 3], [9, 3, 5, 1]], [10, 4]),\n  ('regression stacked axis #2', [[9, 6, 4, 6], [8, 13, 6, 4]], [10, 12]),\n  ('regression stacked axis #3', [[10, 11, 6, 4], [7, 7, 6, 3]], [11, 10]),\n  ('regression stacked axis #4', [[7, 11, 4, 3], [7, 4, 5, 6]], [8, 10]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[7, 2, 4, 4], [4, 3, 3, 3]], 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":"59c4df3786d0e295b7e470f8414ee3767c6a5d561be47711e6843601f9b978d5","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 == qx:\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 = [[('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('fault site stacked axis #1', [[10, 3, 5, 4], [8, 0, 3, 1]], None),\n  ('fault site stacked axis #2', [[2, 2, 6, 1], [4, 5, 3, 5]], None),\n  ('partial repair boundary #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None),\n  ('partial repair boundary #2', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('fault site stacked axis #1', [[2, 2, 6, 1], [4, 5, 3, 5]], None),\n  ('regression stacked axis #1', [[7, 4, 5, 3], [10, 8, 1, 4]], [10, 7]),\n  ('partial repair boundary #1', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('partial repair boundary #2', [[10, 6, 5, 3], [14, 9, 2, 3]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('regression stacked axis #1', [[10, 11, 6, 4], [7, 7, 6, 3]], [11, 10]),\n  ('regression stacked axis #2', [[7, 11, 4, 3], [7, 4, 5, 6]], [8, 10]),\n  ('partial repair boundary #1', [[5, 5, 2, 5], [5, 1, 6, 3]], [5, 4]),\n  ('partial repair boundary #2', [[3, 9, 6, 5], [2, 4, 4, 5]], None),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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 [('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('regression stacked axis #1', [[7, 6, 5, 5], [3, 0, 6, 5]], [7, 5]),\n  ('regression stacked axis #2', [[4, 13, 5, 2], [3, 9, 2, 3]], [4, 12]),\n  ('partial repair boundary #1', [[9, 6, 5, 2], [9, 9, 3, 6]], [10, 8]),\n  ('regression stacked axis #3', [[7, 4, 5, 3], [10, 8, 1, 4]], [10, 7]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\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)],\n [('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('regression stacked axis #1', [[9, 5, 4, 3], [9, 3, 5, 1]], [10, 4]),\n  ('regression stacked axis #2', [[9, 6, 4, 6], [8, 13, 6, 4]], [10, 12]),\n  ('regression stacked axis #3', [[10, 11, 6, 4], [7, 7, 6, 3]], [11, 10]),\n  ('regression stacked axis #4', [[7, 11, 4, 3], [7, 4, 5, 6]], [8, 10]),\n  ('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('control #1', [[7, 2, 4, 4], [4, 3, 3, 3]], 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-stacked-axis","generated_at":"2026-09-29T14:50:53.140145+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.","root_cause":"The stacked-room test compares against the neighbour x coordinate.","sha256":"a6af151ba096a0142fab9f7d8634b8637a1a35551eb53eac6cf2fd730b457baa","title":"Door placement between rooms: Stacked rooms compared on the x axis · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":38.351,"exit_code":1,"observations":[{"actual":null,"check":"stacked reversed order #1","expected":[3,4],"passed":false},{"actual":null,"check":"fault site stacked axis #1","expected":null,"passed":true},{"actual":null,"check":"fault site stacked axis #2","expected":null,"passed":true},{"actual":[7,10],"check":"partial repair boundary #1","expected":null,"passed":false},{"actual":[8,5],"check":"partial repair boundary #2","expected":null,"passed":false},{"actual":[3,2],"check":"side by side #1","expected":[3,2],"passed":true},{"actual":null,"check":"rooms touching without wall #1","expected":null,"passed":true},{"actual":[5,10],"check":"control #1","expected":[5,10],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"stacked reversed order #1\", \"actual\": null, \"expected\": [3, 4], \"passed\": false}, {\"check\": \"fault site stacked axis #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fault site stacked axis #2\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": [7, 10], \"expected\": null, \"passed\": false}, {\"check\": \"partial repair boundary #2\", \"actual\": [8, 5], \"expected\": null, \"passed\": false}, {\"check\": \"side by side #1\", \"actual\": [3, 2], \"expected\": [3, 2], \"passed\": true}, {\"check\": \"rooms touching without wall #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #1\", \"actual\": [5, 10], \"expected\": [5, 10], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.677,"exit_code":1,"observations":[{"actual":null,"check":"stacked reversed order #1","expected":[3,4],"passed":false},{"actual":[10,7],"check":"fault site stacked axis #1","expected":null,"passed":false},{"actual":[5,3],"check":"fault site stacked axis #2","expected":null,"passed":false},{"actual":null,"check":"partial repair boundary #1","expected":null,"passed":true},{"actual":null,"check":"partial repair boundary #2","expected":null,"passed":true},{"actual":[3,2],"check":"side by side #1","expected":[3,2],"passed":true},{"actual":null,"check":"rooms touching without wall #1","expected":null,"passed":true},{"actual":[5,10],"check":"control #1","expected":[5,10],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"stacked reversed order #1\", \"actual\": null, \"expected\": [3, 4], \"passed\": false}, {\"check\": \"fault site stacked axis #1\", \"actual\": [10, 7], \"expected\": null, \"passed\": false}, {\"check\": \"fault site stacked axis #2\", \"actual\": [5, 3], \"expected\": null, \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"partial repair boundary #2\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"side by side #1\", \"actual\": [3, 2], \"expected\": [3, 2], \"passed\": true}, {\"check\": \"rooms touching without wall #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #1\", \"actual\": [5, 10], \"expected\": [5, 10], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}