FAILURE MAP
← Case archive

FA-86506 / Procedural level generation constraints / Open access

Chunk seed derivation: Transposed chunks share a seed · case 01

Chunk (3, 5) and (5, 3) generate identical terrain.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Both axes use the same multiplier, making the hash symmetric.

THE FAILURE

Both axes use the same multiplier, making the hash symmetric.

Unsuccessful approach: Hashing the coordinate sum makes whole diagonals collide.

Case contract

Coordinates are zigzag encoded (v >= 0 -> 2v, v < 0 -> -2v-1). seed = (world_seed*1000003 mod 2^32) xor (zz(cx)*73856093 mod 2^32) xor (zz(cy)*19349663 mod 2^32). The generator state is seed, or 1 when seed is 0, advanced by three 32-bit xorshift rounds (<<13, >>17, <<5, each left shift masked to 32 bits). Returns [seed, state % 100].

Why this case matters

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.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(world_seed, cx, cy):
    def zz(v):
        return v * 2 if v >= 0 else -v * 2 - 1
    s = (world_seed * 1000003) & 0xFFFFFFFF
    s ^= (zz(cx) * 73856093) & 0xFFFFFFFF
    s ^= (zz(cy) * 73856093) & 0xFFFFFFFF
    x = s or 1
    for _ in range(3):
        x ^= (x << 13) & 0xFFFFFFFF
        x ^= x >> 17
        x ^= (x << 5) & 0xFFFFFFFF
    return [s, x % 100]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('regression axis multiplier #1', [42, -1, 1], [78162845, 87]),
  ('fault site axis multiplier #1', [0, 0, 3], [116097978, 65]),
  ('regression axis multiplier #2', [1099511627779, -1, 155], [1640198686, 4]),
  ('regression axis multiplier #3', [1099511627779, 1, 1], [179220301, 79]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [1, 0, 0], [1000003, 82])],
 [('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('fault site axis multiplier #1', [0, 0, 3], [116097978, 65]),
  ('regression axis multiplier #1', [1099511627779, -1, 155], [1640198686, 4]),
  ('regression axis multiplier #2', [42, -1, 1], [78162845, 87]),
  ('regression axis multiplier #3', [1099511627779, 1, 1], [179220301, 79]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [1, 0, 0], [1000003, 82])],
 [('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('regression axis multiplier #1', [1099511627779, 1, 1], [179220301, 79]),
  ('regression axis multiplier #2', [0, 2, -3], [341807727, 72]),
  ('partial repair boundary #1', [1099511627779, -374, 0], [3628518806, 87]),
  ('regression axis multiplier #3', [1099511627779, -1, 3], [44085550, 32]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [2147483655, 0, 0], [2154483669, 77])],
 [('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('regression axis multiplier #1', [1099511627779, -1, 3], [44085550, 32]),
  ('regression axis multiplier #2', [1, -2, 1], [259333738, 52]),
  ('regression axis multiplier #3', [0, 2, -3], [341807727, 72]),
  ('partial repair boundary #1', [2147483655, -2, 0], [2371752642, 72]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [29957752378028, 0, 0], [3641309956, 8])],
 [('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('regression axis multiplier #1', [42, -1, -303], [3206913376, 67]),
  ('regression axis multiplier #2', [17601332116874, -1, 1], [1431083645, 95]),
  ('partial repair boundary #1', [2147483655, -2, 0], [2371752642, 72]),
  ('regression axis multiplier #3', [1, -2, 1], [259333738, 52]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [42, 0, 0], [42000126, 40])]]
for label, args, expected in cases[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
mirrored coordinates #1[906427993, 47][294384589, 20]Failed
negative neighbour chunk #1[115747491, 56][115747491, 56]Passed
regression axis multiplier #1[237748761, 93][78162845, 87]Failed
fault site axis multiplier #1[443136558, 49][116097978, 65]Failed
regression axis multiplier #2[1356913162, 20][1640198686, 4]Failed
regression axis multiplier #3[3000009, 29][179220301, 79]Failed
origin with zero seed #1[0, 61][0, 61]Passed
control #1[1000003, 82][1000003, 82]Passed

SHA-256 / b71450f29d8831755ce713bbcd9ce2017c8f31c5f9be6e920159dfd230f9d23a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(world_seed, cx, cy):
    def zz(v):
        return v * 2 if v >= 0 else -v * 2 - 1
    s = (world_seed * 1000003) & 0xFFFFFFFF
    s ^= (zz(cx) * 73856093) & 0xFFFFFFFF
    s ^= (zz(cx + cy) * 19349663) & 0xFFFFFFFF
    x = s or 1
    for _ in range(3):
        x ^= (x << 13) & 0xFFFFFFFF
        x ^= x >> 17
        x ^= (x << 5) & 0xFFFFFFFF
    return [s, x % 100]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('regression axis multiplier #1', [42, -1, 1], [78162845, 87]),
  ('fault site axis multiplier #1', [0, 0, 3], [116097978, 65]),
  ('regression axis multiplier #2', [1099511627779, -1, 155], [1640198686, 4]),
  ('regression axis multiplier #3', [1099511627779, 1, 1], [179220301, 79]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [1, 0, 0], [1000003, 82])],
 [('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('fault site axis multiplier #1', [0, 0, 3], [116097978, 65]),
  ('regression axis multiplier #1', [1099511627779, -1, 155], [1640198686, 4]),
  ('regression axis multiplier #2', [42, -1, 1], [78162845, 87]),
  ('regression axis multiplier #3', [1099511627779, 1, 1], [179220301, 79]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [1, 0, 0], [1000003, 82])],
 [('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('regression axis multiplier #1', [1099511627779, 1, 1], [179220301, 79]),
  ('regression axis multiplier #2', [0, 2, -3], [341807727, 72]),
  ('partial repair boundary #1', [1099511627779, -374, 0], [3628518806, 87]),
  ('regression axis multiplier #3', [1099511627779, -1, 3], [44085550, 32]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [2147483655, 0, 0], [2154483669, 77])],
 [('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('regression axis multiplier #1', [1099511627779, -1, 3], [44085550, 32]),
  ('regression axis multiplier #2', [1, -2, 1], [259333738, 52]),
  ('regression axis multiplier #3', [0, 2, -3], [341807727, 72]),
  ('partial repair boundary #1', [2147483655, -2, 0], [2371752642, 72]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [29957752378028, 0, 0], [3641309956, 8])],
 [('mirrored coordinates #1', [7, 3, 5], [294384589, 20]),
  ('negative neighbour chunk #1', [42, -1, 0], [115747491, 56]),
  ('regression axis multiplier #1', [42, -1, -303], [3206913376, 67]),
  ('regression axis multiplier #2', [17601332116874, -1, 1], [1431083645, 95]),
  ('partial repair boundary #1', [2147483655, -2, 0], [2371752642, 72]),
  ('regression axis multiplier #3', [1, -2, 1], [259333738, 52]),
  ('origin with zero seed #1', [0, 0, 0], [0, 61]),
  ('control #1', [42, 0, 0], [42000126, 40])]]
for label, args, expected in cases[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
mirrored coordinates #1[142048267, 81][294384589, 20]Failed
negative neighbour chunk #1[130116156, 65][115747491, 56]Failed
regression axis multiplier #1[115747491, 56][78162845, 87]Failed
fault site axis multiplier #1[116097978, 65][116097978, 65]Passed
regression axis multiplier #2[1735560664, 5][1640198686, 4]Failed
regression axis multiplier #3[209529871, 42][179220301, 79]Failed
origin with zero seed #1[0, 61][0, 61]Passed
control #1[1000003, 82][1000003, 82]Passed

SHA-256 / 5f381fcc676ac36232a85e3c22f188d1503cbc719c6b00df3f8fd57f179f34a4

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:50:50.198739+00:00.

Case digest / 28818aa47ab6493882a1bbfe1d7effc950ffc01a9055422da72d2a94f3407fbe