{"abstract":"The first column is smoothed with values from the opposite side.","category":"Procedural level generation constraints","checks":8,"contract":"Each cell height becomes floor(mean) of the in-bounds cells in its 3x3 window (input values only). Class: '~' when v < sea, 's' beach when v < sea+2, 'g' when v < mountain, otherwise '^'. Returns strings per row.","contract_signature":"heights, sea, mountain","evaluation_group":"w2-procedural-level-generation-constraints-height-classify","failed_approach":"Clamping at one excludes column zero from windows.","family":"w2-procedural-level-generation-constraints-height-classify-column-window-start","id":"FA-86721","implementations":{"attempt":{"sha256":"d33fbeddc60ead5305741d0d720442360bfcbed3558577a69079d63be8476616","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(heights, sea, mountain):\n    h = len(heights)\n    w = len(heights[0])\n    out = []\n    for r in range(h):\n        row = []\n        for c in range(w):\n            total = 0\n            cnt = 0\n            for rr in range(max(0, r - 1), min(h, r + 2)):\n                for cc in range(max(1, c - 1), min(w, c + 2)):\n                    total += heights[rr][cc]\n                    cnt += 1\n            v = total // cnt\n            if v < sea:\n                row.append('~')\n            elif v < sea + 2:\n                row.append('s')\n            elif v < mountain:\n                row.append('g')\n            else:\n                row.append('^')\n        out.append(''.join(row))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1', [[[10, 11, 6, 11, 0], [9, 0, 9, 4, 4]], 5, 7], ['^^ss~', '^^ss~']),\n  ('regression column window start #2',\n   [[[5, 4, 2, 6, 4], [12, 10, 8, 2, 4], [4, 10, 11, 2, 6]], 2, 8],\n   ['ggggg', 'ggggg', '^^ggs']),\n  ('partial repair boundary #1',\n   [[[8, 6, 12, 10, 8], [6, 1, 1, 7, 5], [1, 6, 12, 6, 0], [3, 8, 3, 6, 0], [1, 7, 3, 2, 0]], 6, 9],\n   ['~~sss', '~~sss', '~~~~~', '~~~~~', '~~~~~']),\n  ('regression column window start #3', [[[5, 5], [10, 3], [7, 0]], 2, 10], ['gg', 'gg', 'gg']),\n  ('control #1', [[[0, 9], [7, 2]], 2, 11], ['gg', 'gg']),\n  ('control #2', [[[9, 5, 6], [9, 0, 4]], 6, 10], ['~~~', '~~~'])],\n [('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1',\n   [[[5, 4, 2, 6, 4], [12, 10, 8, 2, 4], [4, 10, 11, 2, 6]], 2, 8],\n   ['ggggg', 'ggggg', '^^ggs']),\n  ('regression column window start #2', [[[5, 5], [10, 3], [7, 0]], 2, 10], ['gg', 'gg', 'gg']),\n  ('regression column window start #3', [[[10, 11, 6, 11, 0], [9, 0, 9, 4, 4]], 5, 7], ['^^ss~', '^^ss~']),\n  ('partial repair boundary #1',\n   [[[8, 6, 12, 10, 8], [6, 1, 1, 7, 5], [1, 6, 12, 6, 0], [3, 8, 3, 6, 0], [1, 7, 3, 2, 0]], 6, 9],\n   ['~~sss', '~~sss', '~~~~~', '~~~~~', '~~~~~']),\n  ('control #1', [[[10, 11], [1, 0]], 3, 9], ['gg', 'gg']),\n  ('control #2', [[[9, 7]], 2, 6], ['^^'])],\n [('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1',\n   [[[2, 9, 4, 10, 11], [7, 7, 11, 1, 10], [11, 5, 12, 1, 12], [9, 4, 1, 0, 2]], 6, 8],\n   ['ssss^', 'sss^s', 'ss~~~', 'ss~~~']),\n  ('regression column window start #2',\n   [[[0, 3], [6, 9], [0, 3], [3, 12], [7, 10]], 5, 6],\n   ['~~', '~~', 'ss', 'ss', '^^']),\n  ('partial repair boundary #1',\n   [[[8, 6, 12, 10, 8], [6, 1, 1, 7, 5], [1, 6, 12, 6, 0], [3, 8, 3, 6, 0], [1, 7, 3, 2, 0]], 6, 9],\n   ['~~sss', '~~sss', '~~~~~', '~~~~~', '~~~~~']),\n  ('regression column window start #3', [[[5, 5], [10, 3], [7, 0]], 2, 10], ['gg', 'gg', 'gg']),\n  ('control #1',\n   [[[4, 3, 3, 1], [4, 1, 10, 9], [2, 2, 10, 5], [0, 0, 7, 2]], 6, 8],\n   ['~~~~', '~~~s', '~~~s', '~~~s']),\n  ('control #2', [[[7, 8], [6, 2], [5, 5], [4, 11]], 2, 11], ['gg', 'gg', 'gg', 'gg'])],\n [('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1', [[[11, 0, 4, 12]], 2, 7], ['ggg^']),\n  ('regression column window start #2',\n   [[[4, 5, 6, 9, 9], [8, 11, 8, 5, 5], [10, 12, 11, 0, 3]], 6, 11],\n   ['sssss', 'ggss~', 'ggs~~']),\n  ('regression column window start #3',\n   [[[2, 9, 4, 10, 11], [7, 7, 11, 1, 10], [11, 5, 12, 1, 12], [9, 4, 1, 0, 2]], 6, 8],\n   ['ssss^', 'sss^s', 'ss~~~', 'ss~~~']),\n  ('partial repair boundary #1', [[[1, 2, 10]], 6, 9], ['~~s']),\n  ('control #1', [[[7, 6], [5, 12], [1, 6], [10, 10], [8, 3]], 3, 6], ['^^', '^^', '^^', '^^', '^^']),\n  ('control #2', [[[5, 3, 0, 8]], 6, 7], ['~~~~'])],\n [('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1', [[[0, 3, 3], [0, 1, 5], [4, 0, 5]], 2, 6], ['~ss', '~ss', '~ss']),\n  ('regression column window start #2',\n   [[[12, 10, 4, 10], [2, 0, 12, 2], [9, 12, 4, 8], [3, 9, 11, 3], [12, 5, 11, 6]], 5, 10],\n   ['sssg', 'ggss', 'ssss', 'gggg', 'gggg']),\n  ('partial repair boundary #1', [[[0, 1], [3, 5], [10, 1]], 3, 10], ['~~', 'ss', 'ss']),\n  ('partial repair boundary #2',\n   [[[1, 2, 0, 4], [12, 1, 9, 7], [9, 3, 6, 5]], 2, 11],\n   ['ggsg', 'gggg', 'gggg']),\n  ('control #1', [[[5, 9, 0, 8, 5], [12, 12, 0, 1, 8]], 2, 11], ['gggsg', 'gggsg']),\n  ('control #2',\n   [[[6, 10, 8, 0], [6, 10, 7, 12], [10, 7, 5, 3], [4, 11, 0, 1], [1, 2, 7, 12]], 2, 7],\n   ['^^^g', '^^gg', '^ggg', 'gggg', 'gggg'])]]\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":"4cc54ad8107e077d6b9ac0515fb999350a967fbff2f0612c57965448611c4f21","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(heights, sea, mountain):\n    h = len(heights)\n    w = len(heights[0])\n    out = []\n    for r in range(h):\n        row = []\n        for c in range(w):\n            total = 0\n            cnt = 0\n            for rr in range(max(0, r - 1), min(h, r + 2)):\n                for cc in range(c - 1, min(w, c + 2)):\n                    total += heights[rr][cc]\n                    cnt += 1\n            v = total // cnt\n            if v < sea:\n                row.append('~')\n            elif v < sea + 2:\n                row.append('s')\n            elif v < mountain:\n                row.append('g')\n            else:\n                row.append('^')\n        out.append(''.join(row))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1', [[[10, 11, 6, 11, 0], [9, 0, 9, 4, 4]], 5, 7], ['^^ss~', '^^ss~']),\n  ('regression column window start #2',\n   [[[5, 4, 2, 6, 4], [12, 10, 8, 2, 4], [4, 10, 11, 2, 6]], 2, 8],\n   ['ggggg', 'ggggg', '^^ggs']),\n  ('partial repair boundary #1',\n   [[[8, 6, 12, 10, 8], [6, 1, 1, 7, 5], [1, 6, 12, 6, 0], [3, 8, 3, 6, 0], [1, 7, 3, 2, 0]], 6, 9],\n   ['~~sss', '~~sss', '~~~~~', '~~~~~', '~~~~~']),\n  ('regression column window start #3', [[[5, 5], [10, 3], [7, 0]], 2, 10], ['gg', 'gg', 'gg']),\n  ('control #1', [[[0, 9], [7, 2]], 2, 11], ['gg', 'gg']),\n  ('control #2', [[[9, 5, 6], [9, 0, 4]], 6, 10], ['~~~', '~~~'])],\n [('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1',\n   [[[5, 4, 2, 6, 4], [12, 10, 8, 2, 4], [4, 10, 11, 2, 6]], 2, 8],\n   ['ggggg', 'ggggg', '^^ggs']),\n  ('regression column window start #2', [[[5, 5], [10, 3], [7, 0]], 2, 10], ['gg', 'gg', 'gg']),\n  ('regression column window start #3', [[[10, 11, 6, 11, 0], [9, 0, 9, 4, 4]], 5, 7], ['^^ss~', '^^ss~']),\n  ('partial repair boundary #1',\n   [[[8, 6, 12, 10, 8], [6, 1, 1, 7, 5], [1, 6, 12, 6, 0], [3, 8, 3, 6, 0], [1, 7, 3, 2, 0]], 6, 9],\n   ['~~sss', '~~sss', '~~~~~', '~~~~~', '~~~~~']),\n  ('control #1', [[[10, 11], [1, 0]], 3, 9], ['gg', 'gg']),\n  ('control #2', [[[9, 7]], 2, 6], ['^^'])],\n [('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1',\n   [[[2, 9, 4, 10, 11], [7, 7, 11, 1, 10], [11, 5, 12, 1, 12], [9, 4, 1, 0, 2]], 6, 8],\n   ['ssss^', 'sss^s', 'ss~~~', 'ss~~~']),\n  ('regression column window start #2',\n   [[[0, 3], [6, 9], [0, 3], [3, 12], [7, 10]], 5, 6],\n   ['~~', '~~', 'ss', 'ss', '^^']),\n  ('partial repair boundary #1',\n   [[[8, 6, 12, 10, 8], [6, 1, 1, 7, 5], [1, 6, 12, 6, 0], [3, 8, 3, 6, 0], [1, 7, 3, 2, 0]], 6, 9],\n   ['~~sss', '~~sss', '~~~~~', '~~~~~', '~~~~~']),\n  ('regression column window start #3', [[[5, 5], [10, 3], [7, 0]], 2, 10], ['gg', 'gg', 'gg']),\n  ('control #1',\n   [[[4, 3, 3, 1], [4, 1, 10, 9], [2, 2, 10, 5], [0, 0, 7, 2]], 6, 8],\n   ['~~~~', '~~~s', '~~~s', '~~~s']),\n  ('control #2', [[[7, 8], [6, 2], [5, 5], [4, 11]], 2, 11], ['gg', 'gg', 'gg', 'gg'])],\n [('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1', [[[11, 0, 4, 12]], 2, 7], ['ggg^']),\n  ('regression column window start #2',\n   [[[4, 5, 6, 9, 9], [8, 11, 8, 5, 5], [10, 12, 11, 0, 3]], 6, 11],\n   ['sssss', 'ggss~', 'ggs~~']),\n  ('regression column window start #3',\n   [[[2, 9, 4, 10, 11], [7, 7, 11, 1, 10], [11, 5, 12, 1, 12], [9, 4, 1, 0, 2]], 6, 8],\n   ['ssss^', 'sss^s', 'ss~~~', 'ss~~~']),\n  ('partial repair boundary #1', [[[1, 2, 10]], 6, 9], ['~~s']),\n  ('control #1', [[[7, 6], [5, 12], [1, 6], [10, 10], [8, 3]], 3, 6], ['^^', '^^', '^^', '^^', '^^']),\n  ('control #2', [[[5, 3, 0, 8]], 6, 7], ['~~~~'])],\n [('single row #1', [[[0, 12, 0]], 3, 6], ['^s^']),\n  ('corner cell average #1', [[[9, 9], [9, 0]], 3, 8], ['gg', 'gg']),\n  ('regression column window start #1', [[[0, 3, 3], [0, 1, 5], [4, 0, 5]], 2, 6], ['~ss', '~ss', '~ss']),\n  ('regression column window start #2',\n   [[[12, 10, 4, 10], [2, 0, 12, 2], [9, 12, 4, 8], [3, 9, 11, 3], [12, 5, 11, 6]], 5, 10],\n   ['sssg', 'ggss', 'ssss', 'gggg', 'gggg']),\n  ('partial repair boundary #1', [[[0, 1], [3, 5], [10, 1]], 3, 10], ['~~', 'ss', 'ss']),\n  ('partial repair boundary #2',\n   [[[1, 2, 0, 4], [12, 1, 9, 7], [9, 3, 6, 5]], 2, 11],\n   ['ggsg', 'gggg', 'gggg']),\n  ('control #1', [[[5, 9, 0, 8, 5], [12, 12, 0, 1, 8]], 2, 11], ['gggsg', 'gggsg']),\n  ('control #2',\n   [[[6, 10, 8, 0], [6, 10, 7, 12], [10, 7, 5, 3], [4, 11, 0, 1], [1, 2, 7, 12]], 2, 7],\n   ['^^^g', '^^gg', '^ggg', 'gggg', 'gggg'])]]\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-height-classify-column-window-start","generated_at":"2026-09-29T14:50:52.169921+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 column window is not clamped at zero, so index -1 wraps.","sha256":"237e44f64e117c21cc9e008c6c31caf88f13ca7def05b75bd9f5f0865162f443","title":"Heightmap smoothing and biome classes: Left edge wraps to the right edge · 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":41.06,"exit_code":1,"observations":[{"actual":["^^^"],"check":"single row #1","expected":["^s^"],"passed":false},{"actual":["ss","ss"],"check":"corner cell average #1","expected":["gg","gg"],"passed":false},{"actual":["ssss~","ssss~"],"check":"regression column window start #1","expected":["^^ss~","^^ss~"],"passed":false},{"actual":["ggggg","^gggg","^^ggs"],"check":"regression column window start #2","expected":["ggggg","ggggg","^^ggs"],"passed":false},{"actual":["~~sss","~ssss","~~~~~","ss~~~","s~~~~"],"check":"partial repair boundary #1","expected":["~~sss","~~sss","~~~~~","~~~~~","~~~~~"],"passed":false},{"actual":["gg","ss","~~"],"check":"regression column window start #3","expected":["gg","gg","gg"],"passed":false},{"actual":["gg","gg"],"check":"control #1","expected":["gg","gg"],"passed":true},{"actual":["~~~","~~~"],"check":"control #2","expected":["~~~","~~~"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single row #1\", \"actual\": [\"^^^\"], \"expected\": [\"^s^\"], \"passed\": false}, {\"check\": \"corner cell average #1\", \"actual\": [\"ss\", \"ss\"], \"expected\": [\"gg\", \"gg\"], \"passed\": false}, {\"check\": \"regression column window start #1\", \"actual\": [\"ssss~\", \"ssss~\"], \"expected\": [\"^^ss~\", \"^^ss~\"], \"passed\": false}, {\"check\": \"regression column window start #2\", \"actual\": [\"ggggg\", \"^gggg\", \"^^ggs\"], \"expected\": [\"ggggg\", \"ggggg\", \"^^ggs\"], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [\"~~sss\", \"~ssss\", \"~~~~~\", \"ss~~~\", \"s~~~~\"], \"expected\": [\"~~sss\", \"~~sss\", \"~~~~~\", \"~~~~~\", \"~~~~~\"], \"passed\": false}, {\"check\": \"regression column window start #3\", \"actual\": [\"gg\", \"ss\", \"~~\"], \"expected\": [\"gg\", \"gg\", \"gg\"], \"passed\": false}, {\"check\": \"control #1\", \"actual\": [\"gg\", \"gg\"], \"expected\": [\"gg\", \"gg\"], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [\"~~~\", \"~~~\"], \"expected\": [\"~~~\", \"~~~\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.364,"exit_code":1,"observations":[{"actual":["ss^"],"check":"single row #1","expected":["^s^"],"passed":false},{"actual":["gg","gg"],"check":"corner cell average #1","expected":["gg","gg"],"passed":true},{"actual":["s^ss~","s^ss~"],"check":"regression column window start #1","expected":["^^ss~","^^ss~"],"passed":false},{"actual":["ggggg","ggggg","g^ggs"],"check":"regression column window start #2","expected":["ggggg","ggggg","^^ggs"],"passed":false},{"actual":["~~sss","~~sss","~~~~~","~~~~~","~~~~~"],"check":"partial repair boundary #1","expected":["~~sss","~~sss","~~~~~","~~~~~","~~~~~"],"passed":true},{"actual":["gg","gg","sg"],"check":"regression column window start #3","expected":["gg","gg","gg"],"passed":false},{"actual":["gg","gg"],"check":"control #1","expected":["gg","gg"],"passed":true},{"actual":["~~~","~~~"],"check":"control #2","expected":["~~~","~~~"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single row #1\", \"actual\": [\"ss^\"], \"expected\": [\"^s^\"], \"passed\": false}, {\"check\": \"corner cell average #1\", \"actual\": [\"gg\", \"gg\"], \"expected\": [\"gg\", \"gg\"], \"passed\": true}, {\"check\": \"regression column window start #1\", \"actual\": [\"s^ss~\", \"s^ss~\"], \"expected\": [\"^^ss~\", \"^^ss~\"], \"passed\": false}, {\"check\": \"regression column window start #2\", \"actual\": [\"ggggg\", \"ggggg\", \"g^ggs\"], \"expected\": [\"ggggg\", \"ggggg\", \"^^ggs\"], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [\"~~sss\", \"~~sss\", \"~~~~~\", \"~~~~~\", \"~~~~~\"], \"expected\": [\"~~sss\", \"~~sss\", \"~~~~~\", \"~~~~~\", \"~~~~~\"], \"passed\": true}, {\"check\": \"regression column window start #3\", \"actual\": [\"gg\", \"gg\", \"sg\"], \"expected\": [\"gg\", \"gg\", \"gg\"], \"passed\": false}, {\"check\": \"control #1\", \"actual\": [\"gg\", \"gg\"], \"expected\": [\"gg\", \"gg\"], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [\"~~~\", \"~~~\"], \"expected\": [\"~~~\", \"~~~\"], \"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."}}