FAILURE MAP
← Case archive

FA-87376 / Collision detection broadphase / Open access

Candidate pairs found in several cells are reported repeatedly · case 01

Narrowphase runs the same pair once per shared cell.

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

ROOT CAUSE

Pairs are collected in a list rather than a set.

THE FAILURE

Pairs are collected in a list rather than a set.

Unsuccessful approach: A set of unordered tuples still keeps (a,b) and (b,a) separately.

Case contract

solve(boxes, cs): insert each box [id,minx,miny,maxx,maxy] into every grid cell floor(min/cs)..floor(max/cs) inclusive on both axes. Return [sorted unique canonical candidate pairs sharing a cell, total cell insertions, largest bucket size].

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(boxes, cs):
    grid = {}
    inserts = 0
    for b in boxes:
        i0, i1 = math.floor(b[1] / cs), math.floor(b[3] / cs)
        j0, j1 = math.floor(b[2] / cs), math.floor(b[4] / cs)
        for i in range(i0, i1 + 1):
            for j in range(j0, j1 + 1):
                grid.setdefault((i, j), []).append(b[0])
                inserts += 1
    pairs = []
    for cell in grid.values():
        for p in range(len(cell)):
            for q in range(p + 1, len(cell)):
                a, c = cell[p], cell[q]
                pairs.append((min(a, c), max(a, c)))
    return [sorted([list(p) for p in pairs]), inserts, max((len(v) for v in grid.values()), default=0)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[9, -2.0, -2.0, -2.0, -1.0], [17, 1.5, -1.5, 3.5, 0.0], [25, -2.5, 3.0, 0.0, 3.5], [6, 2.5, 2.5, 5.0, 2.5], [12, 0.5, 1.5, 2.5, 3.0]], 1.0], [[[6, 12], [12, 25]], 28, 2]], [[[[12, -2.5, -2.0, -2.0, -2.0], [8, -3.0, -2.5, -0.5, -1.5]], 3.0], [[[8, 12]], 2, 2]], [[[[38, 4.0, -1.0, 5.0, 0.0], [39, -4.0, -3.0, 0.0, 1.0]], 2.5], [[], 13, 1]], [[[[7, 5.0, 1.0, 5.0, 4.0], [6, 0.0, -6.0, 5.0, -1.0], [22, 6.0, 6.0, 9.0, 10.0], [34, -1.0, 2.0, -1.0, 6.0], [1, 4.0, -5.0, 4.0, -2.0]], 2.5], [[[1, 6]], 22, 2]], [[[[34, -5.0, -6.0, -2.0, -2.0], [20, 3.0, 4.0, 7.0, 7.0], [23, 2.0, 3.0, 7.0, 6.0], [14, -4.0, 6.0, -4.0, 10.0], [6, 1.0, 0.0, 2.0, 5.0], [17, -3.0, -4.0, -1.0, -2.0]], 2.5], [[[6, 23], [17, 34], [20, 23]], 26, 2]], [[[[30, -5.0, 2.0, -2.0, 3.0], [27, 3.0, 3.0, 3.0, 3.0], [26, 5.0, -4.0, 9.0, -4.0]], 3.0], [[], 8, 1]], [[[[29, -3.0, 1.5, -0.5, 3.0], [14, -1.0, -1.5, 0.0, 0.5]], 3.0], [[[14, 29]], 6, 2]], [[[[21, -2.5, 1.5, -2.0, 2.5], [19, 1.5, 0.0, 2.0, 1.0], [10, -1.0, 1.5, 1.0, 3.5], [18, -1.5, 0.0, -1.0, 2.5], [24, -3.0, -1.5, -1.0, -1.0], [28, 3.0, 0.5, 4.0, 1.5]], 2.5], [[[10, 18], [10, 19], [10, 21], [18, 21]], 12, 3]]], [[[[[23, 4.0, -2.0, 7.0, 1.0], [38, -5.0, 3.0, 0.0, 7.0], [24, -6.0, 1.0, -1.0, 2.0], [34, -3.0, -1.0, 1.0, 0.0], [35, 3.0, 0.0, 3.0, 4.0]], 1.0], [[], 73, 1]], [[[[37, 3.0, 0.5, 3.5, 3.0], [13, 2.0, -0.5, 3.5, 0.5], [21, 1.0, 2.0, 2.5, 2.5], [34, 0.0, 2.0, 1.5, 4.5], [29, -0.5, -2.0, 1.5, -1.0], [33, -0.5, 0.5, 0.0, 3.0], [27, 0.5, 0.5, 2.0, 0.5]], 1.0], [[[13, 27], [13, 37], [21, 34], [27, 33], [33, 34]], 33, 2]], [[[[13, -1.0, 6.0, 2.0, 9.0], [17, 5.0, -1.0, 10.0, 1.0], [8, 4.0, -4.0, 6.0, -2.0], [14, 3.0, 2.0, 6.0, 3.0], [18, 2.0, -1.0, 3.0, 2.0]], 2.5], [[[8, 17], [8, 18], [14, 17], [14, 18]], 22, 2]], [[[[1, -2.0, 2.0, -1.5, 4.5], [38, -3.0, 3.0, -1.0, 5.0], [39, -1.5, -3.0, 0.5, -1.5], [25, 1.5, -0.5, 3.5, 2.0], [9, -2.0, 1.0, -1.0, 3.0]], 3.0], [[[1, 9], [1, 38], [9, 38], [25, 39]], 11, 3]], [[[[8, -4.0, 6.0, 1.0, 6.0], [31, -5.0, 3.0, -5.0, 7.0], [24, 6.0, -3.0, 7.0, 1.0], [5, -5.0, 5.0, -4.0, 9.0]], 1.0], [[[5, 8], [5, 31]], 31, 2]], [[[[25, -6.0, 5.0, -6.0, 9.0], [28, 4.0, 3.0, 8.0, 3.0], [36, -2.0, 3.0, 2.0, 8.0], [29, 2.0, -5.0, 5.0, -1.0], [20, -2.0, 4.0, 3.0, 9.0], [12, -2.0, -3.0, 1.0, -3.0]], 1.0], [[[20, 36]], 100, 2]], [[[[30, 3.0, 3.0, 4.0, 8.0], [14, 3.0, -6.0, 6.0, -5.0], [28, -1.0, -5.0, -1.0, -3.0]], 1.0], [[], 23, 1]], [[[[6, -2.5, 2.5, -1.5, 4.0], [32, -2.5, 0.5, -0.5, 1.0], [29, 2.5, 0.0, 4.0, 1.5], [18, -2.5, -0.5, -1.0, 2.0]], 1.0], [[[6, 18], [18, 32]], 30, 2]]], [[[[[16, 2.0, 1.5, 3.0, 2.5], [25, -2.5, -1.0, -0.5, 1.0], [9, -2.5, 2.0, -0.5, 3.5], [11, -2.0, -1.0, 0.0, -1.0], [37, -0.5, 2.0, 0.0, 2.5], [26, -2.0, -2.0, 0.5, -2.0], [8, 2.5, -3.0, 5.0, -1.5], [30, -2.5, -0.5, -2.5, 1.0]], 2.0], [[[9, 37], [11, 25], [11, 26], [25, 26], [25, 30]], 20, 3]], [[[[37, -1.0, -2.0, -1.0, -1.0], [10, 3.0, -1.0, 4.0, 4.0], [34, -6.0, -3.0, -5.0, 0.0], [28, -2.0, 3.0, 0.0, 8.0], [20, 4.0, -3.0, 5.0, 1.0], [22, 1.0, -4.0, 5.0, -3.0]], 2.0], [[[10, 20], [20, 22]], 26, 2]], [[[[23, -2.0, 3.0, -0.5, 3.5], [26, 3.0, 2.0, 5.5, 3.0], [38, -1.5, 0.0, 0.0, 0.0], [4, 1.5, 2.5, 4.0, 5.0]], 1.0], [[[4, 26]], 27, 2]], [[[[22, 0.5, 2.0, 2.0, 2.5], [8, 1.5, -0.5, 2.0, -0.5], [2, 3.0, -0.5, 3.0, 0.0], [27, -1.0, 1.5, 0.5, 2.0], [36, 1.5, 1.5, 2.5, 1.5], [14, -2.5, -1.5, -2.0, -1.5], [31, 0.0, -1.5, 1.0, -0.5]], 2.5], [[[2, 36], [8, 31], [22, 27], [22, 36], [27, 36]], 11, 3]], [[[[22, 3.0, 4.0, 6.0, 6.0], [36, 0.0, -6.0, 4.0, -1.0], [38, -5.0, 0.0, 0.0, 0.0], [25, -4.0, 1.0, 0.0, 3.0]], 2.5], [[[25, 38]], 19, 2]], [[[[28, 1.5, 0.5, 3.0, 3.0], [22, -1.5, -0.5, -0.5, -0.5], [15, -1.5, 2.5, -1.0, 3.5], [19, -1.0, -2.5, 1.0, -1.0], [30, -2.5, 0.0, -1.0, 0.5], [2, 0.5, -2.5, 2.0, -0.5], [23, -2.0, 0.0, -1.0, 0.5]], 2.5], [[[2, 19], [19, 22], [23, 30]], 11, 2]], [[[[16, -5.0, 5.0, -4.0, 6.0], [37, -2.0, 5.0, -1.0, 10.0], [10, 5.0, -2.0, 9.0, 1.0]], 1.0], [[], 36, 1]], [[[[21, 1.0, -1.0, 5.0, 2.0], [18, -6.0, 3.0, -3.0, 8.0], [29, 6.0, -1.0, 6.0, 2.0], [10, 5.0, 0.0, 7.0, 1.0], [30, 0.0, -4.0, 3.0, -3.0], [16, 2.0, 1.0, 7.0, 2.0]], 2.5], [[[10, 16], [10, 21], [10, 29], [16, 21], [16, 29], [21, 29]], 20, 4]]], [[[[[8, 5.0, 4.0, 9.0, 8.0], [21, 5.0, -3.0, 5.0, -2.0], [14, 3.0, 6.0, 3.0, 11.0], [32, 4.0, -5.0, 5.0, 0.0], [29, -1.0, 3.0, 2.0, 5.0], [3, -4.0, 4.0, -1.0, 8.0], [39, -1.0, 1.0, 4.0, 3.0]], 2.0], [[[3, 29], [21, 32], [29, 39], [32, 39]], 38, 2]], [[[[5, -3.0, 2.0, -2.5, 3.5], [4, 2.5, 2.0, 5.0, 4.5], [27, 3.0, 0.5, 4.5, 0.5], [12, 0.0, -1.5, 1.5, -1.5], [22, 2.5, 1.5, 2.5, 2.5], [20, 1.5, 1.0, 2.0, 2.0]], 1.0], [[[4, 20], [4, 22], [20, 22]], 24, 3]], [[[[17, 4.0, 0.0, 9.0, 5.0], [10, 3.0, -6.0, 5.0, -1.0], [11, 0.0, -4.0, 2.0, 0.0]], 2.5], [[], 18, 1]], [[[[14, 4.0, -5.0, 4.0, -5.0], [25, -2.0, -4.0, 0.0, -4.0], [30, -4.0, 0.0, -1.0, 0.0], [8, -4.0, -4.0, -3.0, -4.0], [28, -4.0, 5.0, 0.0, 7.0], [19, -5.0, -2.0, -2.0, 2.0], [37, 4.0, -1.0, 9.0, 4.0], [9, -5.0, 4.0, -3.0, 8.0]], 3.0], [[[8, 25], [9, 28], [19, 30]], 30, 2]], [[[[30, -2.5, -1.0, -0.5, 1.0], [16, 0.5, 3.0, 3.0, 5.5], [17, 1.0, -2.5, 1.0, -1.0], [32, 1.5, 0.0, 4.0, 0.0], [36, -1.5, 2.0, -0.5, 3.5]], 2.5], [[[30, 36]], 11, 2]], [[[[15, 0.0, 2.0, 2.0, 2.5], [2, -3.0, 2.0, -3.0, 4.5], [29, -1.5, 1.5, 0.0, 4.0], [37, -2.0, 1.0, -2.0, 3.0], [27, 2.5, 1.0, 4.0, 3.5], [30, -0.5, 2.5, -0.5, 4.5]], 1.0], [[[15, 27], [15, 29], [29, 30], [29, 37]], 33, 2]], [[[[19, -3.0, 2.0, -1.0, 2.0], [3, 6.0, 0.0, 9.0, 4.0], [32, 3.0, -6.0, 3.0, -2.0], [38, 0.0, 3.0, 5.0, 3.0], [8, -4.0, 6.0, -3.0, 11.0], [13, -3.0, 5.0, 2.0, 10.0], [2, 3.0, 3.0, 7.0, 3.0], [30, 2.0, 0.0, 5.0, 5.0]], 3.0], [[[2, 3], [2, 30], [2, 38], [8, 13], [13, 30], [13, 38], [30, 38]], 25, 3]], [[[[33, 2.0, 0.0, 5.0, 1.0], [26, 1.0, -1.0, 1.0, 0.0], [29, -5.0, 2.0, -4.0, 5.0]], 2.0], [[], 8, 1]]], [[[[[2, 0.0, -4.0, 1.0, 0.0], [33, 4.0, -4.0, 4.0, -3.0], [9, 4.0, 5.0, 9.0, 5.0], [37, 6.0, 5.0, 6.0, 6.0], [32, -3.0, -5.0, 2.0, -5.0], [26, 5.0, 0.0, 5.0, 1.0]], 2.5], [[[2, 32], [9, 37]], 12, 2]], [[[[2, 0.0, -2.0, 1.0, 2.0], [38, -4.0, -3.0, 1.0, -2.0], [8, 5.0, -2.0, 10.0, 3.0], [10, 4.0, -2.0, 9.0, 0.0], [4, -1.0, 6.0, 1.0, 10.0], [20, -3.0, -2.0, -2.0, 3.0], [31, -5.0, -4.0, -5.0, -3.0], [16, -4.0, -1.0, -2.0, 4.0], [1, -1.0, -5.0, 3.0, 0.0], [23, -6.0, 4.0, -4.0, 6.0]], 2.5], [[[1, 2], [1, 10], [1, 16], [1, 20], [1, 38], [2, 38], [8, 10], [16, 20], [16, 23], [16, 38], [20, 23], [20, 38], [31, 38]], 55, 4]], [[[[35, 0.0, 0.0, 0.0, 4.0], [18, -1.0, -6.0, 3.0, -6.0], [6, 3.0, 4.0, 5.0, 8.0], [25, 4.0, -4.0, 6.0, -2.0], [36, 2.0, -6.0, 7.0, -5.0], [21, 0.0, 4.0, 4.0, 6.0], [29, 4.0, -2.0, 9.0, 3.0], [34, 3.0, -2.0, 7.0, 0.0], [33, 5.0, -4.0, 5.0, -3.0], [15, 4.0, 0.0, 4.0, 5.0]], 2.5], [[[6, 15], [6, 21], [6, 29], [15, 21], [15, 29], [15, 34], [18, 36], [21, 29], [21, 35], [25, 29], [25, 33], [25, 34], [25, 36], [29, 34], [33, 36]], 42, 4]], [[[[29, 1.0, -2.0, 2.5, 0.0], [30, -2.5, 0.0, -2.0, 0.0]], 2.5], [[], 5, 1]], [[[[33, -2.0, -5.0, -1.0, -1.0], [32, -4.0, -3.0, -4.0, -2.0]], 2.5], [[], 4, 1]], [[[[1, -0.5, -3.0, 1.0, -0.5], [31, 1.0, -3.0, 2.0, -3.0], [30, -1.0, 2.5, -1.0, 3.0], [23, -2.0, -2.5, -2.0, 0.0], [35, 3.0, -2.0, 3.0, -1.5], [5, -2.0, -2.5, 0.5, -1.5], [7, 0.0, -1.0, 1.0, 1.5], [12, 1.5, 0.0, 3.0, 0.0], [28, 0.5, -2.5, 0.5, -0.5], [37, -2.5, 0.0, -1.0, 0.0]], 2.0], [[[1, 5], [1, 7], [1, 23], [1, 28], [1, 31], [5, 7], [5, 23], [5, 28], [5, 31], [7, 12], [7, 28], [23, 37], [28, 31]], 23, 4]], [[[[30, -5.0, -5.0, 0.0, -2.0], [37, 6.0, -2.0, 10.0, 3.0], [3, -3.0, 4.0, 2.0, 5.0], [7, 0.0, -5.0, 4.0, 0.0], [20, -2.0, 1.0, 2.0, 4.0], [16, -3.0, -4.0, 0.0, 0.0], [24, 0.0, 6.0, 0.0, 9.0]], 2.0], [[[3, 20], [7, 16], [7, 20], [7, 30], [16, 20], [16, 30]], 57, 3]], [[[[37, 0.5, 2.5, 3.0, 5.0], [31, -2.0, 2.0, 0.5, 3.5], [6, -1.5, -2.0, -0.5, 0.0], [14, -2.5, 1.0, -1.5, 3.5]], 3.0], [[[6, 14], [6, 31], [14, 31], [31, 37]], 12, 3]]]]
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[[[6, 12], [12, 25]], 28, 2][[[6, 12], [12, 25]], 28, 2]Passed
case 1[[[8, 12]], 2, 2][[[8, 12]], 2, 2]Passed
case 2[[], 13, 1][[], 13, 1]Passed
case 3[[[1, 6], [1, 6]], 22, 2][[[1, 6]], 22, 2]Failed
case 4[[[6, 23], [6, 23], [17, 34], [17, 34], [17, 34], [17, 34], [20, 23], [20, 23], [20, 23], [20, 23]], 26, 2][[[6, 23], [17, 34], [20, 23]], 26, 2]Failed
case 5[[], 8, 1][[], 8, 1]Passed
case 6[[[14, 29]], 6, 2][[[14, 29]], 6, 2]Passed
case 7[[[10, 18], [10, 18], [10, 19], [10, 21], [10, 21], [18, 21], [18, 21]], 12, 3][[[10, 18], [10, 19], [10, 21], [18, 21]], 12, 3]Failed

SHA-256 / bee2617f81feb60d55edd1ac49dc971894896e2158e0cfef69255dac612d8978

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(boxes, cs):
    grid = {}
    inserts = 0
    for b in boxes:
        i0, i1 = math.floor(b[1] / cs), math.floor(b[3] / cs)
        j0, j1 = math.floor(b[2] / cs), math.floor(b[4] / cs)
        for i in range(i0, i1 + 1):
            for j in range(j0, j1 + 1):
                grid.setdefault((i, j), []).append(b[0])
                inserts += 1
    pairs = set()
    for cell in grid.values():
        for p in range(len(cell)):
            for q in range(p + 1, len(cell)):
                a, c = cell[p], cell[q]
                pairs.add((a, c))
    return [sorted([list(p) for p in pairs]), inserts, max((len(v) for v in grid.values()), default=0)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[9, -2.0, -2.0, -2.0, -1.0], [17, 1.5, -1.5, 3.5, 0.0], [25, -2.5, 3.0, 0.0, 3.5], [6, 2.5, 2.5, 5.0, 2.5], [12, 0.5, 1.5, 2.5, 3.0]], 1.0], [[[6, 12], [12, 25]], 28, 2]], [[[[12, -2.5, -2.0, -2.0, -2.0], [8, -3.0, -2.5, -0.5, -1.5]], 3.0], [[[8, 12]], 2, 2]], [[[[38, 4.0, -1.0, 5.0, 0.0], [39, -4.0, -3.0, 0.0, 1.0]], 2.5], [[], 13, 1]], [[[[7, 5.0, 1.0, 5.0, 4.0], [6, 0.0, -6.0, 5.0, -1.0], [22, 6.0, 6.0, 9.0, 10.0], [34, -1.0, 2.0, -1.0, 6.0], [1, 4.0, -5.0, 4.0, -2.0]], 2.5], [[[1, 6]], 22, 2]], [[[[34, -5.0, -6.0, -2.0, -2.0], [20, 3.0, 4.0, 7.0, 7.0], [23, 2.0, 3.0, 7.0, 6.0], [14, -4.0, 6.0, -4.0, 10.0], [6, 1.0, 0.0, 2.0, 5.0], [17, -3.0, -4.0, -1.0, -2.0]], 2.5], [[[6, 23], [17, 34], [20, 23]], 26, 2]], [[[[30, -5.0, 2.0, -2.0, 3.0], [27, 3.0, 3.0, 3.0, 3.0], [26, 5.0, -4.0, 9.0, -4.0]], 3.0], [[], 8, 1]], [[[[29, -3.0, 1.5, -0.5, 3.0], [14, -1.0, -1.5, 0.0, 0.5]], 3.0], [[[14, 29]], 6, 2]], [[[[21, -2.5, 1.5, -2.0, 2.5], [19, 1.5, 0.0, 2.0, 1.0], [10, -1.0, 1.5, 1.0, 3.5], [18, -1.5, 0.0, -1.0, 2.5], [24, -3.0, -1.5, -1.0, -1.0], [28, 3.0, 0.5, 4.0, 1.5]], 2.5], [[[10, 18], [10, 19], [10, 21], [18, 21]], 12, 3]]], [[[[[23, 4.0, -2.0, 7.0, 1.0], [38, -5.0, 3.0, 0.0, 7.0], [24, -6.0, 1.0, -1.0, 2.0], [34, -3.0, -1.0, 1.0, 0.0], [35, 3.0, 0.0, 3.0, 4.0]], 1.0], [[], 73, 1]], [[[[37, 3.0, 0.5, 3.5, 3.0], [13, 2.0, -0.5, 3.5, 0.5], [21, 1.0, 2.0, 2.5, 2.5], [34, 0.0, 2.0, 1.5, 4.5], [29, -0.5, -2.0, 1.5, -1.0], [33, -0.5, 0.5, 0.0, 3.0], [27, 0.5, 0.5, 2.0, 0.5]], 1.0], [[[13, 27], [13, 37], [21, 34], [27, 33], [33, 34]], 33, 2]], [[[[13, -1.0, 6.0, 2.0, 9.0], [17, 5.0, -1.0, 10.0, 1.0], [8, 4.0, -4.0, 6.0, -2.0], [14, 3.0, 2.0, 6.0, 3.0], [18, 2.0, -1.0, 3.0, 2.0]], 2.5], [[[8, 17], [8, 18], [14, 17], [14, 18]], 22, 2]], [[[[1, -2.0, 2.0, -1.5, 4.5], [38, -3.0, 3.0, -1.0, 5.0], [39, -1.5, -3.0, 0.5, -1.5], [25, 1.5, -0.5, 3.5, 2.0], [9, -2.0, 1.0, -1.0, 3.0]], 3.0], [[[1, 9], [1, 38], [9, 38], [25, 39]], 11, 3]], [[[[8, -4.0, 6.0, 1.0, 6.0], [31, -5.0, 3.0, -5.0, 7.0], [24, 6.0, -3.0, 7.0, 1.0], [5, -5.0, 5.0, -4.0, 9.0]], 1.0], [[[5, 8], [5, 31]], 31, 2]], [[[[25, -6.0, 5.0, -6.0, 9.0], [28, 4.0, 3.0, 8.0, 3.0], [36, -2.0, 3.0, 2.0, 8.0], [29, 2.0, -5.0, 5.0, -1.0], [20, -2.0, 4.0, 3.0, 9.0], [12, -2.0, -3.0, 1.0, -3.0]], 1.0], [[[20, 36]], 100, 2]], [[[[30, 3.0, 3.0, 4.0, 8.0], [14, 3.0, -6.0, 6.0, -5.0], [28, -1.0, -5.0, -1.0, -3.0]], 1.0], [[], 23, 1]], [[[[6, -2.5, 2.5, -1.5, 4.0], [32, -2.5, 0.5, -0.5, 1.0], [29, 2.5, 0.0, 4.0, 1.5], [18, -2.5, -0.5, -1.0, 2.0]], 1.0], [[[6, 18], [18, 32]], 30, 2]]], [[[[[16, 2.0, 1.5, 3.0, 2.5], [25, -2.5, -1.0, -0.5, 1.0], [9, -2.5, 2.0, -0.5, 3.5], [11, -2.0, -1.0, 0.0, -1.0], [37, -0.5, 2.0, 0.0, 2.5], [26, -2.0, -2.0, 0.5, -2.0], [8, 2.5, -3.0, 5.0, -1.5], [30, -2.5, -0.5, -2.5, 1.0]], 2.0], [[[9, 37], [11, 25], [11, 26], [25, 26], [25, 30]], 20, 3]], [[[[37, -1.0, -2.0, -1.0, -1.0], [10, 3.0, -1.0, 4.0, 4.0], [34, -6.0, -3.0, -5.0, 0.0], [28, -2.0, 3.0, 0.0, 8.0], [20, 4.0, -3.0, 5.0, 1.0], [22, 1.0, -4.0, 5.0, -3.0]], 2.0], [[[10, 20], [20, 22]], 26, 2]], [[[[23, -2.0, 3.0, -0.5, 3.5], [26, 3.0, 2.0, 5.5, 3.0], [38, -1.5, 0.0, 0.0, 0.0], [4, 1.5, 2.5, 4.0, 5.0]], 1.0], [[[4, 26]], 27, 2]], [[[[22, 0.5, 2.0, 2.0, 2.5], [8, 1.5, -0.5, 2.0, -0.5], [2, 3.0, -0.5, 3.0, 0.0], [27, -1.0, 1.5, 0.5, 2.0], [36, 1.5, 1.5, 2.5, 1.5], [14, -2.5, -1.5, -2.0, -1.5], [31, 0.0, -1.5, 1.0, -0.5]], 2.5], [[[2, 36], [8, 31], [22, 27], [22, 36], [27, 36]], 11, 3]], [[[[22, 3.0, 4.0, 6.0, 6.0], [36, 0.0, -6.0, 4.0, -1.0], [38, -5.0, 0.0, 0.0, 0.0], [25, -4.0, 1.0, 0.0, 3.0]], 2.5], [[[25, 38]], 19, 2]], [[[[28, 1.5, 0.5, 3.0, 3.0], [22, -1.5, -0.5, -0.5, -0.5], [15, -1.5, 2.5, -1.0, 3.5], [19, -1.0, -2.5, 1.0, -1.0], [30, -2.5, 0.0, -1.0, 0.5], [2, 0.5, -2.5, 2.0, -0.5], [23, -2.0, 0.0, -1.0, 0.5]], 2.5], [[[2, 19], [19, 22], [23, 30]], 11, 2]], [[[[16, -5.0, 5.0, -4.0, 6.0], [37, -2.0, 5.0, -1.0, 10.0], [10, 5.0, -2.0, 9.0, 1.0]], 1.0], [[], 36, 1]], [[[[21, 1.0, -1.0, 5.0, 2.0], [18, -6.0, 3.0, -3.0, 8.0], [29, 6.0, -1.0, 6.0, 2.0], [10, 5.0, 0.0, 7.0, 1.0], [30, 0.0, -4.0, 3.0, -3.0], [16, 2.0, 1.0, 7.0, 2.0]], 2.5], [[[10, 16], [10, 21], [10, 29], [16, 21], [16, 29], [21, 29]], 20, 4]]], [[[[[8, 5.0, 4.0, 9.0, 8.0], [21, 5.0, -3.0, 5.0, -2.0], [14, 3.0, 6.0, 3.0, 11.0], [32, 4.0, -5.0, 5.0, 0.0], [29, -1.0, 3.0, 2.0, 5.0], [3, -4.0, 4.0, -1.0, 8.0], [39, -1.0, 1.0, 4.0, 3.0]], 2.0], [[[3, 29], [21, 32], [29, 39], [32, 39]], 38, 2]], [[[[5, -3.0, 2.0, -2.5, 3.5], [4, 2.5, 2.0, 5.0, 4.5], [27, 3.0, 0.5, 4.5, 0.5], [12, 0.0, -1.5, 1.5, -1.5], [22, 2.5, 1.5, 2.5, 2.5], [20, 1.5, 1.0, 2.0, 2.0]], 1.0], [[[4, 20], [4, 22], [20, 22]], 24, 3]], [[[[17, 4.0, 0.0, 9.0, 5.0], [10, 3.0, -6.0, 5.0, -1.0], [11, 0.0, -4.0, 2.0, 0.0]], 2.5], [[], 18, 1]], [[[[14, 4.0, -5.0, 4.0, -5.0], [25, -2.0, -4.0, 0.0, -4.0], [30, -4.0, 0.0, -1.0, 0.0], [8, -4.0, -4.0, -3.0, -4.0], [28, -4.0, 5.0, 0.0, 7.0], [19, -5.0, -2.0, -2.0, 2.0], [37, 4.0, -1.0, 9.0, 4.0], [9, -5.0, 4.0, -3.0, 8.0]], 3.0], [[[8, 25], [9, 28], [19, 30]], 30, 2]], [[[[30, -2.5, -1.0, -0.5, 1.0], [16, 0.5, 3.0, 3.0, 5.5], [17, 1.0, -2.5, 1.0, -1.0], [32, 1.5, 0.0, 4.0, 0.0], [36, -1.5, 2.0, -0.5, 3.5]], 2.5], [[[30, 36]], 11, 2]], [[[[15, 0.0, 2.0, 2.0, 2.5], [2, -3.0, 2.0, -3.0, 4.5], [29, -1.5, 1.5, 0.0, 4.0], [37, -2.0, 1.0, -2.0, 3.0], [27, 2.5, 1.0, 4.0, 3.5], [30, -0.5, 2.5, -0.5, 4.5]], 1.0], [[[15, 27], [15, 29], [29, 30], [29, 37]], 33, 2]], [[[[19, -3.0, 2.0, -1.0, 2.0], [3, 6.0, 0.0, 9.0, 4.0], [32, 3.0, -6.0, 3.0, -2.0], [38, 0.0, 3.0, 5.0, 3.0], [8, -4.0, 6.0, -3.0, 11.0], [13, -3.0, 5.0, 2.0, 10.0], [2, 3.0, 3.0, 7.0, 3.0], [30, 2.0, 0.0, 5.0, 5.0]], 3.0], [[[2, 3], [2, 30], [2, 38], [8, 13], [13, 30], [13, 38], [30, 38]], 25, 3]], [[[[33, 2.0, 0.0, 5.0, 1.0], [26, 1.0, -1.0, 1.0, 0.0], [29, -5.0, 2.0, -4.0, 5.0]], 2.0], [[], 8, 1]]], [[[[[2, 0.0, -4.0, 1.0, 0.0], [33, 4.0, -4.0, 4.0, -3.0], [9, 4.0, 5.0, 9.0, 5.0], [37, 6.0, 5.0, 6.0, 6.0], [32, -3.0, -5.0, 2.0, -5.0], [26, 5.0, 0.0, 5.0, 1.0]], 2.5], [[[2, 32], [9, 37]], 12, 2]], [[[[2, 0.0, -2.0, 1.0, 2.0], [38, -4.0, -3.0, 1.0, -2.0], [8, 5.0, -2.0, 10.0, 3.0], [10, 4.0, -2.0, 9.0, 0.0], [4, -1.0, 6.0, 1.0, 10.0], [20, -3.0, -2.0, -2.0, 3.0], [31, -5.0, -4.0, -5.0, -3.0], [16, -4.0, -1.0, -2.0, 4.0], [1, -1.0, -5.0, 3.0, 0.0], [23, -6.0, 4.0, -4.0, 6.0]], 2.5], [[[1, 2], [1, 10], [1, 16], [1, 20], [1, 38], [2, 38], [8, 10], [16, 20], [16, 23], [16, 38], [20, 23], [20, 38], [31, 38]], 55, 4]], [[[[35, 0.0, 0.0, 0.0, 4.0], [18, -1.0, -6.0, 3.0, -6.0], [6, 3.0, 4.0, 5.0, 8.0], [25, 4.0, -4.0, 6.0, -2.0], [36, 2.0, -6.0, 7.0, -5.0], [21, 0.0, 4.0, 4.0, 6.0], [29, 4.0, -2.0, 9.0, 3.0], [34, 3.0, -2.0, 7.0, 0.0], [33, 5.0, -4.0, 5.0, -3.0], [15, 4.0, 0.0, 4.0, 5.0]], 2.5], [[[6, 15], [6, 21], [6, 29], [15, 21], [15, 29], [15, 34], [18, 36], [21, 29], [21, 35], [25, 29], [25, 33], [25, 34], [25, 36], [29, 34], [33, 36]], 42, 4]], [[[[29, 1.0, -2.0, 2.5, 0.0], [30, -2.5, 0.0, -2.0, 0.0]], 2.5], [[], 5, 1]], [[[[33, -2.0, -5.0, -1.0, -1.0], [32, -4.0, -3.0, -4.0, -2.0]], 2.5], [[], 4, 1]], [[[[1, -0.5, -3.0, 1.0, -0.5], [31, 1.0, -3.0, 2.0, -3.0], [30, -1.0, 2.5, -1.0, 3.0], [23, -2.0, -2.5, -2.0, 0.0], [35, 3.0, -2.0, 3.0, -1.5], [5, -2.0, -2.5, 0.5, -1.5], [7, 0.0, -1.0, 1.0, 1.5], [12, 1.5, 0.0, 3.0, 0.0], [28, 0.5, -2.5, 0.5, -0.5], [37, -2.5, 0.0, -1.0, 0.0]], 2.0], [[[1, 5], [1, 7], [1, 23], [1, 28], [1, 31], [5, 7], [5, 23], [5, 28], [5, 31], [7, 12], [7, 28], [23, 37], [28, 31]], 23, 4]], [[[[30, -5.0, -5.0, 0.0, -2.0], [37, 6.0, -2.0, 10.0, 3.0], [3, -3.0, 4.0, 2.0, 5.0], [7, 0.0, -5.0, 4.0, 0.0], [20, -2.0, 1.0, 2.0, 4.0], [16, -3.0, -4.0, 0.0, 0.0], [24, 0.0, 6.0, 0.0, 9.0]], 2.0], [[[3, 20], [7, 16], [7, 20], [7, 30], [16, 20], [16, 30]], 57, 3]], [[[[37, 0.5, 2.5, 3.0, 5.0], [31, -2.0, 2.0, 0.5, 3.5], [6, -1.5, -2.0, -0.5, 0.0], [14, -2.5, 1.0, -1.5, 3.5]], 3.0], [[[6, 14], [6, 31], [14, 31], [31, 37]], 12, 3]]]]
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[[[6, 12], [25, 12]], 28, 2][[[6, 12], [12, 25]], 28, 2]Failed
case 1[[[12, 8]], 2, 2][[[8, 12]], 2, 2]Failed
case 2[[], 13, 1][[], 13, 1]Passed
case 3[[[6, 1]], 22, 2][[[1, 6]], 22, 2]Failed
case 4[[[20, 23], [23, 6], [34, 17]], 26, 2][[[6, 23], [17, 34], [20, 23]], 26, 2]Failed
case 5[[], 8, 1][[], 8, 1]Passed
case 6[[[29, 14]], 6, 2][[[14, 29]], 6, 2]Failed
case 7[[[10, 18], [19, 10], [21, 10], [21, 18]], 12, 3][[[10, 18], [10, 19], [10, 21], [18, 21]], 12, 3]Failed

SHA-256 / 7ec25b010e387dc39e8c301b215200b2cfe5d3ede9082130ca638d57c281a4ea

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

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

Case digest / 67041644033a0fa497974dad82483044309d0232d4b19ba72f8099835c2dbde6