{"abstract":"Small floors fail to place stairs.","category":"Procedural level generation constraints","checks":8,"contract":"Scan floor_a row by row (y), then column (x); choose the first cell where floor_a[y][x] == '.', the cell exists on floor_b and is '.' there, and the Manhattan distance to entrance [x, y] is at least min_dist. Returns [x, y] or None.","contract_signature":"floor_a, floor_b, entrance, min_dist","evaluation_group":"w2-procedural-level-generation-constraints-aligned-stairs","failed_approach":"Relaxing by one accepts cells too close to the entrance.","family":"w2-procedural-level-generation-constraints-aligned-stairs-distance-threshold","id":"FA-86836","implementations":{"attempt":{"sha256":"d256068d17b97858e49991e8a78f76260484438fba5eed108066be11f1495bb1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(floor_a, floor_b, entrance, min_dist):\n    for y in range(len(floor_a)):\n        for x in range(len(floor_a[0])):\n            if floor_a[y][x] != '.':\n                continue\n            if y >= len(floor_b) or x >= len(floor_b[0]) or floor_b[y][x] != '.':\n                continue\n            if abs(x - entrance[0]) + abs(y - entrance[1]) < min_dist - 1:\n                continue\n            return [x, y]\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('fault site distance threshold #1',\n   [['...', '.#.', '...', '..#', '###', '..#'], ['~.#.~', '##~~#', '~~#..', '.~.~.'], [2, 4], 5],\n   [1, 0]),\n  ('fault site distance threshold #2',\n   [['...##.', '..#.#.', '..#...', '#.....', '#.....'], ['#', '.', '.', '~'], [0, 2], 1],\n   [0, 1]),\n  ('partial repair boundary #1', [['#.#.', '...#'], ['...#~', '.....'], [3, 1], 4], None),\n  ('partial repair boundary #2',\n   [['.#', '#.', '#.', '..', '..', '#.'], ['~..##', '#..#.', '#.#~.', '..~.~', '~~~..'], [0, 0], 5],\n   None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['.', '#', '.', '#'], ['#.....'], [0, 1], 4], None)],\n [('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('fault site distance threshold #1',\n   [['...', '.#.', '...', '..#', '###', '..#'], ['~.#.~', '##~~#', '~~#..', '.~.~.'], [2, 4], 5],\n   [1, 0]),\n  ('fault site distance threshold #2',\n   [['...##.', '..#.#.', '..#...', '#.....', '#.....'], ['#', '.', '.', '~'], [0, 2], 1],\n   [0, 1]),\n  ('partial repair boundary #1',\n   [['.#', '#.', '#.', '..', '..', '#.'], ['~..##', '#..#.', '#.#~.', '..~.~', '~~~..'], [0, 0], 5],\n   None),\n  ('partial repair boundary #2',\n   [['.#.#', '#...', '..#.'], ['..#', '~~.', '~.#', '...', '#~.', '~#.'], [2, 0], 4],\n   None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['##', '.#', '#.', '.#', '.#'], ['##.', '...', '.~#'], [0, 0], 5], None),\n  ('control #2',\n   [['#....', '..#..', '#...#', '#..#.', '.#.#.', '.#.#.'],\n    ['#~..', '..~.', '..~.', '..#.', '##~~'],\n    [1, 4],\n    1],\n   [2, 0])],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('fault site distance threshold #1',\n   [['.', '.', '.'], ['.#.~', '~..~', '...~', '...~', '~~#.'], [0, 0], 2],\n   [0, 2]),\n  ('fault site distance threshold #2',\n   [['..##.', '.##..', '.##..'], ['..~', '.##', '..~', '...', '.##', '...'], [3, 2], 5],\n   [0, 0]),\n  ('partial repair boundary #1',\n   [['..', '..', '.#'], ['.#.#', '#~..', '#.#.', '..#.', '#...', '~~..'], [1, 2], 4],\n   None),\n  ('partial repair boundary #2',\n   [['..#.', '..#.', '..#.', '#...', '.#.#'], ['#..#', '.~#.', '.##~'], [0, 2], 5],\n   None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['##', '.#', '#.', '.#', '.#'], ['##.', '...', '.~#'], [0, 0], 5], None)],\n [('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('fault site distance threshold #1',\n   [['..###.', '.#.#..', '...##.', '###...', '.#..##'], ['#', '~', '.', '.', '.', '#'], [2, 2], 2],\n   [0, 2]),\n  ('fault site distance threshold #2',\n   [['..#..', '#..#.', '..#..', '.....', '.#...', '##.#.'],\n    ['~~.', '##.', '~#~', '###', '.##', '...'],\n    [2, 1],\n    0],\n   [2, 1]),\n  ('regression distance threshold #1',\n   [['#.#', '#..', '.##', '..#'], ['~~.#..', '...#~~', '#.#..#', '.....~', '~~#.~.'], [0, 2], 3],\n   [2, 1]),\n  ('partial repair boundary #1', [['..#..'], ['#.#~', '#...', '.~~#', '~.#.'], [2, 0], 2], None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['#..#', '..#.', '#.##'], ['.', '~', '.', '#'], [2, 2], 4], None),\n  ('control #2',\n   [['..', '..', '#.', '.#', '#.', '.#'], ['~.~', '~~~', '~#.', '~#.', '...', '##.'], [0, 4], 4],\n   [1, 0])],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('regression distance threshold #1',\n   [['#.#', '#..', '.##', '..#'], ['~~.#..', '...#~~', '#.#..#', '.....~', '~~#.~.'], [0, 2], 3],\n   [2, 1]),\n  ('fault site distance threshold #1',\n   [['###..', '.#.##', '.....', '.....', '#.##.'], ['~#..', '...#'], [0, 0], 3],\n   [3, 0]),\n  ('partial repair boundary #1',\n   [['#.', '.#'], ['#..#.#', '.~#~.#', '~~#.~.', '..#~~.', '##~..#', '.~#~.#'], [0, 0], 2],\n   None),\n  ('partial repair boundary #2',\n   [['.###', '....', '....', '....', '#...'],\n    ['~.#~.', '..#.~', '.###.', '.#.~#', '.~#.#', '.~.~~'],\n    [0, 2],\n    6],\n   None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['..', '##'], ['.', '.', '~', '~', '.'], [1, 0], 6], 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":"f9318bfb1c574a86f5901f82b80fba8fb99b89684a83a6bb9800b2baa076083c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(floor_a, floor_b, entrance, min_dist):\n    for y in range(len(floor_a)):\n        for x in range(len(floor_a[0])):\n            if floor_a[y][x] != '.':\n                continue\n            if y >= len(floor_b) or x >= len(floor_b[0]) or floor_b[y][x] != '.':\n                continue\n            if abs(x - entrance[0]) + abs(y - entrance[1]) <= min_dist:\n                continue\n            return [x, y]\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('fault site distance threshold #1',\n   [['...', '.#.', '...', '..#', '###', '..#'], ['~.#.~', '##~~#', '~~#..', '.~.~.'], [2, 4], 5],\n   [1, 0]),\n  ('fault site distance threshold #2',\n   [['...##.', '..#.#.', '..#...', '#.....', '#.....'], ['#', '.', '.', '~'], [0, 2], 1],\n   [0, 1]),\n  ('partial repair boundary #1', [['#.#.', '...#'], ['...#~', '.....'], [3, 1], 4], None),\n  ('partial repair boundary #2',\n   [['.#', '#.', '#.', '..', '..', '#.'], ['~..##', '#..#.', '#.#~.', '..~.~', '~~~..'], [0, 0], 5],\n   None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['.', '#', '.', '#'], ['#.....'], [0, 1], 4], None)],\n [('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('fault site distance threshold #1',\n   [['...', '.#.', '...', '..#', '###', '..#'], ['~.#.~', '##~~#', '~~#..', '.~.~.'], [2, 4], 5],\n   [1, 0]),\n  ('fault site distance threshold #2',\n   [['...##.', '..#.#.', '..#...', '#.....', '#.....'], ['#', '.', '.', '~'], [0, 2], 1],\n   [0, 1]),\n  ('partial repair boundary #1',\n   [['.#', '#.', '#.', '..', '..', '#.'], ['~..##', '#..#.', '#.#~.', '..~.~', '~~~..'], [0, 0], 5],\n   None),\n  ('partial repair boundary #2',\n   [['.#.#', '#...', '..#.'], ['..#', '~~.', '~.#', '...', '#~.', '~#.'], [2, 0], 4],\n   None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['##', '.#', '#.', '.#', '.#'], ['##.', '...', '.~#'], [0, 0], 5], None),\n  ('control #2',\n   [['#....', '..#..', '#...#', '#..#.', '.#.#.', '.#.#.'],\n    ['#~..', '..~.', '..~.', '..#.', '##~~'],\n    [1, 4],\n    1],\n   [2, 0])],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('fault site distance threshold #1',\n   [['.', '.', '.'], ['.#.~', '~..~', '...~', '...~', '~~#.'], [0, 0], 2],\n   [0, 2]),\n  ('fault site distance threshold #2',\n   [['..##.', '.##..', '.##..'], ['..~', '.##', '..~', '...', '.##', '...'], [3, 2], 5],\n   [0, 0]),\n  ('partial repair boundary #1',\n   [['..', '..', '.#'], ['.#.#', '#~..', '#.#.', '..#.', '#...', '~~..'], [1, 2], 4],\n   None),\n  ('partial repair boundary #2',\n   [['..#.', '..#.', '..#.', '#...', '.#.#'], ['#..#', '.~#.', '.##~'], [0, 2], 5],\n   None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['##', '.#', '#.', '.#', '.#'], ['##.', '...', '.~#'], [0, 0], 5], None)],\n [('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('fault site distance threshold #1',\n   [['..###.', '.#.#..', '...##.', '###...', '.#..##'], ['#', '~', '.', '.', '.', '#'], [2, 2], 2],\n   [0, 2]),\n  ('fault site distance threshold #2',\n   [['..#..', '#..#.', '..#..', '.....', '.#...', '##.#.'],\n    ['~~.', '##.', '~#~', '###', '.##', '...'],\n    [2, 1],\n    0],\n   [2, 1]),\n  ('regression distance threshold #1',\n   [['#.#', '#..', '.##', '..#'], ['~~.#..', '...#~~', '#.#..#', '.....~', '~~#.~.'], [0, 2], 3],\n   [2, 1]),\n  ('partial repair boundary #1', [['..#..'], ['#.#~', '#...', '.~~#', '~.#.'], [2, 0], 2], None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['#..#', '..#.', '#.##'], ['.', '~', '.', '#'], [2, 2], 4], None),\n  ('control #2',\n   [['..', '..', '#.', '.#', '#.', '.#'], ['~.~', '~~~', '~#.', '~#.', '...', '##.'], [0, 4], 4],\n   [1, 0])],\n [('first row candidate #1', [['..', '..'], ['#.', '..'], [0, 0], 1], [1, 0]),\n  ('distance exactly min #1', [['...'], ['...'], [0, 0], 2], [2, 0]),\n  ('regression distance threshold #1',\n   [['#.#', '#..', '.##', '..#'], ['~~.#..', '...#~~', '#.#..#', '.....~', '~~#.~.'], [0, 2], 3],\n   [2, 1]),\n  ('fault site distance threshold #1',\n   [['###..', '.#.##', '.....', '.....', '#.##.'], ['~#..', '...#'], [0, 0], 3],\n   [3, 0]),\n  ('partial repair boundary #1',\n   [['#.', '.#'], ['#..#.#', '.~#~.#', '~~#.~.', '..#~~.', '##~..#', '.~#~.#'], [0, 0], 2],\n   None),\n  ('partial repair boundary #2',\n   [['.###', '....', '....', '....', '#...'],\n    ['~.#~.', '..#.~', '.###.', '.#.~#', '.~#.#', '.~.~~'],\n    [0, 2],\n    6],\n   None),\n  ('water below #1', [['.'], ['~'], [0, 0], 0], None),\n  ('control #1', [['..', '##'], ['.', '.', '~', '~', '.'], [1, 0], 6], 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-aligned-stairs-distance-threshold","generated_at":"2026-09-29T14:50:53.229568+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 distance test rejects cells exactly at min_dist.","sha256":"b5b8b85604f1448423f8dc230de12d8afbfc3329a6c5cfd4744326d7b7e54a3b","title":"Aligned stair placement: Exact minimum distance rejected · 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":40.478,"exit_code":1,"observations":[{"actual":[1,0],"check":"first row candidate #1","expected":[1,0],"passed":true},{"actual":[1,0],"check":"distance exactly min #1","expected":[2,0],"passed":false},{"actual":[1,0],"check":"fault site distance threshold #1","expected":[1,0],"passed":true},{"actual":[0,1],"check":"fault site distance threshold #2","expected":[0,1],"passed":true},{"actual":[1,0],"check":"partial repair boundary #1","expected":null,"passed":false},{"actual":[1,3],"check":"partial repair boundary #2","expected":null,"passed":false},{"actual":null,"check":"water below #1","expected":null,"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"first row candidate #1\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"distance exactly min #1\", \"actual\": [1, 0], \"expected\": [2, 0], \"passed\": false}, {\"check\": \"fault site distance threshold #1\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"fault site distance threshold #2\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": [1, 0], \"expected\": null, \"passed\": false}, {\"check\": \"partial repair boundary #2\", \"actual\": [1, 3], \"expected\": null, \"passed\": false}, {\"check\": \"water below #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #1\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.408,"exit_code":1,"observations":[{"actual":[1,1],"check":"first row candidate #1","expected":[1,0],"passed":false},{"actual":null,"check":"distance exactly min #1","expected":[2,0],"passed":false},{"actual":null,"check":"fault site distance threshold #1","expected":[1,0],"passed":false},{"actual":null,"check":"fault site distance threshold #2","expected":[0,1],"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":null,"check":"water below #1","expected":null,"passed":true},{"actual":null,"check":"control #1","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"first row candidate #1\", \"actual\": [1, 1], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"distance exactly min #1\", \"actual\": null, \"expected\": [2, 0], \"passed\": false}, {\"check\": \"fault site distance threshold #1\", \"actual\": null, \"expected\": [1, 0], \"passed\": false}, {\"check\": \"fault site distance threshold #2\", \"actual\": null, \"expected\": [0, 1], \"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\": \"water below #1\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control #1\", \"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."}}