FA-87606 / Collision detection broadphase / Open access
Ray exactly through a grid corner steps y first · case 01
Diagonal rays visit a different neighbor than the contract and cached tests.
ROOT CAUSE
The axis choice uses tmx < tmy.
VERIFIED REPAIR
On ties step x first.
Unsuccessful approach: Stepping both axes at once on a tie skips the neighbor cell entirely.
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 / 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 = [[[[[0.0, -1.5], [4, -2], 1.0, 3.0], [[0, -2], [1, -2], [1, -3], [2, -3], [3, -3], [3, -4], [4, -4], [5, -4], [5, -5], [6, -5], [7, -5], [7, -6], [8, -6], [9, -6], [9, -7], [10, -7], [11, -7], [11, -8], [12, -8]]], [[[1.75, -0.25], [4, 4], 0.5, 2.0], [[3, -1], [4, -1], [4, 0], [5, 0], [5, 1], [6, 1], [6, 2], [7, 2], [7, 3], [8, 3], [8, 4], [9, 4], [9, 5], [10, 5], [10, 6], [11, 6], [11, 7], [12, 7], [12, 8], [13, 8], [13, 9], [14, 9], [14, 10], [15, 10], [15, 11], [16, 11], [16, 12], [17, 12], [17, 13], [18, 13], [18, 14], [19, 14], [19, 15]]], [[[-1.25, 1.5], [-4, 2], 0.5, 3.0], [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]]], [[[-0.75, 0.75], [0, 0], 1.0, 0.5], [[-1, 0]]], [[[0.25, 1.75], [-1, 4], 0.5, 3.0], [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]]], [[[0.0, 0.5], [-4, -1], 1.0, 2.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]]], [[[-1.0, -2.0], [-4, 4], 0.5, 0.5], [[-2, -4], [-3, -4], [-4, -4], [-4, -3], [-5, -3], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-7, 0]]], [[[-1.5, -1.5], [4, 4], 0.5, 0.5], [[-3, -3], [-2, -3], [-2, -2], [-1, -2], [-1, -1], [0, -1], [0, 0], [1, 0], [1, 1]]]], [[[[-2.0, -0.75], [-4, 2], 0.5, 0.5], [[-4, -2], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-8, -1], [-8, 0], [-9, 0]]], [[[-1.25, 0.5], [1, -1], 1.0, 3.0], [[-2, 0], [-1, 0], [-1, -1], [0, -1], [0, -2], [1, -2], [1, -3]]], [[[-2.0, 0.75], [4, 4], 0.5, 3.0], [[-4, 1], [-4, 2], [-3, 2], [-3, 3], [-2, 3], [-2, 4], [-1, 4], [-1, 5], [0, 5], [0, 6], [1, 6], [1, 7], [2, 7], [2, 8], [3, 8], [3, 9], [4, 9], [4, 10], [5, 10], [5, 11], [6, 11], [6, 12], [7, 12], [7, 13], [8, 13], [8, 14], [9, 14], [9, 15], [10, 15], [10, 16], [11, 16], [11, 17], [12, 17], [12, 18], [13, 18], [13, 19], [14, 19], [14, 20], [15, 20], [15, 21], [16, 21], [16, 22], [17, 22], [17, 23], [18, 23], [18, 24], [19, 24], [19, 25], [20, 25]]], [[[1.5, 2.0], [-1, 2], 0.5, 1.0], [[3, 4], [2, 4], [2, 5], [1, 5], [1, 6], [1, 7], [0, 7], [0, 8]]], [[[0.75, -1.0], [0, 4], 2.0, 1.0], [[0, -1], [0, 0], [0, 1]]], [[[0.5, -1.0], [1, -2], 2.0, 3.0], [[0, -1], [0, -2], [1, -2], [1, -3], [1, -4]]], [[[-0.25, 2.0], [-1, 2], 0.5, 1.0], [[-1, 4], [-2, 4], [-2, 5], [-2, 6], [-3, 6], [-3, 7], [-3, 8]]], [[[-0.25, 0.5], [0, -1], 0.5, 2.0], [[-1, 1], [-1, 0], [-1, -1], [-1, -2], [-1, -3], [-1, -4]]]], [[[[-0.25, 1.0], [1, 4], 2.0, 2.0], [[-1, 0], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4]]], [[[2.0, 1.25], [-1, -2], 1.0, 2.0], [[2, 1], [1, 1], [1, 0], [1, -1], [0, -1], [0, -2], [0, -3], [-1, -3]]], [[[1.0, 0.5], [-1, 4], 0.5, 3.0], [[2, 1], [1, 1], [1, 2], [1, 3], [1, 4], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [-1, 8], [-1, 9], [-1, 10], [-1, 11], [-1, 12], [-2, 12], [-2, 13], [-2, 14], [-2, 15], [-2, 16], [-3, 16], [-3, 17], [-3, 18], [-3, 19], [-3, 20], [-4, 20], [-4, 21], [-4, 22], [-4, 23], [-4, 24], [-5, 24], [-5, 25]]], [[[-0.25, 0.75], [-2, 2], 0.5, 2.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], [-7, 7], [-8, 7], [-8, 8], [-9, 8], [-9, 9]]], [[[0.25, -1.75], [-2, -2], 2.0, 0.5], [[0, -1], [-1, -1], [-1, -2]]], [[[0.25, 0.25], [-1, 0], 1.0, 1.0], [[0, 0], [-1, 0]]], [[[-1.25, 0.75], [-4, -2], 1.0, 3.0], [[-2, 0], [-3, 0], [-3, -1], [-4, -1], [-5, -1], [-5, -2], [-6, -2], [-7, -2], [-7, -3], [-8, -3], [-9, -3], [-9, -4], [-10, -4], [-11, -4], [-11, -5], [-12, -5], [-13, -5], [-13, -6], [-14, -6]]], [[[0.25, 1.25], [-4, 4], 0.5, 1.0], [[0, 2], [-1, 2], [-1, 3], [-2, 3], [-2, 4], [-3, 4], [-3, 5], [-4, 5], [-4, 6], [-5, 6], [-5, 7], [-6, 7], [-6, 8], [-7, 8], [-7, 9], [-8, 9], [-8, 10]]]], [[[[-1.25, 0.75], [-2, -2], 0.5, 0.5], [[-3, 1], [-4, 1], [-4, 0], [-5, 0], [-5, -1]]], [[[1.5, -1.75], [2, 1], 1.0, 3.0], [[1, -2], [2, -2], [3, -2], [3, -1], [4, -1], [5, -1], [5, 0], [6, 0], [7, 0], [7, 1]]], [[[-0.5, -1.5], [-1, -1], 0.5, 2.0], [[-1, -3], [-2, -3], [-2, -4], [-3, -4], [-3, -5], [-4, -5], [-4, -6], [-5, -6], [-5, -7], [-6, -7], [-6, -8]]], [[[1.25, 0.5], [0, -1], 2.0, 3.0], [[0, 0], [0, -1], [0, -2]]], [[[-1.25, 1.75], [0, 2], 0.5, 0.5], [[-3, 3], [-3, 4], [-3, 5]]], [[[0.5, 0.5], [2, 2], 1.0, 1.0], [[0, 0], [1, 0], [1, 1], [2, 1], [2, 2]]], [[[1.75, -1.75], [1, -1], 1.0, 3.0], [[1, -2], [2, -2], [2, -3], [3, -3], [3, -4], [4, -4], [4, -5]]], [[[-0.25, -0.75], [0, 1], 0.5, 2.0], [[-1, -2], [-1, -1], [-1, 0], [-1, 1], [-1, 2]]]], [[[[0.0, 2.0], [-1, -2], 2.0, 0.5], [[0, 1], [-1, 1], [-1, 0]]], [[[-0.5, 0.0], [2, 2], 2.0, 0.5], [[-1, 0], [0, 0]]], [[[-1.5, -2.0], [-4, 4], 0.5, 0.5], [[-3, -4], [-4, -4], [-5, -4], [-5, -3], [-6, -3], [-6, -2], [-7, -2], [-7, -1], [-8, -1], [-8, 0]]], [[[1.25, 1.75], [-1, -2], 0.5, 2.0], [[2, 3], [2, 2], [1, 2], [1, 1], [1, 0], [0, 0], [0, -1], [0, -2], [-1, -2], [-1, -3], [-1, -4], [-2, -4], [-2, -5]]], [[[0.75, -1.25], [2, -2], 0.5, 1.0], [[1, -3], [2, -3], [2, -4], [3, -4], [3, -5], [4, -5], [4, -6], [5, -6], [5, -7]]], [[[-2.0, 2.0], [-2, 2], 1.0, 1.0], [[-2, 2], [-3, 2], [-4, 2], [-4, 3], [-5, 3], [-5, 4]]], [[[-1.0, -1.0], [-4, -1], 1.0, 0.5], [[-1, -1], [-2, -1], [-2, -2], [-3, -2], [-4, -2]]], [[[0.5, -1.5], [2, 4], 1.0, 0.5], [[0, -2], [0, -1], [1, -1], [1, 0]]]]]
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 | [[0, -2], [0, -3], [1, -3], [2, -3], [2, -4], [3, -4], [4, -4], [4, -5], [5, -5], [6, -5], [6, -6], [7, -6], [8, -6], [8, -7], [9, -7], [10, -7], [10, -8], [11, -8], [12, -8]] | [[0, -2], [1, -2], [1, -3], [2, -3], [3, -3], [3, -4], [4, -4], [5, -4], [5, -5], [6, -5], [7, -5], [7, -6], [8, -6], [9, -6], [9, -7], [10, -7], [11, -7], [11, -8], [12, -8]] | Failed |
| case 1 | [[3, -1], [3, 0], [4, 0], [4, 1], [5, 1], [5, 2], [6, 2], [6, 3], [7, 3], [7, 4], [8, 4], [8, 5], [9, 5], [9, 6], [10, 6], [10, 7], [11, 7], [11, 8], [12, 8], [12, 9], [13, 9], [13, 10], [14, 10], [14, 11], [15, 11], [15, 12], [16, 12], [16, 13], [17, 13], [17, 14], [18, 14], [18, 15], [19, 15]] | [[3, -1], [4, -1], [4, 0], [5, 0], [5, 1], [6, 1], [6, 2], [7, 2], [7, 3], [8, 3], [8, 4], [9, 4], [9, 5], [10, 5], [10, 6], [11, 6], [11, 7], [12, 7], [12, 8], [13, 8], [13, 9], [14, 9], [14, 10], [15, 10], [15, 11], [16, 11], [16, 12], [17, 12], [17, 13], [18, 13], [18, 14], [19, 14], [19, 15]] | Failed |
| case 2 | [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]] | [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]] | Passed |
| case 3 | [[-1, 0]] | [[-1, 0]] | Passed |
| case 4 | [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]] | [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]] | Passed |
| case 5 | [[0, 0], [-1, 0], [-2, 0], [-2, -1], [-3, -1], [-4, -1], [-5, -1], [-6, -1], [-6, -2], [-7, -2], [-8, -2], [-9, -2]] | [[0, 0], [-1, 0], [-2, 0], [-3, 0], [-3, -1], [-4, -1], [-5, -1], [-6, -1], [-7, -1], [-7, -2], [-8, -2], [-9, -2]] | Failed |
| case 6 | [[-2, -4], [-3, -4], [-3, -3], [-4, -3], [-4, -2], [-5, -2], [-5, -1], [-6, -1], [-6, 0], [-7, 0]] | [[-2, -4], [-3, -4], [-4, -4], [-4, -3], [-5, -3], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-7, 0]] | Failed |
| case 7 | [[-3, -3], [-3, -2], [-2, -2], [-2, -1], [-1, -1], [-1, 0], [0, 0], [0, 1], [1, 1]] | [[-3, -3], [-2, -3], [-2, -2], [-1, -2], [-1, -1], [0, -1], [0, 0], [1, 0], [1, 1]] | Failed |
SHA-256 / 01a4459e63553c339d186a93d535b2f26d0a562ef74f95290107fb0ff146558c
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 = cs / 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 tmx == tmy:
ix += sx
tmx += tdx
iy += sy
tmy += tdy
elif 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 = [[[[[0.0, -1.5], [4, -2], 1.0, 3.0], [[0, -2], [1, -2], [1, -3], [2, -3], [3, -3], [3, -4], [4, -4], [5, -4], [5, -5], [6, -5], [7, -5], [7, -6], [8, -6], [9, -6], [9, -7], [10, -7], [11, -7], [11, -8], [12, -8]]], [[[1.75, -0.25], [4, 4], 0.5, 2.0], [[3, -1], [4, -1], [4, 0], [5, 0], [5, 1], [6, 1], [6, 2], [7, 2], [7, 3], [8, 3], [8, 4], [9, 4], [9, 5], [10, 5], [10, 6], [11, 6], [11, 7], [12, 7], [12, 8], [13, 8], [13, 9], [14, 9], [14, 10], [15, 10], [15, 11], [16, 11], [16, 12], [17, 12], [17, 13], [18, 13], [18, 14], [19, 14], [19, 15]]], [[[-1.25, 1.5], [-4, 2], 0.5, 3.0], [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]]], [[[-0.75, 0.75], [0, 0], 1.0, 0.5], [[-1, 0]]], [[[0.25, 1.75], [-1, 4], 0.5, 3.0], [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]]], [[[0.0, 0.5], [-4, -1], 1.0, 2.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]]], [[[-1.0, -2.0], [-4, 4], 0.5, 0.5], [[-2, -4], [-3, -4], [-4, -4], [-4, -3], [-5, -3], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-7, 0]]], [[[-1.5, -1.5], [4, 4], 0.5, 0.5], [[-3, -3], [-2, -3], [-2, -2], [-1, -2], [-1, -1], [0, -1], [0, 0], [1, 0], [1, 1]]]], [[[[-2.0, -0.75], [-4, 2], 0.5, 0.5], [[-4, -2], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-8, -1], [-8, 0], [-9, 0]]], [[[-1.25, 0.5], [1, -1], 1.0, 3.0], [[-2, 0], [-1, 0], [-1, -1], [0, -1], [0, -2], [1, -2], [1, -3]]], [[[-2.0, 0.75], [4, 4], 0.5, 3.0], [[-4, 1], [-4, 2], [-3, 2], [-3, 3], [-2, 3], [-2, 4], [-1, 4], [-1, 5], [0, 5], [0, 6], [1, 6], [1, 7], [2, 7], [2, 8], [3, 8], [3, 9], [4, 9], [4, 10], [5, 10], [5, 11], [6, 11], [6, 12], [7, 12], [7, 13], [8, 13], [8, 14], [9, 14], [9, 15], [10, 15], [10, 16], [11, 16], [11, 17], [12, 17], [12, 18], [13, 18], [13, 19], [14, 19], [14, 20], [15, 20], [15, 21], [16, 21], [16, 22], [17, 22], [17, 23], [18, 23], [18, 24], [19, 24], [19, 25], [20, 25]]], [[[1.5, 2.0], [-1, 2], 0.5, 1.0], [[3, 4], [2, 4], [2, 5], [1, 5], [1, 6], [1, 7], [0, 7], [0, 8]]], [[[0.75, -1.0], [0, 4], 2.0, 1.0], [[0, -1], [0, 0], [0, 1]]], [[[0.5, -1.0], [1, -2], 2.0, 3.0], [[0, -1], [0, -2], [1, -2], [1, -3], [1, -4]]], [[[-0.25, 2.0], [-1, 2], 0.5, 1.0], [[-1, 4], [-2, 4], [-2, 5], [-2, 6], [-3, 6], [-3, 7], [-3, 8]]], [[[-0.25, 0.5], [0, -1], 0.5, 2.0], [[-1, 1], [-1, 0], [-1, -1], [-1, -2], [-1, -3], [-1, -4]]]], [[[[-0.25, 1.0], [1, 4], 2.0, 2.0], [[-1, 0], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4]]], [[[2.0, 1.25], [-1, -2], 1.0, 2.0], [[2, 1], [1, 1], [1, 0], [1, -1], [0, -1], [0, -2], [0, -3], [-1, -3]]], [[[1.0, 0.5], [-1, 4], 0.5, 3.0], [[2, 1], [1, 1], [1, 2], [1, 3], [1, 4], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [-1, 8], [-1, 9], [-1, 10], [-1, 11], [-1, 12], [-2, 12], [-2, 13], [-2, 14], [-2, 15], [-2, 16], [-3, 16], [-3, 17], [-3, 18], [-3, 19], [-3, 20], [-4, 20], [-4, 21], [-4, 22], [-4, 23], [-4, 24], [-5, 24], [-5, 25]]], [[[-0.25, 0.75], [-2, 2], 0.5, 2.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], [-7, 7], [-8, 7], [-8, 8], [-9, 8], [-9, 9]]], [[[0.25, -1.75], [-2, -2], 2.0, 0.5], [[0, -1], [-1, -1], [-1, -2]]], [[[0.25, 0.25], [-1, 0], 1.0, 1.0], [[0, 0], [-1, 0]]], [[[-1.25, 0.75], [-4, -2], 1.0, 3.0], [[-2, 0], [-3, 0], [-3, -1], [-4, -1], [-5, -1], [-5, -2], [-6, -2], [-7, -2], [-7, -3], [-8, -3], [-9, -3], [-9, -4], [-10, -4], [-11, -4], [-11, -5], [-12, -5], [-13, -5], [-13, -6], [-14, -6]]], [[[0.25, 1.25], [-4, 4], 0.5, 1.0], [[0, 2], [-1, 2], [-1, 3], [-2, 3], [-2, 4], [-3, 4], [-3, 5], [-4, 5], [-4, 6], [-5, 6], [-5, 7], [-6, 7], [-6, 8], [-7, 8], [-7, 9], [-8, 9], [-8, 10]]]], [[[[-1.25, 0.75], [-2, -2], 0.5, 0.5], [[-3, 1], [-4, 1], [-4, 0], [-5, 0], [-5, -1]]], [[[1.5, -1.75], [2, 1], 1.0, 3.0], [[1, -2], [2, -2], [3, -2], [3, -1], [4, -1], [5, -1], [5, 0], [6, 0], [7, 0], [7, 1]]], [[[-0.5, -1.5], [-1, -1], 0.5, 2.0], [[-1, -3], [-2, -3], [-2, -4], [-3, -4], [-3, -5], [-4, -5], [-4, -6], [-5, -6], [-5, -7], [-6, -7], [-6, -8]]], [[[1.25, 0.5], [0, -1], 2.0, 3.0], [[0, 0], [0, -1], [0, -2]]], [[[-1.25, 1.75], [0, 2], 0.5, 0.5], [[-3, 3], [-3, 4], [-3, 5]]], [[[0.5, 0.5], [2, 2], 1.0, 1.0], [[0, 0], [1, 0], [1, 1], [2, 1], [2, 2]]], [[[1.75, -1.75], [1, -1], 1.0, 3.0], [[1, -2], [2, -2], [2, -3], [3, -3], [3, -4], [4, -4], [4, -5]]], [[[-0.25, -0.75], [0, 1], 0.5, 2.0], [[-1, -2], [-1, -1], [-1, 0], [-1, 1], [-1, 2]]]], [[[[0.0, 2.0], [-1, -2], 2.0, 0.5], [[0, 1], [-1, 1], [-1, 0]]], [[[-0.5, 0.0], [2, 2], 2.0, 0.5], [[-1, 0], [0, 0]]], [[[-1.5, -2.0], [-4, 4], 0.5, 0.5], [[-3, -4], [-4, -4], [-5, -4], [-5, -3], [-6, -3], [-6, -2], [-7, -2], [-7, -1], [-8, -1], [-8, 0]]], [[[1.25, 1.75], [-1, -2], 0.5, 2.0], [[2, 3], [2, 2], [1, 2], [1, 1], [1, 0], [0, 0], [0, -1], [0, -2], [-1, -2], [-1, -3], [-1, -4], [-2, -4], [-2, -5]]], [[[0.75, -1.25], [2, -2], 0.5, 1.0], [[1, -3], [2, -3], [2, -4], [3, -4], [3, -5], [4, -5], [4, -6], [5, -6], [5, -7]]], [[[-2.0, 2.0], [-2, 2], 1.0, 1.0], [[-2, 2], [-3, 2], [-4, 2], [-4, 3], [-5, 3], [-5, 4]]], [[[-1.0, -1.0], [-4, -1], 1.0, 0.5], [[-1, -1], [-2, -1], [-2, -2], [-3, -2], [-4, -2]]], [[[0.5, -1.5], [2, 4], 1.0, 0.5], [[0, -2], [0, -1], [1, -1], [1, 0]]]]]
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 | [[0, -2], [1, -3], [2, -3], [3, -4], [4, -4], [5, -5], [6, -5], [7, -6], [8, -6], [9, -7], [10, -7], [11, -8], [12, -8]] | [[0, -2], [1, -2], [1, -3], [2, -3], [3, -3], [3, -4], [4, -4], [5, -4], [5, -5], [6, -5], [7, -5], [7, -6], [8, -6], [9, -6], [9, -7], [10, -7], [11, -7], [11, -8], [12, -8]] | Failed |
| case 1 | [[3, -1], [4, 0], [5, 1], [6, 2], [7, 3], [8, 4], [9, 5], [10, 6], [11, 7], [12, 8], [13, 9], [14, 10], [15, 11], [16, 12], [17, 13], [18, 14], [19, 15]] | [[3, -1], [4, -1], [4, 0], [5, 0], [5, 1], [6, 1], [6, 2], [7, 2], [7, 3], [8, 3], [8, 4], [9, 4], [9, 5], [10, 5], [10, 6], [11, 6], [11, 7], [12, 7], [12, 8], [13, 8], [13, 9], [14, 9], [14, 10], [15, 10], [15, 11], [16, 11], [16, 12], [17, 12], [17, 13], [18, 13], [18, 14], [19, 14], [19, 15]] | Failed |
| case 2 | [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]] | [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]] | Passed |
| case 3 | [[-1, 0]] | [[-1, 0]] | Passed |
| case 4 | [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]] | [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]] | Passed |
| case 5 | [[0, 0], [-1, 0], [-2, 0], [-3, -1], [-4, -1], [-5, -1], [-6, -1], [-7, -2], [-8, -2], [-9, -2]] | [[0, 0], [-1, 0], [-2, 0], [-3, 0], [-3, -1], [-4, -1], [-5, -1], [-6, -1], [-7, -1], [-7, -2], [-8, -2], [-9, -2]] | Failed |
| case 6 | [[-2, -4], [-3, -4], [-4, -3], [-5, -2], [-6, -1], [-7, 0]] | [[-2, -4], [-3, -4], [-4, -4], [-4, -3], [-5, -3], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-7, 0]] | Failed |
| case 7 | [[-3, -3], [-2, -2], [-1, -1], [0, 0], [1, 1]] | [[-3, -3], [-2, -3], [-2, -2], [-1, -2], [-1, -1], [0, -1], [0, 0], [1, 0], [1, 1]] | Failed |
SHA-256 / f23fa35e569bab38a361dc7f5eac7d0e5ee84dc9891f018cfdc034dcef8537ce
3 / The verified repair
Exit 0"""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 / 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 = [[[[[0.0, -1.5], [4, -2], 1.0, 3.0], [[0, -2], [1, -2], [1, -3], [2, -3], [3, -3], [3, -4], [4, -4], [5, -4], [5, -5], [6, -5], [7, -5], [7, -6], [8, -6], [9, -6], [9, -7], [10, -7], [11, -7], [11, -8], [12, -8]]], [[[1.75, -0.25], [4, 4], 0.5, 2.0], [[3, -1], [4, -1], [4, 0], [5, 0], [5, 1], [6, 1], [6, 2], [7, 2], [7, 3], [8, 3], [8, 4], [9, 4], [9, 5], [10, 5], [10, 6], [11, 6], [11, 7], [12, 7], [12, 8], [13, 8], [13, 9], [14, 9], [14, 10], [15, 10], [15, 11], [16, 11], [16, 12], [17, 12], [17, 13], [18, 13], [18, 14], [19, 14], [19, 15]]], [[[-1.25, 1.5], [-4, 2], 0.5, 3.0], [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]]], [[[-0.75, 0.75], [0, 0], 1.0, 0.5], [[-1, 0]]], [[[0.25, 1.75], [-1, 4], 0.5, 3.0], [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]]], [[[0.0, 0.5], [-4, -1], 1.0, 2.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]]], [[[-1.0, -2.0], [-4, 4], 0.5, 0.5], [[-2, -4], [-3, -4], [-4, -4], [-4, -3], [-5, -3], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-7, 0]]], [[[-1.5, -1.5], [4, 4], 0.5, 0.5], [[-3, -3], [-2, -3], [-2, -2], [-1, -2], [-1, -1], [0, -1], [0, 0], [1, 0], [1, 1]]]], [[[[-2.0, -0.75], [-4, 2], 0.5, 0.5], [[-4, -2], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-8, -1], [-8, 0], [-9, 0]]], [[[-1.25, 0.5], [1, -1], 1.0, 3.0], [[-2, 0], [-1, 0], [-1, -1], [0, -1], [0, -2], [1, -2], [1, -3]]], [[[-2.0, 0.75], [4, 4], 0.5, 3.0], [[-4, 1], [-4, 2], [-3, 2], [-3, 3], [-2, 3], [-2, 4], [-1, 4], [-1, 5], [0, 5], [0, 6], [1, 6], [1, 7], [2, 7], [2, 8], [3, 8], [3, 9], [4, 9], [4, 10], [5, 10], [5, 11], [6, 11], [6, 12], [7, 12], [7, 13], [8, 13], [8, 14], [9, 14], [9, 15], [10, 15], [10, 16], [11, 16], [11, 17], [12, 17], [12, 18], [13, 18], [13, 19], [14, 19], [14, 20], [15, 20], [15, 21], [16, 21], [16, 22], [17, 22], [17, 23], [18, 23], [18, 24], [19, 24], [19, 25], [20, 25]]], [[[1.5, 2.0], [-1, 2], 0.5, 1.0], [[3, 4], [2, 4], [2, 5], [1, 5], [1, 6], [1, 7], [0, 7], [0, 8]]], [[[0.75, -1.0], [0, 4], 2.0, 1.0], [[0, -1], [0, 0], [0, 1]]], [[[0.5, -1.0], [1, -2], 2.0, 3.0], [[0, -1], [0, -2], [1, -2], [1, -3], [1, -4]]], [[[-0.25, 2.0], [-1, 2], 0.5, 1.0], [[-1, 4], [-2, 4], [-2, 5], [-2, 6], [-3, 6], [-3, 7], [-3, 8]]], [[[-0.25, 0.5], [0, -1], 0.5, 2.0], [[-1, 1], [-1, 0], [-1, -1], [-1, -2], [-1, -3], [-1, -4]]]], [[[[-0.25, 1.0], [1, 4], 2.0, 2.0], [[-1, 0], [0, 0], [0, 1], [0, 2], [0, 3], [0, 4]]], [[[2.0, 1.25], [-1, -2], 1.0, 2.0], [[2, 1], [1, 1], [1, 0], [1, -1], [0, -1], [0, -2], [0, -3], [-1, -3]]], [[[1.0, 0.5], [-1, 4], 0.5, 3.0], [[2, 1], [1, 1], [1, 2], [1, 3], [1, 4], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [-1, 8], [-1, 9], [-1, 10], [-1, 11], [-1, 12], [-2, 12], [-2, 13], [-2, 14], [-2, 15], [-2, 16], [-3, 16], [-3, 17], [-3, 18], [-3, 19], [-3, 20], [-4, 20], [-4, 21], [-4, 22], [-4, 23], [-4, 24], [-5, 24], [-5, 25]]], [[[-0.25, 0.75], [-2, 2], 0.5, 2.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], [-7, 7], [-8, 7], [-8, 8], [-9, 8], [-9, 9]]], [[[0.25, -1.75], [-2, -2], 2.0, 0.5], [[0, -1], [-1, -1], [-1, -2]]], [[[0.25, 0.25], [-1, 0], 1.0, 1.0], [[0, 0], [-1, 0]]], [[[-1.25, 0.75], [-4, -2], 1.0, 3.0], [[-2, 0], [-3, 0], [-3, -1], [-4, -1], [-5, -1], [-5, -2], [-6, -2], [-7, -2], [-7, -3], [-8, -3], [-9, -3], [-9, -4], [-10, -4], [-11, -4], [-11, -5], [-12, -5], [-13, -5], [-13, -6], [-14, -6]]], [[[0.25, 1.25], [-4, 4], 0.5, 1.0], [[0, 2], [-1, 2], [-1, 3], [-2, 3], [-2, 4], [-3, 4], [-3, 5], [-4, 5], [-4, 6], [-5, 6], [-5, 7], [-6, 7], [-6, 8], [-7, 8], [-7, 9], [-8, 9], [-8, 10]]]], [[[[-1.25, 0.75], [-2, -2], 0.5, 0.5], [[-3, 1], [-4, 1], [-4, 0], [-5, 0], [-5, -1]]], [[[1.5, -1.75], [2, 1], 1.0, 3.0], [[1, -2], [2, -2], [3, -2], [3, -1], [4, -1], [5, -1], [5, 0], [6, 0], [7, 0], [7, 1]]], [[[-0.5, -1.5], [-1, -1], 0.5, 2.0], [[-1, -3], [-2, -3], [-2, -4], [-3, -4], [-3, -5], [-4, -5], [-4, -6], [-5, -6], [-5, -7], [-6, -7], [-6, -8]]], [[[1.25, 0.5], [0, -1], 2.0, 3.0], [[0, 0], [0, -1], [0, -2]]], [[[-1.25, 1.75], [0, 2], 0.5, 0.5], [[-3, 3], [-3, 4], [-3, 5]]], [[[0.5, 0.5], [2, 2], 1.0, 1.0], [[0, 0], [1, 0], [1, 1], [2, 1], [2, 2]]], [[[1.75, -1.75], [1, -1], 1.0, 3.0], [[1, -2], [2, -2], [2, -3], [3, -3], [3, -4], [4, -4], [4, -5]]], [[[-0.25, -0.75], [0, 1], 0.5, 2.0], [[-1, -2], [-1, -1], [-1, 0], [-1, 1], [-1, 2]]]], [[[[0.0, 2.0], [-1, -2], 2.0, 0.5], [[0, 1], [-1, 1], [-1, 0]]], [[[-0.5, 0.0], [2, 2], 2.0, 0.5], [[-1, 0], [0, 0]]], [[[-1.5, -2.0], [-4, 4], 0.5, 0.5], [[-3, -4], [-4, -4], [-5, -4], [-5, -3], [-6, -3], [-6, -2], [-7, -2], [-7, -1], [-8, -1], [-8, 0]]], [[[1.25, 1.75], [-1, -2], 0.5, 2.0], [[2, 3], [2, 2], [1, 2], [1, 1], [1, 0], [0, 0], [0, -1], [0, -2], [-1, -2], [-1, -3], [-1, -4], [-2, -4], [-2, -5]]], [[[0.75, -1.25], [2, -2], 0.5, 1.0], [[1, -3], [2, -3], [2, -4], [3, -4], [3, -5], [4, -5], [4, -6], [5, -6], [5, -7]]], [[[-2.0, 2.0], [-2, 2], 1.0, 1.0], [[-2, 2], [-3, 2], [-4, 2], [-4, 3], [-5, 3], [-5, 4]]], [[[-1.0, -1.0], [-4, -1], 1.0, 0.5], [[-1, -1], [-2, -1], [-2, -2], [-3, -2], [-4, -2]]], [[[0.5, -1.5], [2, 4], 1.0, 0.5], [[0, -2], [0, -1], [1, -1], [1, 0]]]]]
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 | [[0, -2], [1, -2], [1, -3], [2, -3], [3, -3], [3, -4], [4, -4], [5, -4], [5, -5], [6, -5], [7, -5], [7, -6], [8, -6], [9, -6], [9, -7], [10, -7], [11, -7], [11, -8], [12, -8]] | [[0, -2], [1, -2], [1, -3], [2, -3], [3, -3], [3, -4], [4, -4], [5, -4], [5, -5], [6, -5], [7, -5], [7, -6], [8, -6], [9, -6], [9, -7], [10, -7], [11, -7], [11, -8], [12, -8]] | Passed |
| case 1 | [[3, -1], [4, -1], [4, 0], [5, 0], [5, 1], [6, 1], [6, 2], [7, 2], [7, 3], [8, 3], [8, 4], [9, 4], [9, 5], [10, 5], [10, 6], [11, 6], [11, 7], [12, 7], [12, 8], [13, 8], [13, 9], [14, 9], [14, 10], [15, 10], [15, 11], [16, 11], [16, 12], [17, 12], [17, 13], [18, 13], [18, 14], [19, 14], [19, 15]] | [[3, -1], [4, -1], [4, 0], [5, 0], [5, 1], [6, 1], [6, 2], [7, 2], [7, 3], [8, 3], [8, 4], [9, 4], [9, 5], [10, 5], [10, 6], [11, 6], [11, 7], [12, 7], [12, 8], [13, 8], [13, 9], [14, 9], [14, 10], [15, 10], [15, 11], [16, 11], [16, 12], [17, 12], [17, 13], [18, 13], [18, 14], [19, 14], [19, 15]] | Passed |
| case 2 | [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]] | [[-3, 3], [-4, 3], [-5, 3], [-5, 4], [-6, 4], [-7, 4], [-7, 5], [-8, 5], [-9, 5], [-9, 6], [-10, 6], [-11, 6], [-11, 7], [-12, 7], [-13, 7], [-13, 8], [-14, 8], [-15, 8], [-15, 9], [-16, 9], [-17, 9], [-17, 10], [-18, 10], [-19, 10], [-19, 11], [-20, 11], [-21, 11], [-21, 12], [-22, 12], [-23, 12], [-23, 13], [-24, 13], [-25, 13], [-25, 14], [-26, 14], [-27, 14], [-27, 15]] | Passed |
| case 3 | [[-1, 0]] | [[-1, 0]] | Passed |
| case 4 | [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]] | [[0, 3], [0, 4], [0, 5], [-1, 5], [-1, 6], [-1, 7], [-1, 8], [-1, 9], [-2, 9], [-2, 10], [-2, 11], [-2, 12], [-2, 13], [-3, 13], [-3, 14], [-3, 15], [-3, 16], [-3, 17], [-4, 17], [-4, 18], [-4, 19], [-4, 20], [-4, 21], [-5, 21], [-5, 22], [-5, 23], [-5, 24], [-5, 25], [-6, 25], [-6, 26], [-6, 27]] | Passed |
| case 5 | [[0, 0], [-1, 0], [-2, 0], [-3, 0], [-3, -1], [-4, -1], [-5, -1], [-6, -1], [-7, -1], [-7, -2], [-8, -2], [-9, -2]] | [[0, 0], [-1, 0], [-2, 0], [-3, 0], [-3, -1], [-4, -1], [-5, -1], [-6, -1], [-7, -1], [-7, -2], [-8, -2], [-9, -2]] | Passed |
| case 6 | [[-2, -4], [-3, -4], [-4, -4], [-4, -3], [-5, -3], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-7, 0]] | [[-2, -4], [-3, -4], [-4, -4], [-4, -3], [-5, -3], [-5, -2], [-6, -2], [-6, -1], [-7, -1], [-7, 0]] | Passed |
| case 7 | [[-3, -3], [-2, -3], [-2, -2], [-1, -2], [-1, -1], [0, -1], [0, 0], [1, 0], [1, 1]] | [[-3, -3], [-2, -3], [-2, -2], [-1, -2], [-1, -1], [0, -1], [0, 0], [1, 0], [1, 1]] | Passed |
SHA-256 / 8972d6ebba0125b30019b6b7aabdf76090714bae4017cc7dd21c60ec3ffa5a83
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.372084+00:00.
Case digest / 62961b3d9c5f39f3166f1388b25410043efa93556fa0aefef53ed64aaf4c8208