{"abstract":"At high frame rates everything is flagged for CCD.","category":"Collision detection broadphase","checks":8,"contract":"solve(box, vel, dt, margin, others): CCD broadphase bounds. Swept box = union of box at t and t+dt expanded by margin on all sides. fast = displacement length > half the smaller box extent. Return [swept rounded to 6, fast, sorted ids of others ([id,minx,miny,maxx,maxy]) overlapping the swept box with closed intervals].","evaluation_group":"w2-collision_detection_broadphase-swept-ccd-bounds","failed_approach":"Dropping the one-half factor flags too few objects.","family":"w2-collision_detection_broadphase-swept-ccd-bounds-fast-mover-displacement","id":"FA-87701","implementations":{"attempt":{"sha256":"ab5c453ce2e207bfa3dea5c38f2d7b18183213a3a20e29cc52094642d6b63d86","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(box, vel, dt, margin, others):\n    dx, dy = vel[0] * dt, vel[1] * dt\n    sw = [min(box[0], box[0] + dx) - margin, min(box[1], box[1] + dy) - margin,\n          max(box[2], box[2] + dx) + margin, max(box[3], box[3] + dy) + margin]\n    ext = min(box[2] - box[0], box[3] - box[1])\n    fast = math.hypot(vel[0], vel[1]) * dt > ext\n    hits = sorted(o[0] for o in others if o[1] <= sw[2] and sw[0] <= o[3] and o[2] <= sw[3] and sw[1] <= o[4])\n    return [[round(c, 6) for c in sw], fast, hits]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[4, 2, 6, 2.5], [-2, 3], 0.125, 0.25, [[16, -4, 4, -3, 5], [3, -1, 6, 0, 6]]], [[3.5, 1.75, 6.25, 3.125], True, []]], [[[1, 1, 1.5, 4], [-2, 16], 0.125, 0.25, [[3, 3, 2, 3, 4], [21, 6, 4, 6, 4]]], [[0.5, 0.75, 1.75, 6.25], True, []]], [[[-3, 2, -2, 5], [-2, 3], 0.0625, 0.5, [[21, -4, -7, -4, -5], [3, -1, 7, 0, 7], [8, 2, -3, 2, -1], [5, 7, 0, 9, 1], [14, -4, -4, -4, -2]]], [[-3.625, 1.5, -1.5, 5.6875], False, []]], [[[0, -1, 2, 2], [2, -3], 0.125, 0.0, [[22, -8, 2, -8, 3], [11, -7, -4, -7, -2]]], [[0.0, -1.375, 2.25, 2.0], False, []]], [[[-1, 3, 1, 3.5], [-12, -3], 0.25, 0.0, [[15, -3, -7, -2, -7], [23, 1, -3, 2, -1], [6, -2, 6, -2, 7]]], [[-4.0, 2.25, 1.0, 3.5], True, []]], [[[-3, 3, -2.5, 4], [-2, 3], 0.25, 0.0, [[9, -8, 8, -6, 10], [14, -8, 0, -8, 0]]], [[-3.5, 3.0, -2.5, 4.75], True, []]], [[[-3, 2, -2, 5], [2, 0], 0.125, 0.0, [[17, -8, -8, -8, -7]]], [[-3.0, 2.0, -1.75, 5.0], False, []]], [[[-2, -3, -1.5, -2], [2, 0], 0.25, 0.25, [[3, 3, 2, 4, 4], [2, -8, 2, -6, 4], [14, -8, -4, -8, -2]]], [[-2.25, -3.25, -0.75, -1.75], True, []]]], [[[[-2, 2, 0, 5], [30, 16], 0.125, 0.25, [[11, -1, 8, -1, 9], [1, -6, 3, -5, 4], [15, -1, 2, 1, 4], [20, 2, 4, 2, 5], [14, -4, 3, -3, 4]]], [[-2.25, 1.75, 4.0, 7.25], True, [15, 20]]], [[[1, -3, 3, 0], [8, -3], 0.0625, 0.0, [[27, -7, 7, -7, 8], [5, -3, 0, -2, 2], [21, 2, 2, 2, 3]]], [[1.0, -3.1875, 3.5, 0.0], False, []]], [[[3, 1, 4, 2], [-2, -3], 0.25, 0.25, [[2, -6, -4, -4, -3], [22, -6, 1, -6, 1], [11, 1, 5, 2, 5], [15, -1, -8, 0, -8]]], [[2.25, 0.0, 4.25, 2.25], True, []]], [[[2, 3, 4, 3.5], [0, 3], 0.25, 0.25, [[25, 5, 7, 5, 7], [20, 7, -1, 9, 1], [24, 2, -8, 4, -8], [28, -3, -7, -3, -7]]], [[1.75, 2.75, 4.25, 4.5], True, []]], [[[2, -1, 4, 0], [0, 16], 0.25, 0.5, [[12, -8, -4, -8, -4], [19, 7, 2, 7, 2], [16, -2, 2, -2, 4]]], [[1.5, -1.5, 4.5, 4.5], True, []]], [[[1, 1, 3, 4], [0, -3], 0.25, 0.5, [[17, -6, 0, -6, 2], [11, -5, -5, -4, -3]]], [[0.5, -0.25, 3.5, 4.5], False, []]], [[[-3, -3, -1, -2], [-12, 3], 0.0625, 0.5, [[3, -3, -5, -1, -5], [24, -6, -2, -5, -1]]], [[-4.25, -3.5, -0.5, -1.3125], True, []]], [[[-4, -4, -2, -3], [-2, 3], 0.0625, 0.0, [[22, -7, -8, -7, -6], [20, 1, -3, 3, -1]]], [[-4.125, -4.0, -2.0, -2.8125], False, []]]], [[[[-3, -2, -2, -1], [-2, -3], 0.25, 0.5, [[29, -1, -6, 1, -6], [3, -3, -5, -2, -4], [13, -8, 0, -6, 0]]], [[-4.0, -3.25, -1.5, -0.5], True, []]], [[[3, -2, 3.5, -1], [2, 0], 0.125, 0.0, [[7, 3, 4, 3, 6], [18, 0, -1, 2, 0], [23, -3, -8, -1, -8]]], [[3.0, -2.0, 3.75, -1.0], False, []]], [[[1, 0, 1.5, 0.5], [-2, 0], 0.25, 0.0, [[21, 2, 4, 3, 6], [14, 3, 7, 3, 9], [9, 1, 2, 2, 3], [25, 8, 2, 10, 2], [20, -4, -5, -3, -5]]], [[0.5, 0.0, 1.5, 0.5], True, []]], [[[-2, -4, -1.5, -1], [0, 16], 0.0625, 0.25, [[27, 3, 5, 4, 6], [10, 8, 3, 10, 3], [2, -2, 6, -1, 8], [15, -2, 0, 0, 0], [12, 2, -7, 3, -7]]], [[-2.25, -4.25, -1.25, 0.25], True, [15]]], [[[-2, -2, -1, -1.5], [-2, -3], 0.0625, 0.25, [[14, 0, 7, 0, 8], [20, -2, 2, -1, 4]]], [[-2.375, -2.4375, -0.75, -1.25], False, []]], [[[-3, -4, -2, -3], [8, 0], 0.0625, 0.25, [[8, 2, -1, 3, 0], [16, -1, 8, -1, 10]]], [[-3.25, -4.25, -1.25, -2.75], False, []]], [[[-2, 2, -1.5, 5], [0, -3], 0.125, 0.5, [[23, -4, 0, -4, 2], [22, -6, -3, -6, -1], [7, 8, -1, 8, 1], [4, -4, -4, -3, -2]]], [[-2.5, 1.125, -1.0, 5.5], True, []]], [[[-2, 3, -1.5, 6], [30, -3], 0.125, 0.25, [[21, 1, 4, 3, 4], [25, -1, 2, 0, 4], [8, -3, 4, -1, 5], [6, 2, -2, 4, 0], [16, 2, 7, 4, 9]]], [[-2.25, 2.375, 2.5, 6.25], True, [8, 21, 25]]]], [[[[-3, -4, -2, -3], [-2, 3], 0.25, 0.25, [[28, 6, 3, 7, 3], [20, 1, 3, 3, 4], [17, -5, -6, -4, -5]]], [[-3.75, -4.25, -1.75, -2.0], True, []]], [[[4, -1, 5, 0], [0, 3], 0.125, 0.5, [[11, 7, -5, 7, -5], [17, -1, -1, 0, 0], [8, -5, 0, -5, 0]]], [[3.5, -1.5, 5.5, 0.875], False, []]], [[[1, 0, 3, 3], [30, -20], 0.25, 0.0, [[10, -5, -3, -3, -3], [20, -7, -1, -7, 0], [17, -8, -6, -6, -4]]], [[1.0, -5.0, 10.5, 3.0], True, []]], [[[3, -1, 3.5, 0], [2, 3], 0.0625, 0.5, [[13, 6, -8, 8, -6], [19, 6, 2, 8, 2]]], [[2.5, -1.5, 4.125, 0.6875], False, []]], [[[-3, -3, -2.5, -2.5], [2, 16], 0.25, 0.25, [[7, -5, 6, -5, 8], [16, -1, 7, 0, 9], [26, 4, 7, 6, 8], [27, 4, 4, 6, 5]]], [[-3.25, -3.25, -1.75, 1.75], True, []]], [[[-4, -2, -2, -1.5], [8, 0], 0.0625, 0.25, [[11, -7, 8, -6, 9], [19, 5, -3, 6, -1], [29, -3, 3, -2, 5], [6, 3, 8, 4, 8], [16, -7, -8, -7, -7]]], [[-4.25, -2.25, -1.25, -1.25], True, []]], [[[0, -3, 0.5, -2], [2, 3], 0.0625, 0.25, [[16, 4, -6, 5, -5], [1, 7, -4, 8, -3], [20, 0, -6, 0, -6], [21, 0, -3, 2, -2]]], [[-0.25, -3.25, 0.875, -1.5625], False, [21]]], [[[2, -4, 3, -1], [30, 0], 0.25, 0.5, [[19, 8, -3, 9, -3], [21, -7, -8, -7, -7], [26, 4, 7, 5, 7], [27, 3, 4, 4, 4]]], [[1.5, -4.5, 11.0, -0.5], True, [19]]]], [[[[3, 0, 5, 3], [2, 16], 0.0625, 0.25, [[28, 1, 0, 2, 1]]], [[2.75, -0.25, 5.375, 4.25], True, []]], [[[3, 0, 4, 1], [-2, 3], 0.0625, 0.0, [[26, 3, 4, 3, 6], [10, -1, -4, 1, -4]]], [[2.875, 0.0, 4.0, 1.1875], False, []]], [[[-3, -3, -2, -2.5], [2, 3], 0.0625, 0.5, [[15, 7, 7, 7, 8], [5, -7, 4, -6, 4], [9, 8, -8, 8, -8]]], [[-3.5, -3.5, -1.375, -1.8125], False, []]], [[[-4, -3, -3, -2], [2, 3], 0.25, 0.0, [[20, 1, 0, 3, 1], [25, 5, -2, 6, -1], [9, 6, -3, 7, -3], [15, 1, 0, 1, 0], [19, 0, -6, 2, -6]]], [[-4.0, -3.0, -2.5, -1.25], True, []]], [[[-1, 1, -0.5, 2], [0, 0], 0.0625, 0.5, [[27, -3, -8, -2, -8]]], [[-1.5, 0.5, 0.0, 2.5], False, []]], [[[-1, 1, -0.5, 1.5], [-2, 0], 0.25, 0.25, [[20, 6, 5, 6, 7], [13, -5, 6, -5, 8], [12, 0, -2, 2, 0]]], [[-1.75, 0.75, -0.25, 1.75], True, []]], [[[4, 2, 5, 5], [0, 3], 0.125, 0.5, [[15, 7, -4, 9, -3], [4, 6, 8, 8, 8], [9, 2, 1, 2, 2], [19, 2, 6, 3, 8], [24, 5, -2, 6, 0]]], [[3.5, 1.5, 5.5, 5.875], False, []]], [[[-3, 4, -1, 7], [30, 0], 0.0625, 0.5, [[13, -6, -8, -6, -7]]], [[-3.5, 3.5, 1.375, 7.5], True, []]]]]\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":"d7d3d5b1d0ba73eb0eccea5464f361b6ddfe3d2aa998321fad13e793763544c8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(box, vel, dt, margin, others):\n    dx, dy = vel[0] * dt, vel[1] * dt\n    sw = [min(box[0], box[0] + dx) - margin, min(box[1], box[1] + dy) - margin,\n          max(box[2], box[2] + dx) + margin, max(box[3], box[3] + dy) + margin]\n    ext = min(box[2] - box[0], box[3] - box[1])\n    fast = math.hypot(vel[0], vel[1]) > 0.5 * ext\n    hits = sorted(o[0] for o in others if o[1] <= sw[2] and sw[0] <= o[3] and o[2] <= sw[3] and sw[1] <= o[4])\n    return [[round(c, 6) for c in sw], fast, hits]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[4, 2, 6, 2.5], [-2, 3], 0.125, 0.25, [[16, -4, 4, -3, 5], [3, -1, 6, 0, 6]]], [[3.5, 1.75, 6.25, 3.125], True, []]], [[[1, 1, 1.5, 4], [-2, 16], 0.125, 0.25, [[3, 3, 2, 3, 4], [21, 6, 4, 6, 4]]], [[0.5, 0.75, 1.75, 6.25], True, []]], [[[-3, 2, -2, 5], [-2, 3], 0.0625, 0.5, [[21, -4, -7, -4, -5], [3, -1, 7, 0, 7], [8, 2, -3, 2, -1], [5, 7, 0, 9, 1], [14, -4, -4, -4, -2]]], [[-3.625, 1.5, -1.5, 5.6875], False, []]], [[[0, -1, 2, 2], [2, -3], 0.125, 0.0, [[22, -8, 2, -8, 3], [11, -7, -4, -7, -2]]], [[0.0, -1.375, 2.25, 2.0], False, []]], [[[-1, 3, 1, 3.5], [-12, -3], 0.25, 0.0, [[15, -3, -7, -2, -7], [23, 1, -3, 2, -1], [6, -2, 6, -2, 7]]], [[-4.0, 2.25, 1.0, 3.5], True, []]], [[[-3, 3, -2.5, 4], [-2, 3], 0.25, 0.0, [[9, -8, 8, -6, 10], [14, -8, 0, -8, 0]]], [[-3.5, 3.0, -2.5, 4.75], True, []]], [[[-3, 2, -2, 5], [2, 0], 0.125, 0.0, [[17, -8, -8, -8, -7]]], [[-3.0, 2.0, -1.75, 5.0], False, []]], [[[-2, -3, -1.5, -2], [2, 0], 0.25, 0.25, [[3, 3, 2, 4, 4], [2, -8, 2, -6, 4], [14, -8, -4, -8, -2]]], [[-2.25, -3.25, -0.75, -1.75], True, []]]], [[[[-2, 2, 0, 5], [30, 16], 0.125, 0.25, [[11, -1, 8, -1, 9], [1, -6, 3, -5, 4], [15, -1, 2, 1, 4], [20, 2, 4, 2, 5], [14, -4, 3, -3, 4]]], [[-2.25, 1.75, 4.0, 7.25], True, [15, 20]]], [[[1, -3, 3, 0], [8, -3], 0.0625, 0.0, [[27, -7, 7, -7, 8], [5, -3, 0, -2, 2], [21, 2, 2, 2, 3]]], [[1.0, -3.1875, 3.5, 0.0], False, []]], [[[3, 1, 4, 2], [-2, -3], 0.25, 0.25, [[2, -6, -4, -4, -3], [22, -6, 1, -6, 1], [11, 1, 5, 2, 5], [15, -1, -8, 0, -8]]], [[2.25, 0.0, 4.25, 2.25], True, []]], [[[2, 3, 4, 3.5], [0, 3], 0.25, 0.25, [[25, 5, 7, 5, 7], [20, 7, -1, 9, 1], [24, 2, -8, 4, -8], [28, -3, -7, -3, -7]]], [[1.75, 2.75, 4.25, 4.5], True, []]], [[[2, -1, 4, 0], [0, 16], 0.25, 0.5, [[12, -8, -4, -8, -4], [19, 7, 2, 7, 2], [16, -2, 2, -2, 4]]], [[1.5, -1.5, 4.5, 4.5], True, []]], [[[1, 1, 3, 4], [0, -3], 0.25, 0.5, [[17, -6, 0, -6, 2], [11, -5, -5, -4, -3]]], [[0.5, -0.25, 3.5, 4.5], False, []]], [[[-3, -3, -1, -2], [-12, 3], 0.0625, 0.5, [[3, -3, -5, -1, -5], [24, -6, -2, -5, -1]]], [[-4.25, -3.5, -0.5, -1.3125], True, []]], [[[-4, -4, -2, -3], [-2, 3], 0.0625, 0.0, [[22, -7, -8, -7, -6], [20, 1, -3, 3, -1]]], [[-4.125, -4.0, -2.0, -2.8125], False, []]]], [[[[-3, -2, -2, -1], [-2, -3], 0.25, 0.5, [[29, -1, -6, 1, -6], [3, -3, -5, -2, -4], [13, -8, 0, -6, 0]]], [[-4.0, -3.25, -1.5, -0.5], True, []]], [[[3, -2, 3.5, -1], [2, 0], 0.125, 0.0, [[7, 3, 4, 3, 6], [18, 0, -1, 2, 0], [23, -3, -8, -1, -8]]], [[3.0, -2.0, 3.75, -1.0], False, []]], [[[1, 0, 1.5, 0.5], [-2, 0], 0.25, 0.0, [[21, 2, 4, 3, 6], [14, 3, 7, 3, 9], [9, 1, 2, 2, 3], [25, 8, 2, 10, 2], [20, -4, -5, -3, -5]]], [[0.5, 0.0, 1.5, 0.5], True, []]], [[[-2, -4, -1.5, -1], [0, 16], 0.0625, 0.25, [[27, 3, 5, 4, 6], [10, 8, 3, 10, 3], [2, -2, 6, -1, 8], [15, -2, 0, 0, 0], [12, 2, -7, 3, -7]]], [[-2.25, -4.25, -1.25, 0.25], True, [15]]], [[[-2, -2, -1, -1.5], [-2, -3], 0.0625, 0.25, [[14, 0, 7, 0, 8], [20, -2, 2, -1, 4]]], [[-2.375, -2.4375, -0.75, -1.25], False, []]], [[[-3, -4, -2, -3], [8, 0], 0.0625, 0.25, [[8, 2, -1, 3, 0], [16, -1, 8, -1, 10]]], [[-3.25, -4.25, -1.25, -2.75], False, []]], [[[-2, 2, -1.5, 5], [0, -3], 0.125, 0.5, [[23, -4, 0, -4, 2], [22, -6, -3, -6, -1], [7, 8, -1, 8, 1], [4, -4, -4, -3, -2]]], [[-2.5, 1.125, -1.0, 5.5], True, []]], [[[-2, 3, -1.5, 6], [30, -3], 0.125, 0.25, [[21, 1, 4, 3, 4], [25, -1, 2, 0, 4], [8, -3, 4, -1, 5], [6, 2, -2, 4, 0], [16, 2, 7, 4, 9]]], [[-2.25, 2.375, 2.5, 6.25], True, [8, 21, 25]]]], [[[[-3, -4, -2, -3], [-2, 3], 0.25, 0.25, [[28, 6, 3, 7, 3], [20, 1, 3, 3, 4], [17, -5, -6, -4, -5]]], [[-3.75, -4.25, -1.75, -2.0], True, []]], [[[4, -1, 5, 0], [0, 3], 0.125, 0.5, [[11, 7, -5, 7, -5], [17, -1, -1, 0, 0], [8, -5, 0, -5, 0]]], [[3.5, -1.5, 5.5, 0.875], False, []]], [[[1, 0, 3, 3], [30, -20], 0.25, 0.0, [[10, -5, -3, -3, -3], [20, -7, -1, -7, 0], [17, -8, -6, -6, -4]]], [[1.0, -5.0, 10.5, 3.0], True, []]], [[[3, -1, 3.5, 0], [2, 3], 0.0625, 0.5, [[13, 6, -8, 8, -6], [19, 6, 2, 8, 2]]], [[2.5, -1.5, 4.125, 0.6875], False, []]], [[[-3, -3, -2.5, -2.5], [2, 16], 0.25, 0.25, [[7, -5, 6, -5, 8], [16, -1, 7, 0, 9], [26, 4, 7, 6, 8], [27, 4, 4, 6, 5]]], [[-3.25, -3.25, -1.75, 1.75], True, []]], [[[-4, -2, -2, -1.5], [8, 0], 0.0625, 0.25, [[11, -7, 8, -6, 9], [19, 5, -3, 6, -1], [29, -3, 3, -2, 5], [6, 3, 8, 4, 8], [16, -7, -8, -7, -7]]], [[-4.25, -2.25, -1.25, -1.25], True, []]], [[[0, -3, 0.5, -2], [2, 3], 0.0625, 0.25, [[16, 4, -6, 5, -5], [1, 7, -4, 8, -3], [20, 0, -6, 0, -6], [21, 0, -3, 2, -2]]], [[-0.25, -3.25, 0.875, -1.5625], False, [21]]], [[[2, -4, 3, -1], [30, 0], 0.25, 0.5, [[19, 8, -3, 9, -3], [21, -7, -8, -7, -7], [26, 4, 7, 5, 7], [27, 3, 4, 4, 4]]], [[1.5, -4.5, 11.0, -0.5], True, [19]]]], [[[[3, 0, 5, 3], [2, 16], 0.0625, 0.25, [[28, 1, 0, 2, 1]]], [[2.75, -0.25, 5.375, 4.25], True, []]], [[[3, 0, 4, 1], [-2, 3], 0.0625, 0.0, [[26, 3, 4, 3, 6], [10, -1, -4, 1, -4]]], [[2.875, 0.0, 4.0, 1.1875], False, []]], [[[-3, -3, -2, -2.5], [2, 3], 0.0625, 0.5, [[15, 7, 7, 7, 8], [5, -7, 4, -6, 4], [9, 8, -8, 8, -8]]], [[-3.5, -3.5, -1.375, -1.8125], False, []]], [[[-4, -3, -3, -2], [2, 3], 0.25, 0.0, [[20, 1, 0, 3, 1], [25, 5, -2, 6, -1], [9, 6, -3, 7, -3], [15, 1, 0, 1, 0], [19, 0, -6, 2, -6]]], [[-4.0, -3.0, -2.5, -1.25], True, []]], [[[-1, 1, -0.5, 2], [0, 0], 0.0625, 0.5, [[27, -3, -8, -2, -8]]], [[-1.5, 0.5, 0.0, 2.5], False, []]], [[[-1, 1, -0.5, 1.5], [-2, 0], 0.25, 0.25, [[20, 6, 5, 6, 7], [13, -5, 6, -5, 8], [12, 0, -2, 2, 0]]], [[-1.75, 0.75, -0.25, 1.75], True, []]], [[[4, 2, 5, 5], [0, 3], 0.125, 0.5, [[15, 7, -4, 9, -3], [4, 6, 8, 8, 8], [9, 2, 1, 2, 2], [19, 2, 6, 3, 8], [24, 5, -2, 6, 0]]], [[3.5, 1.5, 5.5, 5.875], False, []]], [[[-3, 4, -1, 7], [30, 0], 0.0625, 0.5, [[13, -6, -8, -6, -7]]], [[-3.5, 3.5, 1.375, 7.5], True, []]]]]\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":"e7096208f1170e35b6caa18971ef2354351393170efa7b25eda991ebd36933fe","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(box, vel, dt, margin, others):\n    dx, dy = vel[0] * dt, vel[1] * dt\n    sw = [min(box[0], box[0] + dx) - margin, min(box[1], box[1] + dy) - margin,\n          max(box[2], box[2] + dx) + margin, max(box[3], box[3] + dy) + margin]\n    ext = min(box[2] - box[0], box[3] - box[1])\n    fast = math.hypot(dx, dy) > 0.5 * ext\n    hits = sorted(o[0] for o in others if o[1] <= sw[2] and sw[0] <= o[3] and o[2] <= sw[3] and sw[1] <= o[4])\n    return [[round(c, 6) for c in sw], fast, hits]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[4, 2, 6, 2.5], [-2, 3], 0.125, 0.25, [[16, -4, 4, -3, 5], [3, -1, 6, 0, 6]]], [[3.5, 1.75, 6.25, 3.125], True, []]], [[[1, 1, 1.5, 4], [-2, 16], 0.125, 0.25, [[3, 3, 2, 3, 4], [21, 6, 4, 6, 4]]], [[0.5, 0.75, 1.75, 6.25], True, []]], [[[-3, 2, -2, 5], [-2, 3], 0.0625, 0.5, [[21, -4, -7, -4, -5], [3, -1, 7, 0, 7], [8, 2, -3, 2, -1], [5, 7, 0, 9, 1], [14, -4, -4, -4, -2]]], [[-3.625, 1.5, -1.5, 5.6875], False, []]], [[[0, -1, 2, 2], [2, -3], 0.125, 0.0, [[22, -8, 2, -8, 3], [11, -7, -4, -7, -2]]], [[0.0, -1.375, 2.25, 2.0], False, []]], [[[-1, 3, 1, 3.5], [-12, -3], 0.25, 0.0, [[15, -3, -7, -2, -7], [23, 1, -3, 2, -1], [6, -2, 6, -2, 7]]], [[-4.0, 2.25, 1.0, 3.5], True, []]], [[[-3, 3, -2.5, 4], [-2, 3], 0.25, 0.0, [[9, -8, 8, -6, 10], [14, -8, 0, -8, 0]]], [[-3.5, 3.0, -2.5, 4.75], True, []]], [[[-3, 2, -2, 5], [2, 0], 0.125, 0.0, [[17, -8, -8, -8, -7]]], [[-3.0, 2.0, -1.75, 5.0], False, []]], [[[-2, -3, -1.5, -2], [2, 0], 0.25, 0.25, [[3, 3, 2, 4, 4], [2, -8, 2, -6, 4], [14, -8, -4, -8, -2]]], [[-2.25, -3.25, -0.75, -1.75], True, []]]], [[[[-2, 2, 0, 5], [30, 16], 0.125, 0.25, [[11, -1, 8, -1, 9], [1, -6, 3, -5, 4], [15, -1, 2, 1, 4], [20, 2, 4, 2, 5], [14, -4, 3, -3, 4]]], [[-2.25, 1.75, 4.0, 7.25], True, [15, 20]]], [[[1, -3, 3, 0], [8, -3], 0.0625, 0.0, [[27, -7, 7, -7, 8], [5, -3, 0, -2, 2], [21, 2, 2, 2, 3]]], [[1.0, -3.1875, 3.5, 0.0], False, []]], [[[3, 1, 4, 2], [-2, -3], 0.25, 0.25, [[2, -6, -4, -4, -3], [22, -6, 1, -6, 1], [11, 1, 5, 2, 5], [15, -1, -8, 0, -8]]], [[2.25, 0.0, 4.25, 2.25], True, []]], [[[2, 3, 4, 3.5], [0, 3], 0.25, 0.25, [[25, 5, 7, 5, 7], [20, 7, -1, 9, 1], [24, 2, -8, 4, -8], [28, -3, -7, -3, -7]]], [[1.75, 2.75, 4.25, 4.5], True, []]], [[[2, -1, 4, 0], [0, 16], 0.25, 0.5, [[12, -8, -4, -8, -4], [19, 7, 2, 7, 2], [16, -2, 2, -2, 4]]], [[1.5, -1.5, 4.5, 4.5], True, []]], [[[1, 1, 3, 4], [0, -3], 0.25, 0.5, [[17, -6, 0, -6, 2], [11, -5, -5, -4, -3]]], [[0.5, -0.25, 3.5, 4.5], False, []]], [[[-3, -3, -1, -2], [-12, 3], 0.0625, 0.5, [[3, -3, -5, -1, -5], [24, -6, -2, -5, -1]]], [[-4.25, -3.5, -0.5, -1.3125], True, []]], [[[-4, -4, -2, -3], [-2, 3], 0.0625, 0.0, [[22, -7, -8, -7, -6], [20, 1, -3, 3, -1]]], [[-4.125, -4.0, -2.0, -2.8125], False, []]]], [[[[-3, -2, -2, -1], [-2, -3], 0.25, 0.5, [[29, -1, -6, 1, -6], [3, -3, -5, -2, -4], [13, -8, 0, -6, 0]]], [[-4.0, -3.25, -1.5, -0.5], True, []]], [[[3, -2, 3.5, -1], [2, 0], 0.125, 0.0, [[7, 3, 4, 3, 6], [18, 0, -1, 2, 0], [23, -3, -8, -1, -8]]], [[3.0, -2.0, 3.75, -1.0], False, []]], [[[1, 0, 1.5, 0.5], [-2, 0], 0.25, 0.0, [[21, 2, 4, 3, 6], [14, 3, 7, 3, 9], [9, 1, 2, 2, 3], [25, 8, 2, 10, 2], [20, -4, -5, -3, -5]]], [[0.5, 0.0, 1.5, 0.5], True, []]], [[[-2, -4, -1.5, -1], [0, 16], 0.0625, 0.25, [[27, 3, 5, 4, 6], [10, 8, 3, 10, 3], [2, -2, 6, -1, 8], [15, -2, 0, 0, 0], [12, 2, -7, 3, -7]]], [[-2.25, -4.25, -1.25, 0.25], True, [15]]], [[[-2, -2, -1, -1.5], [-2, -3], 0.0625, 0.25, [[14, 0, 7, 0, 8], [20, -2, 2, -1, 4]]], [[-2.375, -2.4375, -0.75, -1.25], False, []]], [[[-3, -4, -2, -3], [8, 0], 0.0625, 0.25, [[8, 2, -1, 3, 0], [16, -1, 8, -1, 10]]], [[-3.25, -4.25, -1.25, -2.75], False, []]], [[[-2, 2, -1.5, 5], [0, -3], 0.125, 0.5, [[23, -4, 0, -4, 2], [22, -6, -3, -6, -1], [7, 8, -1, 8, 1], [4, -4, -4, -3, -2]]], [[-2.5, 1.125, -1.0, 5.5], True, []]], [[[-2, 3, -1.5, 6], [30, -3], 0.125, 0.25, [[21, 1, 4, 3, 4], [25, -1, 2, 0, 4], [8, -3, 4, -1, 5], [6, 2, -2, 4, 0], [16, 2, 7, 4, 9]]], [[-2.25, 2.375, 2.5, 6.25], True, [8, 21, 25]]]], [[[[-3, -4, -2, -3], [-2, 3], 0.25, 0.25, [[28, 6, 3, 7, 3], [20, 1, 3, 3, 4], [17, -5, -6, -4, -5]]], [[-3.75, -4.25, -1.75, -2.0], True, []]], [[[4, -1, 5, 0], [0, 3], 0.125, 0.5, [[11, 7, -5, 7, -5], [17, -1, -1, 0, 0], [8, -5, 0, -5, 0]]], [[3.5, -1.5, 5.5, 0.875], False, []]], [[[1, 0, 3, 3], [30, -20], 0.25, 0.0, [[10, -5, -3, -3, -3], [20, -7, -1, -7, 0], [17, -8, -6, -6, -4]]], [[1.0, -5.0, 10.5, 3.0], True, []]], [[[3, -1, 3.5, 0], [2, 3], 0.0625, 0.5, [[13, 6, -8, 8, -6], [19, 6, 2, 8, 2]]], [[2.5, -1.5, 4.125, 0.6875], False, []]], [[[-3, -3, -2.5, -2.5], [2, 16], 0.25, 0.25, [[7, -5, 6, -5, 8], [16, -1, 7, 0, 9], [26, 4, 7, 6, 8], [27, 4, 4, 6, 5]]], [[-3.25, -3.25, -1.75, 1.75], True, []]], [[[-4, -2, -2, -1.5], [8, 0], 0.0625, 0.25, [[11, -7, 8, -6, 9], [19, 5, -3, 6, -1], [29, -3, 3, -2, 5], [6, 3, 8, 4, 8], [16, -7, -8, -7, -7]]], [[-4.25, -2.25, -1.25, -1.25], True, []]], [[[0, -3, 0.5, -2], [2, 3], 0.0625, 0.25, [[16, 4, -6, 5, -5], [1, 7, -4, 8, -3], [20, 0, -6, 0, -6], [21, 0, -3, 2, -2]]], [[-0.25, -3.25, 0.875, -1.5625], False, [21]]], [[[2, -4, 3, -1], [30, 0], 0.25, 0.5, [[19, 8, -3, 9, -3], [21, -7, -8, -7, -7], [26, 4, 7, 5, 7], [27, 3, 4, 4, 4]]], [[1.5, -4.5, 11.0, -0.5], True, [19]]]], [[[[3, 0, 5, 3], [2, 16], 0.0625, 0.25, [[28, 1, 0, 2, 1]]], [[2.75, -0.25, 5.375, 4.25], True, []]], [[[3, 0, 4, 1], [-2, 3], 0.0625, 0.0, [[26, 3, 4, 3, 6], [10, -1, -4, 1, -4]]], [[2.875, 0.0, 4.0, 1.1875], False, []]], [[[-3, -3, -2, -2.5], [2, 3], 0.0625, 0.5, [[15, 7, 7, 7, 8], [5, -7, 4, -6, 4], [9, 8, -8, 8, -8]]], [[-3.5, -3.5, -1.375, -1.8125], False, []]], [[[-4, -3, -3, -2], [2, 3], 0.25, 0.0, [[20, 1, 0, 3, 1], [25, 5, -2, 6, -1], [9, 6, -3, 7, -3], [15, 1, 0, 1, 0], [19, 0, -6, 2, -6]]], [[-4.0, -3.0, -2.5, -1.25], True, []]], [[[-1, 1, -0.5, 2], [0, 0], 0.0625, 0.5, [[27, -3, -8, -2, -8]]], [[-1.5, 0.5, 0.0, 2.5], False, []]], [[[-1, 1, -0.5, 1.5], [-2, 0], 0.25, 0.25, [[20, 6, 5, 6, 7], [13, -5, 6, -5, 8], [12, 0, -2, 2, 0]]], [[-1.75, 0.75, -0.25, 1.75], True, []]], [[[4, 2, 5, 5], [0, 3], 0.125, 0.5, [[15, 7, -4, 9, -3], [4, 6, 8, 8, 8], [9, 2, 1, 2, 2], [19, 2, 6, 3, 8], [24, 5, -2, 6, 0]]], [[3.5, 1.5, 5.5, 5.875], False, []]], [[[-3, 4, -1, 7], [30, 0], 0.0625, 0.5, [[13, -6, -8, -6, -7]]], [[-3.5, 3.5, 1.375, 7.5], True, []]]]]\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-swept-ccd-bounds-fast-mover-displacement","generated_at":"2026-09-29T14:51:01.272546+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":"Compare the per-step displacement length.","root_cause":"The test measures |vel| rather than |vel*dt|.","sha256":"d9dbbc51ae6dc7f1effb49c128a7f3ac61676d198c1d0c3e9b3243a9721a6235","title":"Fast-mover test uses speed instead of displacement · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.741,"exit_code":1,"observations":[{"actual":[[3.5,1.75,6.25,3.125],false,[]],"check":"case 0","expected":[[3.5,1.75,6.25,3.125],true,[]],"passed":false},{"actual":[[0.5,0.75,1.75,6.25],true,[]],"check":"case 1","expected":[[0.5,0.75,1.75,6.25],true,[]],"passed":true},{"actual":[[-3.625,1.5,-1.5,5.6875],false,[]],"check":"case 2","expected":[[-3.625,1.5,-1.5,5.6875],false,[]],"passed":true},{"actual":[[0.0,-1.375,2.25,2.0],false,[]],"check":"case 3","expected":[[0.0,-1.375,2.25,2.0],false,[]],"passed":true},{"actual":[[-4.0,2.25,1.0,3.5],true,[]],"check":"case 4","expected":[[-4.0,2.25,1.0,3.5],true,[]],"passed":true},{"actual":[[-3.5,3.0,-2.5,4.75],true,[]],"check":"case 5","expected":[[-3.5,3.0,-2.5,4.75],true,[]],"passed":true},{"actual":[[-3.0,2.0,-1.75,5.0],false,[]],"check":"case 6","expected":[[-3.0,2.0,-1.75,5.0],false,[]],"passed":true},{"actual":[[-2.25,-3.25,-0.75,-1.75],false,[]],"check":"case 7","expected":[[-2.25,-3.25,-0.75,-1.75],true,[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[3.5, 1.75, 6.25, 3.125], false, []], \"expected\": [[3.5, 1.75, 6.25, 3.125], true, []], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [[0.5, 0.75, 1.75, 6.25], true, []], \"expected\": [[0.5, 0.75, 1.75, 6.25], true, []], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[-3.625, 1.5, -1.5, 5.6875], false, []], \"expected\": [[-3.625, 1.5, -1.5, 5.6875], false, []], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[0.0, -1.375, 2.25, 2.0], false, []], \"expected\": [[0.0, -1.375, 2.25, 2.0], false, []], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [[-4.0, 2.25, 1.0, 3.5], true, []], \"expected\": [[-4.0, 2.25, 1.0, 3.5], true, []], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [[-3.5, 3.0, -2.5, 4.75], true, []], \"expected\": [[-3.5, 3.0, -2.5, 4.75], true, []], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[-3.0, 2.0, -1.75, 5.0], false, []], \"expected\": [[-3.0, 2.0, -1.75, 5.0], false, []], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[-2.25, -3.25, -0.75, -1.75], false, []], \"expected\": [[-2.25, -3.25, -0.75, -1.75], true, []], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.617,"exit_code":1,"observations":[{"actual":[[3.5,1.75,6.25,3.125],true,[]],"check":"case 0","expected":[[3.5,1.75,6.25,3.125],true,[]],"passed":true},{"actual":[[0.5,0.75,1.75,6.25],true,[]],"check":"case 1","expected":[[0.5,0.75,1.75,6.25],true,[]],"passed":true},{"actual":[[-3.625,1.5,-1.5,5.6875],true,[]],"check":"case 2","expected":[[-3.625,1.5,-1.5,5.6875],false,[]],"passed":false},{"actual":[[0.0,-1.375,2.25,2.0],true,[]],"check":"case 3","expected":[[0.0,-1.375,2.25,2.0],false,[]],"passed":false},{"actual":[[-4.0,2.25,1.0,3.5],true,[]],"check":"case 4","expected":[[-4.0,2.25,1.0,3.5],true,[]],"passed":true},{"actual":[[-3.5,3.0,-2.5,4.75],true,[]],"check":"case 5","expected":[[-3.5,3.0,-2.5,4.75],true,[]],"passed":true},{"actual":[[-3.0,2.0,-1.75,5.0],true,[]],"check":"case 6","expected":[[-3.0,2.0,-1.75,5.0],false,[]],"passed":false},{"actual":[[-2.25,-3.25,-0.75,-1.75],true,[]],"check":"case 7","expected":[[-2.25,-3.25,-0.75,-1.75],true,[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[3.5, 1.75, 6.25, 3.125], true, []], \"expected\": [[3.5, 1.75, 6.25, 3.125], true, []], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[0.5, 0.75, 1.75, 6.25], true, []], \"expected\": [[0.5, 0.75, 1.75, 6.25], true, []], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[-3.625, 1.5, -1.5, 5.6875], true, []], \"expected\": [[-3.625, 1.5, -1.5, 5.6875], false, []], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[0.0, -1.375, 2.25, 2.0], true, []], \"expected\": [[0.0, -1.375, 2.25, 2.0], false, []], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[-4.0, 2.25, 1.0, 3.5], true, []], \"expected\": [[-4.0, 2.25, 1.0, 3.5], true, []], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [[-3.5, 3.0, -2.5, 4.75], true, []], \"expected\": [[-3.5, 3.0, -2.5, 4.75], true, []], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[-3.0, 2.0, -1.75, 5.0], true, []], \"expected\": [[-3.0, 2.0, -1.75, 5.0], false, []], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [[-2.25, -3.25, -0.75, -1.75], true, []], \"expected\": [[-2.25, -3.25, -0.75, -1.75], true, []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.909,"exit_code":0,"observations":[{"actual":[[3.5,1.75,6.25,3.125],true,[]],"check":"case 0","expected":[[3.5,1.75,6.25,3.125],true,[]],"passed":true},{"actual":[[0.5,0.75,1.75,6.25],true,[]],"check":"case 1","expected":[[0.5,0.75,1.75,6.25],true,[]],"passed":true},{"actual":[[-3.625,1.5,-1.5,5.6875],false,[]],"check":"case 2","expected":[[-3.625,1.5,-1.5,5.6875],false,[]],"passed":true},{"actual":[[0.0,-1.375,2.25,2.0],false,[]],"check":"case 3","expected":[[0.0,-1.375,2.25,2.0],false,[]],"passed":true},{"actual":[[-4.0,2.25,1.0,3.5],true,[]],"check":"case 4","expected":[[-4.0,2.25,1.0,3.5],true,[]],"passed":true},{"actual":[[-3.5,3.0,-2.5,4.75],true,[]],"check":"case 5","expected":[[-3.5,3.0,-2.5,4.75],true,[]],"passed":true},{"actual":[[-3.0,2.0,-1.75,5.0],false,[]],"check":"case 6","expected":[[-3.0,2.0,-1.75,5.0],false,[]],"passed":true},{"actual":[[-2.25,-3.25,-0.75,-1.75],true,[]],"check":"case 7","expected":[[-2.25,-3.25,-0.75,-1.75],true,[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[3.5, 1.75, 6.25, 3.125], true, []], \"expected\": [[3.5, 1.75, 6.25, 3.125], true, []], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[0.5, 0.75, 1.75, 6.25], true, []], \"expected\": [[0.5, 0.75, 1.75, 6.25], true, []], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[-3.625, 1.5, -1.5, 5.6875], false, []], \"expected\": [[-3.625, 1.5, -1.5, 5.6875], false, []], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[0.0, -1.375, 2.25, 2.0], false, []], \"expected\": [[0.0, -1.375, 2.25, 2.0], false, []], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [[-4.0, 2.25, 1.0, 3.5], true, []], \"expected\": [[-4.0, 2.25, 1.0, 3.5], true, []], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [[-3.5, 3.0, -2.5, 4.75], true, []], \"expected\": [[-3.5, 3.0, -2.5, 4.75], true, []], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[-3.0, 2.0, -1.75, 5.0], false, []], \"expected\": [[-3.0, 2.0, -1.75, 5.0], false, []], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[-2.25, -3.25, -0.75, -1.75], true, []], \"expected\": [[-2.25, -3.25, -0.75, -1.75], true, []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}