FA-87626 / Collision detection broadphase / Open access
Objects exactly one cell wide are promoted a level · case 01
Grid level populations shift upward and coarse levels get crowded.
ROOT CAUSE
The loop continues while size <= ext.
THE FAILURE
The loop continues while size <= ext.
Unsuccessful approach: Comparing against half the extent treats size as a radius.
Case contract
solve(objs, base, levels): multi-level grid. Each [id,minx,miny,maxx,maxy] goes to the smallest level l (cell size base*2^l) whose cell size is >= the larger box extent, capped at levels-1; its home cell is floor(min corner / level cell size). Return sorted [[id, level, cx, cy]].
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(objs, base, levels):
out = []
for i, a, b, c, d in objs:
ext = max(c - a, d - b)
lvl = 0
size = base
while size <= ext and lvl < levels - 1:
size *= 2
lvl += 1
out.append([i, lvl, math.floor(a / size), math.floor(b / size)])
out.sort()
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[29, -9.0, -5.0, -1.0, -4.5], [31, -2.0, 4.0, 0.0, 13.0], [8, -2.0, -10.0, 28.0, -6.0]], 1.0, 5], [[8, 4, -1, -1], [29, 3, -2, -1], [31, 4, -1, 0]]], [[[[26, 3.5, 5.0, 4.0, 10.0], [4, -8.5, 9.0, -4.5, 18.0], [5, -4.5, 2.0, -3.5, 6.0], [10, 6.5, 9.0, 14.5, 9.5], [1, 3.0, 5.5, 5.0, 14.5], [23, 8.0, -2.0, 10.0, 2.0]], 1.0, 2], [[1, 1, 1, 2], [4, 1, -5, 4], [5, 1, -3, 1], [10, 1, 3, 4], [23, 1, 4, -1], [26, 1, 1, 2]]], [[[[6, 8.5, 1.0, 11.5, 2.0], [10, -8.0, 1.5, -7.0, 3.5]], 1.0, 2], [[6, 1, 4, 0], [10, 1, -4, 0]]], [[[[37, -2.0, 2.5, 0.0, 7.5], [34, 6.0, -9.0, 10.0, -5.0], [2, 8.5, 2.0, 12.5, 11.0], [27, 9.5, 6.5, 16.5, 11.5]], 1.0, 2], [[2, 1, 4, 1], [27, 1, 4, 3], [34, 1, 3, -5], [37, 1, -1, 1]]], [[[[10, -1.5, 7.5, 0.5, 11.5], [11, -8.0, 3.5, -4.0, 8.5], [17, -5.5, 0.0, -4.5, 4.0], [3, 4.0, -8.5, 12.0, -4.5]], 1.0, 4], [[3, 3, 0, -2], [10, 2, -1, 1], [11, 3, -1, 0], [17, 2, -2, 0]]], [[[[5, -5.0, 3.0, 11.0, 8.0], [31, 7.0, -5.0, 23.0, -3.0], [37, -8.0, 10.0, 22.0, 15.0], [22, 1.0, -9.5, 17.0, -7.5], [14, 3.5, -4.0, 5.5, 0.0]], 1.0, 5], [[5, 4, -1, 0], [14, 2, 0, -1], [22, 4, 0, -1], [31, 4, 0, -1], [37, 4, -1, 0]]], [[[[34, 9.5, 5.0, 17.5, 14.0], [1, 8.0, 1.0, 11.0, 5.0]], 2.0, 3], [[1, 1, 2, 0], [34, 2, 1, 0]]], [[[[36, -1.5, 10.0, 1.5, 10.5], [28, -7.5, -2.0, 0.5, 3.0], [31, 7.0, 10.0, 11.0, 15.0]], 2.0, 3], [[28, 2, -1, -1], [31, 2, 0, 1], [36, 1, -1, 2]]]], [[[[[25, -6.0, 9.0, -4.0, 18.0], [12, 9.5, -7.0, 25.5, -3.0], [33, -2.0, -9.5, 1.0, -0.5], [15, 0.0, -4.0, 0.5, 1.0], [19, 0.0, 2.5, 1.0, 11.5]], 1.0, 2], [[12, 1, 4, -4], [15, 1, 0, -2], [19, 1, 0, 1], [25, 1, -3, 4], [33, 1, -1, -5]]], [[[[19, 10.0, -8.5, 13.0, -4.5], [4, 8.5, 10.0, 10.5, 14.0], [23, -9.0, 4.5, -7.0, 9.5], [14, -3.5, 5.5, 3.5, 6.5], [2, 3.0, -8.0, 11.0, -4.0], [11, -4.0, 3.5, 4.0, 4.5]], 2.0, 3], [[2, 2, 0, -1], [4, 1, 2, 2], [11, 2, -1, 0], [14, 2, -1, 0], [19, 1, 2, -3], [23, 2, -2, 0]]], [[[[28, 3.5, 2.5, 6.5, 4.5], [6, 8.5, 5.0, 15.5, 6.0], [11, 3.5, -3.0, 4.0, -2.0], [4, 0.5, 1.5, 3.5, 5.5], [19, 9.0, 3.5, 17.0, 12.5], [35, 1.0, -2.5, 31.0, -1.5], [12, 2.0, 9.0, 5.0, 13.0]], 1.0, 5], [[4, 2, 0, 0], [6, 3, 1, 0], [11, 0, 3, -3], [12, 2, 0, 2], [19, 4, 0, 0], [28, 2, 0, 0], [35, 4, 0, -1]]], [[[[19, -1.0, -8.5, 29.0, -3.5], [24, -7.0, 1.5, -3.0, 10.5], [39, -3.0, 0.5, -2.5, 1.5]], 2.0, 3], [[19, 2, -1, -2], [24, 2, -1, 0], [39, 0, -2, 0]]], [[[[20, -9.0, -2.0, 21.0, -1.0], [6, -5.5, 2.5, -5.0, 7.5], [12, 0.0, 9.0, 2.0, 14.0], [16, 10.0, 7.0, 13.0, 11.0], [17, 8.5, 6.5, 24.5, 10.5], [31, -7.5, 3.0, -5.5, 12.0]], 1.0, 2], [[6, 1, -3, 1], [12, 1, 0, 4], [16, 1, 5, 3], [17, 1, 4, 3], [20, 1, -5, -1], [31, 1, -4, 1]]], [[[[7, 8.0, 2.5, 16.0, 4.5], [20, 7.5, 5.5, 11.5, 14.5], [25, -4.0, -10.0, 3.0, -9.0], [1, 0.5, -0.5, 4.5, 0.0]], 2.0, 5], [[1, 1, 0, -1], [7, 2, 1, 0], [20, 3, 0, 0], [25, 2, -1, -2]]], [[[[13, 4.5, 1.0, 12.5, 6.0], [11, -1.0, 5.0, 3.0, 6.0], [21, -6.0, -3.5, -4.0, -2.5], [5, 0.5, -6.5, 7.5, -1.5], [32, 6.0, 4.5, 36.0, 9.5], [10, -1.0, 8.0, 29.0, 8.5]], 2.0, 3], [[5, 2, 0, -1], [10, 2, -1, 1], [11, 1, -1, 1], [13, 2, 0, 0], [21, 0, -3, -2], [32, 2, 0, 0]]], [[[[8, 9.0, 3.0, 17.0, 3.5], [17, 7.0, 3.5, 8.0, 4.0], [25, 2.5, -6.5, 4.5, 2.5], [37, -9.0, -4.5, -7.0, -2.5], [19, 6.5, 4.5, 14.5, 13.5], [36, 3.5, -7.0, 4.5, -6.0]], 1.0, 3], [[8, 2, 2, 0], [17, 0, 7, 3], [19, 2, 1, 1], [25, 2, 0, -2], [36, 0, 3, -7], [37, 1, -5, -3]]]], [[[[[22, -9.0, 8.0, 7.0, 8.5], [39, 3.5, 10.0, 10.5, 11.0], [12, -9.5, -5.0, 6.5, 4.0], [8, -0.5, -1.0, 0.5, 8.0], [16, 4.0, 5.0, 20.0, 14.0]], 1.0, 5], [[8, 4, -1, -1], [12, 4, -1, -1], [16, 4, 0, 0], [22, 4, -1, 0], [39, 3, 0, 1]]], [[[[7, -8.0, -9.0, -1.0, -8.5], [10, 3.0, -9.0, 6.0, -5.0], [3, -5.5, -8.0, -2.5, -3.0]], 1.0, 4], [[3, 3, -1, -1], [7, 3, -1, -2], [10, 2, 0, -3]]], [[[[29, 0.0, -2.5, 3.0, -0.5], [18, 9.0, -5.0, 12.0, 0.0], [1, 5.0, -4.0, 6.0, 5.0], [11, -4.5, -4.0, -3.5, -3.5], [3, 2.0, -2.0, 5.0, -1.5], [28, 9.0, 10.0, 25.0, 19.0], [9, -5.0, -4.0, 11.0, -3.0]], 1.0, 2], [[1, 1, 2, -2], [3, 1, 1, -1], [9, 1, -3, -2], [11, 0, -5, -4], [18, 1, 4, -3], [28, 1, 4, 5], [29, 1, 0, -2]]], [[[[22, 7.5, 9.0, 23.5, 11.0], [16, 7.5, 6.0, 8.5, 15.0], [35, 3.0, -3.0, 4.0, 1.0], [39, -8.5, 9.0, -5.5, 11.0], [20, -9.5, 3.0, 6.5, 12.0], [15, -4.0, -10.0, 26.0, -8.0], [17, -8.0, 5.5, -4.0, 9.5], [14, 2.5, 1.5, 4.5, 6.5]], 2.0, 2], [[14, 1, 0, 0], [15, 1, -1, -3], [16, 1, 1, 1], [17, 1, -2, 1], [20, 1, -3, 0], [22, 1, 1, 2], [35, 1, 0, -1], [39, 1, -3, 2]]], [[[[27, -2.5, -2.5, -0.5, -0.5], [16, -9.5, 10.0, -9.0, 12.0], [36, -4.0, 2.5, 3.0, 6.5], [4, -0.5, 2.0, 15.5, 6.0], [26, -0.5, 10.0, 3.5, 12.0], [3, -6.5, 1.5, -4.5, 3.5]], 1.0, 4], [[3, 1, -4, 0], [4, 3, -1, 0], [16, 1, -5, 5], [26, 2, -1, 2], [27, 1, -2, -2], [36, 3, -1, 0]]], [[[[37, 1.5, -1.5, 8.5, 7.5], [6, 0.0, -3.5, 3.0, -1.5], [10, 7.0, -2.5, 15.0, -2.0], [27, -0.5, 2.0, 0.5, 11.0], [9, 1.5, -6.5, 5.5, -6.0], [34, -7.5, 0.5, 0.5, 1.5], [17, 5.0, 6.5, 9.0, 15.5], [33, 10.0, -6.5, 12.0, 2.5]], 2.0, 5], [[6, 1, 0, -1], [9, 1, 0, -2], [10, 2, 0, -1], [17, 3, 0, 0], [27, 3, -1, 0], [33, 3, 0, -1], [34, 2, -1, 0], [37, 3, 0, -1]]], [[[[17, -8.0, 2.5, 8.0, 6.5], [31, 1.5, 5.5, 9.5, 7.5], [8, 5.0, -2.5, 13.0, -1.5]], 2.0, 3], [[8, 2, 0, -1], [17, 2, -1, 0], [31, 2, 0, 0]]], [[[[4, 0.0, -4.0, 16.0, 1.0], [2, -1.5, -9.5, 5.5, -7.5], [33, -6.5, 3.0, -2.5, 7.0], [39, -5.0, 5.5, 11.0, 6.0], [13, -9.0, -4.0, 7.0, 5.0]], 2.0, 2], [[2, 1, -1, -3], [4, 1, 0, -1], [13, 1, -3, -1], [33, 1, -2, 0], [39, 1, -2, 1]]]], [[[[[15, 7.5, -3.5, 11.5, -3.0], [9, 8.0, 0.0, 9.0, 2.0], [3, -5.0, -7.5, 11.0, 1.5]], 1.0, 2], [[3, 1, -3, -4], [9, 1, 4, 0], [15, 1, 3, -2]]], [[[[32, 7.5, -0.5, 8.5, 4.5], [11, 8.0, -2.0, 11.0, 0.0], [29, 9.0, 1.5, 16.0, 10.5], [1, -9.0, -3.5, -2.0, 0.5], [10, -10.0, -6.5, -8.0, -4.5], [24, 0.0, 9.0, 8.0, 13.0], [23, 1.5, -0.5, 2.5, 4.5], [38, 6.5, -7.5, 36.5, 1.5]], 1.0, 5], [[1, 3, -2, -1], [10, 1, -5, -4], [11, 2, 2, -1], [23, 3, 0, -1], [24, 3, 0, 1], [29, 4, 0, 0], [32, 3, 0, -1], [38, 4, 0, -1]]], [[[[20, -9.5, 10.0, -7.5, 19.0], [2, -2.5, -0.5, 5.5, 3.5], [13, -10.0, -2.5, -3.0, -0.5], [24, 2.0, -0.5, 9.0, 1.5], [23, 1.5, 1.0, 5.5, 2.0], [17, -10.0, -8.5, 6.0, -3.5], [1, 2.5, -0.5, 10.5, 0.5], [8, 9.5, 4.0, 13.5, 6.0]], 2.0, 2], [[1, 1, 0, -1], [2, 1, -1, -1], [8, 1, 2, 1], [13, 1, -3, -1], [17, 1, -3, -3], [20, 1, -3, 2], [23, 1, 0, 0], [24, 1, 0, -1]]], [[[[10, -8.0, 1.5, 8.0, 2.5], [20, 3.5, -0.5, 10.5, 0.5], [27, -7.5, -4.5, -4.5, 0.5]], 2.0, 5], [[10, 3, -1, 0], [20, 2, 0, -1], [27, 2, -1, -1]]], [[[[7, 0.5, -3.0, 1.5, 6.0], [6, -10.0, 1.5, -2.0, 10.5], [32, 9.0, -7.0, 11.0, -3.0], [3, 8.5, -2.5, 16.5, -2.0]], 1.0, 5], [[3, 3, 1, -1], [6, 4, -1, 0], [7, 4, 0, -1], [32, 2, 2, -2]]], [[[[32, -8.0, -8.0, -7.0, -4.0], [26, -6.0, -4.5, -5.0, 0.5]], 1.0, 2], [[26, 1, -3, -3], [32, 1, -4, -4]]], [[[[36, 1.0, 10.0, 31.0, 14.0], [27, 9.5, 9.0, 16.5, 13.0], [3, -5.5, 3.0, -2.5, 8.0]], 2.0, 2], [[3, 1, -2, 0], [27, 1, 2, 2], [36, 1, 0, 2]]], [[[[25, 8.5, 0.5, 9.5, 4.5], [16, 6.5, -10.0, 7.5, -8.0], [9, -0.5, 1.5, 3.5, 6.5], [21, -6.5, -1.5, -3.5, 2.5], [29, -5.0, -9.5, -4.5, -0.5], [37, 4.5, 6.0, 20.5, 10.0], [33, 0.5, -0.5, 30.5, 3.5], [35, 8.5, 0.5, 9.0, 1.5]], 2.0, 4], [[9, 2, -1, 0], [16, 0, 3, -5], [21, 1, -2, -1], [25, 1, 2, 0], [29, 3, -1, -1], [33, 3, 0, -1], [35, 0, 4, 0], [37, 3, 0, 0]]]], [[[[[7, 7.0, 0.5, 10.0, 1.0], [31, 7.5, 10.0, 23.5, 14.0], [11, -6.5, 9.0, -5.5, 14.0], [17, 8.0, -7.0, 8.5, -2.0], [22, 1.0, 3.0, 2.0, 5.0], [30, -2.0, -7.0, 1.0, -3.0]], 2.0, 5], [[7, 1, 1, 0], [11, 2, -1, 1], [17, 2, 1, -1], [22, 0, 0, 1], [30, 1, -1, -2], [31, 3, 0, 0]]], [[[[24, -0.5, -4.5, 0.5, -2.5], [8, -7.0, -8.0, 23.0, -7.0], [6, 1.0, 6.5, 4.0, 7.0], [2, 6.5, -9.0, 22.5, -7.0], [21, 0.5, -2.5, 4.5, 6.5], [19, -6.0, 9.0, -3.0, 13.0], [22, -3.5, 4.5, -2.5, 6.5], [26, -2.0, -5.0, -1.0, 0.0]], 1.0, 5], [[2, 4, 0, -1], [6, 2, 0, 1], [8, 4, -1, -1], [19, 2, -2, 2], [21, 4, 0, -1], [22, 1, -2, 2], [24, 1, -1, -3], [26, 3, -1, -1]]], [[[[39, 6.5, 1.0, 13.5, 3.0], [34, 8.0, -9.0, 15.0, 0.0], [38, 0.5, -10.0, 16.5, -8.0], [37, -1.0, -4.5, 7.0, -2.5], [22, 0.0, -3.5, 16.0, -1.5], [10, 7.5, -5.5, 8.5, -0.5], [7, 10.0, 4.5, 40.0, 9.5], [25, 2.0, 9.5, 10.0, 10.0]], 1.0, 4], [[7, 3, 1, 0], [10, 3, 0, -1], [22, 3, 0, -1], [25, 3, 0, 1], [34, 3, 1, -2], [37, 3, -1, -1], [38, 3, 0, -2], [39, 3, 0, 0]]], [[[[21, 2.5, -8.5, 3.5, -4.5], [32, -8.0, 9.0, -4.0, 10.0]], 2.0, 2], [[21, 1, 0, -3], [32, 1, -2, 2]]], [[[[13, -1.0, -5.5, 6.0, -3.5], [39, 8.0, -8.0, 8.5, -3.0], [4, -1.0, 2.0, 2.0, 7.0], [38, -6.0, 4.0, 2.0, 8.0], [21, -7.5, 8.5, -0.5, 17.5]], 1.0, 4], [[4, 3, -1, 0], [13, 3, -1, -1], [21, 3, -1, 1], [38, 3, -1, 0], [39, 3, 1, -1]]], [[[[7, 4.5, 1.5, 11.5, 2.5], [37, 2.0, 3.5, 10.0, 4.5], [2, 4.0, -5.5, 5.0, 3.5], [5, -7.0, 10.0, 0.0, 14.0], [33, 6.0, -6.5, 14.0, 2.5], [30, 0.0, 0.0, 2.0, 9.0], [38, -1.0, -5.5, 1.0, -3.5], [10, -7.5, -9.0, 0.5, -5.0], [28, -0.5, 2.5, 15.5, 4.5]], 1.0, 5], [[2, 4, 0, -1], [5, 3, -1, 1], [7, 3, 0, 0], [10, 3, -1, -2], [28, 4, -1, 0], [30, 4, 0, 0], [33, 4, 0, -1], [37, 3, 0, 0], [38, 1, -1, -3]]], [[[[26, -3.0, -3.0, 4.0, -1.0], [27, 4.0, 6.5, 34.0, 11.5]], 2.0, 2], [[26, 1, -1, -1], [27, 1, 1, 1]]], [[[[24, 10.0, 2.5, 26.0, 11.5], [1, -7.5, -10.0, 0.5, -9.0], [4, 0.0, 6.0, 4.0, 8.0], [17, -0.5, 5.0, 7.5, 14.0], [32, 3.5, -1.5, 19.5, -0.5]], 2.0, 4], [[1, 2, -1, -2], [4, 1, 0, 1], [17, 3, -1, 0], [24, 3, 0, 0], [32, 3, 0, -1]]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| case 0 | [[8, 4, -1, -1], [29, 4, -1, -1], [31, 4, -1, 0]] | [[8, 4, -1, -1], [29, 3, -2, -1], [31, 4, -1, 0]] | Failed |
| case 1 | [[1, 1, 1, 2], [4, 1, -5, 4], [5, 1, -3, 1], [10, 1, 3, 4], [23, 1, 4, -1], [26, 1, 1, 2]] | [[1, 1, 1, 2], [4, 1, -5, 4], [5, 1, -3, 1], [10, 1, 3, 4], [23, 1, 4, -1], [26, 1, 1, 2]] | Passed |
| case 2 | [[6, 1, 4, 0], [10, 1, -4, 0]] | [[6, 1, 4, 0], [10, 1, -4, 0]] | Passed |
| case 3 | [[2, 1, 4, 1], [27, 1, 4, 3], [34, 1, 3, -5], [37, 1, -1, 1]] | [[2, 1, 4, 1], [27, 1, 4, 3], [34, 1, 3, -5], [37, 1, -1, 1]] | Passed |
| case 4 | [[3, 3, 0, -2], [10, 3, -1, 0], [11, 3, -1, 0], [17, 3, -1, 0]] | [[3, 3, 0, -2], [10, 2, -1, 1], [11, 3, -1, 0], [17, 2, -2, 0]] | Failed |
| case 5 | [[5, 4, -1, 0], [14, 3, 0, -1], [22, 4, 0, -1], [31, 4, 0, -1], [37, 4, -1, 0]] | [[5, 4, -1, 0], [14, 2, 0, -1], [22, 4, 0, -1], [31, 4, 0, -1], [37, 4, -1, 0]] | Failed |
| case 6 | [[1, 2, 1, 0], [34, 2, 1, 0]] | [[1, 1, 2, 0], [34, 2, 1, 0]] | Failed |
| case 7 | [[28, 2, -1, -1], [31, 2, 0, 1], [36, 1, -1, 2]] | [[28, 2, -1, -1], [31, 2, 0, 1], [36, 1, -1, 2]] | Passed |
SHA-256 / 94a4add375ba6930f1c69453d6e2f26cba78e5e88c7a2e5b8d01ca79000c82fc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(objs, base, levels):
out = []
for i, a, b, c, d in objs:
ext = max(c - a, d - b)
lvl = 0
size = base
while size < ext / 2 and lvl < levels - 1:
size *= 2
lvl += 1
out.append([i, lvl, math.floor(a / size), math.floor(b / size)])
out.sort()
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[29, -9.0, -5.0, -1.0, -4.5], [31, -2.0, 4.0, 0.0, 13.0], [8, -2.0, -10.0, 28.0, -6.0]], 1.0, 5], [[8, 4, -1, -1], [29, 3, -2, -1], [31, 4, -1, 0]]], [[[[26, 3.5, 5.0, 4.0, 10.0], [4, -8.5, 9.0, -4.5, 18.0], [5, -4.5, 2.0, -3.5, 6.0], [10, 6.5, 9.0, 14.5, 9.5], [1, 3.0, 5.5, 5.0, 14.5], [23, 8.0, -2.0, 10.0, 2.0]], 1.0, 2], [[1, 1, 1, 2], [4, 1, -5, 4], [5, 1, -3, 1], [10, 1, 3, 4], [23, 1, 4, -1], [26, 1, 1, 2]]], [[[[6, 8.5, 1.0, 11.5, 2.0], [10, -8.0, 1.5, -7.0, 3.5]], 1.0, 2], [[6, 1, 4, 0], [10, 1, -4, 0]]], [[[[37, -2.0, 2.5, 0.0, 7.5], [34, 6.0, -9.0, 10.0, -5.0], [2, 8.5, 2.0, 12.5, 11.0], [27, 9.5, 6.5, 16.5, 11.5]], 1.0, 2], [[2, 1, 4, 1], [27, 1, 4, 3], [34, 1, 3, -5], [37, 1, -1, 1]]], [[[[10, -1.5, 7.5, 0.5, 11.5], [11, -8.0, 3.5, -4.0, 8.5], [17, -5.5, 0.0, -4.5, 4.0], [3, 4.0, -8.5, 12.0, -4.5]], 1.0, 4], [[3, 3, 0, -2], [10, 2, -1, 1], [11, 3, -1, 0], [17, 2, -2, 0]]], [[[[5, -5.0, 3.0, 11.0, 8.0], [31, 7.0, -5.0, 23.0, -3.0], [37, -8.0, 10.0, 22.0, 15.0], [22, 1.0, -9.5, 17.0, -7.5], [14, 3.5, -4.0, 5.5, 0.0]], 1.0, 5], [[5, 4, -1, 0], [14, 2, 0, -1], [22, 4, 0, -1], [31, 4, 0, -1], [37, 4, -1, 0]]], [[[[34, 9.5, 5.0, 17.5, 14.0], [1, 8.0, 1.0, 11.0, 5.0]], 2.0, 3], [[1, 1, 2, 0], [34, 2, 1, 0]]], [[[[36, -1.5, 10.0, 1.5, 10.5], [28, -7.5, -2.0, 0.5, 3.0], [31, 7.0, 10.0, 11.0, 15.0]], 2.0, 3], [[28, 2, -1, -1], [31, 2, 0, 1], [36, 1, -1, 2]]]], [[[[[25, -6.0, 9.0, -4.0, 18.0], [12, 9.5, -7.0, 25.5, -3.0], [33, -2.0, -9.5, 1.0, -0.5], [15, 0.0, -4.0, 0.5, 1.0], [19, 0.0, 2.5, 1.0, 11.5]], 1.0, 2], [[12, 1, 4, -4], [15, 1, 0, -2], [19, 1, 0, 1], [25, 1, -3, 4], [33, 1, -1, -5]]], [[[[19, 10.0, -8.5, 13.0, -4.5], [4, 8.5, 10.0, 10.5, 14.0], [23, -9.0, 4.5, -7.0, 9.5], [14, -3.5, 5.5, 3.5, 6.5], [2, 3.0, -8.0, 11.0, -4.0], [11, -4.0, 3.5, 4.0, 4.5]], 2.0, 3], [[2, 2, 0, -1], [4, 1, 2, 2], [11, 2, -1, 0], [14, 2, -1, 0], [19, 1, 2, -3], [23, 2, -2, 0]]], [[[[28, 3.5, 2.5, 6.5, 4.5], [6, 8.5, 5.0, 15.5, 6.0], [11, 3.5, -3.0, 4.0, -2.0], [4, 0.5, 1.5, 3.5, 5.5], [19, 9.0, 3.5, 17.0, 12.5], [35, 1.0, -2.5, 31.0, -1.5], [12, 2.0, 9.0, 5.0, 13.0]], 1.0, 5], [[4, 2, 0, 0], [6, 3, 1, 0], [11, 0, 3, -3], [12, 2, 0, 2], [19, 4, 0, 0], [28, 2, 0, 0], [35, 4, 0, -1]]], [[[[19, -1.0, -8.5, 29.0, -3.5], [24, -7.0, 1.5, -3.0, 10.5], [39, -3.0, 0.5, -2.5, 1.5]], 2.0, 3], [[19, 2, -1, -2], [24, 2, -1, 0], [39, 0, -2, 0]]], [[[[20, -9.0, -2.0, 21.0, -1.0], [6, -5.5, 2.5, -5.0, 7.5], [12, 0.0, 9.0, 2.0, 14.0], [16, 10.0, 7.0, 13.0, 11.0], [17, 8.5, 6.5, 24.5, 10.5], [31, -7.5, 3.0, -5.5, 12.0]], 1.0, 2], [[6, 1, -3, 1], [12, 1, 0, 4], [16, 1, 5, 3], [17, 1, 4, 3], [20, 1, -5, -1], [31, 1, -4, 1]]], [[[[7, 8.0, 2.5, 16.0, 4.5], [20, 7.5, 5.5, 11.5, 14.5], [25, -4.0, -10.0, 3.0, -9.0], [1, 0.5, -0.5, 4.5, 0.0]], 2.0, 5], [[1, 1, 0, -1], [7, 2, 1, 0], [20, 3, 0, 0], [25, 2, -1, -2]]], [[[[13, 4.5, 1.0, 12.5, 6.0], [11, -1.0, 5.0, 3.0, 6.0], [21, -6.0, -3.5, -4.0, -2.5], [5, 0.5, -6.5, 7.5, -1.5], [32, 6.0, 4.5, 36.0, 9.5], [10, -1.0, 8.0, 29.0, 8.5]], 2.0, 3], [[5, 2, 0, -1], [10, 2, -1, 1], [11, 1, -1, 1], [13, 2, 0, 0], [21, 0, -3, -2], [32, 2, 0, 0]]], [[[[8, 9.0, 3.0, 17.0, 3.5], [17, 7.0, 3.5, 8.0, 4.0], [25, 2.5, -6.5, 4.5, 2.5], [37, -9.0, -4.5, -7.0, -2.5], [19, 6.5, 4.5, 14.5, 13.5], [36, 3.5, -7.0, 4.5, -6.0]], 1.0, 3], [[8, 2, 2, 0], [17, 0, 7, 3], [19, 2, 1, 1], [25, 2, 0, -2], [36, 0, 3, -7], [37, 1, -5, -3]]]], [[[[[22, -9.0, 8.0, 7.0, 8.5], [39, 3.5, 10.0, 10.5, 11.0], [12, -9.5, -5.0, 6.5, 4.0], [8, -0.5, -1.0, 0.5, 8.0], [16, 4.0, 5.0, 20.0, 14.0]], 1.0, 5], [[8, 4, -1, -1], [12, 4, -1, -1], [16, 4, 0, 0], [22, 4, -1, 0], [39, 3, 0, 1]]], [[[[7, -8.0, -9.0, -1.0, -8.5], [10, 3.0, -9.0, 6.0, -5.0], [3, -5.5, -8.0, -2.5, -3.0]], 1.0, 4], [[3, 3, -1, -1], [7, 3, -1, -2], [10, 2, 0, -3]]], [[[[29, 0.0, -2.5, 3.0, -0.5], [18, 9.0, -5.0, 12.0, 0.0], [1, 5.0, -4.0, 6.0, 5.0], [11, -4.5, -4.0, -3.5, -3.5], [3, 2.0, -2.0, 5.0, -1.5], [28, 9.0, 10.0, 25.0, 19.0], [9, -5.0, -4.0, 11.0, -3.0]], 1.0, 2], [[1, 1, 2, -2], [3, 1, 1, -1], [9, 1, -3, -2], [11, 0, -5, -4], [18, 1, 4, -3], [28, 1, 4, 5], [29, 1, 0, -2]]], [[[[22, 7.5, 9.0, 23.5, 11.0], [16, 7.5, 6.0, 8.5, 15.0], [35, 3.0, -3.0, 4.0, 1.0], [39, -8.5, 9.0, -5.5, 11.0], [20, -9.5, 3.0, 6.5, 12.0], [15, -4.0, -10.0, 26.0, -8.0], [17, -8.0, 5.5, -4.0, 9.5], [14, 2.5, 1.5, 4.5, 6.5]], 2.0, 2], [[14, 1, 0, 0], [15, 1, -1, -3], [16, 1, 1, 1], [17, 1, -2, 1], [20, 1, -3, 0], [22, 1, 1, 2], [35, 1, 0, -1], [39, 1, -3, 2]]], [[[[27, -2.5, -2.5, -0.5, -0.5], [16, -9.5, 10.0, -9.0, 12.0], [36, -4.0, 2.5, 3.0, 6.5], [4, -0.5, 2.0, 15.5, 6.0], [26, -0.5, 10.0, 3.5, 12.0], [3, -6.5, 1.5, -4.5, 3.5]], 1.0, 4], [[3, 1, -4, 0], [4, 3, -1, 0], [16, 1, -5, 5], [26, 2, -1, 2], [27, 1, -2, -2], [36, 3, -1, 0]]], [[[[37, 1.5, -1.5, 8.5, 7.5], [6, 0.0, -3.5, 3.0, -1.5], [10, 7.0, -2.5, 15.0, -2.0], [27, -0.5, 2.0, 0.5, 11.0], [9, 1.5, -6.5, 5.5, -6.0], [34, -7.5, 0.5, 0.5, 1.5], [17, 5.0, 6.5, 9.0, 15.5], [33, 10.0, -6.5, 12.0, 2.5]], 2.0, 5], [[6, 1, 0, -1], [9, 1, 0, -2], [10, 2, 0, -1], [17, 3, 0, 0], [27, 3, -1, 0], [33, 3, 0, -1], [34, 2, -1, 0], [37, 3, 0, -1]]], [[[[17, -8.0, 2.5, 8.0, 6.5], [31, 1.5, 5.5, 9.5, 7.5], [8, 5.0, -2.5, 13.0, -1.5]], 2.0, 3], [[8, 2, 0, -1], [17, 2, -1, 0], [31, 2, 0, 0]]], [[[[4, 0.0, -4.0, 16.0, 1.0], [2, -1.5, -9.5, 5.5, -7.5], [33, -6.5, 3.0, -2.5, 7.0], [39, -5.0, 5.5, 11.0, 6.0], [13, -9.0, -4.0, 7.0, 5.0]], 2.0, 2], [[2, 1, -1, -3], [4, 1, 0, -1], [13, 1, -3, -1], [33, 1, -2, 0], [39, 1, -2, 1]]]], [[[[[15, 7.5, -3.5, 11.5, -3.0], [9, 8.0, 0.0, 9.0, 2.0], [3, -5.0, -7.5, 11.0, 1.5]], 1.0, 2], [[3, 1, -3, -4], [9, 1, 4, 0], [15, 1, 3, -2]]], [[[[32, 7.5, -0.5, 8.5, 4.5], [11, 8.0, -2.0, 11.0, 0.0], [29, 9.0, 1.5, 16.0, 10.5], [1, -9.0, -3.5, -2.0, 0.5], [10, -10.0, -6.5, -8.0, -4.5], [24, 0.0, 9.0, 8.0, 13.0], [23, 1.5, -0.5, 2.5, 4.5], [38, 6.5, -7.5, 36.5, 1.5]], 1.0, 5], [[1, 3, -2, -1], [10, 1, -5, -4], [11, 2, 2, -1], [23, 3, 0, -1], [24, 3, 0, 1], [29, 4, 0, 0], [32, 3, 0, -1], [38, 4, 0, -1]]], [[[[20, -9.5, 10.0, -7.5, 19.0], [2, -2.5, -0.5, 5.5, 3.5], [13, -10.0, -2.5, -3.0, -0.5], [24, 2.0, -0.5, 9.0, 1.5], [23, 1.5, 1.0, 5.5, 2.0], [17, -10.0, -8.5, 6.0, -3.5], [1, 2.5, -0.5, 10.5, 0.5], [8, 9.5, 4.0, 13.5, 6.0]], 2.0, 2], [[1, 1, 0, -1], [2, 1, -1, -1], [8, 1, 2, 1], [13, 1, -3, -1], [17, 1, -3, -3], [20, 1, -3, 2], [23, 1, 0, 0], [24, 1, 0, -1]]], [[[[10, -8.0, 1.5, 8.0, 2.5], [20, 3.5, -0.5, 10.5, 0.5], [27, -7.5, -4.5, -4.5, 0.5]], 2.0, 5], [[10, 3, -1, 0], [20, 2, 0, -1], [27, 2, -1, -1]]], [[[[7, 0.5, -3.0, 1.5, 6.0], [6, -10.0, 1.5, -2.0, 10.5], [32, 9.0, -7.0, 11.0, -3.0], [3, 8.5, -2.5, 16.5, -2.0]], 1.0, 5], [[3, 3, 1, -1], [6, 4, -1, 0], [7, 4, 0, -1], [32, 2, 2, -2]]], [[[[32, -8.0, -8.0, -7.0, -4.0], [26, -6.0, -4.5, -5.0, 0.5]], 1.0, 2], [[26, 1, -3, -3], [32, 1, -4, -4]]], [[[[36, 1.0, 10.0, 31.0, 14.0], [27, 9.5, 9.0, 16.5, 13.0], [3, -5.5, 3.0, -2.5, 8.0]], 2.0, 2], [[3, 1, -2, 0], [27, 1, 2, 2], [36, 1, 0, 2]]], [[[[25, 8.5, 0.5, 9.5, 4.5], [16, 6.5, -10.0, 7.5, -8.0], [9, -0.5, 1.5, 3.5, 6.5], [21, -6.5, -1.5, -3.5, 2.5], [29, -5.0, -9.5, -4.5, -0.5], [37, 4.5, 6.0, 20.5, 10.0], [33, 0.5, -0.5, 30.5, 3.5], [35, 8.5, 0.5, 9.0, 1.5]], 2.0, 4], [[9, 2, -1, 0], [16, 0, 3, -5], [21, 1, -2, -1], [25, 1, 2, 0], [29, 3, -1, -1], [33, 3, 0, -1], [35, 0, 4, 0], [37, 3, 0, 0]]]], [[[[[7, 7.0, 0.5, 10.0, 1.0], [31, 7.5, 10.0, 23.5, 14.0], [11, -6.5, 9.0, -5.5, 14.0], [17, 8.0, -7.0, 8.5, -2.0], [22, 1.0, 3.0, 2.0, 5.0], [30, -2.0, -7.0, 1.0, -3.0]], 2.0, 5], [[7, 1, 1, 0], [11, 2, -1, 1], [17, 2, 1, -1], [22, 0, 0, 1], [30, 1, -1, -2], [31, 3, 0, 0]]], [[[[24, -0.5, -4.5, 0.5, -2.5], [8, -7.0, -8.0, 23.0, -7.0], [6, 1.0, 6.5, 4.0, 7.0], [2, 6.5, -9.0, 22.5, -7.0], [21, 0.5, -2.5, 4.5, 6.5], [19, -6.0, 9.0, -3.0, 13.0], [22, -3.5, 4.5, -2.5, 6.5], [26, -2.0, -5.0, -1.0, 0.0]], 1.0, 5], [[2, 4, 0, -1], [6, 2, 0, 1], [8, 4, -1, -1], [19, 2, -2, 2], [21, 4, 0, -1], [22, 1, -2, 2], [24, 1, -1, -3], [26, 3, -1, -1]]], [[[[39, 6.5, 1.0, 13.5, 3.0], [34, 8.0, -9.0, 15.0, 0.0], [38, 0.5, -10.0, 16.5, -8.0], [37, -1.0, -4.5, 7.0, -2.5], [22, 0.0, -3.5, 16.0, -1.5], [10, 7.5, -5.5, 8.5, -0.5], [7, 10.0, 4.5, 40.0, 9.5], [25, 2.0, 9.5, 10.0, 10.0]], 1.0, 4], [[7, 3, 1, 0], [10, 3, 0, -1], [22, 3, 0, -1], [25, 3, 0, 1], [34, 3, 1, -2], [37, 3, -1, -1], [38, 3, 0, -2], [39, 3, 0, 0]]], [[[[21, 2.5, -8.5, 3.5, -4.5], [32, -8.0, 9.0, -4.0, 10.0]], 2.0, 2], [[21, 1, 0, -3], [32, 1, -2, 2]]], [[[[13, -1.0, -5.5, 6.0, -3.5], [39, 8.0, -8.0, 8.5, -3.0], [4, -1.0, 2.0, 2.0, 7.0], [38, -6.0, 4.0, 2.0, 8.0], [21, -7.5, 8.5, -0.5, 17.5]], 1.0, 4], [[4, 3, -1, 0], [13, 3, -1, -1], [21, 3, -1, 1], [38, 3, -1, 0], [39, 3, 1, -1]]], [[[[7, 4.5, 1.5, 11.5, 2.5], [37, 2.0, 3.5, 10.0, 4.5], [2, 4.0, -5.5, 5.0, 3.5], [5, -7.0, 10.0, 0.0, 14.0], [33, 6.0, -6.5, 14.0, 2.5], [30, 0.0, 0.0, 2.0, 9.0], [38, -1.0, -5.5, 1.0, -3.5], [10, -7.5, -9.0, 0.5, -5.0], [28, -0.5, 2.5, 15.5, 4.5]], 1.0, 5], [[2, 4, 0, -1], [5, 3, -1, 1], [7, 3, 0, 0], [10, 3, -1, -2], [28, 4, -1, 0], [30, 4, 0, 0], [33, 4, 0, -1], [37, 3, 0, 0], [38, 1, -1, -3]]], [[[[26, -3.0, -3.0, 4.0, -1.0], [27, 4.0, 6.5, 34.0, 11.5]], 2.0, 2], [[26, 1, -1, -1], [27, 1, 1, 1]]], [[[[24, 10.0, 2.5, 26.0, 11.5], [1, -7.5, -10.0, 0.5, -9.0], [4, 0.0, 6.0, 4.0, 8.0], [17, -0.5, 5.0, 7.5, 14.0], [32, 3.5, -1.5, 19.5, -0.5]], 2.0, 4], [[1, 2, -1, -2], [4, 1, 0, 1], [17, 3, -1, 0], [24, 3, 0, 0], [32, 3, 0, -1]]]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| case 0 | [[8, 4, -1, -1], [29, 2, -3, -2], [31, 3, -1, 0]] | [[8, 4, -1, -1], [29, 3, -2, -1], [31, 4, -1, 0]] | Failed |
| case 1 | [[1, 1, 1, 2], [4, 1, -5, 4], [5, 1, -3, 1], [10, 1, 3, 4], [23, 1, 4, -1], [26, 1, 1, 2]] | [[1, 1, 1, 2], [4, 1, -5, 4], [5, 1, -3, 1], [10, 1, 3, 4], [23, 1, 4, -1], [26, 1, 1, 2]] | Passed |
| case 2 | [[6, 1, 4, 0], [10, 0, -8, 1]] | [[6, 1, 4, 0], [10, 1, -4, 0]] | Failed |
| case 3 | [[2, 1, 4, 1], [27, 1, 4, 3], [34, 1, 3, -5], [37, 1, -1, 1]] | [[2, 1, 4, 1], [27, 1, 4, 3], [34, 1, 3, -5], [37, 1, -1, 1]] | Passed |
| case 4 | [[3, 2, 1, -3], [10, 1, -1, 3], [11, 2, -2, 0], [17, 1, -3, 0]] | [[3, 3, 0, -2], [10, 2, -1, 1], [11, 3, -1, 0], [17, 2, -2, 0]] | Failed |
| case 5 | [[5, 3, -1, 0], [14, 1, 1, -2], [22, 3, 0, -2], [31, 3, 0, -1], [37, 4, -1, 0]] | [[5, 4, -1, 0], [14, 2, 0, -1], [22, 4, 0, -1], [31, 4, 0, -1], [37, 4, -1, 0]] | Failed |
| case 6 | [[1, 0, 4, 0], [34, 2, 1, 0]] | [[1, 1, 2, 0], [34, 2, 1, 0]] | Failed |
| case 7 | [[28, 1, -2, -1], [31, 1, 1, 2], [36, 0, -1, 5]] | [[28, 2, -1, -1], [31, 2, 0, 1], [36, 1, -1, 2]] | Failed |
SHA-256 / 390f21353f76d0d7553ba259b058af86385362da49198556a0c560edb690dc27
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:51:00.590784+00:00.
Case digest / e87d527c2c9c8525c473ce7e1292e5c31b854d5ce1d9466f71c6bc7311482bc8