FA-87601 / Collision detection broadphase / Open access
x crossing interval keeps the direction sign · case 01
Leftward rays step x repeatedly without advancing the boundary time.
ROOT CAUSE
tDeltaX = cs/d[0] instead of cs/|d[0]|.
THE FAILURE
tDeltaX = cs/d[0] instead of cs/|d[0]|.
Unsuccessful approach: Dropping the cell size gives wrong intervals for non-unit cells.
Case contract
solve(o, d, cs, max_t): Amanatides-Woo traversal of a uniform grid for a ray o+t*d (d not normalized). Start in cell floor(o/cs); step the axis with the smaller next boundary t (x on ties) while that t <= max_t, at most 64 cells. Return the visited cells [[ix,iy],...].
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(o, d, cs, max_t):
ix, iy = math.floor(o[0] / cs), math.floor(o[1] / cs)
sx = 1 if d[0] > 0 else (-1 if d[0] < 0 else 0)
sy = 1 if d[1] > 0 else (-1 if d[1] < 0 else 0)
inf = float('inf')
if sx > 0:
tmx = ((ix + 1) * cs - o[0]) / d[0]
elif sx < 0:
tmx = (ix * cs - o[0]) / d[0]
else:
tmx = inf
if sy > 0:
tmy = ((iy + 1) * cs - o[1]) / d[1]
elif sy < 0:
tmy = (iy * cs - o[1]) / d[1]
else:
tmy = inf
tdx = cs / d[0] if sx else inf
tdy = cs / abs(d[1]) if sy else inf
cells = [[ix, iy]]
while len(cells) < 64:
if tmx <= tmy:
t, ax = tmx, 0
else:
t, ax = tmy, 1
if t > max_t:
break
if ax == 0:
ix += sx
tmx += tdx
else:
iy += sy
tmy += tdy
cells.append([ix, iy])
return cells
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[-1.75, 1.75], [-2, 4], 1.0, 0.5], [[-2, 1], [-2, 2], [-3, 2], [-3, 3]]], [[[-1.5, 0.0], [-4, 0], 1.0, 2.0], [[-2, 0], [-3, 0], [-4, 0], [-5, 0], [-6, 0], [-7, 0], [-8, 0], [-9, 0], [-10, 0]]], [[[1.75, 1.5], [-4, -1], 0.5, 1.0], [[3, 3], [3, 2], [2, 2], [1, 2], [0, 2], [-1, 2], [-1, 1], [-2, 1], [-3, 1], [-4, 1], [-5, 1], [-5, 0]]], [[[1.0, -1.0], [2, 1], 0.5, 1.0], [[2, -2], [3, -2], [4, -2], [4, -1], [5, -1], [6, -1], [6, 0]]], [[[-0.25, -1.75], [2, 2], 0.5, 2.0], [[-1, -4], [0, -4], [0, -3], [1, -3], [1, -2], [2, -2], [2, -1], [3, -1], [3, 0], [4, 0], [4, 1], [5, 1], [5, 2], [6, 2], [6, 3], [7, 3], [7, 4]]], [[[1.0, 0.75], [-4, 2], 0.5, 2.0], [[2, 1], [1, 1], [0, 1], [0, 2], [-1, 2], [-2, 2], [-2, 3], [-3, 3], [-4, 3], [-4, 4], [-5, 4], [-6, 4], [-6, 5], [-7, 5], [-8, 5], [-8, 6], [-9, 6], [-10, 6], [-10, 7], [-11, 7], [-12, 7], [-12, 8], [-13, 8], [-14, 8], [-14, 9], [-15, 9]]], [[[-0.75, -0.5], [1, 0], 1.0, 0.5], [[-1, -1]]], [[[1.0, 1.5], [1, 1], 1.0, 1.0], [[1, 1], [1, 2], [2, 2]]]], [[[[0.5, -1.5], [4, 2], 2.0, 2.0], [[0, -1], [1, -1], [1, 0], [2, 0], [3, 0], [3, 1], [4, 1]]], [[[0.75, 0.75], [-2, -2], 0.5, 0.5], [[1, 1], [0, 1], [0, 0], [-1, 0], [-1, -1]]], [[[2.0, -0.5], [0, 0], 1.0, 3.0], [[2, -1]]], [[[-0.25, -0.75], [-4, -2], 2.0, 3.0], [[-1, -1], [-2, -1], [-2, -2], [-3, -2], [-4, -2], [-4, -3], [-5, -3], [-6, -3], [-6, -4], [-7, -4]]], [[[1.0, 1.25], [-2, 0], 0.5, 0.5], [[2, 2], [1, 2], [0, 2], [-1, 2]]], [[[-0.25, 0.5], [0, -1], 0.5, 2.0], [[-1, 1], [-1, 0], [-1, -1], [-1, -2], [-1, -3], [-1, -4]]], [[[-2.0, 0.5], [-1, 2], 2.0, 3.0], [[-1, 0], [-2, 0], [-2, 1], [-2, 2], [-3, 2], [-3, 3]]], [[[0.5, -1.0], [1, -2], 2.0, 3.0], [[0, -1], [0, -2], [1, -2], [1, -3], [1, -4]]]], [[[[-0.75, 0.75], [-2, -1], 1.0, 0.5], [[-1, 0], [-2, 0]]], [[[1.75, 0.75], [-1, 2], 1.0, 0.5], [[1, 0], [1, 1]]], [[[1.0, -0.25], [-1, -2], 0.5, 2.0], [[2, -1], [1, -1], [1, -2], [1, -3], [0, -3], [0, -4], [0, -5], [-1, -5], [-1, -6], [-1, -7], [-2, -7], [-2, -8], [-2, -9], [-3, -9]]], [[[0.0, 1.5], [2, 2], 1.0, 1.0], [[0, 1], [0, 2], [1, 2], [1, 3], [2, 3]]], [[[1.75, -1.5], [4, 2], 2.0, 2.0], [[0, -1], [1, -1], [2, -1], [2, 0], [3, 0], [4, 0], [4, 1]]], [[[1.5, 0.75], [-2, 0], 0.5, 0.5], [[3, 1], [2, 1], [1, 1], [0, 1]]], [[[0.25, -1.75], [-2, -2], 2.0, 0.5], [[0, -1], [-1, -1], [-1, -2]]], [[[1.5, 2.0], [-2, 2], 1.0, 0.5], [[1, 2], [0, 2], [0, 3]]]], [[[[1.75, -1.75], [-2, -2], 2.0, 0.5], [[0, -1], [0, -2]]], [[[-0.25, -0.25], [0, 2], 0.5, 1.0], [[-1, -1], [-1, 0], [-1, 1], [-1, 2], [-1, 3]]], [[[2.0, 1.5], [-2, 1], 2.0, 1.0], [[1, 0], [0, 0], [0, 1], [-1, 1]]], [[[0.25, -1.25], [-1, 4], 2.0, 3.0], [[0, -1], [-1, -1], [-1, 0], [-1, 1], [-1, 2], [-1, 3], [-2, 3], [-2, 4], [-2, 5]]], [[[2.0, 1.0], [4, 4], 2.0, 3.0], [[1, 0], [1, 1], [2, 1], [2, 2], [3, 2], [3, 3], [4, 3], [4, 4], [5, 4], [5, 5], [6, 5], [6, 6], [7, 6]]], [[[0.5, 0.25], [-4, 1], 1.0, 3.0], [[0, 0], [-1, 0], [-2, 0], [-3, 0], [-3, 1], [-4, 1], [-5, 1], [-6, 1], [-7, 1], [-7, 2], [-8, 2], [-9, 2], [-10, 2], [-11, 2], [-11, 3], [-12, 3]]], [[[0.0, 2.0], [-2, 1], 2.0, 3.0], [[0, 1], [-1, 1], [-2, 1], [-3, 1], [-3, 2], [-4, 2]]], [[[-0.25, 1.75], [-2, 1], 0.5, 0.5], [[-1, 3], [-2, 3], [-2, 4], [-3, 4]]]], [[[[2.0, 0.0], [-2, -2], 0.5, 1.0], [[4, 0], [3, 0], [3, -1], [2, -1], [2, -2], [1, -2], [1, -3], [0, -3], [0, -4], [-1, -4], [-1, -5]]], [[[-1.25, -0.25], [4, 4], 2.0, 3.0], [[-1, -1], [-1, 0], [0, 0], [0, 1], [1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5]]], [[[-2.0, -1.75], [-1, 1], 0.5, 3.0], [[-4, -4], [-5, -4], [-5, -3], [-6, -3], [-6, -2], [-7, -2], [-7, -1], [-8, -1], [-8, 0], [-9, 0], [-9, 1], [-10, 1], [-10, 2], [-11, 2]]], [[[1.25, -1.5], [1, 1], 0.5, 3.0], [[2, -3], [3, -3], [3, -2], [4, -2], [4, -1], [5, -1], [5, 0], [6, 0], [6, 1], [7, 1], [7, 2], [8, 2], [8, 3]]], [[[1.75, -0.75], [0, -1], 0.5, 2.0], [[3, -2], [3, -3], [3, -4], [3, -5], [3, -6]]], [[[0.5, 1.75], [-2, -1], 0.5, 1.0], [[1, 3], [0, 3], [-1, 3], [-1, 2], [-2, 2], [-3, 2], [-3, 1], [-4, 1]]], [[[2.0, -1.75], [4, -1], 0.5, 2.0], [[4, -4], [5, -4], [6, -4], [6, -5], [7, -5], [8, -5], [9, -5], [10, -5], [10, -6], [11, -6], [12, -6], [13, -6], [14, -6], [14, -7], [15, -7], [16, -7], [17, -7], [18, -7], [18, -8], [19, -8], [20, -8]]], [[[-1.0, -2.0], [-1, 2], 1.0, 3.0], [[-1, -2], [-2, -2], [-2, -1], [-3, -1], [-3, 0], [-3, 1], [-4, 1], [-4, 2], [-4, 3], [-5, 3], [-5, 4]]]]]
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 | [[-2, 1], [-2, 2], [-3, 2], [-4, 2], [-5, 2], [-6, 2], [-7, 2], [-8, 2], [-9, 2], [-10, 2], [-11, 2], [-12, 2], [-13, 2], [-14, 2], [-15, 2], [-16, 2], [-17, 2], [-18, 2], [-19, 2], [-20, 2], [-21, 2], [-22, 2], [-23, 2], [-24, 2], [-25, 2], [-26, 2], [-27, 2], [-28, 2], [-29, 2], [-30, 2], [-31, 2], [-32, 2], [-33, 2], [-34, 2], [-35, 2], [-36, 2], [-37, 2], [-38, 2], [-39, 2], [-40, 2], [-41, 2], [-42, 2], [-43, 2], [-44, 2], [-45, 2], [-46, 2], [-47, 2], [-48, 2], [-49, 2], [-50, 2], [-51, 2], [-52, 2], [-53, 2], [-54, 2], [-55, 2], [-56, 2], [-57, 2], [-58, 2], [-59, 2], [-60, 2], [-61, 2], [-62, 2], [-63, 2], [-64, 2]] | [[-2, 1], [-2, 2], [-3, 2], [-3, 3]] | Failed |
| case 1 | [[-2, 0], [-3, 0], [-4, 0], [-5, 0], [-6, 0], [-7, 0], [-8, 0], [-9, 0], [-10, 0], [-11, 0], [-12, 0], [-13, 0], [-14, 0], [-15, 0], [-16, 0], [-17, 0], [-18, 0], [-19, 0], [-20, 0], [-21, 0], [-22, 0], [-23, 0], [-24, 0], [-25, 0], [-26, 0], [-27, 0], [-28, 0], [-29, 0], [-30, 0], [-31, 0], [-32, 0], [-33, 0], [-34, 0], [-35, 0], [-36, 0], [-37, 0], [-38, 0], [-39, 0], [-40, 0], [-41, 0], [-42, 0], [-43, 0], [-44, 0], [-45, 0], [-46, 0], [-47, 0], [-48, 0], [-49, 0], [-50, 0], [-51, 0], [-52, 0], [-53, 0], [-54, 0], [-55, 0], [-56, 0], [-57, 0], [-58, 0], [-59, 0], [-60, 0], [-61, 0], [-62, 0], [-63, 0], [-64, 0], [-65, 0]] | [[-2, 0], [-3, 0], [-4, 0], [-5, 0], [-6, 0], [-7, 0], [-8, 0], [-9, 0], [-10, 0]] | Failed |
| case 2 | [[3, 3], [3, 2], [2, 2], [1, 2], [0, 2], [-1, 2], [-2, 2], [-3, 2], [-4, 2], [-5, 2], [-6, 2], [-7, 2], [-8, 2], [-9, 2], [-10, 2], [-11, 2], [-12, 2], [-13, 2], [-14, 2], [-15, 2], [-16, 2], [-17, 2], [-18, 2], [-19, 2], [-20, 2], [-21, 2], [-22, 2], [-23, 2], [-24, 2], [-25, 2], [-26, 2], [-27, 2], [-28, 2], [-29, 2], [-30, 2], [-31, 2], [-32, 2], [-33, 2], [-34, 2], [-35, 2], [-36, 2], [-37, 2], [-38, 2], [-39, 2], [-40, 2], [-41, 2], [-42, 2], [-43, 2], [-44, 2], [-45, 2], [-46, 2], [-47, 2], [-48, 2], [-49, 2], [-50, 2], [-51, 2], [-52, 2], [-53, 2], [-54, 2], [-55, 2], [-56, 2], [-57, 2], [-58, 2], [-59, 2]] | [[3, 3], [3, 2], [2, 2], [1, 2], [0, 2], [-1, 2], [-1, 1], [-2, 1], [-3, 1], [-4, 1], [-5, 1], [-5, 0]] | Failed |
| case 3 | [[2, -2], [3, -2], [4, -2], [4, -1], [5, -1], [6, -1], [6, 0]] | [[2, -2], [3, -2], [4, -2], [4, -1], [5, -1], [6, -1], [6, 0]] | Passed |
| case 4 | [[-1, -4], [0, -4], [0, -3], [1, -3], [1, -2], [2, -2], [2, -1], [3, -1], [3, 0], [4, 0], [4, 1], [5, 1], [5, 2], [6, 2], [6, 3], [7, 3], [7, 4]] | [[-1, -4], [0, -4], [0, -3], [1, -3], [1, -2], [2, -2], [2, -1], [3, -1], [3, 0], [4, 0], [4, 1], [5, 1], [5, 2], [6, 2], [6, 3], [7, 3], [7, 4]] | Passed |
| case 5 | [[2, 1], [1, 1], [0, 1], [-1, 1], [-2, 1], [-3, 1], [-4, 1], [-5, 1], [-6, 1], [-7, 1], [-8, 1], [-9, 1], [-10, 1], [-11, 1], [-12, 1], [-13, 1], [-14, 1], [-15, 1], [-16, 1], [-17, 1], [-18, 1], [-19, 1], [-20, 1], [-21, 1], [-22, 1], [-23, 1], [-24, 1], [-25, 1], [-26, 1], [-27, 1], [-28, 1], [-29, 1], [-30, 1], [-31, 1], [-32, 1], [-33, 1], [-34, 1], [-35, 1], [-36, 1], [-37, 1], [-38, 1], [-39, 1], [-40, 1], [-41, 1], [-42, 1], [-43, 1], [-44, 1], [-45, 1], [-46, 1], [-47, 1], [-48, 1], [-49, 1], [-50, 1], [-51, 1], [-52, 1], [-53, 1], [-54, 1], [-55, 1], [-56, 1], [-57, 1], [-58, 1], [-59, 1], [-60, 1], [-61, 1]] | [[2, 1], [1, 1], [0, 1], [0, 2], [-1, 2], [-2, 2], [-2, 3], [-3, 3], [-4, 3], [-4, 4], [-5, 4], [-6, 4], [-6, 5], [-7, 5], [-8, 5], [-8, 6], [-9, 6], [-10, 6], [-10, 7], [-11, 7], [-12, 7], [-12, 8], [-13, 8], [-14, 8], [-14, 9], [-15, 9]] | Failed |
| case 6 | [[-1, -1]] | [[-1, -1]] | Passed |
| case 7 | [[1, 1], [1, 2], [2, 2]] | [[1, 1], [1, 2], [2, 2]] | Passed |
SHA-256 / d9a30180e3d577c0efda05b2cf9853516a0cb3322a3a4224d53f93446481f23b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(o, d, cs, max_t):
ix, iy = math.floor(o[0] / cs), math.floor(o[1] / cs)
sx = 1 if d[0] > 0 else (-1 if d[0] < 0 else 0)
sy = 1 if d[1] > 0 else (-1 if d[1] < 0 else 0)
inf = float('inf')
if sx > 0:
tmx = ((ix + 1) * cs - o[0]) / d[0]
elif sx < 0:
tmx = (ix * cs - o[0]) / d[0]
else:
tmx = inf
if sy > 0:
tmy = ((iy + 1) * cs - o[1]) / d[1]
elif sy < 0:
tmy = (iy * cs - o[1]) / d[1]
else:
tmy = inf
tdx = 1 / abs(d[0]) if sx else inf
tdy = cs / abs(d[1]) if sy else inf
cells = [[ix, iy]]
while len(cells) < 64:
if tmx <= tmy:
t, ax = tmx, 0
else:
t, ax = tmy, 1
if t > max_t:
break
if ax == 0:
ix += sx
tmx += tdx
else:
iy += sy
tmy += tdy
cells.append([ix, iy])
return cells
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[-1.75, 1.75], [-2, 4], 1.0, 0.5], [[-2, 1], [-2, 2], [-3, 2], [-3, 3]]], [[[-1.5, 0.0], [-4, 0], 1.0, 2.0], [[-2, 0], [-3, 0], [-4, 0], [-5, 0], [-6, 0], [-7, 0], [-8, 0], [-9, 0], [-10, 0]]], [[[1.75, 1.5], [-4, -1], 0.5, 1.0], [[3, 3], [3, 2], [2, 2], [1, 2], [0, 2], [-1, 2], [-1, 1], [-2, 1], [-3, 1], [-4, 1], [-5, 1], [-5, 0]]], [[[1.0, -1.0], [2, 1], 0.5, 1.0], [[2, -2], [3, -2], [4, -2], [4, -1], [5, -1], [6, -1], [6, 0]]], [[[-0.25, -1.75], [2, 2], 0.5, 2.0], [[-1, -4], [0, -4], [0, -3], [1, -3], [1, -2], [2, -2], [2, -1], [3, -1], [3, 0], [4, 0], [4, 1], [5, 1], [5, 2], [6, 2], [6, 3], [7, 3], [7, 4]]], [[[1.0, 0.75], [-4, 2], 0.5, 2.0], [[2, 1], [1, 1], [0, 1], [0, 2], [-1, 2], [-2, 2], [-2, 3], [-3, 3], [-4, 3], [-4, 4], [-5, 4], [-6, 4], [-6, 5], [-7, 5], [-8, 5], [-8, 6], [-9, 6], [-10, 6], [-10, 7], [-11, 7], [-12, 7], [-12, 8], [-13, 8], [-14, 8], [-14, 9], [-15, 9]]], [[[-0.75, -0.5], [1, 0], 1.0, 0.5], [[-1, -1]]], [[[1.0, 1.5], [1, 1], 1.0, 1.0], [[1, 1], [1, 2], [2, 2]]]], [[[[0.5, -1.5], [4, 2], 2.0, 2.0], [[0, -1], [1, -1], [1, 0], [2, 0], [3, 0], [3, 1], [4, 1]]], [[[0.75, 0.75], [-2, -2], 0.5, 0.5], [[1, 1], [0, 1], [0, 0], [-1, 0], [-1, -1]]], [[[2.0, -0.5], [0, 0], 1.0, 3.0], [[2, -1]]], [[[-0.25, -0.75], [-4, -2], 2.0, 3.0], [[-1, -1], [-2, -1], [-2, -2], [-3, -2], [-4, -2], [-4, -3], [-5, -3], [-6, -3], [-6, -4], [-7, -4]]], [[[1.0, 1.25], [-2, 0], 0.5, 0.5], [[2, 2], [1, 2], [0, 2], [-1, 2]]], [[[-0.25, 0.5], [0, -1], 0.5, 2.0], [[-1, 1], [-1, 0], [-1, -1], [-1, -2], [-1, -3], [-1, -4]]], [[[-2.0, 0.5], [-1, 2], 2.0, 3.0], [[-1, 0], [-2, 0], [-2, 1], [-2, 2], [-3, 2], [-3, 3]]], [[[0.5, -1.0], [1, -2], 2.0, 3.0], [[0, -1], [0, -2], [1, -2], [1, -3], [1, -4]]]], [[[[-0.75, 0.75], [-2, -1], 1.0, 0.5], [[-1, 0], [-2, 0]]], [[[1.75, 0.75], [-1, 2], 1.0, 0.5], [[1, 0], [1, 1]]], [[[1.0, -0.25], [-1, -2], 0.5, 2.0], [[2, -1], [1, -1], [1, -2], [1, -3], [0, -3], [0, -4], [0, -5], [-1, -5], [-1, -6], [-1, -7], [-2, -7], [-2, -8], [-2, -9], [-3, -9]]], [[[0.0, 1.5], [2, 2], 1.0, 1.0], [[0, 1], [0, 2], [1, 2], [1, 3], [2, 3]]], [[[1.75, -1.5], [4, 2], 2.0, 2.0], [[0, -1], [1, -1], [2, -1], [2, 0], [3, 0], [4, 0], [4, 1]]], [[[1.5, 0.75], [-2, 0], 0.5, 0.5], [[3, 1], [2, 1], [1, 1], [0, 1]]], [[[0.25, -1.75], [-2, -2], 2.0, 0.5], [[0, -1], [-1, -1], [-1, -2]]], [[[1.5, 2.0], [-2, 2], 1.0, 0.5], [[1, 2], [0, 2], [0, 3]]]], [[[[1.75, -1.75], [-2, -2], 2.0, 0.5], [[0, -1], [0, -2]]], [[[-0.25, -0.25], [0, 2], 0.5, 1.0], [[-1, -1], [-1, 0], [-1, 1], [-1, 2], [-1, 3]]], [[[2.0, 1.5], [-2, 1], 2.0, 1.0], [[1, 0], [0, 0], [0, 1], [-1, 1]]], [[[0.25, -1.25], [-1, 4], 2.0, 3.0], [[0, -1], [-1, -1], [-1, 0], [-1, 1], [-1, 2], [-1, 3], [-2, 3], [-2, 4], [-2, 5]]], [[[2.0, 1.0], [4, 4], 2.0, 3.0], [[1, 0], [1, 1], [2, 1], [2, 2], [3, 2], [3, 3], [4, 3], [4, 4], [5, 4], [5, 5], [6, 5], [6, 6], [7, 6]]], [[[0.5, 0.25], [-4, 1], 1.0, 3.0], [[0, 0], [-1, 0], [-2, 0], [-3, 0], [-3, 1], [-4, 1], [-5, 1], [-6, 1], [-7, 1], [-7, 2], [-8, 2], [-9, 2], [-10, 2], [-11, 2], [-11, 3], [-12, 3]]], [[[0.0, 2.0], [-2, 1], 2.0, 3.0], [[0, 1], [-1, 1], [-2, 1], [-3, 1], [-3, 2], [-4, 2]]], [[[-0.25, 1.75], [-2, 1], 0.5, 0.5], [[-1, 3], [-2, 3], [-2, 4], [-3, 4]]]], [[[[2.0, 0.0], [-2, -2], 0.5, 1.0], [[4, 0], [3, 0], [3, -1], [2, -1], [2, -2], [1, -2], [1, -3], [0, -3], [0, -4], [-1, -4], [-1, -5]]], [[[-1.25, -0.25], [4, 4], 2.0, 3.0], [[-1, -1], [-1, 0], [0, 0], [0, 1], [1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5]]], [[[-2.0, -1.75], [-1, 1], 0.5, 3.0], [[-4, -4], [-5, -4], [-5, -3], [-6, -3], [-6, -2], [-7, -2], [-7, -1], [-8, -1], [-8, 0], [-9, 0], [-9, 1], [-10, 1], [-10, 2], [-11, 2]]], [[[1.25, -1.5], [1, 1], 0.5, 3.0], [[2, -3], [3, -3], [3, -2], [4, -2], [4, -1], [5, -1], [5, 0], [6, 0], [6, 1], [7, 1], [7, 2], [8, 2], [8, 3]]], [[[1.75, -0.75], [0, -1], 0.5, 2.0], [[3, -2], [3, -3], [3, -4], [3, -5], [3, -6]]], [[[0.5, 1.75], [-2, -1], 0.5, 1.0], [[1, 3], [0, 3], [-1, 3], [-1, 2], [-2, 2], [-3, 2], [-3, 1], [-4, 1]]], [[[2.0, -1.75], [4, -1], 0.5, 2.0], [[4, -4], [5, -4], [6, -4], [6, -5], [7, -5], [8, -5], [9, -5], [10, -5], [10, -6], [11, -6], [12, -6], [13, -6], [14, -6], [14, -7], [15, -7], [16, -7], [17, -7], [18, -7], [18, -8], [19, -8], [20, -8]]], [[[-1.0, -2.0], [-1, 2], 1.0, 3.0], [[-1, -2], [-2, -2], [-2, -1], [-3, -1], [-3, 0], [-3, 1], [-4, 1], [-4, 2], [-4, 3], [-5, 3], [-5, 4]]]]]
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 | [[-2, 1], [-2, 2], [-3, 2], [-3, 3]] | [[-2, 1], [-2, 2], [-3, 2], [-3, 3]] | Passed |
| case 1 | [[-2, 0], [-3, 0], [-4, 0], [-5, 0], [-6, 0], [-7, 0], [-8, 0], [-9, 0], [-10, 0]] | [[-2, 0], [-3, 0], [-4, 0], [-5, 0], [-6, 0], [-7, 0], [-8, 0], [-9, 0], [-10, 0]] | Passed |
| case 2 | [[3, 3], [3, 2], [2, 2], [1, 2], [1, 1], [0, 1], [-1, 1], [-1, 0]] | [[3, 3], [3, 2], [2, 2], [1, 2], [0, 2], [-1, 2], [-1, 1], [-2, 1], [-3, 1], [-4, 1], [-5, 1], [-5, 0]] | Failed |
| case 3 | [[2, -2], [3, -2], [3, -1], [4, -1], [4, 0]] | [[2, -2], [3, -2], [4, -2], [4, -1], [5, -1], [6, -1], [6, 0]] | Failed |
| case 4 | [[-1, -4], [0, -4], [0, -3], [0, -2], [1, -2], [1, -1], [1, 0], [2, 0], [2, 1], [2, 2], [3, 2], [3, 3], [3, 4]] | [[-1, -4], [0, -4], [0, -3], [1, -3], [1, -2], [2, -2], [2, -1], [3, -1], [3, 0], [4, 0], [4, 1], [5, 1], [5, 2], [6, 2], [6, 3], [7, 3], [7, 4]] | Failed |
| case 5 | [[2, 1], [1, 1], [1, 2], [0, 2], [0, 3], [-1, 3], [-1, 4], [-2, 4], [-2, 5], [-3, 5], [-3, 6], [-4, 6], [-4, 7], [-5, 7], [-5, 8], [-6, 8], [-6, 9], [-7, 9]] | [[2, 1], [1, 1], [0, 1], [0, 2], [-1, 2], [-2, 2], [-2, 3], [-3, 3], [-4, 3], [-4, 4], [-5, 4], [-6, 4], [-6, 5], [-7, 5], [-8, 5], [-8, 6], [-9, 6], [-10, 6], [-10, 7], [-11, 7], [-12, 7], [-12, 8], [-13, 8], [-14, 8], [-14, 9], [-15, 9]] | Failed |
| case 6 | [[-1, -1]] | [[-1, -1]] | Passed |
| case 7 | [[1, 1], [1, 2], [2, 2]] | [[1, 1], [1, 2], [2, 2]] | Passed |
SHA-256 / 4072a385bf4df3280905712fec92eaf14732b67d72acdf36e4ffeb5a05efb0a3
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.340606+00:00.
Case digest / 0349ba57bed256d775db51d62c6eb1f5153c63ae36a1df387efe67f5b48448e0