{"abstract":"Scenes with mixed box sizes sweep along a poorly separating axis.","category":"Collision detection broadphase","checks":8,"contract":"solve(boxes): 3D sweep-and-prune axis selection. Boxes [id,minx,miny,minz,maxx,maxy,maxz]. Pick the axis with the largest population variance of box centres (first axis on ties), then order ids by (min on that axis, id). Return [axis, variance rounded to 6, ordered ids].","evaluation_group":"w2-collision_detection_broadphase-sap-axis-variance","failed_approach":"Summing min and max without halving scales the variance by four.","family":"w2-collision_detection_broadphase-sap-axis-variance-centre-coordinate","id":"FA-87651","implementations":{"attempt":{"sha256":"82ab74577f66016272a9082e4cbb03fd57b5878dab8f84605a49ec709bcb3899","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes):\n    n = len(boxes)\n    best_axis, best_var = 0, -1.0\n    for ax in (0, 1, 2):\n        cs_ = [(b[1 + ax] + b[4 + ax]) for b in boxes]\n        mean = sum(cs_) / n\n        var = sum((c - mean) ** 2 for c in cs_) / n\n        if var > best_var:\n            best_axis, best_var = ax, var\n    order = [b[0] for b in sorted(boxes, key=lambda b: (b[1 + best_axis], b[0]))]\n    return [best_axis, round(best_var, 6), order]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[18, 25, 7, 8, 33, 9, 11], [8, 13, 5, 8, 22, 11, 8], [11, 30, 7, 12, 42, 18, 14]]], [0, 58.166667, [8, 18, 11]]], [[[[14, 20, 2, 14, 32, 6, 19], [37, 15, 1, 14, 19, 11, 15]]], [0, 20.25, [37, 14]]], [[[[6, 2, 1, 8, 6, 9, 15], [28, 20, 7, 28, 26, 14, 38], [32, 4, 9, 3, 5, 21, 5], [4, 15, 8, 24, 16, 19, 28], [3, 10, 1, 13, 12, 12, 18], [20, 1, 2, 14, 13, 10, 18]]], [2, 89.472222, [32, 6, 3, 20, 4, 28]]], [[[[10, 1, 21, 0, 1, 31, 5], [5, 0, 17, 1, 7, 18, 10], [17, 0, 30, 0, 6, 42, 8], [15, 0, 29, 0, 4, 39, 7], [18, 2, 0, 2, 2, 3, 7]]], [1, 158.3, [18, 5, 10, 15, 17]]], [[[[9, 1, 7, 0, 11, 9, 12], [15, 6, 1, 3, 17, 3, 6]]], [1, 9.0, [15, 9]]], [[[[1, 3, 2, 10, 12, 11, 19], [8, 10, 0, 28, 11, 9, 37]]], [2, 81.0, [1, 8]]], [[[[32, 0, 1, 25, 10, 12, 27], [4, 0, 0, 17, 7, 10, 19]]], [2, 16.0, [4, 32]]], [[[[26, 7, 0, 1, 19, 8, 5], [12, 5, 2, 1, 6, 2, 5], [35, 15, 2, 0, 22, 5, 0], [7, 2, 2, 1, 8, 10, 12]]], [0, 31.375, [7, 12, 26, 35]]]], [[[[[8, 5, 21, 8, 5, 30, 20], [21, 3, 7, 1, 12, 16, 9]]], [1, 49.0, [21, 8]]], [[[[37, 0, 0, 21, 6, 8, 27], [33, 9, 2, 1, 14, 3, 7]]], [2, 100.0, [33, 37]]], [[[[14, 7, 9, 6, 15, 17, 12], [31, 2, 14, 5, 3, 14, 15], [34, 6, 28, 30, 10, 36, 37], [24, 3, 25, 19, 7, 27, 25]]], [2, 99.921875, [31, 14, 24, 34]]], [[[[12, 19, 0, 0, 25, 3, 7], [10, 20, 0, 0, 23, 11, 2], [24, 5, 2, 0, 14, 14, 3], [3, 8, 1, 1, 18, 10, 8]]], [0, 29.125, [24, 3, 12, 10]]], [[[[20, 8, 21, 1, 15, 22, 6], [39, 10, 11, 1, 21, 17, 8], [26, 8, 10, 1, 11, 17, 12], [32, 2, 28, 2, 5, 33, 9], [30, 2, 1, 0, 12, 2, 2], [36, 0, 29, 2, 2, 32, 13], [7, 4, 6, 1, 16, 10, 3]]], [1, 103.887755, [30, 7, 26, 39, 20, 32, 36]]], [[[[15, 26, 1, 5, 32, 8, 12], [6, 5, 2, 0, 10, 4, 11], [16, 2, 0, 18, 2, 7, 27], [5, 25, 2, 10, 32, 5, 20], [7, 21, 0, 5, 33, 4, 16], [29, 6, 0, 3, 18, 4, 10], [1, 14, 1, 24, 21, 9, 34]]], [0, 101.979592, [16, 6, 29, 1, 7, 5, 15]]], [[[[27, 20, 1, 0, 21, 10, 3], [34, 9, 0, 1, 10, 12, 9]]], [0, 30.25, [34, 27]]], [[[[21, 5, 24, 10, 10, 28, 14], [15, 10, 15, 7, 16, 19, 11], [39, 4, 3, 3, 6, 6, 5], [5, 9, 7, 9, 14, 19, 9], [29, 4, 20, 6, 14, 26, 17], [25, 1, 12, 7, 8, 17, 11], [28, 3, 21, 8, 10, 22, 11]]], [1, 45.102041, [39, 5, 25, 15, 29, 28, 21]]]], [[[[[10, 2, 2, 27, 9, 12, 34], [13, 2, 10, 11, 8, 17, 18]]], [2, 64.0, [13, 10]]], [[[[26, 9, 1, 0, 13, 5, 12], [3, 20, 1, 0, 23, 12, 5], [21, 18, 1, 1, 24, 12, 3], [28, 11, 0, 1, 15, 12, 6], [38, 12, 0, 0, 23, 8, 6]]], [0, 17.66, [26, 28, 38, 21, 3]]], [[[[11, 2, 0, 5, 11, 3, 8], [34, 2, 1, 4, 8, 3, 10]]], [0, 0.5625, [11, 34]]], [[[[1, 27, 25, 1, 39, 34, 10], [35, 21, 20, 2, 32, 29, 5], [22, 6, 14, 1, 10, 16, 12], [13, 3, 27, 2, 4, 34, 7], [8, 19, 15, 1, 26, 25, 12], [39, 0, 16, 0, 6, 22, 12]]], [0, 138.451389, [39, 13, 22, 8, 35, 1]]], [[[[37, 8, 1, 0, 14, 5, 1], [38, 0, 2, 22, 7, 5, 25], [10, 3, 5, 29, 7, 12, 38], [35, 6, 7, 7, 6, 19, 16]]], [2, 154.1875, [37, 35, 38, 10]]], [[[[34, 5, 5, 1, 16, 5, 10], [1, 0, 5, 2, 8, 13, 8], [19, 9, 0, 2, 10, 3, 10], [3, 4, 1, 0, 5, 7, 3], [2, 4, 8, 2, 14, 16, 4], [29, 10, 5, 0, 10, 14, 12]]], [1, 13.055556, [19, 3, 1, 29, 34, 2]]], [[[[18, 1, 1, 9, 8, 3, 11], [16, 0, 2, 1, 11, 14, 11], [8, 1, 0, 0, 4, 4, 9]]], [1, 8.0, [8, 18, 16]]], [[[[27, 1, 8, 21, 3, 17, 23], [1, 12, 8, 3, 13, 18, 5], [18, 26, 3, 24, 38, 5, 27], [7, 13, 27, 13, 23, 30, 16]]], [0, 117.046875, [27, 1, 7, 18]]]], [[[[[27, 2, 2, 10, 12, 14, 17], [23, 0, 1, 7, 3, 8, 11], [12, 2, 1, 5, 8, 6, 15], [32, 1, 1, 6, 4, 2, 6], [36, 2, 2, 7, 9, 2, 16], [1, 1, 2, 9, 11, 9, 16], [28, 0, 1, 6, 4, 11, 8], [6, 0, 2, 3, 7, 14, 3]]], [2, 11.089844, [6, 12, 28, 32, 23, 36, 1, 27]]], [[[[29, 2, 0, 1, 3, 1, 3], [8, 0, 1, 0, 12, 12, 8], [38, 0, 0, 0, 7, 7, 12], [31, 1, 0, 2, 1, 4, 2]]], [1, 4.921875, [29, 31, 38, 8]]], [[[[5, 2, 11, 13, 6, 22, 19], [6, 1, 5, 2, 5, 14, 6], [39, 6, 11, 29, 13, 22, 34], [25, 10, 6, 9, 11, 15, 16], [16, 3, 25, 11, 6, 27, 13], [13, 1, 10, 22, 8, 20, 29]]], [2, 82.951389, [6, 25, 16, 5, 13, 39]]], [[[[3, 4, 1, 1, 9, 9, 12], [13, 10, 1, 0, 22, 10, 1], [25, 2, 7, 1, 11, 17, 6], [23, 2, 8, 0, 10, 17, 5], [24, 2, 6, 2, 5, 10, 11]]], [0, 18.46, [23, 24, 25, 3, 13]]], [[[[19, 24, 1, 0, 26, 13, 6], [24, 27, 0, 1, 33, 5, 13], [12, 16, 0, 2, 25, 4, 11], [30, 5, 2, 0, 8, 12, 12], [22, 27, 0, 1, 38, 7, 7], [14, 30, 1, 1, 37, 3, 2], [23, 25, 1, 2, 36, 3, 13], [9, 2, 2, 0, 3, 10, 3]]], [0, 125.921875, [9, 30, 12, 19, 23, 22, 24, 14]]], [[[[22, 2, 2, 2, 7, 13, 8], [23, 0, 1, 0, 4, 8, 12], [1, 0, 1, 2, 3, 13, 4], [34, 2, 1, 2, 14, 6, 5]]], [0, 6.625, [1, 23, 22, 34]]], [[[[17, 4, 15, 6, 14, 24, 10], [18, 7, 30, 4, 8, 31, 4], [38, 9, 9, 7, 15, 16, 11], [35, 24, 0, 4, 25, 12, 12], [14, 7, 22, 1, 19, 31, 4]]], [1, 80.0, [35, 38, 17, 14, 18]]], [[[[39, 9, 10, 0, 20, 17, 8], [9, 5, 9, 16, 10, 20, 24], [4, 3, 10, 6, 12, 18, 14]]], [2, 43.555556, [39, 4, 9]]]], [[[[[9, 7, 1, 0, 9, 12, 8], [30, 26, 0, 4, 35, 9, 12], [29, 27, 1, 3, 31, 12, 11]]], [0, 105.5, [9, 30, 29]]], [[[[36, 1, 23, 5, 8, 33, 5], [15, 22, 14, 4, 30, 18, 9], [7, 14, 23, 4, 14, 26, 13], [35, 28, 11, 8, 38, 12, 9]]], [0, 119.921875, [36, 7, 15, 35]]], [[[[23, 23, 14, 0, 35, 18, 11], [31, 23, 5, 16, 26, 8, 19], [2, 0, 10, 28, 10, 21, 29], [18, 7, 19, 0, 17, 20, 5], [12, 7, 19, 14, 7, 25, 26], [36, 17, 1, 23, 18, 13, 29]]], [2, 94.055556, [18, 23, 12, 31, 36, 2]]], [[[[37, 20, 2, 0, 26, 9, 11], [30, 6, 9, 2, 9, 16, 12]]], [0, 60.0625, [30, 37]]], [[[[12, 1, 8, 2, 5, 16, 14], [10, 2, 2, 2, 7, 8, 3], [31, 1, 7, 2, 3, 7, 10], [36, 0, 3, 0, 10, 15, 0], [39, 1, 4, 0, 12, 15, 4], [25, 2, 0, 2, 2, 4, 5]]], [1, 10.534722, [25, 10, 36, 39, 31, 12]]], [[[[13, 5, 25, 23, 5, 26, 29], [19, 24, 6, 27, 32, 14, 33], [17, 1, 2, 17, 11, 9, 22], [4, 21, 25, 22, 27, 30, 24], [27, 29, 26, 1, 38, 30, 9], [30, 11, 22, 2, 13, 32, 7]]], [0, 120.868056, [17, 13, 30, 4, 19, 27]]], [[[[18, 10, 21, 1, 14, 27, 2], [16, 20, 5, 1, 26, 8, 11], [1, 6, 4, 2, 9, 7, 11]]], [1, 72.166667, [1, 16, 18]]], [[[[11, 2, 2, 10, 6, 5, 15], [28, 6, 2, 19, 11, 13, 25], [24, 3, 2, 18, 8, 3, 21], [8, 3, 1, 28, 12, 6, 38]]], [2, 54.3125, [11, 24, 28, 8]]]]]\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":"0614b6510c48ad4bfa794b0a9ad34dc0c74beb9bef8585cab4ce40a422c8b511","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes):\n    n = len(boxes)\n    best_axis, best_var = 0, -1.0\n    for ax in (0, 1, 2):\n        cs_ = [b[1 + ax] for b in boxes]\n        mean = sum(cs_) / n\n        var = sum((c - mean) ** 2 for c in cs_) / n\n        if var > best_var:\n            best_axis, best_var = ax, var\n    order = [b[0] for b in sorted(boxes, key=lambda b: (b[1 + best_axis], b[0]))]\n    return [best_axis, round(best_var, 6), order]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[18, 25, 7, 8, 33, 9, 11], [8, 13, 5, 8, 22, 11, 8], [11, 30, 7, 12, 42, 18, 14]]], [0, 58.166667, [8, 18, 11]]], [[[[14, 20, 2, 14, 32, 6, 19], [37, 15, 1, 14, 19, 11, 15]]], [0, 20.25, [37, 14]]], [[[[6, 2, 1, 8, 6, 9, 15], [28, 20, 7, 28, 26, 14, 38], [32, 4, 9, 3, 5, 21, 5], [4, 15, 8, 24, 16, 19, 28], [3, 10, 1, 13, 12, 12, 18], [20, 1, 2, 14, 13, 10, 18]]], [2, 89.472222, [32, 6, 3, 20, 4, 28]]], [[[[10, 1, 21, 0, 1, 31, 5], [5, 0, 17, 1, 7, 18, 10], [17, 0, 30, 0, 6, 42, 8], [15, 0, 29, 0, 4, 39, 7], [18, 2, 0, 2, 2, 3, 7]]], [1, 158.3, [18, 5, 10, 15, 17]]], [[[[9, 1, 7, 0, 11, 9, 12], [15, 6, 1, 3, 17, 3, 6]]], [1, 9.0, [15, 9]]], [[[[1, 3, 2, 10, 12, 11, 19], [8, 10, 0, 28, 11, 9, 37]]], [2, 81.0, [1, 8]]], [[[[32, 0, 1, 25, 10, 12, 27], [4, 0, 0, 17, 7, 10, 19]]], [2, 16.0, [4, 32]]], [[[[26, 7, 0, 1, 19, 8, 5], [12, 5, 2, 1, 6, 2, 5], [35, 15, 2, 0, 22, 5, 0], [7, 2, 2, 1, 8, 10, 12]]], [0, 31.375, [7, 12, 26, 35]]]], [[[[[8, 5, 21, 8, 5, 30, 20], [21, 3, 7, 1, 12, 16, 9]]], [1, 49.0, [21, 8]]], [[[[37, 0, 0, 21, 6, 8, 27], [33, 9, 2, 1, 14, 3, 7]]], [2, 100.0, [33, 37]]], [[[[14, 7, 9, 6, 15, 17, 12], [31, 2, 14, 5, 3, 14, 15], [34, 6, 28, 30, 10, 36, 37], [24, 3, 25, 19, 7, 27, 25]]], [2, 99.921875, [31, 14, 24, 34]]], [[[[12, 19, 0, 0, 25, 3, 7], [10, 20, 0, 0, 23, 11, 2], [24, 5, 2, 0, 14, 14, 3], [3, 8, 1, 1, 18, 10, 8]]], [0, 29.125, [24, 3, 12, 10]]], [[[[20, 8, 21, 1, 15, 22, 6], [39, 10, 11, 1, 21, 17, 8], [26, 8, 10, 1, 11, 17, 12], [32, 2, 28, 2, 5, 33, 9], [30, 2, 1, 0, 12, 2, 2], [36, 0, 29, 2, 2, 32, 13], [7, 4, 6, 1, 16, 10, 3]]], [1, 103.887755, [30, 7, 26, 39, 20, 32, 36]]], [[[[15, 26, 1, 5, 32, 8, 12], [6, 5, 2, 0, 10, 4, 11], [16, 2, 0, 18, 2, 7, 27], [5, 25, 2, 10, 32, 5, 20], [7, 21, 0, 5, 33, 4, 16], [29, 6, 0, 3, 18, 4, 10], [1, 14, 1, 24, 21, 9, 34]]], [0, 101.979592, [16, 6, 29, 1, 7, 5, 15]]], [[[[27, 20, 1, 0, 21, 10, 3], [34, 9, 0, 1, 10, 12, 9]]], [0, 30.25, [34, 27]]], [[[[21, 5, 24, 10, 10, 28, 14], [15, 10, 15, 7, 16, 19, 11], [39, 4, 3, 3, 6, 6, 5], [5, 9, 7, 9, 14, 19, 9], [29, 4, 20, 6, 14, 26, 17], [25, 1, 12, 7, 8, 17, 11], [28, 3, 21, 8, 10, 22, 11]]], [1, 45.102041, [39, 5, 25, 15, 29, 28, 21]]]], [[[[[10, 2, 2, 27, 9, 12, 34], [13, 2, 10, 11, 8, 17, 18]]], [2, 64.0, [13, 10]]], [[[[26, 9, 1, 0, 13, 5, 12], [3, 20, 1, 0, 23, 12, 5], [21, 18, 1, 1, 24, 12, 3], [28, 11, 0, 1, 15, 12, 6], [38, 12, 0, 0, 23, 8, 6]]], [0, 17.66, [26, 28, 38, 21, 3]]], [[[[11, 2, 0, 5, 11, 3, 8], [34, 2, 1, 4, 8, 3, 10]]], [0, 0.5625, [11, 34]]], [[[[1, 27, 25, 1, 39, 34, 10], [35, 21, 20, 2, 32, 29, 5], [22, 6, 14, 1, 10, 16, 12], [13, 3, 27, 2, 4, 34, 7], [8, 19, 15, 1, 26, 25, 12], [39, 0, 16, 0, 6, 22, 12]]], [0, 138.451389, [39, 13, 22, 8, 35, 1]]], [[[[37, 8, 1, 0, 14, 5, 1], [38, 0, 2, 22, 7, 5, 25], [10, 3, 5, 29, 7, 12, 38], [35, 6, 7, 7, 6, 19, 16]]], [2, 154.1875, [37, 35, 38, 10]]], [[[[34, 5, 5, 1, 16, 5, 10], [1, 0, 5, 2, 8, 13, 8], [19, 9, 0, 2, 10, 3, 10], [3, 4, 1, 0, 5, 7, 3], [2, 4, 8, 2, 14, 16, 4], [29, 10, 5, 0, 10, 14, 12]]], [1, 13.055556, [19, 3, 1, 29, 34, 2]]], [[[[18, 1, 1, 9, 8, 3, 11], [16, 0, 2, 1, 11, 14, 11], [8, 1, 0, 0, 4, 4, 9]]], [1, 8.0, [8, 18, 16]]], [[[[27, 1, 8, 21, 3, 17, 23], [1, 12, 8, 3, 13, 18, 5], [18, 26, 3, 24, 38, 5, 27], [7, 13, 27, 13, 23, 30, 16]]], [0, 117.046875, [27, 1, 7, 18]]]], [[[[[27, 2, 2, 10, 12, 14, 17], [23, 0, 1, 7, 3, 8, 11], [12, 2, 1, 5, 8, 6, 15], [32, 1, 1, 6, 4, 2, 6], [36, 2, 2, 7, 9, 2, 16], [1, 1, 2, 9, 11, 9, 16], [28, 0, 1, 6, 4, 11, 8], [6, 0, 2, 3, 7, 14, 3]]], [2, 11.089844, [6, 12, 28, 32, 23, 36, 1, 27]]], [[[[29, 2, 0, 1, 3, 1, 3], [8, 0, 1, 0, 12, 12, 8], [38, 0, 0, 0, 7, 7, 12], [31, 1, 0, 2, 1, 4, 2]]], [1, 4.921875, [29, 31, 38, 8]]], [[[[5, 2, 11, 13, 6, 22, 19], [6, 1, 5, 2, 5, 14, 6], [39, 6, 11, 29, 13, 22, 34], [25, 10, 6, 9, 11, 15, 16], [16, 3, 25, 11, 6, 27, 13], [13, 1, 10, 22, 8, 20, 29]]], [2, 82.951389, [6, 25, 16, 5, 13, 39]]], [[[[3, 4, 1, 1, 9, 9, 12], [13, 10, 1, 0, 22, 10, 1], [25, 2, 7, 1, 11, 17, 6], [23, 2, 8, 0, 10, 17, 5], [24, 2, 6, 2, 5, 10, 11]]], [0, 18.46, [23, 24, 25, 3, 13]]], [[[[19, 24, 1, 0, 26, 13, 6], [24, 27, 0, 1, 33, 5, 13], [12, 16, 0, 2, 25, 4, 11], [30, 5, 2, 0, 8, 12, 12], [22, 27, 0, 1, 38, 7, 7], [14, 30, 1, 1, 37, 3, 2], [23, 25, 1, 2, 36, 3, 13], [9, 2, 2, 0, 3, 10, 3]]], [0, 125.921875, [9, 30, 12, 19, 23, 22, 24, 14]]], [[[[22, 2, 2, 2, 7, 13, 8], [23, 0, 1, 0, 4, 8, 12], [1, 0, 1, 2, 3, 13, 4], [34, 2, 1, 2, 14, 6, 5]]], [0, 6.625, [1, 23, 22, 34]]], [[[[17, 4, 15, 6, 14, 24, 10], [18, 7, 30, 4, 8, 31, 4], [38, 9, 9, 7, 15, 16, 11], [35, 24, 0, 4, 25, 12, 12], [14, 7, 22, 1, 19, 31, 4]]], [1, 80.0, [35, 38, 17, 14, 18]]], [[[[39, 9, 10, 0, 20, 17, 8], [9, 5, 9, 16, 10, 20, 24], [4, 3, 10, 6, 12, 18, 14]]], [2, 43.555556, [39, 4, 9]]]], [[[[[9, 7, 1, 0, 9, 12, 8], [30, 26, 0, 4, 35, 9, 12], [29, 27, 1, 3, 31, 12, 11]]], [0, 105.5, [9, 30, 29]]], [[[[36, 1, 23, 5, 8, 33, 5], [15, 22, 14, 4, 30, 18, 9], [7, 14, 23, 4, 14, 26, 13], [35, 28, 11, 8, 38, 12, 9]]], [0, 119.921875, [36, 7, 15, 35]]], [[[[23, 23, 14, 0, 35, 18, 11], [31, 23, 5, 16, 26, 8, 19], [2, 0, 10, 28, 10, 21, 29], [18, 7, 19, 0, 17, 20, 5], [12, 7, 19, 14, 7, 25, 26], [36, 17, 1, 23, 18, 13, 29]]], [2, 94.055556, [18, 23, 12, 31, 36, 2]]], [[[[37, 20, 2, 0, 26, 9, 11], [30, 6, 9, 2, 9, 16, 12]]], [0, 60.0625, [30, 37]]], [[[[12, 1, 8, 2, 5, 16, 14], [10, 2, 2, 2, 7, 8, 3], [31, 1, 7, 2, 3, 7, 10], [36, 0, 3, 0, 10, 15, 0], [39, 1, 4, 0, 12, 15, 4], [25, 2, 0, 2, 2, 4, 5]]], [1, 10.534722, [25, 10, 36, 39, 31, 12]]], [[[[13, 5, 25, 23, 5, 26, 29], [19, 24, 6, 27, 32, 14, 33], [17, 1, 2, 17, 11, 9, 22], [4, 21, 25, 22, 27, 30, 24], [27, 29, 26, 1, 38, 30, 9], [30, 11, 22, 2, 13, 32, 7]]], [0, 120.868056, [17, 13, 30, 4, 19, 27]]], [[[[18, 10, 21, 1, 14, 27, 2], [16, 20, 5, 1, 26, 8, 11], [1, 6, 4, 2, 9, 7, 11]]], [1, 72.166667, [1, 16, 18]]], [[[[11, 2, 2, 10, 6, 5, 15], [28, 6, 2, 19, 11, 13, 25], [24, 3, 2, 18, 8, 3, 21], [8, 3, 1, 28, 12, 6, 38]]], [2, 54.3125, [11, 24, 28, 8]]]]]\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"},"fixed":{"sha256":"0d2d149608f76e87d5fbd3aebaafb753c2de368d5d3b89dd9cc1ceb8c6724467","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes):\n    n = len(boxes)\n    best_axis, best_var = 0, -1.0\n    for ax in (0, 1, 2):\n        cs_ = [(b[1 + ax] + b[4 + ax]) / 2 for b in boxes]\n        mean = sum(cs_) / n\n        var = sum((c - mean) ** 2 for c in cs_) / n\n        if var > best_var:\n            best_axis, best_var = ax, var\n    order = [b[0] for b in sorted(boxes, key=lambda b: (b[1 + best_axis], b[0]))]\n    return [best_axis, round(best_var, 6), order]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[18, 25, 7, 8, 33, 9, 11], [8, 13, 5, 8, 22, 11, 8], [11, 30, 7, 12, 42, 18, 14]]], [0, 58.166667, [8, 18, 11]]], [[[[14, 20, 2, 14, 32, 6, 19], [37, 15, 1, 14, 19, 11, 15]]], [0, 20.25, [37, 14]]], [[[[6, 2, 1, 8, 6, 9, 15], [28, 20, 7, 28, 26, 14, 38], [32, 4, 9, 3, 5, 21, 5], [4, 15, 8, 24, 16, 19, 28], [3, 10, 1, 13, 12, 12, 18], [20, 1, 2, 14, 13, 10, 18]]], [2, 89.472222, [32, 6, 3, 20, 4, 28]]], [[[[10, 1, 21, 0, 1, 31, 5], [5, 0, 17, 1, 7, 18, 10], [17, 0, 30, 0, 6, 42, 8], [15, 0, 29, 0, 4, 39, 7], [18, 2, 0, 2, 2, 3, 7]]], [1, 158.3, [18, 5, 10, 15, 17]]], [[[[9, 1, 7, 0, 11, 9, 12], [15, 6, 1, 3, 17, 3, 6]]], [1, 9.0, [15, 9]]], [[[[1, 3, 2, 10, 12, 11, 19], [8, 10, 0, 28, 11, 9, 37]]], [2, 81.0, [1, 8]]], [[[[32, 0, 1, 25, 10, 12, 27], [4, 0, 0, 17, 7, 10, 19]]], [2, 16.0, [4, 32]]], [[[[26, 7, 0, 1, 19, 8, 5], [12, 5, 2, 1, 6, 2, 5], [35, 15, 2, 0, 22, 5, 0], [7, 2, 2, 1, 8, 10, 12]]], [0, 31.375, [7, 12, 26, 35]]]], [[[[[8, 5, 21, 8, 5, 30, 20], [21, 3, 7, 1, 12, 16, 9]]], [1, 49.0, [21, 8]]], [[[[37, 0, 0, 21, 6, 8, 27], [33, 9, 2, 1, 14, 3, 7]]], [2, 100.0, [33, 37]]], [[[[14, 7, 9, 6, 15, 17, 12], [31, 2, 14, 5, 3, 14, 15], [34, 6, 28, 30, 10, 36, 37], [24, 3, 25, 19, 7, 27, 25]]], [2, 99.921875, [31, 14, 24, 34]]], [[[[12, 19, 0, 0, 25, 3, 7], [10, 20, 0, 0, 23, 11, 2], [24, 5, 2, 0, 14, 14, 3], [3, 8, 1, 1, 18, 10, 8]]], [0, 29.125, [24, 3, 12, 10]]], [[[[20, 8, 21, 1, 15, 22, 6], [39, 10, 11, 1, 21, 17, 8], [26, 8, 10, 1, 11, 17, 12], [32, 2, 28, 2, 5, 33, 9], [30, 2, 1, 0, 12, 2, 2], [36, 0, 29, 2, 2, 32, 13], [7, 4, 6, 1, 16, 10, 3]]], [1, 103.887755, [30, 7, 26, 39, 20, 32, 36]]], [[[[15, 26, 1, 5, 32, 8, 12], [6, 5, 2, 0, 10, 4, 11], [16, 2, 0, 18, 2, 7, 27], [5, 25, 2, 10, 32, 5, 20], [7, 21, 0, 5, 33, 4, 16], [29, 6, 0, 3, 18, 4, 10], [1, 14, 1, 24, 21, 9, 34]]], [0, 101.979592, [16, 6, 29, 1, 7, 5, 15]]], [[[[27, 20, 1, 0, 21, 10, 3], [34, 9, 0, 1, 10, 12, 9]]], [0, 30.25, [34, 27]]], [[[[21, 5, 24, 10, 10, 28, 14], [15, 10, 15, 7, 16, 19, 11], [39, 4, 3, 3, 6, 6, 5], [5, 9, 7, 9, 14, 19, 9], [29, 4, 20, 6, 14, 26, 17], [25, 1, 12, 7, 8, 17, 11], [28, 3, 21, 8, 10, 22, 11]]], [1, 45.102041, [39, 5, 25, 15, 29, 28, 21]]]], [[[[[10, 2, 2, 27, 9, 12, 34], [13, 2, 10, 11, 8, 17, 18]]], [2, 64.0, [13, 10]]], [[[[26, 9, 1, 0, 13, 5, 12], [3, 20, 1, 0, 23, 12, 5], [21, 18, 1, 1, 24, 12, 3], [28, 11, 0, 1, 15, 12, 6], [38, 12, 0, 0, 23, 8, 6]]], [0, 17.66, [26, 28, 38, 21, 3]]], [[[[11, 2, 0, 5, 11, 3, 8], [34, 2, 1, 4, 8, 3, 10]]], [0, 0.5625, [11, 34]]], [[[[1, 27, 25, 1, 39, 34, 10], [35, 21, 20, 2, 32, 29, 5], [22, 6, 14, 1, 10, 16, 12], [13, 3, 27, 2, 4, 34, 7], [8, 19, 15, 1, 26, 25, 12], [39, 0, 16, 0, 6, 22, 12]]], [0, 138.451389, [39, 13, 22, 8, 35, 1]]], [[[[37, 8, 1, 0, 14, 5, 1], [38, 0, 2, 22, 7, 5, 25], [10, 3, 5, 29, 7, 12, 38], [35, 6, 7, 7, 6, 19, 16]]], [2, 154.1875, [37, 35, 38, 10]]], [[[[34, 5, 5, 1, 16, 5, 10], [1, 0, 5, 2, 8, 13, 8], [19, 9, 0, 2, 10, 3, 10], [3, 4, 1, 0, 5, 7, 3], [2, 4, 8, 2, 14, 16, 4], [29, 10, 5, 0, 10, 14, 12]]], [1, 13.055556, [19, 3, 1, 29, 34, 2]]], [[[[18, 1, 1, 9, 8, 3, 11], [16, 0, 2, 1, 11, 14, 11], [8, 1, 0, 0, 4, 4, 9]]], [1, 8.0, [8, 18, 16]]], [[[[27, 1, 8, 21, 3, 17, 23], [1, 12, 8, 3, 13, 18, 5], [18, 26, 3, 24, 38, 5, 27], [7, 13, 27, 13, 23, 30, 16]]], [0, 117.046875, [27, 1, 7, 18]]]], [[[[[27, 2, 2, 10, 12, 14, 17], [23, 0, 1, 7, 3, 8, 11], [12, 2, 1, 5, 8, 6, 15], [32, 1, 1, 6, 4, 2, 6], [36, 2, 2, 7, 9, 2, 16], [1, 1, 2, 9, 11, 9, 16], [28, 0, 1, 6, 4, 11, 8], [6, 0, 2, 3, 7, 14, 3]]], [2, 11.089844, [6, 12, 28, 32, 23, 36, 1, 27]]], [[[[29, 2, 0, 1, 3, 1, 3], [8, 0, 1, 0, 12, 12, 8], [38, 0, 0, 0, 7, 7, 12], [31, 1, 0, 2, 1, 4, 2]]], [1, 4.921875, [29, 31, 38, 8]]], [[[[5, 2, 11, 13, 6, 22, 19], [6, 1, 5, 2, 5, 14, 6], [39, 6, 11, 29, 13, 22, 34], [25, 10, 6, 9, 11, 15, 16], [16, 3, 25, 11, 6, 27, 13], [13, 1, 10, 22, 8, 20, 29]]], [2, 82.951389, [6, 25, 16, 5, 13, 39]]], [[[[3, 4, 1, 1, 9, 9, 12], [13, 10, 1, 0, 22, 10, 1], [25, 2, 7, 1, 11, 17, 6], [23, 2, 8, 0, 10, 17, 5], [24, 2, 6, 2, 5, 10, 11]]], [0, 18.46, [23, 24, 25, 3, 13]]], [[[[19, 24, 1, 0, 26, 13, 6], [24, 27, 0, 1, 33, 5, 13], [12, 16, 0, 2, 25, 4, 11], [30, 5, 2, 0, 8, 12, 12], [22, 27, 0, 1, 38, 7, 7], [14, 30, 1, 1, 37, 3, 2], [23, 25, 1, 2, 36, 3, 13], [9, 2, 2, 0, 3, 10, 3]]], [0, 125.921875, [9, 30, 12, 19, 23, 22, 24, 14]]], [[[[22, 2, 2, 2, 7, 13, 8], [23, 0, 1, 0, 4, 8, 12], [1, 0, 1, 2, 3, 13, 4], [34, 2, 1, 2, 14, 6, 5]]], [0, 6.625, [1, 23, 22, 34]]], [[[[17, 4, 15, 6, 14, 24, 10], [18, 7, 30, 4, 8, 31, 4], [38, 9, 9, 7, 15, 16, 11], [35, 24, 0, 4, 25, 12, 12], [14, 7, 22, 1, 19, 31, 4]]], [1, 80.0, [35, 38, 17, 14, 18]]], [[[[39, 9, 10, 0, 20, 17, 8], [9, 5, 9, 16, 10, 20, 24], [4, 3, 10, 6, 12, 18, 14]]], [2, 43.555556, [39, 4, 9]]]], [[[[[9, 7, 1, 0, 9, 12, 8], [30, 26, 0, 4, 35, 9, 12], [29, 27, 1, 3, 31, 12, 11]]], [0, 105.5, [9, 30, 29]]], [[[[36, 1, 23, 5, 8, 33, 5], [15, 22, 14, 4, 30, 18, 9], [7, 14, 23, 4, 14, 26, 13], [35, 28, 11, 8, 38, 12, 9]]], [0, 119.921875, [36, 7, 15, 35]]], [[[[23, 23, 14, 0, 35, 18, 11], [31, 23, 5, 16, 26, 8, 19], [2, 0, 10, 28, 10, 21, 29], [18, 7, 19, 0, 17, 20, 5], [12, 7, 19, 14, 7, 25, 26], [36, 17, 1, 23, 18, 13, 29]]], [2, 94.055556, [18, 23, 12, 31, 36, 2]]], [[[[37, 20, 2, 0, 26, 9, 11], [30, 6, 9, 2, 9, 16, 12]]], [0, 60.0625, [30, 37]]], [[[[12, 1, 8, 2, 5, 16, 14], [10, 2, 2, 2, 7, 8, 3], [31, 1, 7, 2, 3, 7, 10], [36, 0, 3, 0, 10, 15, 0], [39, 1, 4, 0, 12, 15, 4], [25, 2, 0, 2, 2, 4, 5]]], [1, 10.534722, [25, 10, 36, 39, 31, 12]]], [[[[13, 5, 25, 23, 5, 26, 29], [19, 24, 6, 27, 32, 14, 33], [17, 1, 2, 17, 11, 9, 22], [4, 21, 25, 22, 27, 30, 24], [27, 29, 26, 1, 38, 30, 9], [30, 11, 22, 2, 13, 32, 7]]], [0, 120.868056, [17, 13, 30, 4, 19, 27]]], [[[[18, 10, 21, 1, 14, 27, 2], [16, 20, 5, 1, 26, 8, 11], [1, 6, 4, 2, 9, 7, 11]]], [1, 72.166667, [1, 16, 18]]], [[[[11, 2, 2, 10, 6, 5, 15], [28, 6, 2, 19, 11, 13, 25], [24, 3, 2, 18, 8, 3, 21], [8, 3, 1, 28, 12, 6, 38]]], [2, 54.3125, [11, 24, 28, 8]]]]]\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-sap-axis-variance-centre-coordinate","generated_at":"2026-09-29T14:51:00.860752+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.","repair":"Use (min+max)/2 per axis.","root_cause":"The spread uses min coordinates instead of centres.","sha256":"ce2cfc1c35fe8065282eb5e7be64fd6fdd1dc37a00a711c68f00e1177ce89957","title":"Axis variance is computed from box minima · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.103,"exit_code":1,"observations":[{"actual":[0,232.666667,[8,18,11]],"check":"case 0","expected":[0,58.166667,[8,18,11]],"passed":false},{"actual":[0,81.0,[37,14]],"check":"case 1","expected":[0,20.25,[37,14]],"passed":false},{"actual":[2,357.888889,[32,6,3,20,4,28]],"check":"case 2","expected":[2,89.472222,[32,6,3,20,4,28]],"passed":false},{"actual":[1,633.2,[18,5,10,15,17]],"check":"case 3","expected":[1,158.3,[18,5,10,15,17]],"passed":false},{"actual":[1,36.0,[15,9]],"check":"case 4","expected":[1,9.0,[15,9]],"passed":false},{"actual":[2,324.0,[1,8]],"check":"case 5","expected":[2,81.0,[1,8]],"passed":false},{"actual":[2,64.0,[4,32]],"check":"case 6","expected":[2,16.0,[4,32]],"passed":false},{"actual":[0,125.5,[7,12,26,35]],"check":"case 7","expected":[0,31.375,[7,12,26,35]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [0, 232.666667, [8, 18, 11]], \"expected\": [0, 58.166667, [8, 18, 11]], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [0, 81.0, [37, 14]], \"expected\": [0, 20.25, [37, 14]], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [2, 357.888889, [32, 6, 3, 20, 4, 28]], \"expected\": [2, 89.472222, [32, 6, 3, 20, 4, 28]], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [1, 633.2, [18, 5, 10, 15, 17]], \"expected\": [1, 158.3, [18, 5, 10, 15, 17]], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [1, 36.0, [15, 9]], \"expected\": [1, 9.0, [15, 9]], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [2, 324.0, [1, 8]], \"expected\": [2, 81.0, [1, 8]], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [2, 64.0, [4, 32]], \"expected\": [2, 16.0, [4, 32]], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [0, 125.5, [7, 12, 26, 35]], \"expected\": [0, 31.375, [7, 12, 26, 35]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.549,"exit_code":1,"observations":[{"actual":[0,50.888889,[8,18,11]],"check":"case 0","expected":[0,58.166667,[8,18,11]],"passed":false},{"actual":[0,6.25,[37,14]],"check":"case 1","expected":[0,20.25,[37,14]],"passed":false},{"actual":[2,74.666667,[32,6,3,20,4,28]],"check":"case 2","expected":[2,89.472222,[32,6,3,20,4,28]],"passed":false},{"actual":[1,117.84,[18,5,10,15,17]],"check":"case 3","expected":[1,158.3,[18,5,10,15,17]],"passed":false},{"actual":[1,9.0,[15,9]],"check":"case 4","expected":[1,9.0,[15,9]],"passed":true},{"actual":[2,81.0,[1,8]],"check":"case 5","expected":[2,81.0,[1,8]],"passed":true},{"actual":[2,16.0,[4,32]],"check":"case 6","expected":[2,16.0,[4,32]],"passed":true},{"actual":[0,23.1875,[7,12,26,35]],"check":"case 7","expected":[0,31.375,[7,12,26,35]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [0, 50.888889, [8, 18, 11]], \"expected\": [0, 58.166667, [8, 18, 11]], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [0, 6.25, [37, 14]], \"expected\": [0, 20.25, [37, 14]], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [2, 74.666667, [32, 6, 3, 20, 4, 28]], \"expected\": [2, 89.472222, [32, 6, 3, 20, 4, 28]], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [1, 117.84, [18, 5, 10, 15, 17]], \"expected\": [1, 158.3, [18, 5, 10, 15, 17]], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [1, 9.0, [15, 9]], \"expected\": [1, 9.0, [15, 9]], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [2, 81.0, [1, 8]], \"expected\": [2, 81.0, [1, 8]], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [2, 16.0, [4, 32]], \"expected\": [2, 16.0, [4, 32]], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [0, 23.1875, [7, 12, 26, 35]], \"expected\": [0, 31.375, [7, 12, 26, 35]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.567,"exit_code":0,"observations":[{"actual":[0,58.166667,[8,18,11]],"check":"case 0","expected":[0,58.166667,[8,18,11]],"passed":true},{"actual":[0,20.25,[37,14]],"check":"case 1","expected":[0,20.25,[37,14]],"passed":true},{"actual":[2,89.472222,[32,6,3,20,4,28]],"check":"case 2","expected":[2,89.472222,[32,6,3,20,4,28]],"passed":true},{"actual":[1,158.3,[18,5,10,15,17]],"check":"case 3","expected":[1,158.3,[18,5,10,15,17]],"passed":true},{"actual":[1,9.0,[15,9]],"check":"case 4","expected":[1,9.0,[15,9]],"passed":true},{"actual":[2,81.0,[1,8]],"check":"case 5","expected":[2,81.0,[1,8]],"passed":true},{"actual":[2,16.0,[4,32]],"check":"case 6","expected":[2,16.0,[4,32]],"passed":true},{"actual":[0,31.375,[7,12,26,35]],"check":"case 7","expected":[0,31.375,[7,12,26,35]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [0, 58.166667, [8, 18, 11]], \"expected\": [0, 58.166667, [8, 18, 11]], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [0, 20.25, [37, 14]], \"expected\": [0, 20.25, [37, 14]], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [2, 89.472222, [32, 6, 3, 20, 4, 28]], \"expected\": [2, 89.472222, [32, 6, 3, 20, 4, 28]], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [1, 158.3, [18, 5, 10, 15, 17]], \"expected\": [1, 158.3, [18, 5, 10, 15, 17]], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [1, 9.0, [15, 9]], \"expected\": [1, 9.0, [15, 9]], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [2, 81.0, [1, 8]], \"expected\": [2, 81.0, [1, 8]], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [2, 16.0, [4, 32]], \"expected\": [2, 16.0, [4, 32]], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [0, 31.375, [7, 12, 26, 35]], \"expected\": [0, 31.375, [7, 12, 26, 35]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}