FAILURE MAP
← Case archive

FA-87756 / Collision detection broadphase / Open access

Occupancy statistic counts stale buckets · case 01

Load reports grow monotonically across frames.

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

ROOT CAUSE

Buckets are counted when their list is non-empty regardless of stamp.

VERIFIED REPAIR

Count only buckets stamped this frame.

Unsuccessful approach: Counting every bucket ever stamped keeps stale ones too.

Case contract

solve(frames, n): particle hash table of n buckets reused across frames without clearing; a bucket whose stamp is older than the frame is lazily reset on first insert. Cell = floor(x), floor(y); bucket = ((ix*73856093 mod 2^32) xor (iy*19349663 mod 2^32)) mod n. A particle pairs with earlier particles in the same bucket only if they share the exact cell. Per frame return [sorted [min,max] pairs, buckets stamped this frame].

Why this case matters

Broadphase stages decide which object pairs ever reach narrowphase; a wrong boundary, ordering or bookkeeping rule silently drops real contacts or floods the solver with false candidates.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames, n):
    table = [[-1, []] for _ in range(n)]
    result = []
    for f, pts in enumerate(frames):
        pairs = []
        for pid, x, y in pts:
            ix, iy = math.floor(x), math.floor(y)
            h = (((ix * 73856093) & 0xFFFFFFFF) ^ ((iy * 19349663) & 0xFFFFFFFF)) % n
            slot = table[h]
            if slot[0] != f:
                slot[0] = f
                slot[1] = []
            for qid, qx, qy in slot[1]:
                if (qx, qy) == (ix, iy):
                    pairs.append([min(pid, qid), max(pid, qid)])
            slot[1].append((pid, ix, iy))
        result.append([sorted(pairs), sum(1 for s in table if s[1])])
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[[3, -1.5, 2.5], [18, 0.0, -1.5], [6, -1.5, -2.5], [5, 3.0, 2.0]]], 3], [[[], 2]]], [[[[[1, 2.5, 1.5], [19, 1.0, 0.5], [8, 3.0, -2.5], [10, -3.0, 2.0], [14, 1.0, 2.5]], [[9, 0.0, 2.5], [17, 1.5, 0.0], [14, -1.5, 2.5], [10, 0.5, 2.5]], [[1, 2.5, 1.0], [2, -1.0, -2.5], [14, -3.0, 1.0], [10, -2.0, 1.0], [7, -2.0, 0.5], [9, 2.5, 1.5]], [[18, -0.5, -1.0], [4, -2.0, -1.5], [16, -1.5, 0.0], [6, -2.0, -3.0], [12, 1.5, 1.0], [19, 1.0, -2.5]]], 3], [[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]]], [[[[[7, -1.5, 3.0], [9, 1.0, 0.0], [6, -1.5, -0.5], [15, -2.0, -1.5], [12, 1.0, -0.5]], [[19, 3.0, -3.0], [7, -2.0, 3.0], [9, 1.5, 2.0], [3, 3.0, 2.0]], [[15, 0.0, 3.0], [19, 2.5, -3.0], [2, 1.0, 1.0], [9, -0.5, -0.5], [17, 1.0, 0.5]]], 3], [[[], 2], [[], 3], [[], 3]]], [[[[[14, 0.5, -2.0], [3, 3.0, 1.5], [10, 2.0, 2.5]], [[4, 1.5, 2.0], [13, -2.0, 3.0]]], 5], [[[], 3], [[], 2]]], [[[[[10, 1.5, -1.0], [14, 0.5, -3.0], [7, -1.5, 3.0], [12, 2.0, 3.0]], [[16, 0.5, 0.5], [7, -1.0, 1.5], [14, -2.0, -0.5]], [[8, -1.5, 3.0], [17, 1.0, -1.0], [2, 0.5, -2.5], [1, -3.0, 1.0], [19, -1.0, -1.0]], [[11, 3.0, 2.0], [17, -0.5, 2.5], [14, 2.0, -1.5]]], 3], [[[], 3], [[], 2], [[], 3], [[], 1]]], [[[[[5, 3.0, 3.0], [4, -1.0, 3.0], [16, 2.5, 2.0]], [[17, 0.0, 1.0], [10, 1.5, 1.5]], [[16, 0.5, 0.0], [7, 2.0, -1.0], [2, -2.5, 1.0]], [[6, -1.0, -3.0], [1, -1.5, -0.5]]], 11], [[[], 2], [[], 2], [[], 2], [[], 2]]], [[[[[17, 1.0, 0.5], [7, -3.0, 0.0]], [[9, -1.0, 1.0], [6, -0.5, -2.5], [18, -2.5, 3.0], [14, -0.5, 0.5], [8, 3.0, 1.0], [3, -2.5, 3.0]], [[18, -1.0, -2.5], [7, 2.0, 0.0]]], 7], [[[], 2], [[[3, 18]], 5], [[], 2]]], [[[[[1, 1.0, -0.5], [18, 1.5, -0.5], [5, 2.5, 2.5]]], 5], [[[[1, 18]], 2]]]], [[[[[[13, -1.5, 1.0], [8, 2.0, -2.5], [1, 1.5, -2.5], [3, 1.0, -3.0]], [[2, -1.5, -3.0], [16, -2.5, 2.5], [19, -2.0, 1.5]], [[8, 3.0, -1.5], [2, -2.0, -2.5], [4, -0.5, -1.5], [18, 2.5, 3.0], [10, 1.5, -0.5], [16, -2.5, -2.0]]], 11], [[[[1, 3]], 3], [[], 2], [[], 6]]], [[[[[6, -1.5, -3.0], [3, 0.0, 2.0]], [[11, 3.0, 2.0], [17, 2.0, 1.5], [12, 0.5, -1.5], [14, 1.5, 0.5], [1, 1.0, -3.0]]], 11], [[[], 2], [[], 5]]], [[[[[16, 3.0, 2.5], [14, 0.0, -3.0], [12, -2.5, 0.0], [15, 3.0, 2.0]]], 3], [[[[15, 16]], 2]]], [[[[[6, 2.0, -0.5], [4, -1.0, 1.5]], [[5, -1.5, 1.0], [18, 1.5, -0.5], [12, 1.0, 2.5], [10, -2.0, 2.5], [3, -2.0, 3.0], [17, -1.0, 0.0]]], 3], [[[], 2], [[], 3]]], [[[[[19, -2.0, -1.5], [12, -1.0, 1.0]], [[14, -3.0, -2.0], [7, -2.5, 0.0], [6, 1.0, 3.0], [8, -3.0, 2.5], [13, -1.5, 1.0], [19, 0.0, -3.0]], [[13, -2.5, 3.0], [11, 1.5, -0.5], [16, -2.0, -2.5], [7, -3.0, 0.0]]], 5], [[[], 2], [[], 2], [[], 2]]], [[[[[14, 2.5, 1.0], [12, 2.5, 3.0], [5, 0.5, 1.0]], [[8, -1.0, 1.0], [2, 1.0, -0.5]]], 11], [[[], 3], [[], 1]]], [[[[[2, 0.5, -2.5], [11, -3.0, -2.0], [4, 2.0, 2.0], [18, 2.0, 3.0]], [[11, 0.5, 0.0], [13, -0.5, 2.0]]], 11], [[[], 4], [[], 1]]], [[[[[12, 0.5, -1.0], [19, -2.5, 1.0], [11, 2.0, 3.0]], [[13, -1.0, -2.5], [17, 2.5, 2.0], [9, 1.5, 1.0], [15, 1.0, -0.5], [11, -0.5, -2.5], [7, 1.5, -2.0]]], 5], [[[], 3], [[[11, 13]], 5]]]], [[[[[[10, 3.0, 0.5], [16, 3.0, -0.5], [4, 2.5, -1.0], [6, 1.0, 2.0], [8, 3.0, -0.5], [17, 1.0, 0.0]]], 5], [[[[8, 16]], 4]]], [[[[[13, 1.5, 2.5], [3, 2.0, -0.5], [11, -3.0, -2.0], [8, 3.0, -3.0]], [[13, 2.5, 1.5], [18, 0.0, -1.5], [4, 1.0, -1.5], [6, 2.5, 2.5], [9, 0.0, -2.5]]], 7], [[[], 4], [[], 4]]], [[[[[14, -0.5, -0.5], [15, 2.0, 2.0], [19, -1.5, 1.0], [8, -3.0, -1.0], [12, 1.0, 0.5]], [[7, 2.5, 0.5], [15, 3.0, -1.0], [10, -2.0, 3.0], [18, -2.5, 2.5], [14, 1.5, 0.0]], [[6, -3.0, -3.0], [4, -1.0, -2.0], [16, 2.0, -3.0]], [[3, 2.0, 2.0], [10, 2.0, 2.5]]], 7], [[[], 4], [[], 5], [[], 3], [[[3, 10]], 1]]], [[[[[6, -3.0, -1.5], [4, 1.0, -2.0], [9, 2.0, -1.5], [13, -1.0, -2.5]], [[12, -2.5, 2.5], [8, 3.0, -2.0], [9, 0.0, 3.0], [2, -1.5, 2.5]], [[11, 0.5, 3.0], [2, 3.0, 0.0], [13, -1.5, 1.0], [3, 1.5, -2.0]], [[3, 1.5, 2.0], [19, 1.0, 1.5], [16, 0.5, -1.5], [4, 0.0, -1.5], [2, 0.5, -3.0], [15, 1.5, 2.5]]], 7], [[[], 4], [[], 4], [[], 4], [[[3, 15], [4, 16]], 3]]], [[[[[12, 0.5, 3.0], [2, 0.0, 0.0]]], 11], [[[], 2]]], [[[[[16, -2.0, -2.0], [14, -1.0, -3.0], [18, 2.5, 2.0], [1, -3.0, -0.5], [15, 2.0, 0.5]], [[16, 0.5, 2.5], [17, -0.5, -0.5]]], 7], [[[], 4], [[], 2]]], [[[[[7, 2.0, -0.5], [16, 2.5, -3.0], [11, -1.0, -3.0]]], 7], [[[], 3]]], [[[[[11, 1.0, -0.5], [2, -1.5, 3.0], [9, 2.5, 3.0], [15, -1.5, 1.5]]], 11], [[[], 3]]]], [[[[[[7, -0.5, 1.5], [16, 0.5, 2.0], [8, -2.5, 2.5], [3, -2.0, 0.5], [1, 2.5, -2.0]]], 11], [[[], 5]]], [[[[[2, 2.0, -3.0], [12, 0.0, -2.5]], [[11, 1.5, -1.0], [18, 3.0, 1.0], [7, -2.5, 1.0], [1, -2.0, 3.0]], [[7, 1.5, 0.5], [9, -0.5, -2.5], [16, -1.0, -3.0], [6, 3.0, 2.0], [17, 3.0, 1.0], [18, 0.5, -0.5]], [[6, 1.5, -0.5], [1, -2.0, 3.0], [4, 3.0, -0.5]]], 5], [[[], 1], [[], 2], [[[9, 16]], 4], [[], 2]]], [[[[[9, 3.0, 0.5], [10, 1.0, 2.5], [19, -2.0, -1.5]], [[11, -3.0, 1.0], [13, 1.0, -0.5]], [[13, -2.0, 1.0], [17, 1.5, -0.5]], [[6, -3.0, 3.0], [19, 1.0, 0.5], [15, -1.0, 0.0], [11, 0.0, 0.5], [9, 0.0, -2.0], [4, -0.5, -0.5]]], 5], [[[], 3], [[], 1], [[], 2], [[], 3]]], [[[[[12, -1.5, 0.0], [10, 1.5, -1.0], [5, 0.5, 0.5]], [[10, -3.0, -2.5], [11, 1.5, -2.5], [8, 2.0, 2.0], [1, 1.5, 1.5], [12, -2.0, -0.5]]], 5], [[[], 1], [[], 4]]], [[[[[1, -3.0, -0.5], [15, -2.0, 2.5], [17, -1.0, -2.5], [19, 0.0, -0.5], [10, 0.5, 1.0], [7, 2.5, 2.5]]], 7], [[[], 4]]], [[[[[15, -3.0, -0.5], [19, -1.0, 2.5], [13, -1.0, -0.5]], [[17, 0.0, 2.0], [18, 1.0, -3.0]], [[17, 3.0, 2.5], [19, -3.0, -1.0], [8, 2.5, -1.5], [11, 0.5, -1.5]], [[12, -0.5, 1.5], [15, -3.0, 1.0], [16, 0.5, -3.0]]], 3], [[[], 1], [[], 2], [[], 1], [[], 2]]], [[[[[12, -0.5, -2.5], [1, -2.5, 1.5], [11, 2.5, 3.0], [5, 0.5, 3.0], [8, -2.0, 3.0], [18, -3.0, -0.5]], [[4, 1.0, -0.5], [17, 1.5, -1.0], [7, -1.5, 2.5], [10, -1.5, 0.5]], [[8, 3.0, 0.5], [5, 2.0, 1.5], [16, -0.5, 2.0]]], 3], [[[], 2], [[[4, 17]], 2], [[], 2]]], [[[[[15, -1.5, 3.0], [3, -3.0, 1.0], [8, -0.5, 3.0], [11, -1.5, 3.0], [1, 0.0, 3.0], [13, -1.5, 0.0]], [[6, 3.0, 0.0], [5, 1.5, 0.5], [11, -2.0, -0.5], [9, -0.5, 1.5]]], 5], [[[[11, 15]], 3], [[], 3]]]], [[[[[[3, 1.5, 1.0], [8, -2.0, 0.0], [9, -1.5, -1.0], [18, 1.5, 2.5]]], 11], [[[], 4]]], [[[[[5, 1.0, -2.5], [17, 0.5, 0.5], [8, -3.0, 3.0], [14, -2.5, -2.0], [4, -2.5, -1.0], [11, -2.5, 1.0]], [[7, -1.5, 0.0], [2, -1.5, -1.5]]], 7], [[[], 4], [[], 1]]], [[[[[8, 0.5, -2.5], [18, 0.5, -2.0], [15, 3.0, -2.0], [12, 0.0, 1.0]]], 3], [[[], 3]]], [[[[[14, 0.0, 3.0], [5, 2.0, 3.0], [10, -1.0, 0.0], [8, 0.0, 1.5], [1, -2.0, 2.5], [15, 2.0, 1.0]], [[6, 2.0, -2.0], [15, -2.5, 1.5]], [[19, -2.0, 0.0], [4, -0.5, -1.0], [18, -2.5, -2.5]], [[6, 0.5, 0.0], [7, -0.5, 1.0], [8, -1.5, 2.5]]], 3], [[[], 3], [[], 2], [[], 1], [[], 2]]], [[[[[18, 1.5, -1.0], [19, 2.5, -2.5], [14, -1.5, -1.0], [15, -0.5, 0.0], [7, -2.5, 2.5], [2, 1.5, 1.0]]], 11], [[[], 5]]], [[[[[17, 2.0, -1.0], [3, -1.5, 1.5], [13, 3.0, 2.5], [14, 1.0, 1.0], [15, -2.0, 0.5]], [[15, 2.5, 1.5], [3, -1.5, 2.5], [17, 0.5, 2.0], [6, -0.5, -1.5]]], 11], [[[], 4], [[], 4]]], [[[[[9, -1.5, 2.0], [13, 2.0, -1.5], [3, -2.0, 0.0], [8, 3.0, -1.0], [15, -2.0, 2.0], [12, -2.5, -1.5]], [[15, 1.5, -2.0], [2, -3.0, 3.0], [14, 1.0, -1.0], [1, -3.0, 3.0], [10, 3.0, -1.5]], [[13, 0.5, 0.5], [17, 3.0, 2.0], [3, 1.0, 2.5], [6, 0.5, 0.5], [1, 0.5, 0.0]], [[12, -1.5, -2.5], [15, 2.5, 0.0]]], 11], [[[[9, 15]], 3], [[[1, 2]], 4], [[[1, 6], [1, 13], [6, 13]], 3], [[], 2]]], [[[[[16, -3.0, -2.5], [11, 1.0, 2.0], [6, 2.5, -2.5], [2, 3.0, -1.0], [5, -0.5, -3.0]], [[4, 2.5, 0.0], [19, 2.0, -0.5]]], 5], [[[], 3], [[], 2]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, 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
case 0[[[], 2]][[[], 2]]Passed
case 1[[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]][[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]]Passed
case 2[[[], 2], [[], 3], [[], 3]][[[], 2], [[], 3], [[], 3]]Passed
case 3[[[], 3], [[], 4]][[[], 3], [[], 2]]Failed
case 4[[[], 3], [[], 3], [[], 3], [[], 3]][[[], 3], [[], 2], [[], 3], [[], 1]]Failed
case 5[[[], 2], [[], 4], [[], 6], [[], 8]][[[], 2], [[], 2], [[], 2], [[], 2]]Failed
case 6[[[], 2], [[[3, 18]], 5], [[], 5]][[[], 2], [[[3, 18]], 5], [[], 2]]Failed
case 7[[[[1, 18]], 2]][[[[1, 18]], 2]]Passed

SHA-256 / 76d36ed11aefdc4580e29a03af874b854f1f14125efe56b96531459a3dbffe63

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames, n):
    table = [[-1, []] for _ in range(n)]
    result = []
    for f, pts in enumerate(frames):
        pairs = []
        for pid, x, y in pts:
            ix, iy = math.floor(x), math.floor(y)
            h = (((ix * 73856093) & 0xFFFFFFFF) ^ ((iy * 19349663) & 0xFFFFFFFF)) % n
            slot = table[h]
            if slot[0] != f:
                slot[0] = f
                slot[1] = []
            for qid, qx, qy in slot[1]:
                if (qx, qy) == (ix, iy):
                    pairs.append([min(pid, qid), max(pid, qid)])
            slot[1].append((pid, ix, iy))
        result.append([sorted(pairs), sum(1 for s in table if s[0] >= 0)])
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[[3, -1.5, 2.5], [18, 0.0, -1.5], [6, -1.5, -2.5], [5, 3.0, 2.0]]], 3], [[[], 2]]], [[[[[1, 2.5, 1.5], [19, 1.0, 0.5], [8, 3.0, -2.5], [10, -3.0, 2.0], [14, 1.0, 2.5]], [[9, 0.0, 2.5], [17, 1.5, 0.0], [14, -1.5, 2.5], [10, 0.5, 2.5]], [[1, 2.5, 1.0], [2, -1.0, -2.5], [14, -3.0, 1.0], [10, -2.0, 1.0], [7, -2.0, 0.5], [9, 2.5, 1.5]], [[18, -0.5, -1.0], [4, -2.0, -1.5], [16, -1.5, 0.0], [6, -2.0, -3.0], [12, 1.5, 1.0], [19, 1.0, -2.5]]], 3], [[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]]], [[[[[7, -1.5, 3.0], [9, 1.0, 0.0], [6, -1.5, -0.5], [15, -2.0, -1.5], [12, 1.0, -0.5]], [[19, 3.0, -3.0], [7, -2.0, 3.0], [9, 1.5, 2.0], [3, 3.0, 2.0]], [[15, 0.0, 3.0], [19, 2.5, -3.0], [2, 1.0, 1.0], [9, -0.5, -0.5], [17, 1.0, 0.5]]], 3], [[[], 2], [[], 3], [[], 3]]], [[[[[14, 0.5, -2.0], [3, 3.0, 1.5], [10, 2.0, 2.5]], [[4, 1.5, 2.0], [13, -2.0, 3.0]]], 5], [[[], 3], [[], 2]]], [[[[[10, 1.5, -1.0], [14, 0.5, -3.0], [7, -1.5, 3.0], [12, 2.0, 3.0]], [[16, 0.5, 0.5], [7, -1.0, 1.5], [14, -2.0, -0.5]], [[8, -1.5, 3.0], [17, 1.0, -1.0], [2, 0.5, -2.5], [1, -3.0, 1.0], [19, -1.0, -1.0]], [[11, 3.0, 2.0], [17, -0.5, 2.5], [14, 2.0, -1.5]]], 3], [[[], 3], [[], 2], [[], 3], [[], 1]]], [[[[[5, 3.0, 3.0], [4, -1.0, 3.0], [16, 2.5, 2.0]], [[17, 0.0, 1.0], [10, 1.5, 1.5]], [[16, 0.5, 0.0], [7, 2.0, -1.0], [2, -2.5, 1.0]], [[6, -1.0, -3.0], [1, -1.5, -0.5]]], 11], [[[], 2], [[], 2], [[], 2], [[], 2]]], [[[[[17, 1.0, 0.5], [7, -3.0, 0.0]], [[9, -1.0, 1.0], [6, -0.5, -2.5], [18, -2.5, 3.0], [14, -0.5, 0.5], [8, 3.0, 1.0], [3, -2.5, 3.0]], [[18, -1.0, -2.5], [7, 2.0, 0.0]]], 7], [[[], 2], [[[3, 18]], 5], [[], 2]]], [[[[[1, 1.0, -0.5], [18, 1.5, -0.5], [5, 2.5, 2.5]]], 5], [[[[1, 18]], 2]]]], [[[[[[13, -1.5, 1.0], [8, 2.0, -2.5], [1, 1.5, -2.5], [3, 1.0, -3.0]], [[2, -1.5, -3.0], [16, -2.5, 2.5], [19, -2.0, 1.5]], [[8, 3.0, -1.5], [2, -2.0, -2.5], [4, -0.5, -1.5], [18, 2.5, 3.0], [10, 1.5, -0.5], [16, -2.5, -2.0]]], 11], [[[[1, 3]], 3], [[], 2], [[], 6]]], [[[[[6, -1.5, -3.0], [3, 0.0, 2.0]], [[11, 3.0, 2.0], [17, 2.0, 1.5], [12, 0.5, -1.5], [14, 1.5, 0.5], [1, 1.0, -3.0]]], 11], [[[], 2], [[], 5]]], [[[[[16, 3.0, 2.5], [14, 0.0, -3.0], [12, -2.5, 0.0], [15, 3.0, 2.0]]], 3], [[[[15, 16]], 2]]], [[[[[6, 2.0, -0.5], [4, -1.0, 1.5]], [[5, -1.5, 1.0], [18, 1.5, -0.5], [12, 1.0, 2.5], [10, -2.0, 2.5], [3, -2.0, 3.0], [17, -1.0, 0.0]]], 3], [[[], 2], [[], 3]]], [[[[[19, -2.0, -1.5], [12, -1.0, 1.0]], [[14, -3.0, -2.0], [7, -2.5, 0.0], [6, 1.0, 3.0], [8, -3.0, 2.5], [13, -1.5, 1.0], [19, 0.0, -3.0]], [[13, -2.5, 3.0], [11, 1.5, -0.5], [16, -2.0, -2.5], [7, -3.0, 0.0]]], 5], [[[], 2], [[], 2], [[], 2]]], [[[[[14, 2.5, 1.0], [12, 2.5, 3.0], [5, 0.5, 1.0]], [[8, -1.0, 1.0], [2, 1.0, -0.5]]], 11], [[[], 3], [[], 1]]], [[[[[2, 0.5, -2.5], [11, -3.0, -2.0], [4, 2.0, 2.0], [18, 2.0, 3.0]], [[11, 0.5, 0.0], [13, -0.5, 2.0]]], 11], [[[], 4], [[], 1]]], [[[[[12, 0.5, -1.0], [19, -2.5, 1.0], [11, 2.0, 3.0]], [[13, -1.0, -2.5], [17, 2.5, 2.0], [9, 1.5, 1.0], [15, 1.0, -0.5], [11, -0.5, -2.5], [7, 1.5, -2.0]]], 5], [[[], 3], [[[11, 13]], 5]]]], [[[[[[10, 3.0, 0.5], [16, 3.0, -0.5], [4, 2.5, -1.0], [6, 1.0, 2.0], [8, 3.0, -0.5], [17, 1.0, 0.0]]], 5], [[[[8, 16]], 4]]], [[[[[13, 1.5, 2.5], [3, 2.0, -0.5], [11, -3.0, -2.0], [8, 3.0, -3.0]], [[13, 2.5, 1.5], [18, 0.0, -1.5], [4, 1.0, -1.5], [6, 2.5, 2.5], [9, 0.0, -2.5]]], 7], [[[], 4], [[], 4]]], [[[[[14, -0.5, -0.5], [15, 2.0, 2.0], [19, -1.5, 1.0], [8, -3.0, -1.0], [12, 1.0, 0.5]], [[7, 2.5, 0.5], [15, 3.0, -1.0], [10, -2.0, 3.0], [18, -2.5, 2.5], [14, 1.5, 0.0]], [[6, -3.0, -3.0], [4, -1.0, -2.0], [16, 2.0, -3.0]], [[3, 2.0, 2.0], [10, 2.0, 2.5]]], 7], [[[], 4], [[], 5], [[], 3], [[[3, 10]], 1]]], [[[[[6, -3.0, -1.5], [4, 1.0, -2.0], [9, 2.0, -1.5], [13, -1.0, -2.5]], [[12, -2.5, 2.5], [8, 3.0, -2.0], [9, 0.0, 3.0], [2, -1.5, 2.5]], [[11, 0.5, 3.0], [2, 3.0, 0.0], [13, -1.5, 1.0], [3, 1.5, -2.0]], [[3, 1.5, 2.0], [19, 1.0, 1.5], [16, 0.5, -1.5], [4, 0.0, -1.5], [2, 0.5, -3.0], [15, 1.5, 2.5]]], 7], [[[], 4], [[], 4], [[], 4], [[[3, 15], [4, 16]], 3]]], [[[[[12, 0.5, 3.0], [2, 0.0, 0.0]]], 11], [[[], 2]]], [[[[[16, -2.0, -2.0], [14, -1.0, -3.0], [18, 2.5, 2.0], [1, -3.0, -0.5], [15, 2.0, 0.5]], [[16, 0.5, 2.5], [17, -0.5, -0.5]]], 7], [[[], 4], [[], 2]]], [[[[[7, 2.0, -0.5], [16, 2.5, -3.0], [11, -1.0, -3.0]]], 7], [[[], 3]]], [[[[[11, 1.0, -0.5], [2, -1.5, 3.0], [9, 2.5, 3.0], [15, -1.5, 1.5]]], 11], [[[], 3]]]], [[[[[[7, -0.5, 1.5], [16, 0.5, 2.0], [8, -2.5, 2.5], [3, -2.0, 0.5], [1, 2.5, -2.0]]], 11], [[[], 5]]], [[[[[2, 2.0, -3.0], [12, 0.0, -2.5]], [[11, 1.5, -1.0], [18, 3.0, 1.0], [7, -2.5, 1.0], [1, -2.0, 3.0]], [[7, 1.5, 0.5], [9, -0.5, -2.5], [16, -1.0, -3.0], [6, 3.0, 2.0], [17, 3.0, 1.0], [18, 0.5, -0.5]], [[6, 1.5, -0.5], [1, -2.0, 3.0], [4, 3.0, -0.5]]], 5], [[[], 1], [[], 2], [[[9, 16]], 4], [[], 2]]], [[[[[9, 3.0, 0.5], [10, 1.0, 2.5], [19, -2.0, -1.5]], [[11, -3.0, 1.0], [13, 1.0, -0.5]], [[13, -2.0, 1.0], [17, 1.5, -0.5]], [[6, -3.0, 3.0], [19, 1.0, 0.5], [15, -1.0, 0.0], [11, 0.0, 0.5], [9, 0.0, -2.0], [4, -0.5, -0.5]]], 5], [[[], 3], [[], 1], [[], 2], [[], 3]]], [[[[[12, -1.5, 0.0], [10, 1.5, -1.0], [5, 0.5, 0.5]], [[10, -3.0, -2.5], [11, 1.5, -2.5], [8, 2.0, 2.0], [1, 1.5, 1.5], [12, -2.0, -0.5]]], 5], [[[], 1], [[], 4]]], [[[[[1, -3.0, -0.5], [15, -2.0, 2.5], [17, -1.0, -2.5], [19, 0.0, -0.5], [10, 0.5, 1.0], [7, 2.5, 2.5]]], 7], [[[], 4]]], [[[[[15, -3.0, -0.5], [19, -1.0, 2.5], [13, -1.0, -0.5]], [[17, 0.0, 2.0], [18, 1.0, -3.0]], [[17, 3.0, 2.5], [19, -3.0, -1.0], [8, 2.5, -1.5], [11, 0.5, -1.5]], [[12, -0.5, 1.5], [15, -3.0, 1.0], [16, 0.5, -3.0]]], 3], [[[], 1], [[], 2], [[], 1], [[], 2]]], [[[[[12, -0.5, -2.5], [1, -2.5, 1.5], [11, 2.5, 3.0], [5, 0.5, 3.0], [8, -2.0, 3.0], [18, -3.0, -0.5]], [[4, 1.0, -0.5], [17, 1.5, -1.0], [7, -1.5, 2.5], [10, -1.5, 0.5]], [[8, 3.0, 0.5], [5, 2.0, 1.5], [16, -0.5, 2.0]]], 3], [[[], 2], [[[4, 17]], 2], [[], 2]]], [[[[[15, -1.5, 3.0], [3, -3.0, 1.0], [8, -0.5, 3.0], [11, -1.5, 3.0], [1, 0.0, 3.0], [13, -1.5, 0.0]], [[6, 3.0, 0.0], [5, 1.5, 0.5], [11, -2.0, -0.5], [9, -0.5, 1.5]]], 5], [[[[11, 15]], 3], [[], 3]]]], [[[[[[3, 1.5, 1.0], [8, -2.0, 0.0], [9, -1.5, -1.0], [18, 1.5, 2.5]]], 11], [[[], 4]]], [[[[[5, 1.0, -2.5], [17, 0.5, 0.5], [8, -3.0, 3.0], [14, -2.5, -2.0], [4, -2.5, -1.0], [11, -2.5, 1.0]], [[7, -1.5, 0.0], [2, -1.5, -1.5]]], 7], [[[], 4], [[], 1]]], [[[[[8, 0.5, -2.5], [18, 0.5, -2.0], [15, 3.0, -2.0], [12, 0.0, 1.0]]], 3], [[[], 3]]], [[[[[14, 0.0, 3.0], [5, 2.0, 3.0], [10, -1.0, 0.0], [8, 0.0, 1.5], [1, -2.0, 2.5], [15, 2.0, 1.0]], [[6, 2.0, -2.0], [15, -2.5, 1.5]], [[19, -2.0, 0.0], [4, -0.5, -1.0], [18, -2.5, -2.5]], [[6, 0.5, 0.0], [7, -0.5, 1.0], [8, -1.5, 2.5]]], 3], [[[], 3], [[], 2], [[], 1], [[], 2]]], [[[[[18, 1.5, -1.0], [19, 2.5, -2.5], [14, -1.5, -1.0], [15, -0.5, 0.0], [7, -2.5, 2.5], [2, 1.5, 1.0]]], 11], [[[], 5]]], [[[[[17, 2.0, -1.0], [3, -1.5, 1.5], [13, 3.0, 2.5], [14, 1.0, 1.0], [15, -2.0, 0.5]], [[15, 2.5, 1.5], [3, -1.5, 2.5], [17, 0.5, 2.0], [6, -0.5, -1.5]]], 11], [[[], 4], [[], 4]]], [[[[[9, -1.5, 2.0], [13, 2.0, -1.5], [3, -2.0, 0.0], [8, 3.0, -1.0], [15, -2.0, 2.0], [12, -2.5, -1.5]], [[15, 1.5, -2.0], [2, -3.0, 3.0], [14, 1.0, -1.0], [1, -3.0, 3.0], [10, 3.0, -1.5]], [[13, 0.5, 0.5], [17, 3.0, 2.0], [3, 1.0, 2.5], [6, 0.5, 0.5], [1, 0.5, 0.0]], [[12, -1.5, -2.5], [15, 2.5, 0.0]]], 11], [[[[9, 15]], 3], [[[1, 2]], 4], [[[1, 6], [1, 13], [6, 13]], 3], [[], 2]]], [[[[[16, -3.0, -2.5], [11, 1.0, 2.0], [6, 2.5, -2.5], [2, 3.0, -1.0], [5, -0.5, -3.0]], [[4, 2.5, 0.0], [19, 2.0, -0.5]]], 5], [[[], 3], [[], 2]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, 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
case 0[[[], 2]][[[], 2]]Passed
case 1[[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]][[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]]Passed
case 2[[[], 2], [[], 3], [[], 3]][[[], 2], [[], 3], [[], 3]]Passed
case 3[[[], 3], [[], 4]][[[], 3], [[], 2]]Failed
case 4[[[], 3], [[], 3], [[], 3], [[], 3]][[[], 3], [[], 2], [[], 3], [[], 1]]Failed
case 5[[[], 2], [[], 4], [[], 6], [[], 8]][[[], 2], [[], 2], [[], 2], [[], 2]]Failed
case 6[[[], 2], [[[3, 18]], 5], [[], 5]][[[], 2], [[[3, 18]], 5], [[], 2]]Failed
case 7[[[[1, 18]], 2]][[[[1, 18]], 2]]Passed

SHA-256 / f697597e248f67ad1c44c5326e4373979406427064014be45e78c2b971976be4

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames, n):
    table = [[-1, []] for _ in range(n)]
    result = []
    for f, pts in enumerate(frames):
        pairs = []
        for pid, x, y in pts:
            ix, iy = math.floor(x), math.floor(y)
            h = (((ix * 73856093) & 0xFFFFFFFF) ^ ((iy * 19349663) & 0xFFFFFFFF)) % n
            slot = table[h]
            if slot[0] != f:
                slot[0] = f
                slot[1] = []
            for qid, qx, qy in slot[1]:
                if (qx, qy) == (ix, iy):
                    pairs.append([min(pid, qid), max(pid, qid)])
            slot[1].append((pid, ix, iy))
        result.append([sorted(pairs), sum(1 for s in table if s[0] == f)])
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[[3, -1.5, 2.5], [18, 0.0, -1.5], [6, -1.5, -2.5], [5, 3.0, 2.0]]], 3], [[[], 2]]], [[[[[1, 2.5, 1.5], [19, 1.0, 0.5], [8, 3.0, -2.5], [10, -3.0, 2.0], [14, 1.0, 2.5]], [[9, 0.0, 2.5], [17, 1.5, 0.0], [14, -1.5, 2.5], [10, 0.5, 2.5]], [[1, 2.5, 1.0], [2, -1.0, -2.5], [14, -3.0, 1.0], [10, -2.0, 1.0], [7, -2.0, 0.5], [9, 2.5, 1.5]], [[18, -0.5, -1.0], [4, -2.0, -1.5], [16, -1.5, 0.0], [6, -2.0, -3.0], [12, 1.5, 1.0], [19, 1.0, -2.5]]], 3], [[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]]], [[[[[7, -1.5, 3.0], [9, 1.0, 0.0], [6, -1.5, -0.5], [15, -2.0, -1.5], [12, 1.0, -0.5]], [[19, 3.0, -3.0], [7, -2.0, 3.0], [9, 1.5, 2.0], [3, 3.0, 2.0]], [[15, 0.0, 3.0], [19, 2.5, -3.0], [2, 1.0, 1.0], [9, -0.5, -0.5], [17, 1.0, 0.5]]], 3], [[[], 2], [[], 3], [[], 3]]], [[[[[14, 0.5, -2.0], [3, 3.0, 1.5], [10, 2.0, 2.5]], [[4, 1.5, 2.0], [13, -2.0, 3.0]]], 5], [[[], 3], [[], 2]]], [[[[[10, 1.5, -1.0], [14, 0.5, -3.0], [7, -1.5, 3.0], [12, 2.0, 3.0]], [[16, 0.5, 0.5], [7, -1.0, 1.5], [14, -2.0, -0.5]], [[8, -1.5, 3.0], [17, 1.0, -1.0], [2, 0.5, -2.5], [1, -3.0, 1.0], [19, -1.0, -1.0]], [[11, 3.0, 2.0], [17, -0.5, 2.5], [14, 2.0, -1.5]]], 3], [[[], 3], [[], 2], [[], 3], [[], 1]]], [[[[[5, 3.0, 3.0], [4, -1.0, 3.0], [16, 2.5, 2.0]], [[17, 0.0, 1.0], [10, 1.5, 1.5]], [[16, 0.5, 0.0], [7, 2.0, -1.0], [2, -2.5, 1.0]], [[6, -1.0, -3.0], [1, -1.5, -0.5]]], 11], [[[], 2], [[], 2], [[], 2], [[], 2]]], [[[[[17, 1.0, 0.5], [7, -3.0, 0.0]], [[9, -1.0, 1.0], [6, -0.5, -2.5], [18, -2.5, 3.0], [14, -0.5, 0.5], [8, 3.0, 1.0], [3, -2.5, 3.0]], [[18, -1.0, -2.5], [7, 2.0, 0.0]]], 7], [[[], 2], [[[3, 18]], 5], [[], 2]]], [[[[[1, 1.0, -0.5], [18, 1.5, -0.5], [5, 2.5, 2.5]]], 5], [[[[1, 18]], 2]]]], [[[[[[13, -1.5, 1.0], [8, 2.0, -2.5], [1, 1.5, -2.5], [3, 1.0, -3.0]], [[2, -1.5, -3.0], [16, -2.5, 2.5], [19, -2.0, 1.5]], [[8, 3.0, -1.5], [2, -2.0, -2.5], [4, -0.5, -1.5], [18, 2.5, 3.0], [10, 1.5, -0.5], [16, -2.5, -2.0]]], 11], [[[[1, 3]], 3], [[], 2], [[], 6]]], [[[[[6, -1.5, -3.0], [3, 0.0, 2.0]], [[11, 3.0, 2.0], [17, 2.0, 1.5], [12, 0.5, -1.5], [14, 1.5, 0.5], [1, 1.0, -3.0]]], 11], [[[], 2], [[], 5]]], [[[[[16, 3.0, 2.5], [14, 0.0, -3.0], [12, -2.5, 0.0], [15, 3.0, 2.0]]], 3], [[[[15, 16]], 2]]], [[[[[6, 2.0, -0.5], [4, -1.0, 1.5]], [[5, -1.5, 1.0], [18, 1.5, -0.5], [12, 1.0, 2.5], [10, -2.0, 2.5], [3, -2.0, 3.0], [17, -1.0, 0.0]]], 3], [[[], 2], [[], 3]]], [[[[[19, -2.0, -1.5], [12, -1.0, 1.0]], [[14, -3.0, -2.0], [7, -2.5, 0.0], [6, 1.0, 3.0], [8, -3.0, 2.5], [13, -1.5, 1.0], [19, 0.0, -3.0]], [[13, -2.5, 3.0], [11, 1.5, -0.5], [16, -2.0, -2.5], [7, -3.0, 0.0]]], 5], [[[], 2], [[], 2], [[], 2]]], [[[[[14, 2.5, 1.0], [12, 2.5, 3.0], [5, 0.5, 1.0]], [[8, -1.0, 1.0], [2, 1.0, -0.5]]], 11], [[[], 3], [[], 1]]], [[[[[2, 0.5, -2.5], [11, -3.0, -2.0], [4, 2.0, 2.0], [18, 2.0, 3.0]], [[11, 0.5, 0.0], [13, -0.5, 2.0]]], 11], [[[], 4], [[], 1]]], [[[[[12, 0.5, -1.0], [19, -2.5, 1.0], [11, 2.0, 3.0]], [[13, -1.0, -2.5], [17, 2.5, 2.0], [9, 1.5, 1.0], [15, 1.0, -0.5], [11, -0.5, -2.5], [7, 1.5, -2.0]]], 5], [[[], 3], [[[11, 13]], 5]]]], [[[[[[10, 3.0, 0.5], [16, 3.0, -0.5], [4, 2.5, -1.0], [6, 1.0, 2.0], [8, 3.0, -0.5], [17, 1.0, 0.0]]], 5], [[[[8, 16]], 4]]], [[[[[13, 1.5, 2.5], [3, 2.0, -0.5], [11, -3.0, -2.0], [8, 3.0, -3.0]], [[13, 2.5, 1.5], [18, 0.0, -1.5], [4, 1.0, -1.5], [6, 2.5, 2.5], [9, 0.0, -2.5]]], 7], [[[], 4], [[], 4]]], [[[[[14, -0.5, -0.5], [15, 2.0, 2.0], [19, -1.5, 1.0], [8, -3.0, -1.0], [12, 1.0, 0.5]], [[7, 2.5, 0.5], [15, 3.0, -1.0], [10, -2.0, 3.0], [18, -2.5, 2.5], [14, 1.5, 0.0]], [[6, -3.0, -3.0], [4, -1.0, -2.0], [16, 2.0, -3.0]], [[3, 2.0, 2.0], [10, 2.0, 2.5]]], 7], [[[], 4], [[], 5], [[], 3], [[[3, 10]], 1]]], [[[[[6, -3.0, -1.5], [4, 1.0, -2.0], [9, 2.0, -1.5], [13, -1.0, -2.5]], [[12, -2.5, 2.5], [8, 3.0, -2.0], [9, 0.0, 3.0], [2, -1.5, 2.5]], [[11, 0.5, 3.0], [2, 3.0, 0.0], [13, -1.5, 1.0], [3, 1.5, -2.0]], [[3, 1.5, 2.0], [19, 1.0, 1.5], [16, 0.5, -1.5], [4, 0.0, -1.5], [2, 0.5, -3.0], [15, 1.5, 2.5]]], 7], [[[], 4], [[], 4], [[], 4], [[[3, 15], [4, 16]], 3]]], [[[[[12, 0.5, 3.0], [2, 0.0, 0.0]]], 11], [[[], 2]]], [[[[[16, -2.0, -2.0], [14, -1.0, -3.0], [18, 2.5, 2.0], [1, -3.0, -0.5], [15, 2.0, 0.5]], [[16, 0.5, 2.5], [17, -0.5, -0.5]]], 7], [[[], 4], [[], 2]]], [[[[[7, 2.0, -0.5], [16, 2.5, -3.0], [11, -1.0, -3.0]]], 7], [[[], 3]]], [[[[[11, 1.0, -0.5], [2, -1.5, 3.0], [9, 2.5, 3.0], [15, -1.5, 1.5]]], 11], [[[], 3]]]], [[[[[[7, -0.5, 1.5], [16, 0.5, 2.0], [8, -2.5, 2.5], [3, -2.0, 0.5], [1, 2.5, -2.0]]], 11], [[[], 5]]], [[[[[2, 2.0, -3.0], [12, 0.0, -2.5]], [[11, 1.5, -1.0], [18, 3.0, 1.0], [7, -2.5, 1.0], [1, -2.0, 3.0]], [[7, 1.5, 0.5], [9, -0.5, -2.5], [16, -1.0, -3.0], [6, 3.0, 2.0], [17, 3.0, 1.0], [18, 0.5, -0.5]], [[6, 1.5, -0.5], [1, -2.0, 3.0], [4, 3.0, -0.5]]], 5], [[[], 1], [[], 2], [[[9, 16]], 4], [[], 2]]], [[[[[9, 3.0, 0.5], [10, 1.0, 2.5], [19, -2.0, -1.5]], [[11, -3.0, 1.0], [13, 1.0, -0.5]], [[13, -2.0, 1.0], [17, 1.5, -0.5]], [[6, -3.0, 3.0], [19, 1.0, 0.5], [15, -1.0, 0.0], [11, 0.0, 0.5], [9, 0.0, -2.0], [4, -0.5, -0.5]]], 5], [[[], 3], [[], 1], [[], 2], [[], 3]]], [[[[[12, -1.5, 0.0], [10, 1.5, -1.0], [5, 0.5, 0.5]], [[10, -3.0, -2.5], [11, 1.5, -2.5], [8, 2.0, 2.0], [1, 1.5, 1.5], [12, -2.0, -0.5]]], 5], [[[], 1], [[], 4]]], [[[[[1, -3.0, -0.5], [15, -2.0, 2.5], [17, -1.0, -2.5], [19, 0.0, -0.5], [10, 0.5, 1.0], [7, 2.5, 2.5]]], 7], [[[], 4]]], [[[[[15, -3.0, -0.5], [19, -1.0, 2.5], [13, -1.0, -0.5]], [[17, 0.0, 2.0], [18, 1.0, -3.0]], [[17, 3.0, 2.5], [19, -3.0, -1.0], [8, 2.5, -1.5], [11, 0.5, -1.5]], [[12, -0.5, 1.5], [15, -3.0, 1.0], [16, 0.5, -3.0]]], 3], [[[], 1], [[], 2], [[], 1], [[], 2]]], [[[[[12, -0.5, -2.5], [1, -2.5, 1.5], [11, 2.5, 3.0], [5, 0.5, 3.0], [8, -2.0, 3.0], [18, -3.0, -0.5]], [[4, 1.0, -0.5], [17, 1.5, -1.0], [7, -1.5, 2.5], [10, -1.5, 0.5]], [[8, 3.0, 0.5], [5, 2.0, 1.5], [16, -0.5, 2.0]]], 3], [[[], 2], [[[4, 17]], 2], [[], 2]]], [[[[[15, -1.5, 3.0], [3, -3.0, 1.0], [8, -0.5, 3.0], [11, -1.5, 3.0], [1, 0.0, 3.0], [13, -1.5, 0.0]], [[6, 3.0, 0.0], [5, 1.5, 0.5], [11, -2.0, -0.5], [9, -0.5, 1.5]]], 5], [[[[11, 15]], 3], [[], 3]]]], [[[[[[3, 1.5, 1.0], [8, -2.0, 0.0], [9, -1.5, -1.0], [18, 1.5, 2.5]]], 11], [[[], 4]]], [[[[[5, 1.0, -2.5], [17, 0.5, 0.5], [8, -3.0, 3.0], [14, -2.5, -2.0], [4, -2.5, -1.0], [11, -2.5, 1.0]], [[7, -1.5, 0.0], [2, -1.5, -1.5]]], 7], [[[], 4], [[], 1]]], [[[[[8, 0.5, -2.5], [18, 0.5, -2.0], [15, 3.0, -2.0], [12, 0.0, 1.0]]], 3], [[[], 3]]], [[[[[14, 0.0, 3.0], [5, 2.0, 3.0], [10, -1.0, 0.0], [8, 0.0, 1.5], [1, -2.0, 2.5], [15, 2.0, 1.0]], [[6, 2.0, -2.0], [15, -2.5, 1.5]], [[19, -2.0, 0.0], [4, -0.5, -1.0], [18, -2.5, -2.5]], [[6, 0.5, 0.0], [7, -0.5, 1.0], [8, -1.5, 2.5]]], 3], [[[], 3], [[], 2], [[], 1], [[], 2]]], [[[[[18, 1.5, -1.0], [19, 2.5, -2.5], [14, -1.5, -1.0], [15, -0.5, 0.0], [7, -2.5, 2.5], [2, 1.5, 1.0]]], 11], [[[], 5]]], [[[[[17, 2.0, -1.0], [3, -1.5, 1.5], [13, 3.0, 2.5], [14, 1.0, 1.0], [15, -2.0, 0.5]], [[15, 2.5, 1.5], [3, -1.5, 2.5], [17, 0.5, 2.0], [6, -0.5, -1.5]]], 11], [[[], 4], [[], 4]]], [[[[[9, -1.5, 2.0], [13, 2.0, -1.5], [3, -2.0, 0.0], [8, 3.0, -1.0], [15, -2.0, 2.0], [12, -2.5, -1.5]], [[15, 1.5, -2.0], [2, -3.0, 3.0], [14, 1.0, -1.0], [1, -3.0, 3.0], [10, 3.0, -1.5]], [[13, 0.5, 0.5], [17, 3.0, 2.0], [3, 1.0, 2.5], [6, 0.5, 0.5], [1, 0.5, 0.0]], [[12, -1.5, -2.5], [15, 2.5, 0.0]]], 11], [[[[9, 15]], 3], [[[1, 2]], 4], [[[1, 6], [1, 13], [6, 13]], 3], [[], 2]]], [[[[[16, -3.0, -2.5], [11, 1.0, 2.0], [6, 2.5, -2.5], [2, 3.0, -1.0], [5, -0.5, -3.0]], [[4, 2.5, 0.0], [19, 2.0, -0.5]]], 5], [[[], 3], [[], 2]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, 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
case 0[[[], 2]][[[], 2]]Passed
case 1[[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]][[[], 2], [[[9, 10]], 3], [[[1, 9]], 3], [[], 3]]Passed
case 2[[[], 2], [[], 3], [[], 3]][[[], 2], [[], 3], [[], 3]]Passed
case 3[[[], 3], [[], 2]][[[], 3], [[], 2]]Passed
case 4[[[], 3], [[], 2], [[], 3], [[], 1]][[[], 3], [[], 2], [[], 3], [[], 1]]Passed
case 5[[[], 2], [[], 2], [[], 2], [[], 2]][[[], 2], [[], 2], [[], 2], [[], 2]]Passed
case 6[[[], 2], [[[3, 18]], 5], [[], 2]][[[], 2], [[[3, 18]], 5], [[], 2]]Passed
case 7[[[[1, 18]], 2]][[[[1, 18]], 2]]Passed

SHA-256 / ce326865c25dbb82b2e630a025c0472d8ae5a790f92bf8ca3fd1a8ab4db831bf

Verification & scope

A deterministic bounded teaching model with stipulated toy conventions; not a production physics engine or spatial index. 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:51:01.820753+00:00.

Case digest / 5d5fc97a45353330a43f449a19d726304e355a6cf4102416a4ed290b0ea1f858