{"abstract":"Boxes straddling the origin share cell 0 with boxes one cell away.","category":"Collision detection broadphase","checks":8,"contract":"solve(boxes, cs): insert each box [id,minx,miny,maxx,maxy] into every grid cell floor(min/cs)..floor(max/cs) inclusive on both axes. Return [sorted unique canonical candidate pairs sharing a cell, total cell insertions, largest bucket size].","contract_signature":"boxes, cs","evaluation_group":"w2-collision_detection_broadphase-uniform-grid-candidates","failed_approach":"Flooring only the minimum corner still truncates the maximum corner.","family":"w2-collision_detection_broadphase-uniform-grid-candidates-negative-cell-truncation","id":"FA-87366","implementations":{"attempt":{"sha256":"b96d2988572e9cfb8cef65324c9fd9db6624f72d1f3ffce643940bb5996ff751","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes, cs):\n    grid = {}\n    inserts = 0\n    for b in boxes:\n        i0, i1 = math.floor(b[1] / cs), int(b[3] / cs)\n        j0, j1 = math.floor(b[2] / cs), math.floor(b[4] / cs)\n        for i in range(i0, i1 + 1):\n            for j in range(j0, j1 + 1):\n                grid.setdefault((i, j), []).append(b[0])\n                inserts += 1\n    pairs = set()\n    for cell in grid.values():\n        for p in range(len(cell)):\n            for q in range(p + 1, len(cell)):\n                a, c = cell[p], cell[q]\n                pairs.add((min(a, c), max(a, c)))\n    return [sorted([list(p) for p in pairs]), inserts, max((len(v) for v in grid.values()), default=0)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[28, 1.0, -1.0, 5.0, 1.0], [39, 5.0, -4.0, 6.0, -4.0], [25, 6.0, -3.0, 6.0, -3.0], [24, 3.0, 1.0, 7.0, 5.0], [22, -4.0, -3.0, 0.0, -2.0]], 2.5], [[[22, 28], [24, 28], [25, 39]], 20, 2]], [[[[39, -3.0, 0.0, -2.0, 3.0], [1, 2.0, -5.0, 6.0, -4.0]], 3.0], [[], 5, 1]], [[[[37, -6.0, 1.0, -3.0, 2.0], [20, -4.0, 5.0, 1.0, 7.0]], 2.0], [[], 10, 1]], [[[[12, -6.0, -5.0, -6.0, -2.0], [6, 1.0, 2.0, 1.0, 4.0], [28, -1.0, 6.0, 3.0, 9.0]], 3.0], [[], 10, 1]], [[[[12, 0.5, -0.5, 1.0, -0.5], [39, 0.0, -2.5, 0.0, -2.5], [3, -3.0, -1.5, -2.5, 1.0], [20, -1.0, 2.5, -0.5, 3.5], [7, -2.5, -0.5, -0.5, -0.5], [10, 1.5, 1.0, 3.5, 3.0]], 1.0], [[[3, 7]], 21, 2]], [[[[14, -2.5, 0.5, -2.5, 3.0], [38, 0.0, 2.0, 1.0, 3.0]], 1.0], [[], 8, 1]], [[[[13, 4.0, 1.0, 4.0, 3.0], [10, 3.0, 0.0, 3.0, 5.0], [3, 2.0, 1.0, 3.0, 4.0], [7, 5.0, 1.0, 8.0, 5.0]], 2.0], [[[3, 10], [7, 13]], 17, 2]], [[[[27, 3.0, 5.0, 6.0, 8.0], [8, 6.0, 2.0, 11.0, 6.0], [10, 5.0, -2.0, 8.0, 2.0], [11, -6.0, 3.0, -2.0, 6.0], [6, 5.0, 5.0, 6.0, 7.0]], 1.0], [[[6, 8], [6, 27], [8, 10], [8, 27]], 92, 3]]], [[[[[35, -6.0, -2.0, -2.0, 1.0], [23, 0.0, -1.0, 0.0, 3.0], [36, 3.0, -6.0, 3.0, -6.0], [34, 3.0, 0.0, 5.0, 1.0]], 3.0], [[], 9, 1]], [[[[29, 4.0, -5.0, 5.0, -1.0], [33, -3.0, 1.0, -1.0, 4.0], [3, -3.0, -1.0, -1.0, 3.0], [37, -6.0, 6.0, -1.0, 11.0], [27, 4.0, 0.0, 7.0, 5.0]], 2.0], [[[3, 33]], 30, 2]], [[[[1, -4.0, -2.0, -4.0, 3.0], [10, 1.0, 1.0, 5.0, 5.0], [19, -4.0, -6.0, 0.0, -1.0]], 1.0], [[[1, 19]], 61, 2]], [[[[29, 4.0, 5.0, 8.0, 10.0], [16, -1.0, -3.0, 4.0, -1.0]], 2.5], [[], 15, 1]], [[[[2, -3.0, -0.5, -2.5, 2.0], [10, 1.0, -3.0, 2.0, -3.0], [36, 0.0, 0.5, 2.0, 0.5]], 2.0], [[], 7, 1]], [[[[9, -2.0, -2.0, -1.0, -1.5], [20, 0.0, 1.0, 0.0, 1.0], [1, 2.0, 1.5, 3.5, 1.5], [33, -1.0, -3.0, 0.0, -1.5], [11, -0.5, 0.0, -0.5, 1.0], [39, 1.5, -1.0, 2.5, 1.0]], 1.0], [[[1, 39], [9, 33]], 17, 2]], [[[[32, -3.0, 3.0, 1.0, 5.0], [16, 5.0, 2.0, 7.0, 2.0], [6, 6.0, 1.0, 10.0, 4.0], [26, 2.0, 0.0, 6.0, 3.0], [5, 3.0, -3.0, 4.0, 2.0]], 1.0], [[[5, 26], [6, 16], [6, 26], [16, 26]], 70, 3]], [[[[8, 3.0, 1.0, 5.0, 3.0], [17, 0.0, 4.0, 1.0, 6.0], [23, -5.0, -3.0, -1.0, -1.0], [20, -3.0, -6.0, 1.0, -1.0], [33, 6.0, 5.0, 8.0, 9.0]], 3.0], [[[20, 23]], 13, 2]]], [[[[[13, 5.0, -1.0, 7.0, 4.0], [17, 4.0, -6.0, 8.0, -3.0]], 1.0], [[], 38, 1]], [[[[5, 1.0, -1.0, 3.0, 1.0], [4, 3.0, 2.5, 3.5, 3.5], [2, 1.5, -0.5, 1.5, 2.0]], 2.5], [[[2, 5]], 7, 2]], [[[[13, -0.5, 1.0, 0.0, 2.0], [22, -1.0, -1.5, -0.5, -0.5], [32, 3.0, -2.0, 3.0, -0.5]], 2.0], [[], 6, 1]], [[[[8, 3.0, 3.0, 5.0, 5.5], [27, -2.0, 1.5, -2.0, 3.0], [5, 0.0, 2.5, 1.5, 3.5], [2, -1.0, -1.0, -1.0, 1.0], [37, 3.0, 3.0, 4.5, 4.0], [4, 1.0, 0.5, 3.0, 2.5], [13, 2.0, 3.0, 2.0, 5.0]], 3.0], [[[2, 27], [4, 5], [5, 13], [8, 37]], 11, 2]], [[[[11, -2.5, 1.5, 0.0, 2.0], [39, -2.5, 0.5, -1.0, 2.0], [34, -3.0, -2.0, -1.5, -1.0], [31, -0.5, -1.5, 2.0, -1.0], [23, 0.5, -1.0, 2.0, -0.5], [27, 1.5, 2.0, 1.5, 2.0]], 2.5], [[[11, 27], [11, 39], [23, 31], [31, 34]], 9, 2]], [[[[18, -0.5, -3.0, 1.5, -1.0], [16, 2.5, -3.0, 4.0, -1.5]], 2.5], [[], 6, 1]], [[[[33, -3.0, -3.0, -1.0, -1.0], [24, -3.0, -1.0, -3.0, 0.5], [19, 1.5, -1.0, 2.5, -0.5], [13, 1.5, -1.5, 3.5, 0.0]], 1.0], [[[13, 19], [24, 33]], 22, 2]], [[[[13, 1.0, 4.0, 4.0, 8.0], [39, 4.0, -4.0, 6.0, 1.0], [11, 0.0, 6.0, 0.0, 8.0], [15, -3.0, -3.0, 0.0, -1.0], [30, 2.0, -1.0, 2.0, 1.0], [31, -1.0, 0.0, -1.0, 5.0], [37, 6.0, 5.0, 6.0, 10.0], [7, 6.0, 3.0, 6.0, 8.0]], 3.0], [[[7, 37], [11, 13], [15, 30]], 22, 2]]], [[[[[19, 3.0, -5.0, 4.0, -3.0], [29, 6.0, -4.0, 7.0, -4.0], [33, 6.0, -5.0, 6.0, -2.0], [34, -2.0, -3.0, -1.0, -1.0], [4, 1.0, 6.0, 2.0, 8.0], [1, -4.0, -2.0, -4.0, -2.0], [7, -1.0, -4.0, -1.0, -1.0], [8, 0.0, -4.0, 1.0, 1.0]], 3.0], [[[7, 34], [29, 33]], 13, 2]], [[[[15, 0.0, 2.0, 2.0, 2.5], [2, -3.0, 2.0, -3.0, 4.5], [29, -1.5, 1.5, 0.0, 4.0], [37, -2.0, 1.0, -2.0, 3.0], [27, 2.5, 1.0, 4.0, 3.5], [30, -0.5, 2.5, -0.5, 4.5]], 1.0], [[[15, 27], [15, 29], [29, 30], [29, 37]], 33, 2]], [[[[30, 2.0, -2.0, 2.5, -1.0], [27, 0.5, 1.0, 2.0, 2.5], [32, 1.5, 1.0, 1.5, 1.0], [8, -0.5, 1.5, 0.0, 2.5], [6, 2.0, 2.0, 3.5, 4.5], [25, 0.5, 2.5, 1.0, 3.5]], 1.0], [[[6, 27], [8, 25], [8, 27], [25, 27], [27, 32]], 23, 3]], [[[[2, 1.0, -3.0, 3.0, -1.0], [8, 0.0, 5.0, 3.0, 9.0], [27, -4.0, -2.0, -2.0, -1.0], [24, 2.0, 5.0, 4.0, 10.0], [7, 6.0, -1.0, 9.0, 1.0], [32, -3.0, 0.0, 0.0, 2.0]], 3.0], [[[8, 24]], 22, 2]], [[[[10, 1.0, 1.0, 5.0, 1.0], [12, 1.0, 4.0, 6.0, 4.0], [38, 4.0, 6.0, 5.0, 6.0], [31, -4.0, -4.0, -4.0, -3.0], [5, -5.0, 4.0, -4.0, 7.0], [29, -1.0, 3.0, -1.0, 5.0], [39, 5.0, -1.0, 8.0, 0.0], [14, -1.0, -2.0, 3.0, 1.0], [17, 5.0, 5.0, 9.0, 7.0]], 1.0], [[[10, 14], [17, 38]], 69, 2]], [[[[16, 1.0, -1.5, 1.0, -1.0], [7, 0.5, 0.5, 0.5, 0.5], [36, -3.0, 0.0, -3.0, 1.5]], 2.5], [[], 3, 1]], [[[[33, 5.0, 4.0, 6.0, 9.0], [23, -6.0, 0.0, -6.0, 5.0]], 3.0], [[], 8, 1]], [[[[38, 1.0, 2.5, 3.0, 3.0], [17, 0.5, 2.0, 2.5, 4.5]], 3.0], [[[17, 38]], 6, 2]]], [[[[[17, 5.0, 0.0, 6.0, 5.0], [34, -4.0, 5.0, -2.0, 9.0], [19, 1.0, -4.0, 1.0, 0.0], [27, -4.0, -1.0, 0.0, -1.0], [22, -1.0, 2.0, 3.0, 5.0], [26, 1.0, -5.0, 1.0, -2.0], [25, 1.0, -4.0, 4.0, -4.0]], 1.0], [[[19, 25], [19, 26], [25, 26]], 65, 3]], [[[[33, 3.0, 4.0, 5.0, 8.0], [14, -1.0, -6.0, 4.0, -1.0], [20, -4.0, -5.0, -4.0, -4.0], [5, 4.0, 4.0, 4.0, 4.0], [32, 1.0, 3.0, 5.0, 5.0], [31, 2.0, 3.0, 6.0, 7.0]], 2.5], [[[5, 31], [5, 32], [5, 33], [31, 32], [31, 33], [32, 33]], 29, 4]], [[[[7, -2.5, -3.0, 0.0, -2.0], [4, 1.5, -2.5, 3.5, -1.5]], 2.5], [[[4, 7]], 6, 2]], [[[[7, 1.5, 2.0, 3.0, 4.5], [13, -1.0, 0.5, 0.5, 0.5], [26, 1.5, 3.0, 4.0, 4.0], [23, 3.0, -1.0, 3.5, 1.0], [28, -3.0, -2.5, -1.5, -0.5], [33, 0.5, -3.0, 2.5, -3.0]], 2.5], [[[7, 13], [7, 23], [7, 26]], 14, 2]], [[[[36, 2.0, 0.0, 6.0, 3.0], [32, -1.0, 6.0, -1.0, 9.0], [7, 4.0, -3.0, 9.0, 2.0]], 3.0], [[[7, 36]], 14, 2]], [[[[35, 0.0, 0.0, 0.0, 4.0], [18, -1.0, -6.0, 3.0, -6.0], [6, 3.0, 4.0, 5.0, 8.0], [25, 4.0, -4.0, 6.0, -2.0], [36, 2.0, -6.0, 7.0, -5.0], [21, 0.0, 4.0, 4.0, 6.0], [29, 4.0, -2.0, 9.0, 3.0], [34, 3.0, -2.0, 7.0, 0.0], [33, 5.0, -4.0, 5.0, -3.0], [15, 4.0, 0.0, 4.0, 5.0]], 2.5], [[[6, 15], [6, 21], [6, 29], [15, 21], [15, 29], [15, 34], [18, 36], [21, 29], [21, 35], [25, 29], [25, 33], [25, 34], [25, 36], [29, 34], [33, 36]], 42, 4]], [[[[14, -1.5, 1.5, 0.0, 2.5], [36, 0.5, 3.0, 0.5, 4.5], [4, 0.5, 3.0, 2.0, 5.0], [33, -3.0, -1.0, -2.5, 0.5], [21, -2.5, 2.5, -0.5, 3.0], [10, 1.5, 1.0, 1.5, 1.0], [7, -0.5, 0.0, 2.0, 2.0], [23, 2.0, -1.0, 2.0, 1.0], [30, 3.0, 0.0, 3.5, 0.5]], 2.0], [[[4, 7], [4, 14], [4, 36], [7, 10], [7, 14], [7, 21], [7, 23], [7, 30], [7, 36], [10, 14], [14, 21], [14, 36], [23, 30]], 24, 4]], [[[[29, -1.5, -0.5, 0.5, 1.0], [33, 0.0, 2.5, 2.0, 4.5], [11, -2.0, -2.0, 0.5, -2.0], [28, -0.5, 3.0, 0.0, 3.5]], 2.0], [[[11, 29], [28, 33]], 12, 2]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %d\" % i, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"0960b26990fb3f3e24da47c653ce0864cc4b7f3ae441921a666f2a2c1fef98f3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes, cs):\n    grid = {}\n    inserts = 0\n    for b in boxes:\n        i0, i1 = int(b[1] / cs), int(b[3] / cs)\n        j0, j1 = math.floor(b[2] / cs), math.floor(b[4] / cs)\n        for i in range(i0, i1 + 1):\n            for j in range(j0, j1 + 1):\n                grid.setdefault((i, j), []).append(b[0])\n                inserts += 1\n    pairs = set()\n    for cell in grid.values():\n        for p in range(len(cell)):\n            for q in range(p + 1, len(cell)):\n                a, c = cell[p], cell[q]\n                pairs.add((min(a, c), max(a, c)))\n    return [sorted([list(p) for p in pairs]), inserts, max((len(v) for v in grid.values()), default=0)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[28, 1.0, -1.0, 5.0, 1.0], [39, 5.0, -4.0, 6.0, -4.0], [25, 6.0, -3.0, 6.0, -3.0], [24, 3.0, 1.0, 7.0, 5.0], [22, -4.0, -3.0, 0.0, -2.0]], 2.5], [[[22, 28], [24, 28], [25, 39]], 20, 2]], [[[[39, -3.0, 0.0, -2.0, 3.0], [1, 2.0, -5.0, 6.0, -4.0]], 3.0], [[], 5, 1]], [[[[37, -6.0, 1.0, -3.0, 2.0], [20, -4.0, 5.0, 1.0, 7.0]], 2.0], [[], 10, 1]], [[[[12, -6.0, -5.0, -6.0, -2.0], [6, 1.0, 2.0, 1.0, 4.0], [28, -1.0, 6.0, 3.0, 9.0]], 3.0], [[], 10, 1]], [[[[12, 0.5, -0.5, 1.0, -0.5], [39, 0.0, -2.5, 0.0, -2.5], [3, -3.0, -1.5, -2.5, 1.0], [20, -1.0, 2.5, -0.5, 3.5], [7, -2.5, -0.5, -0.5, -0.5], [10, 1.5, 1.0, 3.5, 3.0]], 1.0], [[[3, 7]], 21, 2]], [[[[14, -2.5, 0.5, -2.5, 3.0], [38, 0.0, 2.0, 1.0, 3.0]], 1.0], [[], 8, 1]], [[[[13, 4.0, 1.0, 4.0, 3.0], [10, 3.0, 0.0, 3.0, 5.0], [3, 2.0, 1.0, 3.0, 4.0], [7, 5.0, 1.0, 8.0, 5.0]], 2.0], [[[3, 10], [7, 13]], 17, 2]], [[[[27, 3.0, 5.0, 6.0, 8.0], [8, 6.0, 2.0, 11.0, 6.0], [10, 5.0, -2.0, 8.0, 2.0], [11, -6.0, 3.0, -2.0, 6.0], [6, 5.0, 5.0, 6.0, 7.0]], 1.0], [[[6, 8], [6, 27], [8, 10], [8, 27]], 92, 3]]], [[[[[35, -6.0, -2.0, -2.0, 1.0], [23, 0.0, -1.0, 0.0, 3.0], [36, 3.0, -6.0, 3.0, -6.0], [34, 3.0, 0.0, 5.0, 1.0]], 3.0], [[], 9, 1]], [[[[29, 4.0, -5.0, 5.0, -1.0], [33, -3.0, 1.0, -1.0, 4.0], [3, -3.0, -1.0, -1.0, 3.0], [37, -6.0, 6.0, -1.0, 11.0], [27, 4.0, 0.0, 7.0, 5.0]], 2.0], [[[3, 33]], 30, 2]], [[[[1, -4.0, -2.0, -4.0, 3.0], [10, 1.0, 1.0, 5.0, 5.0], [19, -4.0, -6.0, 0.0, -1.0]], 1.0], [[[1, 19]], 61, 2]], [[[[29, 4.0, 5.0, 8.0, 10.0], [16, -1.0, -3.0, 4.0, -1.0]], 2.5], [[], 15, 1]], [[[[2, -3.0, -0.5, -2.5, 2.0], [10, 1.0, -3.0, 2.0, -3.0], [36, 0.0, 0.5, 2.0, 0.5]], 2.0], [[], 7, 1]], [[[[9, -2.0, -2.0, -1.0, -1.5], [20, 0.0, 1.0, 0.0, 1.0], [1, 2.0, 1.5, 3.5, 1.5], [33, -1.0, -3.0, 0.0, -1.5], [11, -0.5, 0.0, -0.5, 1.0], [39, 1.5, -1.0, 2.5, 1.0]], 1.0], [[[1, 39], [9, 33]], 17, 2]], [[[[32, -3.0, 3.0, 1.0, 5.0], [16, 5.0, 2.0, 7.0, 2.0], [6, 6.0, 1.0, 10.0, 4.0], [26, 2.0, 0.0, 6.0, 3.0], [5, 3.0, -3.0, 4.0, 2.0]], 1.0], [[[5, 26], [6, 16], [6, 26], [16, 26]], 70, 3]], [[[[8, 3.0, 1.0, 5.0, 3.0], [17, 0.0, 4.0, 1.0, 6.0], [23, -5.0, -3.0, -1.0, -1.0], [20, -3.0, -6.0, 1.0, -1.0], [33, 6.0, 5.0, 8.0, 9.0]], 3.0], [[[20, 23]], 13, 2]]], [[[[[13, 5.0, -1.0, 7.0, 4.0], [17, 4.0, -6.0, 8.0, -3.0]], 1.0], [[], 38, 1]], [[[[5, 1.0, -1.0, 3.0, 1.0], [4, 3.0, 2.5, 3.5, 3.5], [2, 1.5, -0.5, 1.5, 2.0]], 2.5], [[[2, 5]], 7, 2]], [[[[13, -0.5, 1.0, 0.0, 2.0], [22, -1.0, -1.5, -0.5, -0.5], [32, 3.0, -2.0, 3.0, -0.5]], 2.0], [[], 6, 1]], [[[[8, 3.0, 3.0, 5.0, 5.5], [27, -2.0, 1.5, -2.0, 3.0], [5, 0.0, 2.5, 1.5, 3.5], [2, -1.0, -1.0, -1.0, 1.0], [37, 3.0, 3.0, 4.5, 4.0], [4, 1.0, 0.5, 3.0, 2.5], [13, 2.0, 3.0, 2.0, 5.0]], 3.0], [[[2, 27], [4, 5], [5, 13], [8, 37]], 11, 2]], [[[[11, -2.5, 1.5, 0.0, 2.0], [39, -2.5, 0.5, -1.0, 2.0], [34, -3.0, -2.0, -1.5, -1.0], [31, -0.5, -1.5, 2.0, -1.0], [23, 0.5, -1.0, 2.0, -0.5], [27, 1.5, 2.0, 1.5, 2.0]], 2.5], [[[11, 27], [11, 39], [23, 31], [31, 34]], 9, 2]], [[[[18, -0.5, -3.0, 1.5, -1.0], [16, 2.5, -3.0, 4.0, -1.5]], 2.5], [[], 6, 1]], [[[[33, -3.0, -3.0, -1.0, -1.0], [24, -3.0, -1.0, -3.0, 0.5], [19, 1.5, -1.0, 2.5, -0.5], [13, 1.5, -1.5, 3.5, 0.0]], 1.0], [[[13, 19], [24, 33]], 22, 2]], [[[[13, 1.0, 4.0, 4.0, 8.0], [39, 4.0, -4.0, 6.0, 1.0], [11, 0.0, 6.0, 0.0, 8.0], [15, -3.0, -3.0, 0.0, -1.0], [30, 2.0, -1.0, 2.0, 1.0], [31, -1.0, 0.0, -1.0, 5.0], [37, 6.0, 5.0, 6.0, 10.0], [7, 6.0, 3.0, 6.0, 8.0]], 3.0], [[[7, 37], [11, 13], [15, 30]], 22, 2]]], [[[[[19, 3.0, -5.0, 4.0, -3.0], [29, 6.0, -4.0, 7.0, -4.0], [33, 6.0, -5.0, 6.0, -2.0], [34, -2.0, -3.0, -1.0, -1.0], [4, 1.0, 6.0, 2.0, 8.0], [1, -4.0, -2.0, -4.0, -2.0], [7, -1.0, -4.0, -1.0, -1.0], [8, 0.0, -4.0, 1.0, 1.0]], 3.0], [[[7, 34], [29, 33]], 13, 2]], [[[[15, 0.0, 2.0, 2.0, 2.5], [2, -3.0, 2.0, -3.0, 4.5], [29, -1.5, 1.5, 0.0, 4.0], [37, -2.0, 1.0, -2.0, 3.0], [27, 2.5, 1.0, 4.0, 3.5], [30, -0.5, 2.5, -0.5, 4.5]], 1.0], [[[15, 27], [15, 29], [29, 30], [29, 37]], 33, 2]], [[[[30, 2.0, -2.0, 2.5, -1.0], [27, 0.5, 1.0, 2.0, 2.5], [32, 1.5, 1.0, 1.5, 1.0], [8, -0.5, 1.5, 0.0, 2.5], [6, 2.0, 2.0, 3.5, 4.5], [25, 0.5, 2.5, 1.0, 3.5]], 1.0], [[[6, 27], [8, 25], [8, 27], [25, 27], [27, 32]], 23, 3]], [[[[2, 1.0, -3.0, 3.0, -1.0], [8, 0.0, 5.0, 3.0, 9.0], [27, -4.0, -2.0, -2.0, -1.0], [24, 2.0, 5.0, 4.0, 10.0], [7, 6.0, -1.0, 9.0, 1.0], [32, -3.0, 0.0, 0.0, 2.0]], 3.0], [[[8, 24]], 22, 2]], [[[[10, 1.0, 1.0, 5.0, 1.0], [12, 1.0, 4.0, 6.0, 4.0], [38, 4.0, 6.0, 5.0, 6.0], [31, -4.0, -4.0, -4.0, -3.0], [5, -5.0, 4.0, -4.0, 7.0], [29, -1.0, 3.0, -1.0, 5.0], [39, 5.0, -1.0, 8.0, 0.0], [14, -1.0, -2.0, 3.0, 1.0], [17, 5.0, 5.0, 9.0, 7.0]], 1.0], [[[10, 14], [17, 38]], 69, 2]], [[[[16, 1.0, -1.5, 1.0, -1.0], [7, 0.5, 0.5, 0.5, 0.5], [36, -3.0, 0.0, -3.0, 1.5]], 2.5], [[], 3, 1]], [[[[33, 5.0, 4.0, 6.0, 9.0], [23, -6.0, 0.0, -6.0, 5.0]], 3.0], [[], 8, 1]], [[[[38, 1.0, 2.5, 3.0, 3.0], [17, 0.5, 2.0, 2.5, 4.5]], 3.0], [[[17, 38]], 6, 2]]], [[[[[17, 5.0, 0.0, 6.0, 5.0], [34, -4.0, 5.0, -2.0, 9.0], [19, 1.0, -4.0, 1.0, 0.0], [27, -4.0, -1.0, 0.0, -1.0], [22, -1.0, 2.0, 3.0, 5.0], [26, 1.0, -5.0, 1.0, -2.0], [25, 1.0, -4.0, 4.0, -4.0]], 1.0], [[[19, 25], [19, 26], [25, 26]], 65, 3]], [[[[33, 3.0, 4.0, 5.0, 8.0], [14, -1.0, -6.0, 4.0, -1.0], [20, -4.0, -5.0, -4.0, -4.0], [5, 4.0, 4.0, 4.0, 4.0], [32, 1.0, 3.0, 5.0, 5.0], [31, 2.0, 3.0, 6.0, 7.0]], 2.5], [[[5, 31], [5, 32], [5, 33], [31, 32], [31, 33], [32, 33]], 29, 4]], [[[[7, -2.5, -3.0, 0.0, -2.0], [4, 1.5, -2.5, 3.5, -1.5]], 2.5], [[[4, 7]], 6, 2]], [[[[7, 1.5, 2.0, 3.0, 4.5], [13, -1.0, 0.5, 0.5, 0.5], [26, 1.5, 3.0, 4.0, 4.0], [23, 3.0, -1.0, 3.5, 1.0], [28, -3.0, -2.5, -1.5, -0.5], [33, 0.5, -3.0, 2.5, -3.0]], 2.5], [[[7, 13], [7, 23], [7, 26]], 14, 2]], [[[[36, 2.0, 0.0, 6.0, 3.0], [32, -1.0, 6.0, -1.0, 9.0], [7, 4.0, -3.0, 9.0, 2.0]], 3.0], [[[7, 36]], 14, 2]], [[[[35, 0.0, 0.0, 0.0, 4.0], [18, -1.0, -6.0, 3.0, -6.0], [6, 3.0, 4.0, 5.0, 8.0], [25, 4.0, -4.0, 6.0, -2.0], [36, 2.0, -6.0, 7.0, -5.0], [21, 0.0, 4.0, 4.0, 6.0], [29, 4.0, -2.0, 9.0, 3.0], [34, 3.0, -2.0, 7.0, 0.0], [33, 5.0, -4.0, 5.0, -3.0], [15, 4.0, 0.0, 4.0, 5.0]], 2.5], [[[6, 15], [6, 21], [6, 29], [15, 21], [15, 29], [15, 34], [18, 36], [21, 29], [21, 35], [25, 29], [25, 33], [25, 34], [25, 36], [29, 34], [33, 36]], 42, 4]], [[[[14, -1.5, 1.5, 0.0, 2.5], [36, 0.5, 3.0, 0.5, 4.5], [4, 0.5, 3.0, 2.0, 5.0], [33, -3.0, -1.0, -2.5, 0.5], [21, -2.5, 2.5, -0.5, 3.0], [10, 1.5, 1.0, 1.5, 1.0], [7, -0.5, 0.0, 2.0, 2.0], [23, 2.0, -1.0, 2.0, 1.0], [30, 3.0, 0.0, 3.5, 0.5]], 2.0], [[[4, 7], [4, 14], [4, 36], [7, 10], [7, 14], [7, 21], [7, 23], [7, 30], [7, 36], [10, 14], [14, 21], [14, 36], [23, 30]], 24, 4]], [[[[29, -1.5, -0.5, 0.5, 1.0], [33, 0.0, 2.5, 2.0, 4.5], [11, -2.0, -2.0, 0.5, -2.0], [28, -0.5, 3.0, 0.0, 3.5]], 2.0], [[[11, 29], [28, 33]], 12, 2]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %d\" % i, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-collision_detection_broadphase-uniform-grid-candidates-negative-cell-truncation","generated_at":"2026-09-29T14:50:58.020640+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"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.","root_cause":"int() is used for cell indices, so -0.5 maps to cell 0.","sha256":"b3dfbaee52b3387a1f2c1d8064983229f0ef5ead97f39b3507a58f1861ce86a9","title":"Grid cell index truncates toward zero for negative coordinates · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.92,"exit_code":1,"observations":[{"actual":[[[22,28],[24,28],[25,39]],20,2],"check":"case 0","expected":[[[22,28],[24,28],[25,39]],20,2],"passed":true},{"actual":[[],7,1],"check":"case 1","expected":[[],5,1],"passed":false},{"actual":[[],12,1],"check":"case 2","expected":[[],10,1],"passed":false},{"actual":[[],10,1],"check":"case 3","expected":[[],10,1],"passed":true},{"actual":[[[3,7],[7,12]],28,2],"check":"case 4","expected":[[[3,7]],21,2],"passed":false},{"actual":[[],12,1],"check":"case 5","expected":[[],8,1],"passed":false},{"actual":[[[3,10],[7,13]],17,2],"check":"case 6","expected":[[[3,10],[7,13]],17,2],"passed":true},{"actual":[[[6,8],[6,27],[8,10],[8,27]],92,3],"check":"case 7","expected":[[[6,8],[6,27],[8,10],[8,27]],92,3],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[[22, 28], [24, 28], [25, 39]], 20, 2], \"expected\": [[[22, 28], [24, 28], [25, 39]], 20, 2], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[], 7, 1], \"expected\": [[], 5, 1], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [[], 12, 1], \"expected\": [[], 10, 1], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[], 10, 1], \"expected\": [[], 10, 1], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [[[3, 7], [7, 12]], 28, 2], \"expected\": [[[3, 7]], 21, 2], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [[], 12, 1], \"expected\": [[], 8, 1], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [[[3, 10], [7, 13]], 17, 2], \"expected\": [[[3, 10], [7, 13]], 17, 2], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[[6, 8], [6, 27], [8, 10], [8, 27]], 92, 3], \"expected\": [[[6, 8], [6, 27], [8, 10], [8, 27]], 92, 3], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.349,"exit_code":1,"observations":[{"actual":[[[22,28],[24,28],[25,39]],18,2],"check":"case 0","expected":[[[22,28],[24,28],[25,39]],20,2],"passed":false},{"actual":[[],7,1],"check":"case 1","expected":[[],5,1],"passed":false},{"actual":[[],12,1],"check":"case 2","expected":[[],10,1],"passed":false},{"actual":[[],8,1],"check":"case 3","expected":[[],10,1],"passed":false},{"actual":[[[3,7],[7,12]],27,2],"check":"case 4","expected":[[[3,7]],21,2],"passed":false},{"actual":[[],8,1],"check":"case 5","expected":[[],8,1],"passed":true},{"actual":[[[3,10],[7,13]],17,2],"check":"case 6","expected":[[[3,10],[7,13]],17,2],"passed":true},{"actual":[[[6,8],[6,27],[8,10],[8,27]],92,3],"check":"case 7","expected":[[[6,8],[6,27],[8,10],[8,27]],92,3],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[[22, 28], [24, 28], [25, 39]], 18, 2], \"expected\": [[[22, 28], [24, 28], [25, 39]], 20, 2], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [[], 7, 1], \"expected\": [[], 5, 1], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [[], 12, 1], \"expected\": [[], 10, 1], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[], 8, 1], \"expected\": [[], 10, 1], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[[3, 7], [7, 12]], 27, 2], \"expected\": [[[3, 7]], 21, 2], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [[], 8, 1], \"expected\": [[], 8, 1], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[[3, 10], [7, 13]], 17, 2], \"expected\": [[[3, 10], [7, 13]], 17, 2], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[[6, 8], [6, 27], [8, 10], [8, 27]], 92, 3], \"expected\": [[[6, 8], [6, 27], [8, 10], [8, 27]], 92, 3], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}