FA-87581 / Collision detection broadphase / Open access
Flat scene axis quantizes to the middle cell · case 01
Planar scenes get codes offset from the contract and mismatch cached trees.
ROOT CAUSE
A zero-extent axis returns 512.
VERIFIED REPAIR
A flat axis quantizes to 0.
Unsuccessful approach: Returning 1023 for a flat axis is also off-contract.
Case contract
solve(pts, bounds): LBVH ordering. Each centroid [id,x,y] is quantized per axis to min(1023, max(0, floor((c-lo)/(hi-lo)*1024))) (0 for a flat axis), and the 10-bit values are interleaved with x in even bits and y in odd bits. Return [[id, code]] sorted by (code, numeric id).
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(pts, bounds):
def part(v):
v &= 0x3FF
v = (v | (v << 8)) & 0x00FF00FF
v = (v | (v << 4)) & 0x0F0F0F0F
v = (v | (v << 2)) & 0x33333333
v = (v | (v << 1)) & 0x55555555
return v
def quant(c, lo, hi):
if hi <= lo:
return 512
return min(1023, max(0, math.floor((c - lo) / (hi - lo) * 1024)))
out = []
for i, x, y in pts:
code = part(quant(x, bounds[0], bounds[2])) | (part(quant(y, bounds[1], bounds[3])) << 1)
out.append([i, code])
out.sort(key=lambda r: (r[1], r[0]))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[19, -10.0, 4.0], [7, -10.0, 1.34]], [-10.0, -4.0, -10.0, 4.0]], [[7, 559242], [19, 699050]]], [[[[21, 0.0, 0.0], [5, 0.0, 0.0], [8, 0.0, 31.18], [22, 0.44, 32.0], [12, 0.0, 24.61]], [0.0, 0.0, 0.0, 32.0]], [[5, 0], [21, 0], [12, 655882], [8, 698402], [22, 699050]]], [[[[11, -3.43, 1.64], [15, 0.0, 28.7], [29, 0.0, 6.31], [13, -4.94, 27.01], [6, -10.0, 5.12]], [-10.0, -4.0, 0.0, 28.0]], [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]]], [[[[22, 5.0, 5.01], [12, 5.0, 5.01], [25, 5.01, 8.0], [28, 5.0, 3.73]], [5.0, 0.0, 5.0, 8.0]], [[28, 172706], [12, 557058], [22, 557058], [25, 699050]]], [[[[8, -7.89, -2.0], [3, 0.0, -0.75], [21, -10.37, -0.33], [12, 0.0, 4.0], [9, 0.0, 4.0]], [-10.0, -4.0, 0.0, 4.0]], [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]]], [[[[1, -10.0, -4.0], [21, -10.0, -4.0], [12, -10.0, -0.83], [4, -10.0, 1.95], [8, -10.0, -4.0]], [-10.0, -4.0, -10.0, 4.0]], [[1, 0], [8, 0], [21, 0], [12, 164386], [4, 567938]]], [[[[10, 60.28, 0.0], [4, 13.29, 0.0]], [0.0, 0.0, 100.0, 8.0]], [[4, 16448], [10, 267329]]], [[[[23, -10.0, 2.89], [10, -9.49, 0.0], [12, -10.79, 0.0], [24, -10.0, 8.0], [21, -10.0, 3.46], [15, -10.0, -0.74]], [-10.0, 0.0, -10.0, 8.0]], [[10, 0], [12, 0], [15, 0], [23, 141826], [21, 166536], [24, 699050]]]], [[[[[22, 0.0, 0.0], [17, 0.0, 0.0], [5, -0.97, 0.0], [26, 0.0, 0.0], [9, 0.0, 4.39], [24, 0.0, 8.0]], [0.0, 0.0, 0.0, 8.0]], [[5, 0], [17, 0], [22, 0], [26, 0], [9, 526850], [24, 699050]]], [[[[16, 0.0, 0.51], [14, 0.0, 0.51], [27, 0.0, -4.83]], [0.0, -4.0, 10.0, 4.0]], [[27, 0], [14, 532482], [16, 532482]]], [[[[11, 78.48, 0.0], [28, 5.0, 15.1], [15, 96.42, 0.0], [1, 102.25, 0.0], [5, 51.05, 30.03], [23, 5.0, 0.0], [22, 5.0, 29.99], [25, 65.54, 8.15]], [5.0, 0.0, 105.0, 32.0]], [[23, 0], [28, 174090], [11, 283904], [15, 345152], [1, 349189], [25, 398437], [22, 690858], [5, 782613]]], [[[[7, 61.89, 26.8], [4, 65.14, 0.0], [10, 37.56, 2.32], [12, 46.76, 27.2], [13, 105.0, 16.99]], [5.0, 0.0, 105.0, 32.0]], [[10, 78041], [4, 267285], [12, 748653], [13, 874495], [7, 930454]]], [[[[27, -0.7, 0.0], [4, 0.0, 0.0], [9, 0.0, 30.17], [29, 0.0, 32.0], [7, 0.0, 28.94], [5, 0.0, 20.33]], [0.0, 0.0, 0.0, 32.0]], [[4, 0], [27, 0], [5, 557192], [7, 688808], [9, 696354], [29, 699050]]], [[[[6, 7.33, 8.0], [11, 20.44, 0.0], [26, 90.0, 8.0], [5, -10.0, 8.0], [20, 90.0, 0.0], [24, -10.0, 8.0], [21, -10.0, 8.0], [12, -10.0, 0.57]], [-10.0, 0.0, 90.0, 8.0]], [[12, 8320], [11, 66837], [20, 349525], [5, 699050], [21, 699050], [24, 699050], [6, 716715], [26, 1048575]]], [[[[14, 0.0, -4.0], [22, 0.0, 13.71], [15, 0.13, 7.52], [1, 0.0, -4.0], [29, 0.0, 27.3], [3, 0.0, -1.25]], [0.0, -4.0, 0.0, 28.0]], [[1, 0], [14, 0], [3, 8832], [15, 141824], [22, 526888], [29, 698498]]], [[[[29, -10.0, -0.25], [3, -10.57, 28.0], [19, -10.0, -4.0], [9, -10.0, -4.0], [20, -10.0, -4.0]], [-10.0, -4.0, -10.0, 28.0]], [[9, 0], [19, 0], [20, 0], [29, 10880], [3, 699050]]]], [[[[[6, 6.78, 10.96], [13, 11.06, -4.0], [15, 5.0, -4.0], [4, 21.0, 17.83], [25, 21.0, -0.96], [5, 21.0, 8.8], [9, 21.0, 6.79], [17, 5.0, 28.0], [2, 19.79, 19.98]], [5.0, -4.0, 21.0, 28.0]], [[15, 0], [13, 81925], [6, 178089], [25, 359767], [9, 489431], [5, 514007], [17, 699050], [4, 909277], [2, 913326]]], [[[[7, 10.93, 6.74], [14, 8.29, 8.0], [21, 11.99, 0.0], [25, 9.07, 0.0], [9, 10.31, 8.0], [12, 5.81, 8.0]], [5.0, 0.0, 15.0, 8.0]], [[25, 82944], [21, 282693], [12, 703406], [14, 768938], [7, 930813], [9, 961535]]], [[[[18, -10.96, -4.0], [4, -10.96, -4.0], [20, -9.55, 4.0], [28, -10.0, -2.22], [21, -10.0, -3.26]], [-10.0, -4.0, -10.0, 4.0]], [[4, 0], [18, 0], [21, 8872], [28, 43018], [20, 699050]]], [[[[8, 1.97, -4.78], [27, 9.24, -2.19], [7, 0.0, -4.0]], [0.0, -4.0, 10.0, 4.0]], [[7, 0], [8, 20545], [27, 388398]]], [[[[14, -10.0, 8.0], [26, -10.0, 8.0], [8, -10.0, 3.45], [16, -10.97, 8.0], [25, -10.0, 5.04], [22, -10.0, 0.0], [7, -10.0, 2.57], [15, -9.53, 3.51], [12, -10.46, 2.24]], [-10.0, 0.0, -10.0, 8.0]], [[22, 0], [12, 131752], [7, 139392], [8, 166530], [15, 172034], [25, 557090], [14, 699050], [16, 699050], [26, 699050]]], [[[[7, 0.0, 8.0], [4, 62.93, 0.0], [19, 0.0, 0.0]], [0.0, 0.0, 100.0, 8.0]], [[19, 0], [4, 278544], [7, 699050]]], [[[[2, 5.42, -3.91], [24, 5.0, -4.0], [8, 5.0, 4.0], [7, 5.0, 4.0], [12, 5.0, 4.0]], [5.0, -4.0, 5.0, 4.0]], [[24, 0], [2, 138], [7, 699050], [8, 699050], [12, 699050]]], [[[[26, -10.0, 32.0], [24, -10.0, 11.64], [13, -10.0, 32.0], [23, -10.0, 8.58]], [-10.0, 0.0, -10.0, 32.0]], [[23, 131592], [24, 141856], [13, 699050], [26, 699050]]]], [[[[[21, -10.0, 4.0], [22, -10.0, 4.0], [4, -10.0, 3.11], [25, -10.0, 0.41], [28, -10.0, -4.0], [26, -10.0, 4.0], [24, -9.62, 4.0], [6, -10.0, 1.72], [10, -10.25, -0.14], [16, -10.0, 0.06]], [-10.0, -4.0, -10.0, 4.0]], [[28, 0], [10, 174248], [16, 524330], [25, 526880], [6, 565920], [4, 688296], [21, 699050], [22, 699050], [24, 699050], [26, 699050]]], [[[[25, 69.59, 21.33], [1, 5.0, 28.0], [16, 15.52, 18.84], [27, 17.38, 7.05]], [5.0, -4.0, 105.0, 28.0]], [[27, 146774], [16, 571085], [1, 699050], [25, 936345]]], [[[[8, -0.51, 19.57], [1, 4.93, 32.0], [10, -7.16, 21.55], [26, -10.0, 1.76], [22, -4.61, 0.0]], [-10.0, 0.0, 6.0, 32.0]], [[26, 2688], [22, 69952], [10, 577299], [8, 801629], [1, 1044463]]], [[[[28, 5.0, 0.88], [1, 5.0, 0.88], [27, 5.0, 5.31], [11, 5.0, 2.4], [10, 4.67, 8.0], [19, 5.0, 1.58], [15, 5.0, 0.0], [29, 5.0, 6.76], [6, 5.0, 6.68], [9, 5.0, 3.17]], [5.0, 0.0, 5.0, 8.0]], [[15, 0], [1, 10752], [28, 10752], [19, 41096], [11, 133642], [9, 164386], [27, 559146], [6, 664106], [29, 665602], [10, 699050]]], [[[[27, -9.61, 32.0], [23, -10.0, 32.0]], [-10.0, 0.0, -10.0, 32.0]], [[23, 699050], [27, 699050]]], [[[[25, 0.38, 1.37], [10, 0.38, 1.37], [28, 0.0, 3.23], [21, 0.0, 8.0], [26, 0.0, 1.44], [5, 0.0, 1.55]], [0.0, 0.0, 0.0, 8.0]], [[10, 34986], [25, 34986], [26, 35456], [5, 41000], [28, 164514], [21, 699050]]], [[[[6, 5.0, 28.0], [19, 5.0, -4.0], [10, 4.81, -4.0], [1, 5.97, -4.0], [7, 5.0, 20.22], [16, 5.0, 11.44], [8, 5.0, -4.0], [4, 5.24, 16.7], [21, 5.0, 28.0]], [5.0, -4.0, 5.0, 28.0]], [[1, 0], [8, 0], [10, 0], [19, 0], [16, 174248], [4, 557608], [7, 655402], [6, 699050], [21, 699050]]], [[[[6, -10.0, 10.07], [18, -10.0, 10.07], [16, -0.46, -4.0], [3, -10.0, 28.0]], [-10.0, -4.0, 90.0, 28.0]], [[16, 5121], [6, 172040], [18, 172040], [3, 699050]]]], [[[[[28, 5.0, 8.0], [9, 5.37, 0.0]], [5.0, 0.0, 5.0, 8.0]], [[9, 0], [28, 699050]]], [[[[4, -10.0, 28.66], [18, -10.11, 32.0], [28, -10.0, 27.97], [15, -10.64, 0.0], [1, -10.0, 0.0], [3, -10.0, 32.0], [8, -10.0, 32.0], [10, -10.0, 2.25], [16, -10.0, 32.0], [24, -10.0, 32.0], [20, -10.0, 0.0]], [-10.0, 0.0, -10.0, 32.0]], [[1, 0], [15, 0], [20, 0], [10, 8320], [28, 666282], [4, 688674], [3, 699050], [8, 699050], [16, 699050], [18, 699050], [24, 699050]]], [[[[10, 5.0, 32.0], [18, 5.0, 32.0], [6, 5.0, 32.0], [3, 15.23, 32.0], [4, 19.19, 0.0], [11, 20.79, 0.0], [14, 5.0, 0.0], [12, 16.84, 32.0], [19, 20.34, 0.0], [20, 21.0, 32.0], [23, 10.01, 32.0]], [5.0, 0.0, 21.0, 32.0]], [[14, 0], [4, 344144], [19, 348433], [11, 349444], [6, 699050], [10, 699050], [18, 699050], [23, 768682], [3, 977662], [12, 982971], [20, 1048575]]], [[[[23, 0.0, 0.0], [10, 0.0, 0.0], [2, 0.0, 23.84], [29, -0.27, 20.79], [15, 0.0, 0.0], [27, 0.0, 30.52], [21, -0.47, 17.6], [4, 0.0, 32.0], [18, 0.0, 0.0]], [0.0, 0.0, 0.0, 32.0]], [[10, 0], [15, 0], [18, 0], [23, 0], [21, 526858], [29, 557698], [2, 567944], [27, 696832], [4, 699050]]], [[[[28, 16.11, 2.24], [21, 16.11, 2.24], [27, 9.53, -4.0], [20, 20.91, 4.0], [3, 18.47, -4.0], [4, 5.0, -2.15], [23, 15.36, -4.0], [15, 5.0, 2.72], [16, 21.0, -3.28]], [5.0, -4.0, 21.0, 4.0]], [[4, 43168], [27, 66561], [23, 278805], [3, 332116], [16, 358389], [15, 664224], [21, 938685], [28, 938685], [20, 1048558]]], [[[[6, -10.99, 28.0], [8, -10.0, 10.06], [16, -10.04, -4.0], [18, -9.74, -4.0]], [-10.0, -4.0, -10.0, 28.0]], [[16, 0], [18, 0], [8, 172034], [6, 699050]]], [[[[17, 0.0, -4.0], [21, 0.0, -4.0], [4, 0.0, -2.2], [29, 0.0, 4.0], [5, 0.0, 0.07], [24, 0.0, -3.58], [18, 0.0, 0.36], [7, 0.0, 4.0], [3, 0.0, -4.0], [11, 0.0, -1.93]], [0.0, -4.0, 0.0, 4.0]], [[3, 0], [17, 0], [21, 0], [24, 2594], [4, 43048], [11, 131200], [5, 524416], [18, 526504], [7, 699050], [29, 699050]]], [[[[13, -10.0, 1.59], [7, 90.0, 4.0], [19, -10.0, 0.52], [28, 1.11, -4.0], [23, -10.0, 2.02], [15, 15.03, -4.49], [11, 90.0, 4.0], [1, 45.01, 2.58], [20, 74.22, 4.0]], [-10.0, -4.0, 90.0, 4.0]], [[28, 5377], [15, 65536], [19, 532488], [13, 565386], [23, 655368], [1, 927117], [20, 1031166], [7, 1048575], [11, 1048575]]]]]
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 | [[7, 821386], [19, 961194]] | [[7, 559242], [19, 699050]] | Failed |
| case 1 | [[5, 262144], [21, 262144], [12, 918026], [8, 960546], [22, 961194]] | [[5, 0], [21, 0], [12, 655882], [8, 698402], [22, 699050]] | Failed |
| case 2 | [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]] | [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]] | Passed |
| case 3 | [[28, 434850], [12, 819202], [22, 819202], [25, 961194]] | [[28, 172706], [12, 557058], [22, 557058], [25, 699050]] | Failed |
| case 4 | [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]] | [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]] | Passed |
| case 5 | [[1, 262144], [8, 262144], [21, 262144], [12, 426530], [4, 830082]] | [[1, 0], [8, 0], [21, 0], [12, 164386], [4, 567938]] | Failed |
| case 6 | [[4, 16448], [10, 267329]] | [[4, 16448], [10, 267329]] | Passed |
| case 7 | [[10, 262144], [12, 262144], [15, 262144], [23, 403970], [21, 428680], [24, 961194]] | [[10, 0], [12, 0], [15, 0], [23, 141826], [21, 166536], [24, 699050]] | Failed |
SHA-256 / 995f27cf23c8b2f04b979ce1a28ffd3e2f57a85b9fbc30376a0855956de0c18b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pts, bounds):
def part(v):
v &= 0x3FF
v = (v | (v << 8)) & 0x00FF00FF
v = (v | (v << 4)) & 0x0F0F0F0F
v = (v | (v << 2)) & 0x33333333
v = (v | (v << 1)) & 0x55555555
return v
def quant(c, lo, hi):
if hi <= lo:
return 1023
return min(1023, max(0, math.floor((c - lo) / (hi - lo) * 1024)))
out = []
for i, x, y in pts:
code = part(quant(x, bounds[0], bounds[2])) | (part(quant(y, bounds[1], bounds[3])) << 1)
out.append([i, code])
out.sort(key=lambda r: (r[1], r[0]))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[19, -10.0, 4.0], [7, -10.0, 1.34]], [-10.0, -4.0, -10.0, 4.0]], [[7, 559242], [19, 699050]]], [[[[21, 0.0, 0.0], [5, 0.0, 0.0], [8, 0.0, 31.18], [22, 0.44, 32.0], [12, 0.0, 24.61]], [0.0, 0.0, 0.0, 32.0]], [[5, 0], [21, 0], [12, 655882], [8, 698402], [22, 699050]]], [[[[11, -3.43, 1.64], [15, 0.0, 28.7], [29, 0.0, 6.31], [13, -4.94, 27.01], [6, -10.0, 5.12]], [-10.0, -4.0, 0.0, 28.0]], [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]]], [[[[22, 5.0, 5.01], [12, 5.0, 5.01], [25, 5.01, 8.0], [28, 5.0, 3.73]], [5.0, 0.0, 5.0, 8.0]], [[28, 172706], [12, 557058], [22, 557058], [25, 699050]]], [[[[8, -7.89, -2.0], [3, 0.0, -0.75], [21, -10.37, -0.33], [12, 0.0, 4.0], [9, 0.0, 4.0]], [-10.0, -4.0, 0.0, 4.0]], [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]]], [[[[1, -10.0, -4.0], [21, -10.0, -4.0], [12, -10.0, -0.83], [4, -10.0, 1.95], [8, -10.0, -4.0]], [-10.0, -4.0, -10.0, 4.0]], [[1, 0], [8, 0], [21, 0], [12, 164386], [4, 567938]]], [[[[10, 60.28, 0.0], [4, 13.29, 0.0]], [0.0, 0.0, 100.0, 8.0]], [[4, 16448], [10, 267329]]], [[[[23, -10.0, 2.89], [10, -9.49, 0.0], [12, -10.79, 0.0], [24, -10.0, 8.0], [21, -10.0, 3.46], [15, -10.0, -0.74]], [-10.0, 0.0, -10.0, 8.0]], [[10, 0], [12, 0], [15, 0], [23, 141826], [21, 166536], [24, 699050]]]], [[[[[22, 0.0, 0.0], [17, 0.0, 0.0], [5, -0.97, 0.0], [26, 0.0, 0.0], [9, 0.0, 4.39], [24, 0.0, 8.0]], [0.0, 0.0, 0.0, 8.0]], [[5, 0], [17, 0], [22, 0], [26, 0], [9, 526850], [24, 699050]]], [[[[16, 0.0, 0.51], [14, 0.0, 0.51], [27, 0.0, -4.83]], [0.0, -4.0, 10.0, 4.0]], [[27, 0], [14, 532482], [16, 532482]]], [[[[11, 78.48, 0.0], [28, 5.0, 15.1], [15, 96.42, 0.0], [1, 102.25, 0.0], [5, 51.05, 30.03], [23, 5.0, 0.0], [22, 5.0, 29.99], [25, 65.54, 8.15]], [5.0, 0.0, 105.0, 32.0]], [[23, 0], [28, 174090], [11, 283904], [15, 345152], [1, 349189], [25, 398437], [22, 690858], [5, 782613]]], [[[[7, 61.89, 26.8], [4, 65.14, 0.0], [10, 37.56, 2.32], [12, 46.76, 27.2], [13, 105.0, 16.99]], [5.0, 0.0, 105.0, 32.0]], [[10, 78041], [4, 267285], [12, 748653], [13, 874495], [7, 930454]]], [[[[27, -0.7, 0.0], [4, 0.0, 0.0], [9, 0.0, 30.17], [29, 0.0, 32.0], [7, 0.0, 28.94], [5, 0.0, 20.33]], [0.0, 0.0, 0.0, 32.0]], [[4, 0], [27, 0], [5, 557192], [7, 688808], [9, 696354], [29, 699050]]], [[[[6, 7.33, 8.0], [11, 20.44, 0.0], [26, 90.0, 8.0], [5, -10.0, 8.0], [20, 90.0, 0.0], [24, -10.0, 8.0], [21, -10.0, 8.0], [12, -10.0, 0.57]], [-10.0, 0.0, 90.0, 8.0]], [[12, 8320], [11, 66837], [20, 349525], [5, 699050], [21, 699050], [24, 699050], [6, 716715], [26, 1048575]]], [[[[14, 0.0, -4.0], [22, 0.0, 13.71], [15, 0.13, 7.52], [1, 0.0, -4.0], [29, 0.0, 27.3], [3, 0.0, -1.25]], [0.0, -4.0, 0.0, 28.0]], [[1, 0], [14, 0], [3, 8832], [15, 141824], [22, 526888], [29, 698498]]], [[[[29, -10.0, -0.25], [3, -10.57, 28.0], [19, -10.0, -4.0], [9, -10.0, -4.0], [20, -10.0, -4.0]], [-10.0, -4.0, -10.0, 28.0]], [[9, 0], [19, 0], [20, 0], [29, 10880], [3, 699050]]]], [[[[[6, 6.78, 10.96], [13, 11.06, -4.0], [15, 5.0, -4.0], [4, 21.0, 17.83], [25, 21.0, -0.96], [5, 21.0, 8.8], [9, 21.0, 6.79], [17, 5.0, 28.0], [2, 19.79, 19.98]], [5.0, -4.0, 21.0, 28.0]], [[15, 0], [13, 81925], [6, 178089], [25, 359767], [9, 489431], [5, 514007], [17, 699050], [4, 909277], [2, 913326]]], [[[[7, 10.93, 6.74], [14, 8.29, 8.0], [21, 11.99, 0.0], [25, 9.07, 0.0], [9, 10.31, 8.0], [12, 5.81, 8.0]], [5.0, 0.0, 15.0, 8.0]], [[25, 82944], [21, 282693], [12, 703406], [14, 768938], [7, 930813], [9, 961535]]], [[[[18, -10.96, -4.0], [4, -10.96, -4.0], [20, -9.55, 4.0], [28, -10.0, -2.22], [21, -10.0, -3.26]], [-10.0, -4.0, -10.0, 4.0]], [[4, 0], [18, 0], [21, 8872], [28, 43018], [20, 699050]]], [[[[8, 1.97, -4.78], [27, 9.24, -2.19], [7, 0.0, -4.0]], [0.0, -4.0, 10.0, 4.0]], [[7, 0], [8, 20545], [27, 388398]]], [[[[14, -10.0, 8.0], [26, -10.0, 8.0], [8, -10.0, 3.45], [16, -10.97, 8.0], [25, -10.0, 5.04], [22, -10.0, 0.0], [7, -10.0, 2.57], [15, -9.53, 3.51], [12, -10.46, 2.24]], [-10.0, 0.0, -10.0, 8.0]], [[22, 0], [12, 131752], [7, 139392], [8, 166530], [15, 172034], [25, 557090], [14, 699050], [16, 699050], [26, 699050]]], [[[[7, 0.0, 8.0], [4, 62.93, 0.0], [19, 0.0, 0.0]], [0.0, 0.0, 100.0, 8.0]], [[19, 0], [4, 278544], [7, 699050]]], [[[[2, 5.42, -3.91], [24, 5.0, -4.0], [8, 5.0, 4.0], [7, 5.0, 4.0], [12, 5.0, 4.0]], [5.0, -4.0, 5.0, 4.0]], [[24, 0], [2, 138], [7, 699050], [8, 699050], [12, 699050]]], [[[[26, -10.0, 32.0], [24, -10.0, 11.64], [13, -10.0, 32.0], [23, -10.0, 8.58]], [-10.0, 0.0, -10.0, 32.0]], [[23, 131592], [24, 141856], [13, 699050], [26, 699050]]]], [[[[[21, -10.0, 4.0], [22, -10.0, 4.0], [4, -10.0, 3.11], [25, -10.0, 0.41], [28, -10.0, -4.0], [26, -10.0, 4.0], [24, -9.62, 4.0], [6, -10.0, 1.72], [10, -10.25, -0.14], [16, -10.0, 0.06]], [-10.0, -4.0, -10.0, 4.0]], [[28, 0], [10, 174248], [16, 524330], [25, 526880], [6, 565920], [4, 688296], [21, 699050], [22, 699050], [24, 699050], [26, 699050]]], [[[[25, 69.59, 21.33], [1, 5.0, 28.0], [16, 15.52, 18.84], [27, 17.38, 7.05]], [5.0, -4.0, 105.0, 28.0]], [[27, 146774], [16, 571085], [1, 699050], [25, 936345]]], [[[[8, -0.51, 19.57], [1, 4.93, 32.0], [10, -7.16, 21.55], [26, -10.0, 1.76], [22, -4.61, 0.0]], [-10.0, 0.0, 6.0, 32.0]], [[26, 2688], [22, 69952], [10, 577299], [8, 801629], [1, 1044463]]], [[[[28, 5.0, 0.88], [1, 5.0, 0.88], [27, 5.0, 5.31], [11, 5.0, 2.4], [10, 4.67, 8.0], [19, 5.0, 1.58], [15, 5.0, 0.0], [29, 5.0, 6.76], [6, 5.0, 6.68], [9, 5.0, 3.17]], [5.0, 0.0, 5.0, 8.0]], [[15, 0], [1, 10752], [28, 10752], [19, 41096], [11, 133642], [9, 164386], [27, 559146], [6, 664106], [29, 665602], [10, 699050]]], [[[[27, -9.61, 32.0], [23, -10.0, 32.0]], [-10.0, 0.0, -10.0, 32.0]], [[23, 699050], [27, 699050]]], [[[[25, 0.38, 1.37], [10, 0.38, 1.37], [28, 0.0, 3.23], [21, 0.0, 8.0], [26, 0.0, 1.44], [5, 0.0, 1.55]], [0.0, 0.0, 0.0, 8.0]], [[10, 34986], [25, 34986], [26, 35456], [5, 41000], [28, 164514], [21, 699050]]], [[[[6, 5.0, 28.0], [19, 5.0, -4.0], [10, 4.81, -4.0], [1, 5.97, -4.0], [7, 5.0, 20.22], [16, 5.0, 11.44], [8, 5.0, -4.0], [4, 5.24, 16.7], [21, 5.0, 28.0]], [5.0, -4.0, 5.0, 28.0]], [[1, 0], [8, 0], [10, 0], [19, 0], [16, 174248], [4, 557608], [7, 655402], [6, 699050], [21, 699050]]], [[[[6, -10.0, 10.07], [18, -10.0, 10.07], [16, -0.46, -4.0], [3, -10.0, 28.0]], [-10.0, -4.0, 90.0, 28.0]], [[16, 5121], [6, 172040], [18, 172040], [3, 699050]]]], [[[[[28, 5.0, 8.0], [9, 5.37, 0.0]], [5.0, 0.0, 5.0, 8.0]], [[9, 0], [28, 699050]]], [[[[4, -10.0, 28.66], [18, -10.11, 32.0], [28, -10.0, 27.97], [15, -10.64, 0.0], [1, -10.0, 0.0], [3, -10.0, 32.0], [8, -10.0, 32.0], [10, -10.0, 2.25], [16, -10.0, 32.0], [24, -10.0, 32.0], [20, -10.0, 0.0]], [-10.0, 0.0, -10.0, 32.0]], [[1, 0], [15, 0], [20, 0], [10, 8320], [28, 666282], [4, 688674], [3, 699050], [8, 699050], [16, 699050], [18, 699050], [24, 699050]]], [[[[10, 5.0, 32.0], [18, 5.0, 32.0], [6, 5.0, 32.0], [3, 15.23, 32.0], [4, 19.19, 0.0], [11, 20.79, 0.0], [14, 5.0, 0.0], [12, 16.84, 32.0], [19, 20.34, 0.0], [20, 21.0, 32.0], [23, 10.01, 32.0]], [5.0, 0.0, 21.0, 32.0]], [[14, 0], [4, 344144], [19, 348433], [11, 349444], [6, 699050], [10, 699050], [18, 699050], [23, 768682], [3, 977662], [12, 982971], [20, 1048575]]], [[[[23, 0.0, 0.0], [10, 0.0, 0.0], [2, 0.0, 23.84], [29, -0.27, 20.79], [15, 0.0, 0.0], [27, 0.0, 30.52], [21, -0.47, 17.6], [4, 0.0, 32.0], [18, 0.0, 0.0]], [0.0, 0.0, 0.0, 32.0]], [[10, 0], [15, 0], [18, 0], [23, 0], [21, 526858], [29, 557698], [2, 567944], [27, 696832], [4, 699050]]], [[[[28, 16.11, 2.24], [21, 16.11, 2.24], [27, 9.53, -4.0], [20, 20.91, 4.0], [3, 18.47, -4.0], [4, 5.0, -2.15], [23, 15.36, -4.0], [15, 5.0, 2.72], [16, 21.0, -3.28]], [5.0, -4.0, 21.0, 4.0]], [[4, 43168], [27, 66561], [23, 278805], [3, 332116], [16, 358389], [15, 664224], [21, 938685], [28, 938685], [20, 1048558]]], [[[[6, -10.99, 28.0], [8, -10.0, 10.06], [16, -10.04, -4.0], [18, -9.74, -4.0]], [-10.0, -4.0, -10.0, 28.0]], [[16, 0], [18, 0], [8, 172034], [6, 699050]]], [[[[17, 0.0, -4.0], [21, 0.0, -4.0], [4, 0.0, -2.2], [29, 0.0, 4.0], [5, 0.0, 0.07], [24, 0.0, -3.58], [18, 0.0, 0.36], [7, 0.0, 4.0], [3, 0.0, -4.0], [11, 0.0, -1.93]], [0.0, -4.0, 0.0, 4.0]], [[3, 0], [17, 0], [21, 0], [24, 2594], [4, 43048], [11, 131200], [5, 524416], [18, 526504], [7, 699050], [29, 699050]]], [[[[13, -10.0, 1.59], [7, 90.0, 4.0], [19, -10.0, 0.52], [28, 1.11, -4.0], [23, -10.0, 2.02], [15, 15.03, -4.49], [11, 90.0, 4.0], [1, 45.01, 2.58], [20, 74.22, 4.0]], [-10.0, -4.0, 90.0, 4.0]], [[28, 5377], [15, 65536], [19, 532488], [13, 565386], [23, 655368], [1, 927117], [20, 1031166], [7, 1048575], [11, 1048575]]]]]
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 | [[7, 908767], [19, 1048575]] | [[7, 559242], [19, 699050]] | Failed |
| case 1 | [[5, 349525], [21, 349525], [12, 1005407], [8, 1047927], [22, 1048575]] | [[5, 0], [21, 0], [12, 655882], [8, 698402], [22, 699050]] | Failed |
| case 2 | [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]] | [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]] | Passed |
| case 3 | [[28, 522231], [12, 906583], [22, 906583], [25, 1048575]] | [[28, 172706], [12, 557058], [22, 557058], [25, 699050]] | Failed |
| case 4 | [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]] | [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]] | Passed |
| case 5 | [[1, 349525], [8, 349525], [21, 349525], [12, 513911], [4, 917463]] | [[1, 0], [8, 0], [21, 0], [12, 164386], [4, 567938]] | Failed |
| case 6 | [[4, 16448], [10, 267329]] | [[4, 16448], [10, 267329]] | Passed |
| case 7 | [[10, 349525], [12, 349525], [15, 349525], [23, 491351], [21, 516061], [24, 1048575]] | [[10, 0], [12, 0], [15, 0], [23, 141826], [21, 166536], [24, 699050]] | Failed |
SHA-256 / 726ac78c6aa6c33b76e87dddc0adb0dbedaca45ed70791a5a2658dece07d6cf3
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pts, bounds):
def part(v):
v &= 0x3FF
v = (v | (v << 8)) & 0x00FF00FF
v = (v | (v << 4)) & 0x0F0F0F0F
v = (v | (v << 2)) & 0x33333333
v = (v | (v << 1)) & 0x55555555
return v
def quant(c, lo, hi):
if hi <= lo:
return 0
return min(1023, max(0, math.floor((c - lo) / (hi - lo) * 1024)))
out = []
for i, x, y in pts:
code = part(quant(x, bounds[0], bounds[2])) | (part(quant(y, bounds[1], bounds[3])) << 1)
out.append([i, code])
out.sort(key=lambda r: (r[1], r[0]))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[19, -10.0, 4.0], [7, -10.0, 1.34]], [-10.0, -4.0, -10.0, 4.0]], [[7, 559242], [19, 699050]]], [[[[21, 0.0, 0.0], [5, 0.0, 0.0], [8, 0.0, 31.18], [22, 0.44, 32.0], [12, 0.0, 24.61]], [0.0, 0.0, 0.0, 32.0]], [[5, 0], [21, 0], [12, 655882], [8, 698402], [22, 699050]]], [[[[11, -3.43, 1.64], [15, 0.0, 28.7], [29, 0.0, 6.31], [13, -4.94, 27.01], [6, -10.0, 5.12]], [-10.0, -4.0, 0.0, 28.0]], [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]]], [[[[22, 5.0, 5.01], [12, 5.0, 5.01], [25, 5.01, 8.0], [28, 5.0, 3.73]], [5.0, 0.0, 5.0, 8.0]], [[28, 172706], [12, 557058], [22, 557058], [25, 699050]]], [[[[8, -7.89, -2.0], [3, 0.0, -0.75], [21, -10.37, -0.33], [12, 0.0, 4.0], [9, 0.0, 4.0]], [-10.0, -4.0, 0.0, 4.0]], [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]]], [[[[1, -10.0, -4.0], [21, -10.0, -4.0], [12, -10.0, -0.83], [4, -10.0, 1.95], [8, -10.0, -4.0]], [-10.0, -4.0, -10.0, 4.0]], [[1, 0], [8, 0], [21, 0], [12, 164386], [4, 567938]]], [[[[10, 60.28, 0.0], [4, 13.29, 0.0]], [0.0, 0.0, 100.0, 8.0]], [[4, 16448], [10, 267329]]], [[[[23, -10.0, 2.89], [10, -9.49, 0.0], [12, -10.79, 0.0], [24, -10.0, 8.0], [21, -10.0, 3.46], [15, -10.0, -0.74]], [-10.0, 0.0, -10.0, 8.0]], [[10, 0], [12, 0], [15, 0], [23, 141826], [21, 166536], [24, 699050]]]], [[[[[22, 0.0, 0.0], [17, 0.0, 0.0], [5, -0.97, 0.0], [26, 0.0, 0.0], [9, 0.0, 4.39], [24, 0.0, 8.0]], [0.0, 0.0, 0.0, 8.0]], [[5, 0], [17, 0], [22, 0], [26, 0], [9, 526850], [24, 699050]]], [[[[16, 0.0, 0.51], [14, 0.0, 0.51], [27, 0.0, -4.83]], [0.0, -4.0, 10.0, 4.0]], [[27, 0], [14, 532482], [16, 532482]]], [[[[11, 78.48, 0.0], [28, 5.0, 15.1], [15, 96.42, 0.0], [1, 102.25, 0.0], [5, 51.05, 30.03], [23, 5.0, 0.0], [22, 5.0, 29.99], [25, 65.54, 8.15]], [5.0, 0.0, 105.0, 32.0]], [[23, 0], [28, 174090], [11, 283904], [15, 345152], [1, 349189], [25, 398437], [22, 690858], [5, 782613]]], [[[[7, 61.89, 26.8], [4, 65.14, 0.0], [10, 37.56, 2.32], [12, 46.76, 27.2], [13, 105.0, 16.99]], [5.0, 0.0, 105.0, 32.0]], [[10, 78041], [4, 267285], [12, 748653], [13, 874495], [7, 930454]]], [[[[27, -0.7, 0.0], [4, 0.0, 0.0], [9, 0.0, 30.17], [29, 0.0, 32.0], [7, 0.0, 28.94], [5, 0.0, 20.33]], [0.0, 0.0, 0.0, 32.0]], [[4, 0], [27, 0], [5, 557192], [7, 688808], [9, 696354], [29, 699050]]], [[[[6, 7.33, 8.0], [11, 20.44, 0.0], [26, 90.0, 8.0], [5, -10.0, 8.0], [20, 90.0, 0.0], [24, -10.0, 8.0], [21, -10.0, 8.0], [12, -10.0, 0.57]], [-10.0, 0.0, 90.0, 8.0]], [[12, 8320], [11, 66837], [20, 349525], [5, 699050], [21, 699050], [24, 699050], [6, 716715], [26, 1048575]]], [[[[14, 0.0, -4.0], [22, 0.0, 13.71], [15, 0.13, 7.52], [1, 0.0, -4.0], [29, 0.0, 27.3], [3, 0.0, -1.25]], [0.0, -4.0, 0.0, 28.0]], [[1, 0], [14, 0], [3, 8832], [15, 141824], [22, 526888], [29, 698498]]], [[[[29, -10.0, -0.25], [3, -10.57, 28.0], [19, -10.0, -4.0], [9, -10.0, -4.0], [20, -10.0, -4.0]], [-10.0, -4.0, -10.0, 28.0]], [[9, 0], [19, 0], [20, 0], [29, 10880], [3, 699050]]]], [[[[[6, 6.78, 10.96], [13, 11.06, -4.0], [15, 5.0, -4.0], [4, 21.0, 17.83], [25, 21.0, -0.96], [5, 21.0, 8.8], [9, 21.0, 6.79], [17, 5.0, 28.0], [2, 19.79, 19.98]], [5.0, -4.0, 21.0, 28.0]], [[15, 0], [13, 81925], [6, 178089], [25, 359767], [9, 489431], [5, 514007], [17, 699050], [4, 909277], [2, 913326]]], [[[[7, 10.93, 6.74], [14, 8.29, 8.0], [21, 11.99, 0.0], [25, 9.07, 0.0], [9, 10.31, 8.0], [12, 5.81, 8.0]], [5.0, 0.0, 15.0, 8.0]], [[25, 82944], [21, 282693], [12, 703406], [14, 768938], [7, 930813], [9, 961535]]], [[[[18, -10.96, -4.0], [4, -10.96, -4.0], [20, -9.55, 4.0], [28, -10.0, -2.22], [21, -10.0, -3.26]], [-10.0, -4.0, -10.0, 4.0]], [[4, 0], [18, 0], [21, 8872], [28, 43018], [20, 699050]]], [[[[8, 1.97, -4.78], [27, 9.24, -2.19], [7, 0.0, -4.0]], [0.0, -4.0, 10.0, 4.0]], [[7, 0], [8, 20545], [27, 388398]]], [[[[14, -10.0, 8.0], [26, -10.0, 8.0], [8, -10.0, 3.45], [16, -10.97, 8.0], [25, -10.0, 5.04], [22, -10.0, 0.0], [7, -10.0, 2.57], [15, -9.53, 3.51], [12, -10.46, 2.24]], [-10.0, 0.0, -10.0, 8.0]], [[22, 0], [12, 131752], [7, 139392], [8, 166530], [15, 172034], [25, 557090], [14, 699050], [16, 699050], [26, 699050]]], [[[[7, 0.0, 8.0], [4, 62.93, 0.0], [19, 0.0, 0.0]], [0.0, 0.0, 100.0, 8.0]], [[19, 0], [4, 278544], [7, 699050]]], [[[[2, 5.42, -3.91], [24, 5.0, -4.0], [8, 5.0, 4.0], [7, 5.0, 4.0], [12, 5.0, 4.0]], [5.0, -4.0, 5.0, 4.0]], [[24, 0], [2, 138], [7, 699050], [8, 699050], [12, 699050]]], [[[[26, -10.0, 32.0], [24, -10.0, 11.64], [13, -10.0, 32.0], [23, -10.0, 8.58]], [-10.0, 0.0, -10.0, 32.0]], [[23, 131592], [24, 141856], [13, 699050], [26, 699050]]]], [[[[[21, -10.0, 4.0], [22, -10.0, 4.0], [4, -10.0, 3.11], [25, -10.0, 0.41], [28, -10.0, -4.0], [26, -10.0, 4.0], [24, -9.62, 4.0], [6, -10.0, 1.72], [10, -10.25, -0.14], [16, -10.0, 0.06]], [-10.0, -4.0, -10.0, 4.0]], [[28, 0], [10, 174248], [16, 524330], [25, 526880], [6, 565920], [4, 688296], [21, 699050], [22, 699050], [24, 699050], [26, 699050]]], [[[[25, 69.59, 21.33], [1, 5.0, 28.0], [16, 15.52, 18.84], [27, 17.38, 7.05]], [5.0, -4.0, 105.0, 28.0]], [[27, 146774], [16, 571085], [1, 699050], [25, 936345]]], [[[[8, -0.51, 19.57], [1, 4.93, 32.0], [10, -7.16, 21.55], [26, -10.0, 1.76], [22, -4.61, 0.0]], [-10.0, 0.0, 6.0, 32.0]], [[26, 2688], [22, 69952], [10, 577299], [8, 801629], [1, 1044463]]], [[[[28, 5.0, 0.88], [1, 5.0, 0.88], [27, 5.0, 5.31], [11, 5.0, 2.4], [10, 4.67, 8.0], [19, 5.0, 1.58], [15, 5.0, 0.0], [29, 5.0, 6.76], [6, 5.0, 6.68], [9, 5.0, 3.17]], [5.0, 0.0, 5.0, 8.0]], [[15, 0], [1, 10752], [28, 10752], [19, 41096], [11, 133642], [9, 164386], [27, 559146], [6, 664106], [29, 665602], [10, 699050]]], [[[[27, -9.61, 32.0], [23, -10.0, 32.0]], [-10.0, 0.0, -10.0, 32.0]], [[23, 699050], [27, 699050]]], [[[[25, 0.38, 1.37], [10, 0.38, 1.37], [28, 0.0, 3.23], [21, 0.0, 8.0], [26, 0.0, 1.44], [5, 0.0, 1.55]], [0.0, 0.0, 0.0, 8.0]], [[10, 34986], [25, 34986], [26, 35456], [5, 41000], [28, 164514], [21, 699050]]], [[[[6, 5.0, 28.0], [19, 5.0, -4.0], [10, 4.81, -4.0], [1, 5.97, -4.0], [7, 5.0, 20.22], [16, 5.0, 11.44], [8, 5.0, -4.0], [4, 5.24, 16.7], [21, 5.0, 28.0]], [5.0, -4.0, 5.0, 28.0]], [[1, 0], [8, 0], [10, 0], [19, 0], [16, 174248], [4, 557608], [7, 655402], [6, 699050], [21, 699050]]], [[[[6, -10.0, 10.07], [18, -10.0, 10.07], [16, -0.46, -4.0], [3, -10.0, 28.0]], [-10.0, -4.0, 90.0, 28.0]], [[16, 5121], [6, 172040], [18, 172040], [3, 699050]]]], [[[[[28, 5.0, 8.0], [9, 5.37, 0.0]], [5.0, 0.0, 5.0, 8.0]], [[9, 0], [28, 699050]]], [[[[4, -10.0, 28.66], [18, -10.11, 32.0], [28, -10.0, 27.97], [15, -10.64, 0.0], [1, -10.0, 0.0], [3, -10.0, 32.0], [8, -10.0, 32.0], [10, -10.0, 2.25], [16, -10.0, 32.0], [24, -10.0, 32.0], [20, -10.0, 0.0]], [-10.0, 0.0, -10.0, 32.0]], [[1, 0], [15, 0], [20, 0], [10, 8320], [28, 666282], [4, 688674], [3, 699050], [8, 699050], [16, 699050], [18, 699050], [24, 699050]]], [[[[10, 5.0, 32.0], [18, 5.0, 32.0], [6, 5.0, 32.0], [3, 15.23, 32.0], [4, 19.19, 0.0], [11, 20.79, 0.0], [14, 5.0, 0.0], [12, 16.84, 32.0], [19, 20.34, 0.0], [20, 21.0, 32.0], [23, 10.01, 32.0]], [5.0, 0.0, 21.0, 32.0]], [[14, 0], [4, 344144], [19, 348433], [11, 349444], [6, 699050], [10, 699050], [18, 699050], [23, 768682], [3, 977662], [12, 982971], [20, 1048575]]], [[[[23, 0.0, 0.0], [10, 0.0, 0.0], [2, 0.0, 23.84], [29, -0.27, 20.79], [15, 0.0, 0.0], [27, 0.0, 30.52], [21, -0.47, 17.6], [4, 0.0, 32.0], [18, 0.0, 0.0]], [0.0, 0.0, 0.0, 32.0]], [[10, 0], [15, 0], [18, 0], [23, 0], [21, 526858], [29, 557698], [2, 567944], [27, 696832], [4, 699050]]], [[[[28, 16.11, 2.24], [21, 16.11, 2.24], [27, 9.53, -4.0], [20, 20.91, 4.0], [3, 18.47, -4.0], [4, 5.0, -2.15], [23, 15.36, -4.0], [15, 5.0, 2.72], [16, 21.0, -3.28]], [5.0, -4.0, 21.0, 4.0]], [[4, 43168], [27, 66561], [23, 278805], [3, 332116], [16, 358389], [15, 664224], [21, 938685], [28, 938685], [20, 1048558]]], [[[[6, -10.99, 28.0], [8, -10.0, 10.06], [16, -10.04, -4.0], [18, -9.74, -4.0]], [-10.0, -4.0, -10.0, 28.0]], [[16, 0], [18, 0], [8, 172034], [6, 699050]]], [[[[17, 0.0, -4.0], [21, 0.0, -4.0], [4, 0.0, -2.2], [29, 0.0, 4.0], [5, 0.0, 0.07], [24, 0.0, -3.58], [18, 0.0, 0.36], [7, 0.0, 4.0], [3, 0.0, -4.0], [11, 0.0, -1.93]], [0.0, -4.0, 0.0, 4.0]], [[3, 0], [17, 0], [21, 0], [24, 2594], [4, 43048], [11, 131200], [5, 524416], [18, 526504], [7, 699050], [29, 699050]]], [[[[13, -10.0, 1.59], [7, 90.0, 4.0], [19, -10.0, 0.52], [28, 1.11, -4.0], [23, -10.0, 2.02], [15, 15.03, -4.49], [11, 90.0, 4.0], [1, 45.01, 2.58], [20, 74.22, 4.0]], [-10.0, -4.0, 90.0, 4.0]], [[28, 5377], [15, 65536], [19, 532488], [13, 565386], [23, 655368], [1, 927117], [20, 1031166], [7, 1048575], [11, 1048575]]]]]
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 | [[7, 559242], [19, 699050]] | [[7, 559242], [19, 699050]] | Passed |
| case 1 | [[5, 0], [21, 0], [12, 655882], [8, 698402], [22, 699050]] | [[5, 0], [21, 0], [12, 655882], [8, 698402], [22, 699050]] | Passed |
| case 2 | [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]] | [[6, 133130], [11, 314912], [29, 488919], [13, 960532], [15, 1048575]] | Passed |
| case 3 | [[28, 172706], [12, 557058], [22, 557058], [25, 699050]] | [[28, 172706], [12, 557058], [22, 557058], [25, 699050]] | Passed |
| case 4 | [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]] | [[8, 151872], [21, 172578], [3, 515413], [9, 1048575], [12, 1048575]] | Passed |
| case 5 | [[1, 0], [8, 0], [21, 0], [12, 164386], [4, 567938]] | [[1, 0], [8, 0], [21, 0], [12, 164386], [4, 567938]] | Passed |
| case 6 | [[4, 16448], [10, 267329]] | [[4, 16448], [10, 267329]] | Passed |
| case 7 | [[10, 0], [12, 0], [15, 0], [23, 141826], [21, 166536], [24, 699050]] | [[10, 0], [12, 0], [15, 0], [23, 141826], [21, 166536], [24, 699050]] | Passed |
SHA-256 / 80aefcfcf4eeeb39ac7329ade403ba19967ed775f84e1b91c983df10514cb019
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.190239+00:00.
Case digest / a74ce581f8ff2a53bd219478d0c5f3d5292f3815450cb7e196ddc3846aee888f