{"abstract":"Doors are placed between touching rooms and inside the neighbour.","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":"Accepting any distance places doors between far-apart rooms.","family":"w2-procedural-level-generation-constraints-room-door-wall-thickness","id":"FA-86786","implementations":{"attempt":{"sha256":"8eff930fcd37bd30fbdaf0cacbb18ea41f10ffccad937bca4365df54fcbccf65","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  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('fault site wall thickness #1', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10]),\n  ('partial repair boundary #1', [[0, 7, 4, 1], [15, 3, 4, 5]], None),\n  ('partial repair boundary #2', [[10, 0, 2, 6], [14, -1, 1, 5]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None),\n  ('control #2', [[0, 14, 4, 5], [3, 9, 3, 1]], None)],\n [('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('fault site wall thickness #1', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10]),\n  ('fault site wall thickness #2', [[7, 2, 4, 4], [4, 3, 3, 3]], None),\n  ('partial repair boundary #1', [[1, 3, 1, 1], [9, 3, 2, 1]], None),\n  ('partial repair boundary #2', [[4, 6, 3, 6], [12, 6, 3, 2]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[0, 14, 4, 5], [3, 9, 3, 1]], None),\n  ('control #2', [[2, 9, 3, 5], [5, 15, 1, 5]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site wall thickness #1', [[1, 8, 1, 2], [2, 3, 6, 6]], None),\n  ('fault site wall thickness #2', [[13, 5, 1, 2], [6, 2, 6, 6]], [12, 5]),\n  ('partial repair boundary #1', [[15, 1, 1, 3], [1, 3, 4, 2]], None),\n  ('partial repair boundary #2', [[3, 10, 1, 3], [10, 7, 4, 6]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('control #2', [[10, 6, 5, 3], [14, 9, 2, 3]], None)],\n [('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('fault site wall thickness #1', [[11, 7, 6, 3], [7, 7, 3, 1]], [10, 7]),\n  ('fault site wall thickness #2', [[8, 6, 1, 2], [9, 4, 1, 4]], None),\n  ('partial repair boundary #1', [[0, 2, 6, 1], [8, 0, 1, 3]], None),\n  ('partial repair boundary #2', [[9, 7, 5, 5], [16, 5, 3, 6]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[9, -5, 4, 4], [1, 1, 6, 2]], None),\n  ('control #2', [[6, 3, 2, 2], [13, 16, 2, 4]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site wall thickness #1', [[6, -4, 6, 5], [3, 0, 3, 6]], None),\n  ('fault site wall thickness #2', [[10, 9, 4, 1], [15, 9, 3, 4]], [14, 9]),\n  ('partial repair boundary #1', [[5, 3, 4, 2], [0, 1, 1, 3]], None),\n  ('partial repair boundary #2', [[10, 2, 3, 1], [15, 0, 3, 3]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[14, 1, 4, 3], [10, 7, 2, 4]], None),\n  ('control #2', [[1, 1, 3, 6], [3, 9, 2, 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":"1bce38b54c03d7ff5364e50131c880eded04933ec8ae3ea6f0c1c13708956ccc","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 == 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  ('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('fault site wall thickness #1', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10]),\n  ('partial repair boundary #1', [[0, 7, 4, 1], [15, 3, 4, 5]], None),\n  ('partial repair boundary #2', [[10, 0, 2, 6], [14, -1, 1, 5]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[6, 10, 4, 6], [5, 7, 4, 3]], None),\n  ('control #2', [[0, 14, 4, 5], [3, 9, 3, 1]], None)],\n [('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('fault site wall thickness #1', [[3, 10, 2, 1], [6, 6, 6, 5]], [5, 10]),\n  ('fault site wall thickness #2', [[7, 2, 4, 4], [4, 3, 3, 3]], None),\n  ('partial repair boundary #1', [[1, 3, 1, 1], [9, 3, 2, 1]], None),\n  ('partial repair boundary #2', [[4, 6, 3, 6], [12, 6, 3, 2]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[0, 14, 4, 5], [3, 9, 3, 1]], None),\n  ('control #2', [[2, 9, 3, 5], [5, 15, 1, 5]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site wall thickness #1', [[1, 8, 1, 2], [2, 3, 6, 6]], None),\n  ('fault site wall thickness #2', [[13, 5, 1, 2], [6, 2, 6, 6]], [12, 5]),\n  ('partial repair boundary #1', [[15, 1, 1, 3], [1, 3, 4, 2]], None),\n  ('partial repair boundary #2', [[3, 10, 1, 3], [10, 7, 4, 6]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[7, 2, 3, 3], [8, 5, 2, 6]], None),\n  ('control #2', [[10, 6, 5, 3], [14, 9, 2, 3]], None)],\n [('rooms touching without wall #1', [[0, 0, 3, 3], [3, 0, 3, 3]], None),\n  ('fault site wall thickness #1', [[11, 7, 6, 3], [7, 7, 3, 1]], [10, 7]),\n  ('fault site wall thickness #2', [[8, 6, 1, 2], [9, 4, 1, 4]], None),\n  ('partial repair boundary #1', [[0, 2, 6, 1], [8, 0, 1, 3]], None),\n  ('partial repair boundary #2', [[9, 7, 5, 5], [16, 5, 3, 6]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[9, -5, 4, 4], [1, 1, 6, 2]], None),\n  ('control #2', [[6, 3, 2, 2], [13, 16, 2, 4]], None)],\n [('side by side #1', [[0, 0, 3, 4], [4, 1, 2, 5]], [3, 2]),\n  ('fault site wall thickness #1', [[6, -4, 6, 5], [3, 0, 3, 6]], None),\n  ('fault site wall thickness #2', [[10, 9, 4, 1], [15, 9, 3, 4]], [14, 9]),\n  ('partial repair boundary #1', [[5, 3, 4, 2], [0, 1, 1, 3]], None),\n  ('partial repair boundary #2', [[10, 2, 3, 1], [15, 0, 3, 3]], None),\n  ('stacked reversed order #1', [[2, 5, 3, 2], [1, 0, 4, 4]], [3, 4]),\n  ('control #1', [[14, 1, 4, 3], [10, 7, 2, 4]], None),\n  ('control #2', [[1, 1, 3, 6], [3, 9, 2, 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-wall-thickness","generated_at":"2026-09-29T14:50:52.803698+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 adjacency test expects no wall column between rooms.","sha256":"e961ee99d3f3df34b5adb407fca55446219a864b252c08aca01196000fba0292","title":"Door placement between rooms: Doors between rooms with no wall · 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":39.45,"exit_code":1,"observations":[{"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":"fault site wall thickness #1","expected":[5,10],"passed":true},{"actual":[4,7],"check":"partial repair boundary #1","expected":null,"passed":false},{"actual":[12,1],"check":"partial repair boundary #2","expected":null,"passed":false},{"actual":[3,4],"check":"stacked reversed order #1","expected":[3,4],"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true},{"actual":null,"check":"control #2","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"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\": \"fault site wall thickness #1\", \"actual\": [5, 10], \"expected\": [5, 10], \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": [4, 7], \"expected\": null, \"passed\": false}, {\"check\": \"partial repair boundary #2\", \"actual\": [12, 1], \"expected\": null, \"passed\": false}, {\"check\": \"stacked reversed order #1\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"control #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #2\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.597,"exit_code":1,"observations":[{"actual":null,"check":"side by side #1","expected":[3,2],"passed":false},{"actual":[3,1],"check":"rooms touching without wall #1","expected":null,"passed":false},{"actual":null,"check":"fault site wall thickness #1","expected":[5,10],"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,4],"check":"stacked reversed order #1","expected":[3,4],"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true},{"actual":null,"check":"control #2","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"side by side #1\", \"actual\": null, \"expected\": [3, 2], \"passed\": false}, {\"check\": \"rooms touching without wall #1\", \"actual\": [3, 1], \"expected\": null, \"passed\": false}, {\"check\": \"fault site wall thickness #1\", \"actual\": null, \"expected\": [5, 10], \"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\": \"stacked reversed order #1\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"control #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #2\", \"actual\": null, \"expected\": null, \"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."}}