FAILURE MAP
← Case archive

FA-86496 / Procedural level generation constraints / Open access

Strip wave-function propagation: One-sided support keeps tiles · case 01

Tiles unsupported on one side survive propagation.

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

ROOT CAUSE

A tile is kept when either side supports it.

VERIFIED REPAIR

Restore `if ok_left and ok_right:` at the support conjunction step.

Unsuccessful approach: Checking only the left side ignores right-hand constraints.

Case contract

A 1D strip of cells, each with a domain of tiles; rules[t] lists tiles allowed immediately to the right of t. Repeatedly remove tile t from cell i unless (i is first or some tile l in cell i-1 allows t on its right) and (i is last or t allows some tile in cell i+1), until stable. Domains are returned as sorted unique lists with a contradiction flag (any empty domain).

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(domains, rules):
    dom = [sorted(set(d)) for d in domains]
    changed = True
    while changed:
        changed = False
        for i in range(len(dom)):
            keep = []
            for t in dom[i]:
                ok_left = i == 0 or any(t in rules.get(l, []) for l in dom[i - 1])
                ok_right = i == len(dom) - 1 or any(r in rules.get(t, []) for r in dom[i + 1])
                if ok_left or ok_right:
                    keep.append(t)
            if keep != dom[i]:
                dom[i] = keep
                changed = True
    return {'domains': dom, 'contradiction': any(not d for d in dom)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('fault site support conjunction #1',
   [[['hill'], ['sand', 'hill'], ['sea'], ['grass', 'sand', 'sea', 'hill'], ['sea']],
    {'sea': ['hill', 'sea'],
     'sand': ['grass', 'hill', 'sea'],
     'grass': ['hill', 'sea'],
     'hill': ['sand', 'sea']}],
   {'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['hill', 'sea', 'grass', 'sea'],
     ['sea', 'sand', 'grass', 'hill'],
     ['sand', 'sea'],
     ['sand', 'hill', 'sea', 'grass']],
    {'sea': ['grass', 'hill'], 'sand': ['hill', 'sand'], 'grass': ['sea'], 'hill': ['sand']}],
   {'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['grass', 'sand', 'sea']],
    {'sea': ['grass', 'sand'], 'sand': ['hill'], 'grass': ['hill'], 'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['grass', 'sea']], 'contradiction': False})],
 [('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('fault site support conjunction #1',
   [[['hill'], ['sand', 'hill'], ['sea'], ['grass', 'sand', 'sea', 'hill'], ['sea']],
    {'sea': ['hill', 'sea'],
     'sand': ['grass', 'hill', 'sea'],
     'grass': ['hill', 'sea'],
     'hill': ['sand', 'sea']}],
   {'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['hill', 'sea', 'grass', 'sea'],
     ['sea', 'sand', 'grass', 'hill'],
     ['sand', 'sea'],
     ['sand', 'hill', 'sea', 'grass']],
    {'sea': ['grass', 'hill'], 'sand': ['hill', 'sand'], 'grass': ['sea'], 'hill': ['sand']}],
   {'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #3',
   [[['sea', 'sand'], ['hill'], ['sand', 'sea'], ['sea', 'grass', 'hill']],
    {'sea': ['sand'], 'sand': ['grass', 'sand'], 'grass': ['sea'], 'hill': ['grass']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['grass', 'sand', 'sea']],
    {'sea': ['grass', 'sand'], 'sand': ['hill'], 'grass': ['hill'], 'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False})],
 [('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('regression support conjunction #1',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #2',
   [[['sea', 'sand'], ['hill'], ['sand', 'sea'], ['sea', 'grass', 'hill']],
    {'sea': ['sand'], 'sand': ['grass', 'sand'], 'grass': ['sea'], 'hill': ['grass']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('regression support conjunction #3',
   [[['sea', 'hill', 'grass', 'sand'],
     ['grass', 'sand', 'hill', 'sea'],
     ['hill'],
     ['sea', 'sand', 'sand'],
     ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #4',
   [[['sea', 'hill'], ['sea', 'hill', 'grass'], ['sea', 'sand', 'grass', 'hill']],
    {'sea': ['sand'],
     'sand': ['grass', 'sand', 'sea'],
     'grass': ['hill', 'sand', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['hill'], ['grass', 'hill', 'sea'], ['grass', 'hill', 'sand', 'sea']],
    'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['sand', 'hill', 'sea']],
    {'sea': ['sand', 'sea'],
     'sand': ['grass', 'hill'],
     'grass': ['grass', 'hill', 'sand'],
     'hill': ['hill', 'sand', 'sea']}],
   {'domains': [['hill', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['sand']],
    {'sea': ['sea'],
     'sand': ['hill', 'sand', 'sea'],
     'grass': ['grass', 'hill', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['sand']], 'contradiction': False})],
 [('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('fault site support conjunction #1',
   [[['grass'], ['grass', 'sea', 'sand', 'hill']],
    {'sea': ['grass', 'sand', 'sea'],
     'sand': ['grass', 'sand'],
     'grass': ['grass', 'hill'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass'], ['grass', 'hill']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['sea', 'hill', 'grass', 'sand'],
     ['grass', 'sand', 'hill', 'sea'],
     ['hill'],
     ['sea', 'sand', 'sand'],
     ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #2',
   [[['hill', 'grass', 'sea'], ['grass']],
    {'sea': ['grass', 'sand', 'sea'], 'sand': ['grass', 'sea'], 'grass': ['sea'], 'hill': ['sand', 'sea']}],
   {'domains': [['sea'], ['grass']], 'contradiction': False}),
  ('regression support conjunction #3',
   [[['hill', 'grass', 'sand'],
     ['sand', 'sea'],
     ['sand', 'sea', 'grass', 'hill'],
     ['sea'],
     ['grass', 'sea', 'hill']],
    {'sea': ['grass'], 'sand': ['grass', 'sand'], 'grass': ['grass', 'hill', 'sea'], 'hill': ['sea']}],
   {'domains': [['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass'], ['sea'], ['grass']],
    'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['hill', 'grass', 'sand', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['grass', 'hill', 'sand', 'sea']], 'contradiction': False})],
 [('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('regression support conjunction #1',
   [[['sea', 'hill'], ['sea', 'hill', 'grass'], ['sea', 'sand', 'grass', 'hill']],
    {'sea': ['sand'],
     'sand': ['grass', 'sand', 'sea'],
     'grass': ['hill', 'sand', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['hill'], ['grass', 'hill', 'sea'], ['grass', 'hill', 'sand', 'sea']],
    'contradiction': False}),
  ('fault site support conjunction #1',
   [[['hill', 'grass', 'sand', 'sea'],
     ['sea', 'sand', 'hill', 'grass'],
     ['sand', 'sea', 'grass', 'hill', 'sea']],
    {'sea': ['sand'], 'sand': ['hill', 'sand'], 'grass': ['sand', 'sea'], 'hill': ['sand']}],
   {'domains': [['grass', 'hill', 'sand', 'sea'], ['hill', 'sand', 'sea'], ['hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['sand', 'sea', 'hill', 'grass'],
     ['hill', 'sea', 'grass', 'sand'],
     ['grass', 'sand', 'sea'],
     ['grass', 'sea', 'grass'],
     ['grass', 'hill', 'sea']],
    {'sea': ['hill'], 'sand': ['hill', 'sand'], 'grass': ['hill'], 'hill': ['hill']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #3',
   [[['sea'], ['sand', 'sea'], ['hill', 'sand', 'sea'], ['sea', 'hill', 'sea']],
    {'sea': ['grass', 'hill'], 'sand': ['hill'], 'grass': ['hill', 'sea'], 'hill': ['sand', 'sea']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['sea', 'grass', 'sand']],
    {'sea': ['hill'], 'sand': ['sea'], 'grass': ['grass', 'sand', 'sea'], 'hill': ['hill']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['hill', 'sea', 'grass', 'sand'], ['sea', 'grass', 'sand']],
    {'sea': ['hill', 'sand'], 'sand': ['grass', 'hill', 'sand'], 'grass': ['grass'], 'hill': ['sea']}],
   {'domains': [['grass', 'hill', 'sand', 'sea'], ['grass', 'sand', 'sea']], 'contradiction': False})]]
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
coast gradient #1{'contradiction': False, 'domains': [['sea'], ['grass', 'sand', 'sea'], ['hill']]}{'contradiction': True, 'domains': [[], [], []]}Failed
asymmetric rule #1{'contradiction': False, 'domains': [['sand'], ['grass', 'hill']]}{'contradiction': False, 'domains': [['sand'], ['grass']]}Failed
fault site support conjunction #1{'contradiction': False, 'domains': [['hill'], ['hill', 'sand'], ['sea'], ['grass', 'hill', 'sand', 'sea'], ['sea']]}{'contradiction': False, 'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']]}Failed
regression support conjunction #1{'contradiction': False, 'domains': [['grass', 'hill', 'sea'], ['grass', 'hill', 'sand', 'sea'], ['sand', 'sea'], ['grass', 'hill', 'sand', 'sea']]}{'contradiction': False, 'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']]}Failed
regression support conjunction #2{'contradiction': False, 'domains': [['hill', 'sea'], ['sand', 'sea'], ['hill', 'sea'], ['grass', 'hill', 'sea']]}{'contradiction': False, 'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']]}Failed
duplicate domain entries #1{'contradiction': False, 'domains': [['grass', 'sand']]}{'contradiction': False, 'domains': [['grass', 'sand']]}Passed
control #1{'contradiction': False, 'domains': [['grass', 'sand', 'sea']]}{'contradiction': False, 'domains': [['grass', 'sand', 'sea']]}Passed
control #2{'contradiction': False, 'domains': [['grass', 'sea']]}{'contradiction': False, 'domains': [['grass', 'sea']]}Passed

SHA-256 / 5c7b12e4cb37ea97246075b7b5af152b72207e9c2065aa40f7efec4c5e810c04

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(domains, rules):
    dom = [sorted(set(d)) for d in domains]
    changed = True
    while changed:
        changed = False
        for i in range(len(dom)):
            keep = []
            for t in dom[i]:
                ok_left = i == 0 or any(t in rules.get(l, []) for l in dom[i - 1])
                ok_right = i == len(dom) - 1 or any(r in rules.get(t, []) for r in dom[i + 1])
                if ok_left:
                    keep.append(t)
            if keep != dom[i]:
                dom[i] = keep
                changed = True
    return {'domains': dom, 'contradiction': any(not d for d in dom)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('fault site support conjunction #1',
   [[['hill'], ['sand', 'hill'], ['sea'], ['grass', 'sand', 'sea', 'hill'], ['sea']],
    {'sea': ['hill', 'sea'],
     'sand': ['grass', 'hill', 'sea'],
     'grass': ['hill', 'sea'],
     'hill': ['sand', 'sea']}],
   {'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['hill', 'sea', 'grass', 'sea'],
     ['sea', 'sand', 'grass', 'hill'],
     ['sand', 'sea'],
     ['sand', 'hill', 'sea', 'grass']],
    {'sea': ['grass', 'hill'], 'sand': ['hill', 'sand'], 'grass': ['sea'], 'hill': ['sand']}],
   {'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['grass', 'sand', 'sea']],
    {'sea': ['grass', 'sand'], 'sand': ['hill'], 'grass': ['hill'], 'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['grass', 'sea']], 'contradiction': False})],
 [('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('fault site support conjunction #1',
   [[['hill'], ['sand', 'hill'], ['sea'], ['grass', 'sand', 'sea', 'hill'], ['sea']],
    {'sea': ['hill', 'sea'],
     'sand': ['grass', 'hill', 'sea'],
     'grass': ['hill', 'sea'],
     'hill': ['sand', 'sea']}],
   {'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['hill', 'sea', 'grass', 'sea'],
     ['sea', 'sand', 'grass', 'hill'],
     ['sand', 'sea'],
     ['sand', 'hill', 'sea', 'grass']],
    {'sea': ['grass', 'hill'], 'sand': ['hill', 'sand'], 'grass': ['sea'], 'hill': ['sand']}],
   {'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #3',
   [[['sea', 'sand'], ['hill'], ['sand', 'sea'], ['sea', 'grass', 'hill']],
    {'sea': ['sand'], 'sand': ['grass', 'sand'], 'grass': ['sea'], 'hill': ['grass']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['grass', 'sand', 'sea']],
    {'sea': ['grass', 'sand'], 'sand': ['hill'], 'grass': ['hill'], 'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False})],
 [('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('regression support conjunction #1',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #2',
   [[['sea', 'sand'], ['hill'], ['sand', 'sea'], ['sea', 'grass', 'hill']],
    {'sea': ['sand'], 'sand': ['grass', 'sand'], 'grass': ['sea'], 'hill': ['grass']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('regression support conjunction #3',
   [[['sea', 'hill', 'grass', 'sand'],
     ['grass', 'sand', 'hill', 'sea'],
     ['hill'],
     ['sea', 'sand', 'sand'],
     ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #4',
   [[['sea', 'hill'], ['sea', 'hill', 'grass'], ['sea', 'sand', 'grass', 'hill']],
    {'sea': ['sand'],
     'sand': ['grass', 'sand', 'sea'],
     'grass': ['hill', 'sand', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['hill'], ['grass', 'hill', 'sea'], ['grass', 'hill', 'sand', 'sea']],
    'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['sand', 'hill', 'sea']],
    {'sea': ['sand', 'sea'],
     'sand': ['grass', 'hill'],
     'grass': ['grass', 'hill', 'sand'],
     'hill': ['hill', 'sand', 'sea']}],
   {'domains': [['hill', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['sand']],
    {'sea': ['sea'],
     'sand': ['hill', 'sand', 'sea'],
     'grass': ['grass', 'hill', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['sand']], 'contradiction': False})],
 [('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('fault site support conjunction #1',
   [[['grass'], ['grass', 'sea', 'sand', 'hill']],
    {'sea': ['grass', 'sand', 'sea'],
     'sand': ['grass', 'sand'],
     'grass': ['grass', 'hill'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass'], ['grass', 'hill']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['sea', 'hill', 'grass', 'sand'],
     ['grass', 'sand', 'hill', 'sea'],
     ['hill'],
     ['sea', 'sand', 'sand'],
     ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #2',
   [[['hill', 'grass', 'sea'], ['grass']],
    {'sea': ['grass', 'sand', 'sea'], 'sand': ['grass', 'sea'], 'grass': ['sea'], 'hill': ['sand', 'sea']}],
   {'domains': [['sea'], ['grass']], 'contradiction': False}),
  ('regression support conjunction #3',
   [[['hill', 'grass', 'sand'],
     ['sand', 'sea'],
     ['sand', 'sea', 'grass', 'hill'],
     ['sea'],
     ['grass', 'sea', 'hill']],
    {'sea': ['grass'], 'sand': ['grass', 'sand'], 'grass': ['grass', 'hill', 'sea'], 'hill': ['sea']}],
   {'domains': [['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass'], ['sea'], ['grass']],
    'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['hill', 'grass', 'sand', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['grass', 'hill', 'sand', 'sea']], 'contradiction': False})],
 [('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('regression support conjunction #1',
   [[['sea', 'hill'], ['sea', 'hill', 'grass'], ['sea', 'sand', 'grass', 'hill']],
    {'sea': ['sand'],
     'sand': ['grass', 'sand', 'sea'],
     'grass': ['hill', 'sand', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['hill'], ['grass', 'hill', 'sea'], ['grass', 'hill', 'sand', 'sea']],
    'contradiction': False}),
  ('fault site support conjunction #1',
   [[['hill', 'grass', 'sand', 'sea'],
     ['sea', 'sand', 'hill', 'grass'],
     ['sand', 'sea', 'grass', 'hill', 'sea']],
    {'sea': ['sand'], 'sand': ['hill', 'sand'], 'grass': ['sand', 'sea'], 'hill': ['sand']}],
   {'domains': [['grass', 'hill', 'sand', 'sea'], ['hill', 'sand', 'sea'], ['hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['sand', 'sea', 'hill', 'grass'],
     ['hill', 'sea', 'grass', 'sand'],
     ['grass', 'sand', 'sea'],
     ['grass', 'sea', 'grass'],
     ['grass', 'hill', 'sea']],
    {'sea': ['hill'], 'sand': ['hill', 'sand'], 'grass': ['hill'], 'hill': ['hill']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #3',
   [[['sea'], ['sand', 'sea'], ['hill', 'sand', 'sea'], ['sea', 'hill', 'sea']],
    {'sea': ['grass', 'hill'], 'sand': ['hill'], 'grass': ['hill', 'sea'], 'hill': ['sand', 'sea']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['sea', 'grass', 'sand']],
    {'sea': ['hill'], 'sand': ['sea'], 'grass': ['grass', 'sand', 'sea'], 'hill': ['hill']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['hill', 'sea', 'grass', 'sand'], ['sea', 'grass', 'sand']],
    {'sea': ['hill', 'sand'], 'sand': ['grass', 'hill', 'sand'], 'grass': ['grass'], 'hill': ['sea']}],
   {'domains': [['grass', 'hill', 'sand', 'sea'], ['grass', 'sand', 'sea']], 'contradiction': False})]]
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
coast gradient #1{'contradiction': True, 'domains': [['sea'], ['sand', 'sea'], []]}{'contradiction': True, 'domains': [[], [], []]}Failed
asymmetric rule #1{'contradiction': False, 'domains': [['sand'], ['grass']]}{'contradiction': False, 'domains': [['sand'], ['grass']]}Passed
fault site support conjunction #1{'contradiction': False, 'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']]}{'contradiction': False, 'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']]}Passed
regression support conjunction #1{'contradiction': False, 'domains': [['grass', 'hill', 'sea'], ['grass', 'hill', 'sand', 'sea'], ['sand', 'sea'], ['grass', 'hill', 'sand']]}{'contradiction': False, 'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']]}Failed
regression support conjunction #2{'contradiction': False, 'domains': [['hill', 'sea'], ['sand', 'sea'], ['sea'], ['sea']]}{'contradiction': False, 'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']]}Failed
duplicate domain entries #1{'contradiction': False, 'domains': [['grass', 'sand']]}{'contradiction': False, 'domains': [['grass', 'sand']]}Passed
control #1{'contradiction': False, 'domains': [['grass', 'sand', 'sea']]}{'contradiction': False, 'domains': [['grass', 'sand', 'sea']]}Passed
control #2{'contradiction': False, 'domains': [['grass', 'sea']]}{'contradiction': False, 'domains': [['grass', 'sea']]}Passed

SHA-256 / e7e4213741d52bd27d8dde6b1514851d9058dc009ec8082cb293742794681b36

3 / The verified repair

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

N = 1
observations = []
def solve(domains, rules):
    dom = [sorted(set(d)) for d in domains]
    changed = True
    while changed:
        changed = False
        for i in range(len(dom)):
            keep = []
            for t in dom[i]:
                ok_left = i == 0 or any(t in rules.get(l, []) for l in dom[i - 1])
                ok_right = i == len(dom) - 1 or any(r in rules.get(t, []) for r in dom[i + 1])
                if ok_left and ok_right:
                    keep.append(t)
            if keep != dom[i]:
                dom[i] = keep
                changed = True
    return {'domains': dom, 'contradiction': any(not d for d in dom)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('fault site support conjunction #1',
   [[['hill'], ['sand', 'hill'], ['sea'], ['grass', 'sand', 'sea', 'hill'], ['sea']],
    {'sea': ['hill', 'sea'],
     'sand': ['grass', 'hill', 'sea'],
     'grass': ['hill', 'sea'],
     'hill': ['sand', 'sea']}],
   {'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['hill', 'sea', 'grass', 'sea'],
     ['sea', 'sand', 'grass', 'hill'],
     ['sand', 'sea'],
     ['sand', 'hill', 'sea', 'grass']],
    {'sea': ['grass', 'hill'], 'sand': ['hill', 'sand'], 'grass': ['sea'], 'hill': ['sand']}],
   {'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['grass', 'sand', 'sea']],
    {'sea': ['grass', 'sand'], 'sand': ['hill'], 'grass': ['hill'], 'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['grass', 'sea']], 'contradiction': False})],
 [('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('fault site support conjunction #1',
   [[['hill'], ['sand', 'hill'], ['sea'], ['grass', 'sand', 'sea', 'hill'], ['sea']],
    {'sea': ['hill', 'sea'],
     'sand': ['grass', 'hill', 'sea'],
     'grass': ['hill', 'sea'],
     'hill': ['sand', 'sea']}],
   {'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['hill', 'sea', 'grass', 'sea'],
     ['sea', 'sand', 'grass', 'hill'],
     ['sand', 'sea'],
     ['sand', 'hill', 'sea', 'grass']],
    {'sea': ['grass', 'hill'], 'sand': ['hill', 'sand'], 'grass': ['sea'], 'hill': ['sand']}],
   {'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #3',
   [[['sea', 'sand'], ['hill'], ['sand', 'sea'], ['sea', 'grass', 'hill']],
    {'sea': ['sand'], 'sand': ['grass', 'sand'], 'grass': ['sea'], 'hill': ['grass']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['grass', 'sand', 'sea']],
    {'sea': ['grass', 'sand'], 'sand': ['hill'], 'grass': ['hill'], 'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False})],
 [('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('regression support conjunction #1',
   [[['hill', 'sea'], ['sea', 'hill', 'sand'], ['hill', 'sea'], ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']], 'contradiction': False}),
  ('regression support conjunction #2',
   [[['sea', 'sand'], ['hill'], ['sand', 'sea'], ['sea', 'grass', 'hill']],
    {'sea': ['sand'], 'sand': ['grass', 'sand'], 'grass': ['sea'], 'hill': ['grass']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('regression support conjunction #3',
   [[['sea', 'hill', 'grass', 'sand'],
     ['grass', 'sand', 'hill', 'sea'],
     ['hill'],
     ['sea', 'sand', 'sand'],
     ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #4',
   [[['sea', 'hill'], ['sea', 'hill', 'grass'], ['sea', 'sand', 'grass', 'hill']],
    {'sea': ['sand'],
     'sand': ['grass', 'sand', 'sea'],
     'grass': ['hill', 'sand', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['hill'], ['grass', 'hill', 'sea'], ['grass', 'hill', 'sand', 'sea']],
    'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['sand', 'hill', 'sea']],
    {'sea': ['sand', 'sea'],
     'sand': ['grass', 'hill'],
     'grass': ['grass', 'hill', 'sand'],
     'hill': ['hill', 'sand', 'sea']}],
   {'domains': [['hill', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['sand']],
    {'sea': ['sea'],
     'sand': ['hill', 'sand', 'sea'],
     'grass': ['grass', 'hill', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['sand']], 'contradiction': False})],
 [('asymmetric rule #1',
   [[['sand'], ['hill', 'grass']], {'sand': ['grass'], 'grass': ['sand'], 'hill': ['sand']}],
   {'domains': [['sand'], ['grass']], 'contradiction': False}),
  ('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('fault site support conjunction #1',
   [[['grass'], ['grass', 'sea', 'sand', 'hill']],
    {'sea': ['grass', 'sand', 'sea'],
     'sand': ['grass', 'sand'],
     'grass': ['grass', 'hill'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['grass'], ['grass', 'hill']], 'contradiction': False}),
  ('regression support conjunction #1',
   [[['sea', 'hill', 'grass', 'sand'],
     ['grass', 'sand', 'hill', 'sea'],
     ['hill'],
     ['sea', 'sand', 'sand'],
     ['hill', 'grass', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #2',
   [[['hill', 'grass', 'sea'], ['grass']],
    {'sea': ['grass', 'sand', 'sea'], 'sand': ['grass', 'sea'], 'grass': ['sea'], 'hill': ['sand', 'sea']}],
   {'domains': [['sea'], ['grass']], 'contradiction': False}),
  ('regression support conjunction #3',
   [[['hill', 'grass', 'sand'],
     ['sand', 'sea'],
     ['sand', 'sea', 'grass', 'hill'],
     ['sea'],
     ['grass', 'sea', 'hill']],
    {'sea': ['grass'], 'sand': ['grass', 'sand'], 'grass': ['grass', 'hill', 'sea'], 'hill': ['sea']}],
   {'domains': [['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass'], ['sea'], ['grass']],
    'contradiction': False}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['hill', 'grass', 'sand', 'sea']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [['grass', 'hill', 'sand', 'sea']], 'contradiction': False})],
 [('coast gradient #1',
   [[['sea'], ['sea', 'sand', 'grass', 'hill'], ['hill']],
    {'sea': ['sea', 'sand'],
     'sand': ['sea', 'sand', 'grass'],
     'grass': ['sand', 'grass', 'hill'],
     'hill': ['grass']}],
   {'domains': [[], [], []], 'contradiction': True}),
  ('regression support conjunction #1',
   [[['sea', 'hill'], ['sea', 'hill', 'grass'], ['sea', 'sand', 'grass', 'hill']],
    {'sea': ['sand'],
     'sand': ['grass', 'sand', 'sea'],
     'grass': ['hill', 'sand', 'sea'],
     'hill': ['grass', 'hill', 'sea']}],
   {'domains': [['hill'], ['grass', 'hill', 'sea'], ['grass', 'hill', 'sand', 'sea']],
    'contradiction': False}),
  ('fault site support conjunction #1',
   [[['hill', 'grass', 'sand', 'sea'],
     ['sea', 'sand', 'hill', 'grass'],
     ['sand', 'sea', 'grass', 'hill', 'sea']],
    {'sea': ['sand'], 'sand': ['hill', 'sand'], 'grass': ['sand', 'sea'], 'hill': ['sand']}],
   {'domains': [['grass', 'hill', 'sand', 'sea'], ['hill', 'sand', 'sea'], ['hill', 'sand']],
    'contradiction': False}),
  ('regression support conjunction #2',
   [[['sand', 'sea', 'hill', 'grass'],
     ['hill', 'sea', 'grass', 'sand'],
     ['grass', 'sand', 'sea'],
     ['grass', 'sea', 'grass'],
     ['grass', 'hill', 'sea']],
    {'sea': ['hill'], 'sand': ['hill', 'sand'], 'grass': ['hill'], 'hill': ['hill']}],
   {'domains': [[], [], [], [], []], 'contradiction': True}),
  ('regression support conjunction #3',
   [[['sea'], ['sand', 'sea'], ['hill', 'sand', 'sea'], ['sea', 'hill', 'sea']],
    {'sea': ['grass', 'hill'], 'sand': ['hill'], 'grass': ['hill', 'sea'], 'hill': ['sand', 'sea']}],
   {'domains': [[], [], [], []], 'contradiction': True}),
  ('duplicate domain entries #1',
   [[['grass', 'grass', 'sand']], {'grass': []}],
   {'domains': [['grass', 'sand']], 'contradiction': False}),
  ('control #1',
   [[['sea', 'grass', 'sand']],
    {'sea': ['hill'], 'sand': ['sea'], 'grass': ['grass', 'sand', 'sea'], 'hill': ['hill']}],
   {'domains': [['grass', 'sand', 'sea']], 'contradiction': False}),
  ('control #2',
   [[['hill', 'sea', 'grass', 'sand'], ['sea', 'grass', 'sand']],
    {'sea': ['hill', 'sand'], 'sand': ['grass', 'hill', 'sand'], 'grass': ['grass'], 'hill': ['sea']}],
   {'domains': [['grass', 'hill', 'sand', 'sea'], ['grass', 'sand', 'sea']], 'contradiction': False})]]
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
coast gradient #1{'contradiction': True, 'domains': [[], [], []]}{'contradiction': True, 'domains': [[], [], []]}Passed
asymmetric rule #1{'contradiction': False, 'domains': [['sand'], ['grass']]}{'contradiction': False, 'domains': [['sand'], ['grass']]}Passed
fault site support conjunction #1{'contradiction': False, 'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']]}{'contradiction': False, 'domains': [['hill'], ['sand'], ['sea'], ['hill', 'sea'], ['sea']]}Passed
regression support conjunction #1{'contradiction': False, 'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']]}{'contradiction': False, 'domains': [['hill', 'sea'], ['grass', 'hill', 'sand'], ['sand', 'sea'], ['grass', 'hill', 'sand']]}Passed
regression support conjunction #2{'contradiction': False, 'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']]}{'contradiction': False, 'domains': [['sea'], ['sand', 'sea'], ['sea'], ['sea']]}Passed
duplicate domain entries #1{'contradiction': False, 'domains': [['grass', 'sand']]}{'contradiction': False, 'domains': [['grass', 'sand']]}Passed
control #1{'contradiction': False, 'domains': [['grass', 'sand', 'sea']]}{'contradiction': False, 'domains': [['grass', 'sand', 'sea']]}Passed
control #2{'contradiction': False, 'domains': [['grass', 'sea']]}{'contradiction': False, 'domains': [['grass', 'sea']]}Passed

SHA-256 / e9d5039e47be49b08b98c627e3481f1adff572977d675a888e1d0f73a255d0e4

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.140452+00:00.

Case digest / 54d3c2d902c30060a8a1b3ce159e576f829780d6a028a9575bbcc93d9973e2cc