{"abstract":"Nodes split one object early, creating extra nodes.","category":"Collision detection broadphase","checks":8,"contract":"solve(objs, cap, max_depth, q): quadtree over [0,16]^2. Insert [id,minx,miny,maxx,maxy] in order. A node splits when it holds more than cap objects and depth<max_depth; children are ordered cy*2+cx. An object goes to a child only if it fits entirely: maxx<mid -> left, minx>=mid -> right (same for y); straddlers stay. On split all node objects are re-inserted. Query returns [sorted ids of objects in nodes whose closed bounds overlap q, total node count, max depth].","contract_signature":"objs, cap, max_depth, q","evaluation_group":"w2-collision_detection_broadphase-quadtree-straddle","failed_approach":"Waiting until cap+2 objects splits too late.","family":"w2-collision_detection_broadphase-quadtree-straddle-split-threshold","id":"FA-87481","implementations":{"attempt":{"sha256":"9af79c7030faefea5c00d8e4bc9047d8eb5218955e6d284b3947aa35b5177025","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(objs, cap, max_depth, q):\n    def make(x, y, s, d):\n        return {'x': x, 'y': y, 's': s, 'd': d, 'objs': [], 'kids': None}\n    def child_index(n, o):\n        h = n['s'] / 2\n        mx, my = n['x'] + h, n['y'] + h\n        if o[3] < mx:\n            cx = 0\n        elif o[1] >= mx:\n            cx = 1\n        else:\n            return -1\n        if o[4] < my:\n            cy = 0\n        elif o[2] >= my:\n            cy = 1\n        else:\n            return -1\n        return cy * 2 + cx\n    def split(n):\n        h = n['s'] / 2\n        n['kids'] = [make(n['x'] + (k % 2) * h, n['y'] + (k // 2) * h, h, n['d'] + 1) for k in range(4)]\n        old, n['objs'] = n['objs'], []\n        for o in old:\n            insert(n, o)\n    def insert(n, o):\n        if n['kids'] is not None:\n            k = child_index(n, o)\n            if k >= 0:\n                insert(n['kids'][k], o)\n                return\n        n['objs'].append(o)\n        if n['kids'] is None and len(n['objs']) > cap + 1 and n['d'] < max_depth:\n            split(n)\n    root = make(0, 0, 16, 0)\n    for o in objs:\n        insert(root, o)\n    found, count, deep = [], 0, 0\n    stack = [root]\n    while stack:\n        n = stack.pop()\n        count += 1\n        deep = max(deep, n['d'])\n        if n['kids']:\n            stack.extend(n['kids'])\n        if n['x'] <= q[2] and q[0] <= n['x'] + n['s'] and n['y'] <= q[3] and q[1] <= n['y'] + n['s']:\n            found.extend(o[0] for o in n['objs'])\n    return [sorted(found), count, deep]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[33, 5, 0, 5, 0], [11, 7, 11, 9, 13], [5, 15, 13, 16, 15], [6, 11, 8, 13, 11], [22, 14, 12, 16, 15], [34, 2, 8, 4, 8], [3, 2, 7, 3, 8], [31, 11, 2, 14, 5]], 1, 2, [8, 14, 9, 18]], [[3, 6, 11, 34], 9, 2]], [[[[14, 3, 6, 3, 7], [33, 13, 2, 16, 5], [4, 9, 15, 9, 15], [13, 7, 4, 9, 6], [45, 8, 14, 11, 16], [29, 11, 3, 11, 4], [43, 0, 2, 0, 5]], 1, 2, [12, 1, 17, 3]], [[13, 29, 33], 17, 2]], [[[[30, 11, 15, 14, 16], [41, 3, 15, 3, 16], [11, 3, 1, 3, 4], [17, 2, 13, 2, 14], [42, 14, 6, 16, 7], [2, 10, 9, 13, 9]], 2, 1, [7, 6, 9, 8]], [[2, 11, 17, 30, 41, 42], 5, 1]], [[[[7, 15, 7, 16, 9], [25, 3, 3, 6, 4], [9, 0, 4, 3, 6], [15, 11, 10, 14, 10]], 3, 2, [9, 10, 13, 13]], [[7, 15], 5, 1]], [[[[25, 10, 12, 13, 13], [34, 12, 13, 15, 15], [8, 9, 2, 10, 2]], 2, 2, [12, 11, 14, 13]], [[25, 34], 5, 1]], [[[[29, 1, 10, 1, 12], [19, 5, 10, 6, 11]], 2, 3, [3, 1, 8, 2]], [[19, 29], 1, 0]], [[[[31, 11, 9, 12, 9], [29, 6, 3, 7, 5], [11, 14, 7, 14, 7], [16, 0, 7, 0, 9], [33, 15, 11, 16, 11], [4, 12, 0, 13, 3], [20, 12, 14, 13, 16], [49, 7, 6, 8, 7]], 1, 3, [12, 4, 14, 6]], [[4, 11, 16, 49], 13, 2]], [[[[49, 7, 3, 10, 3], [38, 8, 0, 8, 2], [11, 12, 4, 12, 4], [5, 4, 10, 4, 11], [3, 12, 6, 15, 7], [21, 0, 13, 1, 14], [35, 10, 7, 10, 10], [9, 9, 10, 12, 12]], 2, 2, [9, 2, 10, 7]], [[35, 38, 49], 9, 2]]], [[[[[46, 11, 12, 13, 13], [4, 4, 11, 4, 14], [41, 4, 13, 4, 13], [2, 0, 8, 1, 11], [45, 5, 5, 8, 5], [3, 2, 4, 4, 5], [39, 15, 12, 16, 13], [25, 12, 8, 14, 11]], 1, 2, [0, 0, 5, 1]], [[3, 45], 13, 2]], [[[[28, 9, 14, 12, 16], [29, 2, 3, 2, 6], [23, 8, 0, 8, 2], [17, 2, 9, 5, 11], [33, 15, 5, 16, 7], [46, 14, 15, 16, 16], [14, 13, 0, 16, 3]], 2, 2, [0, 14, 1, 18]], [[17], 9, 2]], [[[[43, 15, 9, 16, 9], [33, 11, 1, 11, 2], [32, 13, 12, 14, 14], [49, 8, 4, 9, 4]], 1, 2, [4, 4, 5, 7]], [[], 13, 2]], [[[[49, 11, 0, 11, 3], [23, 7, 12, 8, 15], [14, 0, 5, 3, 6], [30, 1, 4, 3, 6], [37, 2, 5, 4, 6], [28, 9, 9, 11, 11]], 1, 3, [6, 1, 7, 3]], [[23, 37], 13, 3]], [[[[40, 2, 4, 4, 4], [39, 7, 9, 7, 12], [24, 5, 11, 5, 14], [34, 3, 14, 5, 16], [13, 2, 0, 3, 0], [37, 8, 1, 9, 4], [45, 10, 5, 13, 8], [27, 3, 14, 3, 16], [22, 14, 0, 14, 3]], 3, 2, [14, 3, 16, 4]], [[22, 37, 45], 9, 2]], [[[[28, 8, 5, 10, 8], [39, 4, 12, 4, 12], [10, 4, 1, 4, 4], [29, 14, 11, 16, 13], [4, 6, 14, 6, 14], [22, 1, 0, 3, 0]], 1, 1, [11, 11, 15, 15]], [[28, 29], 5, 1]], [[[[1, 4, 0, 5, 3], [17, 10, 15, 12, 16]], 2, 2, [13, 9, 14, 14]], [[1, 17], 1, 0]], [[[[10, 6, 9, 7, 12], [1, 4, 1, 6, 1], [47, 2, 4, 2, 4], [34, 5, 5, 6, 8], [37, 5, 5, 7, 5], [39, 5, 10, 5, 12], [42, 9, 1, 10, 2], [46, 0, 1, 2, 3], [16, 15, 9, 16, 10]], 1, 1, [3, 10, 3, 14]], [[10, 34, 39], 5, 1]]], [[[[[42, 9, 3, 10, 5], [26, 12, 6, 14, 7], [12, 15, 5, 16, 7], [28, 0, 7, 0, 8], [3, 1, 10, 3, 13], [22, 0, 11, 0, 14], [13, 5, 1, 8, 2], [45, 5, 7, 6, 10], [40, 13, 2, 14, 5]], 3, 3, [12, 11, 15, 11]], [[13, 28, 45], 9, 2]], [[[[25, 9, 7, 10, 8], [29, 11, 3, 11, 6], [9, 14, 6, 16, 7], [44, 4, 5, 4, 8], [35, 2, 15, 4, 15], [12, 9, 10, 10, 10], [10, 8, 7, 11, 8], [43, 15, 0, 16, 3], [22, 14, 0, 16, 0], [16, 15, 6, 16, 8]], 1, 3, [2, 8, 4, 13]], [[10, 16, 25, 35, 44], 13, 3]], [[[[18, 11, 11, 13, 11], [5, 13, 2, 16, 5], [20, 4, 15, 4, 15], [32, 7, 4, 10, 4]], 3, 2, [11, 3, 16, 7]], [[5, 32], 5, 1]], [[[[45, 6, 7, 8, 9], [29, 7, 0, 8, 1], [8, 2, 4, 3, 5], [39, 6, 9, 6, 10], [31, 7, 13, 7, 14], [47, 1, 2, 3, 4]], 3, 2, [1, 0, 1, 0]], [[8, 29, 45, 47], 5, 1]], [[[[35, 12, 4, 14, 4], [20, 10, 12, 10, 14], [9, 4, 13, 6, 13], [44, 12, 10, 14, 11], [12, 10, 6, 12, 8]], 1, 2, [5, 6, 7, 8]], [[9, 12], 9, 2]], [[[[45, 14, 6, 15, 9], [39, 2, 8, 3, 8], [34, 8, 1, 9, 1], [32, 14, 13, 16, 16], [46, 0, 14, 2, 14], [8, 4, 14, 7, 16], [16, 15, 13, 15, 14]], 2, 3, [5, 11, 8, 15]], [[8, 16, 32, 45], 9, 2]], [[[[31, 9, 1, 11, 1], [18, 6, 9, 9, 9], [28, 4, 7, 5, 8]], 2, 3, [14, 6, 16, 10]], [[18, 28, 31], 5, 1]], [[[[38, 4, 9, 7, 11], [44, 15, 10, 16, 12], [13, 13, 12, 13, 13]], 2, 3, [10, 5, 12, 6]], [[], 5, 1]]], [[[[[17, 6, 9, 8, 12], [37, 8, 2, 10, 2], [42, 11, 14, 12, 14], [39, 9, 8, 10, 9], [34, 7, 2, 7, 5], [32, 13, 4, 16, 7], [23, 2, 9, 2, 10], [1, 4, 10, 7, 13], [40, 4, 2, 4, 3], [29, 4, 11, 6, 14]], 2, 2, [0, 9, 3, 13]], [[1, 17, 23, 29], 9, 2]], [[[[34, 14, 5, 16, 8], [30, 14, 15, 16, 16], [19, 2, 8, 2, 10], [43, 14, 5, 16, 5], [47, 5, 8, 8, 8], [9, 8, 10, 8, 12], [8, 1, 14, 2, 16]], 3, 2, [4, 12, 4, 16]], [[8, 19, 34, 47], 5, 1]], [[[[42, 15, 0, 16, 0], [34, 2, 5, 2, 6], [30, 0, 9, 0, 11], [32, 12, 9, 13, 11], [24, 9, 2, 11, 2], [2, 7, 9, 7, 9], [20, 13, 13, 16, 14], [22, 3, 14, 5, 14]], 3, 2, [1, 11, 4, 15]], [[2, 22, 30], 5, 1]], [[[[3, 10, 6, 12, 7], [4, 10, 14, 11, 15], [29, 6, 7, 6, 10], [26, 10, 15, 11, 16]], 2, 3, [12, 12, 13, 13]], [[4, 26, 29], 5, 1]], [[[[12, 6, 1, 9, 3], [29, 14, 6, 16, 9]], 1, 2, [11, 9, 12, 9]], [[12, 29], 5, 1]], [[[[6, 4, 7, 6, 9], [39, 15, 0, 15, 2], [13, 11, 7, 12, 8], [7, 14, 1, 14, 1], [8, 14, 3, 14, 4], [5, 6, 13, 7, 15], [15, 1, 8, 2, 8]], 1, 3, [1, 7, 3, 10]], [[6, 13, 15], 17, 3]], [[[[41, 6, 5, 8, 5], [26, 7, 5, 10, 6], [45, 5, 12, 5, 12], [1, 3, 10, 4, 13], [44, 7, 14, 9, 14]], 1, 1, [8, 9, 8, 14]], [[1, 26, 41, 44, 45], 5, 1]], [[[[7, 13, 7, 14, 10], [49, 6, 5, 9, 6], [35, 8, 9, 10, 9]], 2, 3, [0, 10, 0, 13]], [[7, 49], 5, 1]]], [[[[[7, 10, 4, 10, 7], [28, 8, 10, 10, 13], [21, 14, 13, 16, 15], [9, 13, 6, 16, 7], [11, 11, 4, 11, 7], [27, 14, 5, 16, 8], [1, 0, 8, 3, 9], [19, 0, 7, 0, 8], [29, 0, 11, 1, 14]], 2, 2, [7, 6, 10, 6]], [[7, 11, 19, 27], 9, 2]], [[[[14, 6, 14, 7, 14], [42, 7, 2, 7, 5]], 1, 2, [5, 9, 7, 13]], [[14], 5, 1]], [[[[16, 13, 12, 14, 13], [6, 9, 12, 9, 14], [4, 5, 11, 7, 11], [22, 12, 2, 14, 4], [38, 1, 9, 1, 9], [19, 7, 11, 10, 14]], 2, 2, [13, 4, 18, 9]], [[6, 16, 19, 22], 5, 1]], [[[[29, 6, 0, 8, 3], [20, 11, 15, 11, 16], [27, 6, 12, 9, 15], [38, 0, 9, 2, 11], [30, 10, 9, 10, 10], [7, 2, 9, 3, 11], [48, 8, 11, 11, 14], [9, 2, 7, 2, 10]], 1, 2, [1, 4, 2, 6]], [[9, 27, 29], 13, 2]], [[[[30, 3, 7, 4, 8], [17, 13, 13, 13, 16], [36, 12, 0, 15, 1], [22, 12, 10, 15, 11]], 2, 1, [7, 4, 10, 7]], [[30, 36], 5, 1]], [[[[12, 0, 0, 1, 1], [5, 3, 7, 4, 10], [3, 10, 14, 13, 15]], 1, 1, [11, 9, 15, 10]], [[3, 5], 5, 1]], [[[[22, 10, 13, 12, 14], [17, 15, 1, 16, 4], [5, 11, 3, 12, 3], [49, 12, 0, 15, 0], [31, 2, 6, 2, 7], [18, 2, 12, 2, 14], [34, 2, 15, 2, 16], [28, 13, 14, 15, 16], [39, 0, 5, 3, 7], [30, 12, 1, 15, 1], [40, 0, 3, 1, 4], [45, 3, 6, 3, 9]], 2, 1, [0, 6, 2, 11]], [[18, 31, 34, 39, 40, 45], 5, 1]], [[[[34, 13, 8, 16, 9], [35, 0, 9, 2, 12], [8, 11, 12, 13, 13], [43, 12, 9, 15, 9], [42, 12, 3, 15, 5], [21, 13, 3, 13, 3], [27, 12, 0, 12, 3], [37, 6, 2, 8, 5], [25, 0, 9, 2, 12]], 2, 3, [10, 6, 10, 11]], [[8, 37, 42], 13, 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":"b3e82f5848b451660c86a68e82e60a11cc7993f0aacf2f44561a266cce524ca4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(objs, cap, max_depth, q):\n    def make(x, y, s, d):\n        return {'x': x, 'y': y, 's': s, 'd': d, 'objs': [], 'kids': None}\n    def child_index(n, o):\n        h = n['s'] / 2\n        mx, my = n['x'] + h, n['y'] + h\n        if o[3] < mx:\n            cx = 0\n        elif o[1] >= mx:\n            cx = 1\n        else:\n            return -1\n        if o[4] < my:\n            cy = 0\n        elif o[2] >= my:\n            cy = 1\n        else:\n            return -1\n        return cy * 2 + cx\n    def split(n):\n        h = n['s'] / 2\n        n['kids'] = [make(n['x'] + (k % 2) * h, n['y'] + (k // 2) * h, h, n['d'] + 1) for k in range(4)]\n        old, n['objs'] = n['objs'], []\n        for o in old:\n            insert(n, o)\n    def insert(n, o):\n        if n['kids'] is not None:\n            k = child_index(n, o)\n            if k >= 0:\n                insert(n['kids'][k], o)\n                return\n        n['objs'].append(o)\n        if n['kids'] is None and len(n['objs']) >= cap and n['d'] < max_depth:\n            split(n)\n    root = make(0, 0, 16, 0)\n    for o in objs:\n        insert(root, o)\n    found, count, deep = [], 0, 0\n    stack = [root]\n    while stack:\n        n = stack.pop()\n        count += 1\n        deep = max(deep, n['d'])\n        if n['kids']:\n            stack.extend(n['kids'])\n        if n['x'] <= q[2] and q[0] <= n['x'] + n['s'] and n['y'] <= q[3] and q[1] <= n['y'] + n['s']:\n            found.extend(o[0] for o in n['objs'])\n    return [sorted(found), count, deep]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[33, 5, 0, 5, 0], [11, 7, 11, 9, 13], [5, 15, 13, 16, 15], [6, 11, 8, 13, 11], [22, 14, 12, 16, 15], [34, 2, 8, 4, 8], [3, 2, 7, 3, 8], [31, 11, 2, 14, 5]], 1, 2, [8, 14, 9, 18]], [[3, 6, 11, 34], 9, 2]], [[[[14, 3, 6, 3, 7], [33, 13, 2, 16, 5], [4, 9, 15, 9, 15], [13, 7, 4, 9, 6], [45, 8, 14, 11, 16], [29, 11, 3, 11, 4], [43, 0, 2, 0, 5]], 1, 2, [12, 1, 17, 3]], [[13, 29, 33], 17, 2]], [[[[30, 11, 15, 14, 16], [41, 3, 15, 3, 16], [11, 3, 1, 3, 4], [17, 2, 13, 2, 14], [42, 14, 6, 16, 7], [2, 10, 9, 13, 9]], 2, 1, [7, 6, 9, 8]], [[2, 11, 17, 30, 41, 42], 5, 1]], [[[[7, 15, 7, 16, 9], [25, 3, 3, 6, 4], [9, 0, 4, 3, 6], [15, 11, 10, 14, 10]], 3, 2, [9, 10, 13, 13]], [[7, 15], 5, 1]], [[[[25, 10, 12, 13, 13], [34, 12, 13, 15, 15], [8, 9, 2, 10, 2]], 2, 2, [12, 11, 14, 13]], [[25, 34], 5, 1]], [[[[29, 1, 10, 1, 12], [19, 5, 10, 6, 11]], 2, 3, [3, 1, 8, 2]], [[19, 29], 1, 0]], [[[[31, 11, 9, 12, 9], [29, 6, 3, 7, 5], [11, 14, 7, 14, 7], [16, 0, 7, 0, 9], [33, 15, 11, 16, 11], [4, 12, 0, 13, 3], [20, 12, 14, 13, 16], [49, 7, 6, 8, 7]], 1, 3, [12, 4, 14, 6]], [[4, 11, 16, 49], 13, 2]], [[[[49, 7, 3, 10, 3], [38, 8, 0, 8, 2], [11, 12, 4, 12, 4], [5, 4, 10, 4, 11], [3, 12, 6, 15, 7], [21, 0, 13, 1, 14], [35, 10, 7, 10, 10], [9, 9, 10, 12, 12]], 2, 2, [9, 2, 10, 7]], [[35, 38, 49], 9, 2]]], [[[[[46, 11, 12, 13, 13], [4, 4, 11, 4, 14], [41, 4, 13, 4, 13], [2, 0, 8, 1, 11], [45, 5, 5, 8, 5], [3, 2, 4, 4, 5], [39, 15, 12, 16, 13], [25, 12, 8, 14, 11]], 1, 2, [0, 0, 5, 1]], [[3, 45], 13, 2]], [[[[28, 9, 14, 12, 16], [29, 2, 3, 2, 6], [23, 8, 0, 8, 2], [17, 2, 9, 5, 11], [33, 15, 5, 16, 7], [46, 14, 15, 16, 16], [14, 13, 0, 16, 3]], 2, 2, [0, 14, 1, 18]], [[17], 9, 2]], [[[[43, 15, 9, 16, 9], [33, 11, 1, 11, 2], [32, 13, 12, 14, 14], [49, 8, 4, 9, 4]], 1, 2, [4, 4, 5, 7]], [[], 13, 2]], [[[[49, 11, 0, 11, 3], [23, 7, 12, 8, 15], [14, 0, 5, 3, 6], [30, 1, 4, 3, 6], [37, 2, 5, 4, 6], [28, 9, 9, 11, 11]], 1, 3, [6, 1, 7, 3]], [[23, 37], 13, 3]], [[[[40, 2, 4, 4, 4], [39, 7, 9, 7, 12], [24, 5, 11, 5, 14], [34, 3, 14, 5, 16], [13, 2, 0, 3, 0], [37, 8, 1, 9, 4], [45, 10, 5, 13, 8], [27, 3, 14, 3, 16], [22, 14, 0, 14, 3]], 3, 2, [14, 3, 16, 4]], [[22, 37, 45], 9, 2]], [[[[28, 8, 5, 10, 8], [39, 4, 12, 4, 12], [10, 4, 1, 4, 4], [29, 14, 11, 16, 13], [4, 6, 14, 6, 14], [22, 1, 0, 3, 0]], 1, 1, [11, 11, 15, 15]], [[28, 29], 5, 1]], [[[[1, 4, 0, 5, 3], [17, 10, 15, 12, 16]], 2, 2, [13, 9, 14, 14]], [[1, 17], 1, 0]], [[[[10, 6, 9, 7, 12], [1, 4, 1, 6, 1], [47, 2, 4, 2, 4], [34, 5, 5, 6, 8], [37, 5, 5, 7, 5], [39, 5, 10, 5, 12], [42, 9, 1, 10, 2], [46, 0, 1, 2, 3], [16, 15, 9, 16, 10]], 1, 1, [3, 10, 3, 14]], [[10, 34, 39], 5, 1]]], [[[[[42, 9, 3, 10, 5], [26, 12, 6, 14, 7], [12, 15, 5, 16, 7], [28, 0, 7, 0, 8], [3, 1, 10, 3, 13], [22, 0, 11, 0, 14], [13, 5, 1, 8, 2], [45, 5, 7, 6, 10], [40, 13, 2, 14, 5]], 3, 3, [12, 11, 15, 11]], [[13, 28, 45], 9, 2]], [[[[25, 9, 7, 10, 8], [29, 11, 3, 11, 6], [9, 14, 6, 16, 7], [44, 4, 5, 4, 8], [35, 2, 15, 4, 15], [12, 9, 10, 10, 10], [10, 8, 7, 11, 8], [43, 15, 0, 16, 3], [22, 14, 0, 16, 0], [16, 15, 6, 16, 8]], 1, 3, [2, 8, 4, 13]], [[10, 16, 25, 35, 44], 13, 3]], [[[[18, 11, 11, 13, 11], [5, 13, 2, 16, 5], [20, 4, 15, 4, 15], [32, 7, 4, 10, 4]], 3, 2, [11, 3, 16, 7]], [[5, 32], 5, 1]], [[[[45, 6, 7, 8, 9], [29, 7, 0, 8, 1], [8, 2, 4, 3, 5], [39, 6, 9, 6, 10], [31, 7, 13, 7, 14], [47, 1, 2, 3, 4]], 3, 2, [1, 0, 1, 0]], [[8, 29, 45, 47], 5, 1]], [[[[35, 12, 4, 14, 4], [20, 10, 12, 10, 14], [9, 4, 13, 6, 13], [44, 12, 10, 14, 11], [12, 10, 6, 12, 8]], 1, 2, [5, 6, 7, 8]], [[9, 12], 9, 2]], [[[[45, 14, 6, 15, 9], [39, 2, 8, 3, 8], [34, 8, 1, 9, 1], [32, 14, 13, 16, 16], [46, 0, 14, 2, 14], [8, 4, 14, 7, 16], [16, 15, 13, 15, 14]], 2, 3, [5, 11, 8, 15]], [[8, 16, 32, 45], 9, 2]], [[[[31, 9, 1, 11, 1], [18, 6, 9, 9, 9], [28, 4, 7, 5, 8]], 2, 3, [14, 6, 16, 10]], [[18, 28, 31], 5, 1]], [[[[38, 4, 9, 7, 11], [44, 15, 10, 16, 12], [13, 13, 12, 13, 13]], 2, 3, [10, 5, 12, 6]], [[], 5, 1]]], [[[[[17, 6, 9, 8, 12], [37, 8, 2, 10, 2], [42, 11, 14, 12, 14], [39, 9, 8, 10, 9], [34, 7, 2, 7, 5], [32, 13, 4, 16, 7], [23, 2, 9, 2, 10], [1, 4, 10, 7, 13], [40, 4, 2, 4, 3], [29, 4, 11, 6, 14]], 2, 2, [0, 9, 3, 13]], [[1, 17, 23, 29], 9, 2]], [[[[34, 14, 5, 16, 8], [30, 14, 15, 16, 16], [19, 2, 8, 2, 10], [43, 14, 5, 16, 5], [47, 5, 8, 8, 8], [9, 8, 10, 8, 12], [8, 1, 14, 2, 16]], 3, 2, [4, 12, 4, 16]], [[8, 19, 34, 47], 5, 1]], [[[[42, 15, 0, 16, 0], [34, 2, 5, 2, 6], [30, 0, 9, 0, 11], [32, 12, 9, 13, 11], [24, 9, 2, 11, 2], [2, 7, 9, 7, 9], [20, 13, 13, 16, 14], [22, 3, 14, 5, 14]], 3, 2, [1, 11, 4, 15]], [[2, 22, 30], 5, 1]], [[[[3, 10, 6, 12, 7], [4, 10, 14, 11, 15], [29, 6, 7, 6, 10], [26, 10, 15, 11, 16]], 2, 3, [12, 12, 13, 13]], [[4, 26, 29], 5, 1]], [[[[12, 6, 1, 9, 3], [29, 14, 6, 16, 9]], 1, 2, [11, 9, 12, 9]], [[12, 29], 5, 1]], [[[[6, 4, 7, 6, 9], [39, 15, 0, 15, 2], [13, 11, 7, 12, 8], [7, 14, 1, 14, 1], [8, 14, 3, 14, 4], [5, 6, 13, 7, 15], [15, 1, 8, 2, 8]], 1, 3, [1, 7, 3, 10]], [[6, 13, 15], 17, 3]], [[[[41, 6, 5, 8, 5], [26, 7, 5, 10, 6], [45, 5, 12, 5, 12], [1, 3, 10, 4, 13], [44, 7, 14, 9, 14]], 1, 1, [8, 9, 8, 14]], [[1, 26, 41, 44, 45], 5, 1]], [[[[7, 13, 7, 14, 10], [49, 6, 5, 9, 6], [35, 8, 9, 10, 9]], 2, 3, [0, 10, 0, 13]], [[7, 49], 5, 1]]], [[[[[7, 10, 4, 10, 7], [28, 8, 10, 10, 13], [21, 14, 13, 16, 15], [9, 13, 6, 16, 7], [11, 11, 4, 11, 7], [27, 14, 5, 16, 8], [1, 0, 8, 3, 9], [19, 0, 7, 0, 8], [29, 0, 11, 1, 14]], 2, 2, [7, 6, 10, 6]], [[7, 11, 19, 27], 9, 2]], [[[[14, 6, 14, 7, 14], [42, 7, 2, 7, 5]], 1, 2, [5, 9, 7, 13]], [[14], 5, 1]], [[[[16, 13, 12, 14, 13], [6, 9, 12, 9, 14], [4, 5, 11, 7, 11], [22, 12, 2, 14, 4], [38, 1, 9, 1, 9], [19, 7, 11, 10, 14]], 2, 2, [13, 4, 18, 9]], [[6, 16, 19, 22], 5, 1]], [[[[29, 6, 0, 8, 3], [20, 11, 15, 11, 16], [27, 6, 12, 9, 15], [38, 0, 9, 2, 11], [30, 10, 9, 10, 10], [7, 2, 9, 3, 11], [48, 8, 11, 11, 14], [9, 2, 7, 2, 10]], 1, 2, [1, 4, 2, 6]], [[9, 27, 29], 13, 2]], [[[[30, 3, 7, 4, 8], [17, 13, 13, 13, 16], [36, 12, 0, 15, 1], [22, 12, 10, 15, 11]], 2, 1, [7, 4, 10, 7]], [[30, 36], 5, 1]], [[[[12, 0, 0, 1, 1], [5, 3, 7, 4, 10], [3, 10, 14, 13, 15]], 1, 1, [11, 9, 15, 10]], [[3, 5], 5, 1]], [[[[22, 10, 13, 12, 14], [17, 15, 1, 16, 4], [5, 11, 3, 12, 3], [49, 12, 0, 15, 0], [31, 2, 6, 2, 7], [18, 2, 12, 2, 14], [34, 2, 15, 2, 16], [28, 13, 14, 15, 16], [39, 0, 5, 3, 7], [30, 12, 1, 15, 1], [40, 0, 3, 1, 4], [45, 3, 6, 3, 9]], 2, 1, [0, 6, 2, 11]], [[18, 31, 34, 39, 40, 45], 5, 1]], [[[[34, 13, 8, 16, 9], [35, 0, 9, 2, 12], [8, 11, 12, 13, 13], [43, 12, 9, 15, 9], [42, 12, 3, 15, 5], [21, 13, 3, 13, 3], [27, 12, 0, 12, 3], [37, 6, 2, 8, 5], [25, 0, 9, 2, 12]], 2, 3, [10, 6, 10, 11]], [[8, 37, 42], 13, 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-quadtree-straddle-split-threshold","generated_at":"2026-09-29T14:50:59.180985+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":"The split test is len >= cap.","sha256":"4b8b4a7b52758f84265aead09d9f02eb41207f0fe9fbbb1697f8247ea5d9ae2d","title":"Quadtree splits when a node reaches capacity rather than exceeding it · 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.363,"exit_code":1,"observations":[{"actual":[[3,6,11,34],9,2],"check":"case 0","expected":[[3,6,11,34],9,2],"passed":true},{"actual":[[13,29,33],5,1],"check":"case 1","expected":[[13,29,33],17,2],"passed":false},{"actual":[[2,11,17,30,41,42],5,1],"check":"case 2","expected":[[2,11,17,30,41,42],5,1],"passed":true},{"actual":[[7,9,15,25],1,0],"check":"case 3","expected":[[7,15],5,1],"passed":false},{"actual":[[8,25,34],1,0],"check":"case 4","expected":[[25,34],5,1],"passed":false},{"actual":[[19,29],1,0],"check":"case 5","expected":[[19,29],1,0],"passed":true},{"actual":[[4,11,16,49],9,2],"check":"case 6","expected":[[4,11,16,49],13,2],"passed":false},{"actual":[[3,11,35,38,49],5,1],"check":"case 7","expected":[[35,38,49],9,2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[3, 6, 11, 34], 9, 2], \"expected\": [[3, 6, 11, 34], 9, 2], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[13, 29, 33], 5, 1], \"expected\": [[13, 29, 33], 17, 2], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [[2, 11, 17, 30, 41, 42], 5, 1], \"expected\": [[2, 11, 17, 30, 41, 42], 5, 1], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[7, 9, 15, 25], 1, 0], \"expected\": [[7, 15], 5, 1], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[8, 25, 34], 1, 0], \"expected\": [[25, 34], 5, 1], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [[19, 29], 1, 0], \"expected\": [[19, 29], 1, 0], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[4, 11, 16, 49], 9, 2], \"expected\": [[4, 11, 16, 49], 13, 2], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [[3, 11, 35, 38, 49], 5, 1], \"expected\": [[35, 38, 49], 9, 2], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.896,"exit_code":1,"observations":[{"actual":[[3,6,11,34],21,2],"check":"case 0","expected":[[3,6,11,34],9,2],"passed":false},{"actual":[[13,29,33],17,2],"check":"case 1","expected":[[13,29,33],17,2],"passed":true},{"actual":[[2,11,17,30,41,42],5,1],"check":"case 2","expected":[[2,11,17,30,41,42],5,1],"passed":true},{"actual":[[7,15],5,1],"check":"case 3","expected":[[7,15],5,1],"passed":true},{"actual":[[25,34],9,2],"check":"case 4","expected":[[25,34],5,1],"passed":false},{"actual":[[],9,2],"check":"case 5","expected":[[19,29],1,0],"passed":false},{"actual":[[4,11,16,49],33,3],"check":"case 6","expected":[[4,11,16,49],13,2],"passed":false},{"actual":[[35,38,49],13,2],"check":"case 7","expected":[[35,38,49],9,2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[3, 6, 11, 34], 21, 2], \"expected\": [[3, 6, 11, 34], 9, 2], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [[13, 29, 33], 17, 2], \"expected\": [[13, 29, 33], 17, 2], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[2, 11, 17, 30, 41, 42], 5, 1], \"expected\": [[2, 11, 17, 30, 41, 42], 5, 1], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[7, 15], 5, 1], \"expected\": [[7, 15], 5, 1], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [[25, 34], 9, 2], \"expected\": [[25, 34], 5, 1], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [[], 9, 2], \"expected\": [[19, 29], 1, 0], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [[4, 11, 16, 49], 33, 3], \"expected\": [[4, 11, 16, 49], 13, 2], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [[35, 38, 49], 13, 2], \"expected\": [[35, 38, 49], 9, 2], \"passed\": false}], \"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."}}