{"abstract":"Pairs stored as (b,a) end and restart every frame.","category":"Collision detection broadphase","checks":8,"contract":"solve(prev, curr, asleep): contact pair cache update. Pairs are unordered; self pairs in curr are ignored. Previous pairs whose two bodies are both asleep persist even if not re-reported. Return [begin, end, persist] as sorted [min,max] lists.","evaluation_group":"w2-collision_detection_broadphase-pair-cache-diff","failed_approach":"Normalizing to (max,min) mismatches the current frame the other way.","family":"w2-collision_detection_broadphase-pair-cache-diff-previous-pair-normalization","id":"FA-87536","implementations":{"attempt":{"sha256":"8a7685411ff6c7f274d5a244c3d2a3200cbc10636c315009947e8c1a36c77998","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(prev, curr, asleep):\n    def norm(p):\n        return (min(p), max(p))\n    P = {(max(p), min(p)) for p in prev}\n    C = {norm(p) for p in curr if p[0] != p[1]}\n    sl = set(asleep)\n    for p in P:\n        if p[0] in sl and p[1] in sl:\n            C.add(p)\n    begin = sorted(C - P)\n    end = sorted(P - C)\n    keep = sorted(P & C)\n    return [[list(p) for p in begin], [list(p) for p in end], [list(p) for p in keep]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[1, 2], [4, 5], [1, 2], [5, 4], [7, 1]], [[7, 3], [7, 2]], [7, 4, 2]], [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]], [[[[4, 6]], [[4, 1]], [3, 4, 2]], [[[1, 4]], [[4, 6]], []]], [[[[6, 1], [3, 1], [5, 6], [6, 7], [6, 4], [3, 5]], [[3, 2], [1, 4], [6, 5], [1, 3], [1, 7]], [3, 7, 4]], [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]], [[[[5, 3], [6, 3]], [[5, 6], [4, 2]], [6, 5, 4]], [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]], [[[[4, 7], [4, 7], [2, 4], [4, 5]], [[5, 4], [1, 5], [4, 7], [5, 2]], [6]], [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]], [[[[2, 6]], [[3, 6], [4, 5], [1, 7], [3, 5]], [3]], [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]], [[[[2, 4], [4, 3], [4, 6], [1, 3], [7, 5]], [[2, 1], [3, 1], [6, 3]], [1, 6]], [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]], [[[[1, 6], [4, 3]], [[4, 7], [5, 6], [6, 2], [5, 1], [3, 3]], [6]], [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]]], [[[[[7, 3]], [[2, 4], [1, 5], [7, 5]], [7, 4, 6, 2]], [[[1, 5], [2, 4], [5, 7]], [[3, 7]], []]], [[[[5, 4], [7, 2], [4, 3]], [[3, 4], [7, 4], [6, 2], [7, 6], [1, 4], [4, 2], [1, 1]], [7]], [[[1, 4], [2, 4], [2, 6], [4, 7], [6, 7]], [[2, 7], [4, 5]], [[3, 4]]]], [[[[2, 7], [4, 7], [4, 5], [1, 5], [4, 5], [1, 6]], [[3, 4], [4, 1], [5, 1], [5, 7], [7, 5], [6, 2]], [7, 1]], [[[1, 4], [2, 6], [3, 4], [5, 7]], [[1, 6], [2, 7], [4, 5], [4, 7]], [[1, 5]]]], [[[[6, 2], [6, 3], [7, 4]], [[2, 1], [7, 3], [6, 4], [2, 1]], [4]], [[[1, 2], [3, 7], [4, 6]], [[2, 6], [3, 6], [4, 7]], []]], [[[[4, 5], [4, 6], [3, 5], [5, 6], [5, 1]], [[7, 3], [1, 3], [6, 1], [4, 3]], [4, 5]], [[[1, 3], [1, 6], [3, 4], [3, 7]], [[1, 5], [3, 5], [4, 6], [5, 6]], [[4, 5]]]], [[[[2, 7], [1, 2], [1, 5]], [[6, 1], [7, 5], [1, 2], [3, 1], [7, 2], [6, 5]], [1, 5]], [[[1, 3], [1, 6], [5, 6], [5, 7]], [], [[1, 2], [1, 5], [2, 7]]]], [[[[4, 3], [2, 7], [2, 4], [5, 7], [3, 2], [5, 1]], [[6, 3], [6, 7], [4, 2]], [7]], [[[3, 6], [6, 7]], [[1, 5], [2, 3], [2, 7], [3, 4], [5, 7]], [[2, 4]]]], [[[[2, 3], [1, 2]], [[7, 1]], [3, 7]], [[[1, 7]], [[1, 2], [2, 3]], []]]], [[[[[7, 5]], [[4, 1], [3, 3]], [6]], [[[1, 4]], [[5, 7]], []]], [[[[1, 3], [4, 7], [6, 5]], [[3, 1]], [5, 6, 3]], [[], [[4, 7]], [[1, 3], [5, 6]]]], [[[[1, 7], [3, 7], [1, 3]], [[3, 6], [5, 6], [2, 7]], [1, 2, 3, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 7], [3, 7]], [[1, 3]]]], [[[[1, 2]], [[2, 5], [3, 6], [1, 3]], [5]], [[[1, 3], [2, 5], [3, 6]], [[1, 2]], []]], [[[[4, 6], [1, 7], [2, 5]], [[7, 1], [7, 2]], [4, 7, 5]], [[[2, 7]], [[2, 5], [4, 6]], [[1, 7]]]], [[[[5, 4], [3, 5], [3, 2], [2, 7]], [[2, 1], [3, 6], [2, 2]], [3, 1, 5, 7]], [[[1, 2], [3, 6]], [[2, 3], [2, 7], [4, 5]], [[3, 5]]]], [[[[4, 1], [5, 3], [1, 4], [1, 2], [6, 2]], [[2, 7], [5, 3], [5, 6], [3, 6], [3, 6]], [6, 4, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 2], [1, 4], [2, 6]], [[3, 5]]]], [[[[5, 6], [5, 1], [2, 3]], [[5, 2], [7, 1], [7, 1], [4, 6]], [7]], [[[1, 7], [2, 5], [4, 6]], [[1, 5], [2, 3], [5, 6]], []]]], [[[[[5, 6], [1, 3], [4, 7], [3, 6], [7, 2], [5, 3]], [[5, 1], [4, 2], [4, 7], [1, 7]], [1, 5]], [[[1, 5], [1, 7], [2, 4]], [[1, 3], [2, 7], [3, 5], [3, 6], [5, 6]], [[4, 7]]]], [[[[7, 6], [6, 5], [6, 1], [6, 3], [3, 2]], [[1, 6], [1, 7], [2, 5], [1, 4]], []], [[[1, 4], [1, 7], [2, 5]], [[2, 3], [3, 6], [5, 6], [6, 7]], [[1, 6]]]], [[[[2, 4], [4, 5], [4, 6], [1, 5], [6, 7]], [[6, 5], [2, 1]], [6, 3, 2]], [[[1, 2], [5, 6]], [[1, 5], [2, 4], [4, 5], [4, 6], [6, 7]], []]], [[[[4, 2]], [[7, 5], [5, 3], [7, 3]], [4, 5, 2, 3]], [[[3, 5], [3, 7], [5, 7]], [], [[2, 4]]]], [[[[4, 7], [3, 7], [2, 5], [2, 4]], [[6, 4], [1, 4], [7, 1], [5, 2]], [1, 6, 3, 2]], [[[1, 4], [1, 7], [4, 6]], [[2, 4], [3, 7], [4, 7]], [[2, 5]]]], [[[[4, 6], [2, 3], [4, 6]], [[5, 1], [6, 5], [5, 2], [4, 4]], []], [[[1, 5], [2, 5], [5, 6]], [[2, 3], [4, 6]], []]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[7, 3], [6, 4]], [[1, 4], [4, 3], [2, 1], [4, 6], [3, 5]], [4, 7]], [[[1, 2], [1, 4], [3, 4], [3, 5]], [[3, 7]], [[4, 6]]]]], [[[[[2, 5], [1, 7]], [[5, 6], [3, 4]], [6, 5, 3, 1]], [[[3, 4], [5, 6]], [[1, 7], [2, 5]], []]], [[[[1, 3]], [[3, 5], [2, 1], [4, 5], [4, 5], [3, 6]], [6, 5, 2, 1]], [[[1, 2], [3, 5], [3, 6], [4, 5]], [[1, 3]], []]], [[[[7, 5], [4, 2], [1, 5]], [[4, 6], [1, 7], [3, 7], [4, 1], [4, 1], [3, 1]], [7]], [[[1, 3], [1, 4], [1, 7], [3, 7], [4, 6]], [[1, 5], [2, 4], [5, 7]], []]], [[[[5, 1], [7, 1], [5, 3], [6, 2], [7, 5]], [[3, 7], [4, 1], [5, 6], [4, 7]], [1, 6, 4, 5]], [[[1, 4], [3, 7], [4, 7], [5, 6]], [[1, 7], [2, 6], [3, 5], [5, 7]], [[1, 5]]]], [[[[7, 3], [4, 6], [3, 7], [7, 5], [4, 2]], [[2, 3], [1, 5], [6, 1], [7, 5], [4, 4]], [2, 6]], [[[1, 5], [1, 6], [2, 3]], [[2, 4], [3, 7], [4, 6]], [[5, 7]]]], [[[[3, 6], [3, 6]], [[4, 5], [2, 6], [5, 4], [3, 1]], []], [[[1, 3], [2, 6], [4, 5]], [[3, 6]], []]], [[[[5, 1], [2, 5], [5, 1], [6, 2], [6, 3], [6, 4]], [[5, 4], [4, 5], [2, 4], [7, 4], [4, 1], [4, 4]], [2, 3, 5, 4]], [[[1, 4], [2, 4], [4, 5], [4, 7]], [[1, 5], [2, 6], [3, 6], [4, 6]], [[2, 5]]]], [[[[2, 4], [3, 7], [2, 6]], [[3, 1], [3, 1], [2, 1], [3, 3]], [6, 1, 4, 7]], [[[1, 2], [1, 3]], [[2, 4], [2, 6], [3, 7]], []]]]]\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":"a6a5006a964e99d885111845724640b2351b4f621b073bf665bb82c83c7804d7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(prev, curr, asleep):\n    def norm(p):\n        return (min(p), max(p))\n    P = {tuple(p) for p in prev}\n    C = {norm(p) for p in curr if p[0] != p[1]}\n    sl = set(asleep)\n    for p in P:\n        if p[0] in sl and p[1] in sl:\n            C.add(p)\n    begin = sorted(C - P)\n    end = sorted(P - C)\n    keep = sorted(P & C)\n    return [[list(p) for p in begin], [list(p) for p in end], [list(p) for p in keep]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[1, 2], [4, 5], [1, 2], [5, 4], [7, 1]], [[7, 3], [7, 2]], [7, 4, 2]], [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]], [[[[4, 6]], [[4, 1]], [3, 4, 2]], [[[1, 4]], [[4, 6]], []]], [[[[6, 1], [3, 1], [5, 6], [6, 7], [6, 4], [3, 5]], [[3, 2], [1, 4], [6, 5], [1, 3], [1, 7]], [3, 7, 4]], [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]], [[[[5, 3], [6, 3]], [[5, 6], [4, 2]], [6, 5, 4]], [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]], [[[[4, 7], [4, 7], [2, 4], [4, 5]], [[5, 4], [1, 5], [4, 7], [5, 2]], [6]], [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]], [[[[2, 6]], [[3, 6], [4, 5], [1, 7], [3, 5]], [3]], [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]], [[[[2, 4], [4, 3], [4, 6], [1, 3], [7, 5]], [[2, 1], [3, 1], [6, 3]], [1, 6]], [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]], [[[[1, 6], [4, 3]], [[4, 7], [5, 6], [6, 2], [5, 1], [3, 3]], [6]], [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]]], [[[[[7, 3]], [[2, 4], [1, 5], [7, 5]], [7, 4, 6, 2]], [[[1, 5], [2, 4], [5, 7]], [[3, 7]], []]], [[[[5, 4], [7, 2], [4, 3]], [[3, 4], [7, 4], [6, 2], [7, 6], [1, 4], [4, 2], [1, 1]], [7]], [[[1, 4], [2, 4], [2, 6], [4, 7], [6, 7]], [[2, 7], [4, 5]], [[3, 4]]]], [[[[2, 7], [4, 7], [4, 5], [1, 5], [4, 5], [1, 6]], [[3, 4], [4, 1], [5, 1], [5, 7], [7, 5], [6, 2]], [7, 1]], [[[1, 4], [2, 6], [3, 4], [5, 7]], [[1, 6], [2, 7], [4, 5], [4, 7]], [[1, 5]]]], [[[[6, 2], [6, 3], [7, 4]], [[2, 1], [7, 3], [6, 4], [2, 1]], [4]], [[[1, 2], [3, 7], [4, 6]], [[2, 6], [3, 6], [4, 7]], []]], [[[[4, 5], [4, 6], [3, 5], [5, 6], [5, 1]], [[7, 3], [1, 3], [6, 1], [4, 3]], [4, 5]], [[[1, 3], [1, 6], [3, 4], [3, 7]], [[1, 5], [3, 5], [4, 6], [5, 6]], [[4, 5]]]], [[[[2, 7], [1, 2], [1, 5]], [[6, 1], [7, 5], [1, 2], [3, 1], [7, 2], [6, 5]], [1, 5]], [[[1, 3], [1, 6], [5, 6], [5, 7]], [], [[1, 2], [1, 5], [2, 7]]]], [[[[4, 3], [2, 7], [2, 4], [5, 7], [3, 2], [5, 1]], [[6, 3], [6, 7], [4, 2]], [7]], [[[3, 6], [6, 7]], [[1, 5], [2, 3], [2, 7], [3, 4], [5, 7]], [[2, 4]]]], [[[[2, 3], [1, 2]], [[7, 1]], [3, 7]], [[[1, 7]], [[1, 2], [2, 3]], []]]], [[[[[7, 5]], [[4, 1], [3, 3]], [6]], [[[1, 4]], [[5, 7]], []]], [[[[1, 3], [4, 7], [6, 5]], [[3, 1]], [5, 6, 3]], [[], [[4, 7]], [[1, 3], [5, 6]]]], [[[[1, 7], [3, 7], [1, 3]], [[3, 6], [5, 6], [2, 7]], [1, 2, 3, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 7], [3, 7]], [[1, 3]]]], [[[[1, 2]], [[2, 5], [3, 6], [1, 3]], [5]], [[[1, 3], [2, 5], [3, 6]], [[1, 2]], []]], [[[[4, 6], [1, 7], [2, 5]], [[7, 1], [7, 2]], [4, 7, 5]], [[[2, 7]], [[2, 5], [4, 6]], [[1, 7]]]], [[[[5, 4], [3, 5], [3, 2], [2, 7]], [[2, 1], [3, 6], [2, 2]], [3, 1, 5, 7]], [[[1, 2], [3, 6]], [[2, 3], [2, 7], [4, 5]], [[3, 5]]]], [[[[4, 1], [5, 3], [1, 4], [1, 2], [6, 2]], [[2, 7], [5, 3], [5, 6], [3, 6], [3, 6]], [6, 4, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 2], [1, 4], [2, 6]], [[3, 5]]]], [[[[5, 6], [5, 1], [2, 3]], [[5, 2], [7, 1], [7, 1], [4, 6]], [7]], [[[1, 7], [2, 5], [4, 6]], [[1, 5], [2, 3], [5, 6]], []]]], [[[[[5, 6], [1, 3], [4, 7], [3, 6], [7, 2], [5, 3]], [[5, 1], [4, 2], [4, 7], [1, 7]], [1, 5]], [[[1, 5], [1, 7], [2, 4]], [[1, 3], [2, 7], [3, 5], [3, 6], [5, 6]], [[4, 7]]]], [[[[7, 6], [6, 5], [6, 1], [6, 3], [3, 2]], [[1, 6], [1, 7], [2, 5], [1, 4]], []], [[[1, 4], [1, 7], [2, 5]], [[2, 3], [3, 6], [5, 6], [6, 7]], [[1, 6]]]], [[[[2, 4], [4, 5], [4, 6], [1, 5], [6, 7]], [[6, 5], [2, 1]], [6, 3, 2]], [[[1, 2], [5, 6]], [[1, 5], [2, 4], [4, 5], [4, 6], [6, 7]], []]], [[[[4, 2]], [[7, 5], [5, 3], [7, 3]], [4, 5, 2, 3]], [[[3, 5], [3, 7], [5, 7]], [], [[2, 4]]]], [[[[4, 7], [3, 7], [2, 5], [2, 4]], [[6, 4], [1, 4], [7, 1], [5, 2]], [1, 6, 3, 2]], [[[1, 4], [1, 7], [4, 6]], [[2, 4], [3, 7], [4, 7]], [[2, 5]]]], [[[[4, 6], [2, 3], [4, 6]], [[5, 1], [6, 5], [5, 2], [4, 4]], []], [[[1, 5], [2, 5], [5, 6]], [[2, 3], [4, 6]], []]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[7, 3], [6, 4]], [[1, 4], [4, 3], [2, 1], [4, 6], [3, 5]], [4, 7]], [[[1, 2], [1, 4], [3, 4], [3, 5]], [[3, 7]], [[4, 6]]]]], [[[[[2, 5], [1, 7]], [[5, 6], [3, 4]], [6, 5, 3, 1]], [[[3, 4], [5, 6]], [[1, 7], [2, 5]], []]], [[[[1, 3]], [[3, 5], [2, 1], [4, 5], [4, 5], [3, 6]], [6, 5, 2, 1]], [[[1, 2], [3, 5], [3, 6], [4, 5]], [[1, 3]], []]], [[[[7, 5], [4, 2], [1, 5]], [[4, 6], [1, 7], [3, 7], [4, 1], [4, 1], [3, 1]], [7]], [[[1, 3], [1, 4], [1, 7], [3, 7], [4, 6]], [[1, 5], [2, 4], [5, 7]], []]], [[[[5, 1], [7, 1], [5, 3], [6, 2], [7, 5]], [[3, 7], [4, 1], [5, 6], [4, 7]], [1, 6, 4, 5]], [[[1, 4], [3, 7], [4, 7], [5, 6]], [[1, 7], [2, 6], [3, 5], [5, 7]], [[1, 5]]]], [[[[7, 3], [4, 6], [3, 7], [7, 5], [4, 2]], [[2, 3], [1, 5], [6, 1], [7, 5], [4, 4]], [2, 6]], [[[1, 5], [1, 6], [2, 3]], [[2, 4], [3, 7], [4, 6]], [[5, 7]]]], [[[[3, 6], [3, 6]], [[4, 5], [2, 6], [5, 4], [3, 1]], []], [[[1, 3], [2, 6], [4, 5]], [[3, 6]], []]], [[[[5, 1], [2, 5], [5, 1], [6, 2], [6, 3], [6, 4]], [[5, 4], [4, 5], [2, 4], [7, 4], [4, 1], [4, 4]], [2, 3, 5, 4]], [[[1, 4], [2, 4], [4, 5], [4, 7]], [[1, 5], [2, 6], [3, 6], [4, 6]], [[2, 5]]]], [[[[2, 4], [3, 7], [2, 6]], [[3, 1], [3, 1], [2, 1], [3, 3]], [6, 1, 4, 7]], [[[1, 2], [1, 3]], [[2, 4], [2, 6], [3, 7]], []]]]]\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":"5df61d474956f64ee00ec116644c9b9f38fd726e7a315dc3444f6e9fc03e77b5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(prev, curr, asleep):\n    def norm(p):\n        return (min(p), max(p))\n    P = {norm(p) for p in prev}\n    C = {norm(p) for p in curr if p[0] != p[1]}\n    sl = set(asleep)\n    for p in P:\n        if p[0] in sl and p[1] in sl:\n            C.add(p)\n    begin = sorted(C - P)\n    end = sorted(P - C)\n    keep = sorted(P & C)\n    return [[list(p) for p in begin], [list(p) for p in end], [list(p) for p in keep]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[1, 2], [4, 5], [1, 2], [5, 4], [7, 1]], [[7, 3], [7, 2]], [7, 4, 2]], [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]], [[[[4, 6]], [[4, 1]], [3, 4, 2]], [[[1, 4]], [[4, 6]], []]], [[[[6, 1], [3, 1], [5, 6], [6, 7], [6, 4], [3, 5]], [[3, 2], [1, 4], [6, 5], [1, 3], [1, 7]], [3, 7, 4]], [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]], [[[[5, 3], [6, 3]], [[5, 6], [4, 2]], [6, 5, 4]], [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]], [[[[4, 7], [4, 7], [2, 4], [4, 5]], [[5, 4], [1, 5], [4, 7], [5, 2]], [6]], [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]], [[[[2, 6]], [[3, 6], [4, 5], [1, 7], [3, 5]], [3]], [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]], [[[[2, 4], [4, 3], [4, 6], [1, 3], [7, 5]], [[2, 1], [3, 1], [6, 3]], [1, 6]], [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]], [[[[1, 6], [4, 3]], [[4, 7], [5, 6], [6, 2], [5, 1], [3, 3]], [6]], [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]]], [[[[[7, 3]], [[2, 4], [1, 5], [7, 5]], [7, 4, 6, 2]], [[[1, 5], [2, 4], [5, 7]], [[3, 7]], []]], [[[[5, 4], [7, 2], [4, 3]], [[3, 4], [7, 4], [6, 2], [7, 6], [1, 4], [4, 2], [1, 1]], [7]], [[[1, 4], [2, 4], [2, 6], [4, 7], [6, 7]], [[2, 7], [4, 5]], [[3, 4]]]], [[[[2, 7], [4, 7], [4, 5], [1, 5], [4, 5], [1, 6]], [[3, 4], [4, 1], [5, 1], [5, 7], [7, 5], [6, 2]], [7, 1]], [[[1, 4], [2, 6], [3, 4], [5, 7]], [[1, 6], [2, 7], [4, 5], [4, 7]], [[1, 5]]]], [[[[6, 2], [6, 3], [7, 4]], [[2, 1], [7, 3], [6, 4], [2, 1]], [4]], [[[1, 2], [3, 7], [4, 6]], [[2, 6], [3, 6], [4, 7]], []]], [[[[4, 5], [4, 6], [3, 5], [5, 6], [5, 1]], [[7, 3], [1, 3], [6, 1], [4, 3]], [4, 5]], [[[1, 3], [1, 6], [3, 4], [3, 7]], [[1, 5], [3, 5], [4, 6], [5, 6]], [[4, 5]]]], [[[[2, 7], [1, 2], [1, 5]], [[6, 1], [7, 5], [1, 2], [3, 1], [7, 2], [6, 5]], [1, 5]], [[[1, 3], [1, 6], [5, 6], [5, 7]], [], [[1, 2], [1, 5], [2, 7]]]], [[[[4, 3], [2, 7], [2, 4], [5, 7], [3, 2], [5, 1]], [[6, 3], [6, 7], [4, 2]], [7]], [[[3, 6], [6, 7]], [[1, 5], [2, 3], [2, 7], [3, 4], [5, 7]], [[2, 4]]]], [[[[2, 3], [1, 2]], [[7, 1]], [3, 7]], [[[1, 7]], [[1, 2], [2, 3]], []]]], [[[[[7, 5]], [[4, 1], [3, 3]], [6]], [[[1, 4]], [[5, 7]], []]], [[[[1, 3], [4, 7], [6, 5]], [[3, 1]], [5, 6, 3]], [[], [[4, 7]], [[1, 3], [5, 6]]]], [[[[1, 7], [3, 7], [1, 3]], [[3, 6], [5, 6], [2, 7]], [1, 2, 3, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 7], [3, 7]], [[1, 3]]]], [[[[1, 2]], [[2, 5], [3, 6], [1, 3]], [5]], [[[1, 3], [2, 5], [3, 6]], [[1, 2]], []]], [[[[4, 6], [1, 7], [2, 5]], [[7, 1], [7, 2]], [4, 7, 5]], [[[2, 7]], [[2, 5], [4, 6]], [[1, 7]]]], [[[[5, 4], [3, 5], [3, 2], [2, 7]], [[2, 1], [3, 6], [2, 2]], [3, 1, 5, 7]], [[[1, 2], [3, 6]], [[2, 3], [2, 7], [4, 5]], [[3, 5]]]], [[[[4, 1], [5, 3], [1, 4], [1, 2], [6, 2]], [[2, 7], [5, 3], [5, 6], [3, 6], [3, 6]], [6, 4, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 2], [1, 4], [2, 6]], [[3, 5]]]], [[[[5, 6], [5, 1], [2, 3]], [[5, 2], [7, 1], [7, 1], [4, 6]], [7]], [[[1, 7], [2, 5], [4, 6]], [[1, 5], [2, 3], [5, 6]], []]]], [[[[[5, 6], [1, 3], [4, 7], [3, 6], [7, 2], [5, 3]], [[5, 1], [4, 2], [4, 7], [1, 7]], [1, 5]], [[[1, 5], [1, 7], [2, 4]], [[1, 3], [2, 7], [3, 5], [3, 6], [5, 6]], [[4, 7]]]], [[[[7, 6], [6, 5], [6, 1], [6, 3], [3, 2]], [[1, 6], [1, 7], [2, 5], [1, 4]], []], [[[1, 4], [1, 7], [2, 5]], [[2, 3], [3, 6], [5, 6], [6, 7]], [[1, 6]]]], [[[[2, 4], [4, 5], [4, 6], [1, 5], [6, 7]], [[6, 5], [2, 1]], [6, 3, 2]], [[[1, 2], [5, 6]], [[1, 5], [2, 4], [4, 5], [4, 6], [6, 7]], []]], [[[[4, 2]], [[7, 5], [5, 3], [7, 3]], [4, 5, 2, 3]], [[[3, 5], [3, 7], [5, 7]], [], [[2, 4]]]], [[[[4, 7], [3, 7], [2, 5], [2, 4]], [[6, 4], [1, 4], [7, 1], [5, 2]], [1, 6, 3, 2]], [[[1, 4], [1, 7], [4, 6]], [[2, 4], [3, 7], [4, 7]], [[2, 5]]]], [[[[4, 6], [2, 3], [4, 6]], [[5, 1], [6, 5], [5, 2], [4, 4]], []], [[[1, 5], [2, 5], [5, 6]], [[2, 3], [4, 6]], []]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[7, 3], [6, 4]], [[1, 4], [4, 3], [2, 1], [4, 6], [3, 5]], [4, 7]], [[[1, 2], [1, 4], [3, 4], [3, 5]], [[3, 7]], [[4, 6]]]]], [[[[[2, 5], [1, 7]], [[5, 6], [3, 4]], [6, 5, 3, 1]], [[[3, 4], [5, 6]], [[1, 7], [2, 5]], []]], [[[[1, 3]], [[3, 5], [2, 1], [4, 5], [4, 5], [3, 6]], [6, 5, 2, 1]], [[[1, 2], [3, 5], [3, 6], [4, 5]], [[1, 3]], []]], [[[[7, 5], [4, 2], [1, 5]], [[4, 6], [1, 7], [3, 7], [4, 1], [4, 1], [3, 1]], [7]], [[[1, 3], [1, 4], [1, 7], [3, 7], [4, 6]], [[1, 5], [2, 4], [5, 7]], []]], [[[[5, 1], [7, 1], [5, 3], [6, 2], [7, 5]], [[3, 7], [4, 1], [5, 6], [4, 7]], [1, 6, 4, 5]], [[[1, 4], [3, 7], [4, 7], [5, 6]], [[1, 7], [2, 6], [3, 5], [5, 7]], [[1, 5]]]], [[[[7, 3], [4, 6], [3, 7], [7, 5], [4, 2]], [[2, 3], [1, 5], [6, 1], [7, 5], [4, 4]], [2, 6]], [[[1, 5], [1, 6], [2, 3]], [[2, 4], [3, 7], [4, 6]], [[5, 7]]]], [[[[3, 6], [3, 6]], [[4, 5], [2, 6], [5, 4], [3, 1]], []], [[[1, 3], [2, 6], [4, 5]], [[3, 6]], []]], [[[[5, 1], [2, 5], [5, 1], [6, 2], [6, 3], [6, 4]], [[5, 4], [4, 5], [2, 4], [7, 4], [4, 1], [4, 4]], [2, 3, 5, 4]], [[[1, 4], [2, 4], [4, 5], [4, 7]], [[1, 5], [2, 6], [3, 6], [4, 6]], [[2, 5]]]], [[[[2, 4], [3, 7], [2, 6]], [[3, 1], [3, 1], [2, 1], [3, 3]], [6, 1, 4, 7]], [[[1, 2], [1, 3]], [[2, 4], [2, 6], [3, 7]], []]]]]\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-pair-cache-diff-previous-pair-normalization","generated_at":"2026-09-29T14:50:59.707457+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":"Normalize both frames to (min,max).","root_cause":"P keeps raw tuple orientation.","sha256":"447dcddc72986caf1e45aa498f4e90826f3b4e8418ddb94e3fc5ef40deb38fe0","title":"Previous-frame pairs are not normalized · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.63,"exit_code":1,"observations":[{"actual":[[[2,7],[3,7]],[[2,1],[5,4],[7,1]],[]],"check":"case 0","expected":[[[2,7],[3,7]],[[1,2],[1,7],[4,5]],[]],"passed":false},{"actual":[[[1,4]],[[6,4]],[]],"check":"case 1","expected":[[[1,4]],[[4,6]],[]],"passed":false},{"actual":[[[1,3],[1,4],[1,7],[2,3],[5,6]],[[3,1],[5,3],[6,1],[6,4],[6,5],[7,6]],[]],"check":"case 2","expected":[[[1,4],[1,7],[2,3]],[[1,6],[3,5],[4,6],[6,7]],[[1,3],[5,6]]],"passed":false},{"actual":[[[2,4],[5,6]],[[5,3],[6,3]],[]],"check":"case 3","expected":[[[2,4],[5,6]],[[3,5],[3,6]],[]],"passed":false},{"actual":[[[1,5],[2,5],[4,5],[4,7]],[[4,2],[5,4],[7,4]],[]],"check":"case 4","expected":[[[1,5],[2,5]],[[2,4]],[[4,5],[4,7]]],"passed":false},{"actual":[[[1,7],[3,5],[3,6],[4,5]],[[6,2]],[]],"check":"case 5","expected":[[[1,7],[3,5],[3,6],[4,5]],[[2,6]],[]],"passed":false},{"actual":[[[1,2],[1,3],[3,6]],[[3,1],[4,2],[4,3],[6,4],[7,5]],[]],"check":"case 6","expected":[[[1,2],[3,6]],[[2,4],[3,4],[4,6],[5,7]],[[1,3]]],"passed":false},{"actual":[[[1,5],[2,6],[4,7],[5,6]],[[4,3],[6,1]],[]],"check":"case 7","expected":[[[1,5],[2,6],[4,7],[5,6]],[[1,6],[3,4]],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[[2, 7], [3, 7]], [[2, 1], [5, 4], [7, 1]], []], \"expected\": [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [[[1, 4]], [[6, 4]], []], \"expected\": [[[1, 4]], [[4, 6]], []], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [[[1, 3], [1, 4], [1, 7], [2, 3], [5, 6]], [[3, 1], [5, 3], [6, 1], [6, 4], [6, 5], [7, 6]], []], \"expected\": [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[[2, 4], [5, 6]], [[5, 3], [6, 3]], []], \"expected\": [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[[1, 5], [2, 5], [4, 5], [4, 7]], [[4, 2], [5, 4], [7, 4]], []], \"expected\": [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [[[1, 7], [3, 5], [3, 6], [4, 5]], [[6, 2]], []], \"expected\": [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [[[1, 2], [1, 3], [3, 6]], [[3, 1], [4, 2], [4, 3], [6, 4], [7, 5]], []], \"expected\": [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [[[1, 5], [2, 6], [4, 7], [5, 6]], [[4, 3], [6, 1]], []], \"expected\": [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.183,"exit_code":1,"observations":[{"actual":[[[2,7],[3,7]],[[1,2],[4,5],[5,4],[7,1]],[]],"check":"case 0","expected":[[[2,7],[3,7]],[[1,2],[1,7],[4,5]],[]],"passed":false},{"actual":[[[1,4]],[[4,6]],[]],"check":"case 1","expected":[[[1,4]],[[4,6]],[]],"passed":true},{"actual":[[[1,3],[1,4],[1,7],[2,3]],[[3,1],[3,5],[6,1],[6,4],[6,7]],[[5,6]]],"check":"case 2","expected":[[[1,4],[1,7],[2,3]],[[1,6],[3,5],[4,6],[6,7]],[[1,3],[5,6]]],"passed":false},{"actual":[[[2,4],[5,6]],[[5,3],[6,3]],[]],"check":"case 3","expected":[[[2,4],[5,6]],[[3,5],[3,6]],[]],"passed":false},{"actual":[[[1,5],[2,5]],[[2,4]],[[4,5],[4,7]]],"check":"case 4","expected":[[[1,5],[2,5]],[[2,4]],[[4,5],[4,7]]],"passed":true},{"actual":[[[1,7],[3,5],[3,6],[4,5]],[[2,6]],[]],"check":"case 5","expected":[[[1,7],[3,5],[3,6],[4,5]],[[2,6]],[]],"passed":true},{"actual":[[[1,2],[3,6]],[[2,4],[4,3],[4,6],[7,5]],[[1,3]]],"check":"case 6","expected":[[[1,2],[3,6]],[[2,4],[3,4],[4,6],[5,7]],[[1,3]]],"passed":false},{"actual":[[[1,5],[2,6],[4,7],[5,6]],[[1,6],[4,3]],[]],"check":"case 7","expected":[[[1,5],[2,6],[4,7],[5,6]],[[1,6],[3,4]],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[[2, 7], [3, 7]], [[1, 2], [4, 5], [5, 4], [7, 1]], []], \"expected\": [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [[[1, 4]], [[4, 6]], []], \"expected\": [[[1, 4]], [[4, 6]], []], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[[1, 3], [1, 4], [1, 7], [2, 3]], [[3, 1], [3, 5], [6, 1], [6, 4], [6, 7]], [[5, 6]]], \"expected\": [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[[2, 4], [5, 6]], [[5, 3], [6, 3]], []], \"expected\": [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]], \"expected\": [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []], \"expected\": [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[[1, 2], [3, 6]], [[2, 4], [4, 3], [4, 6], [7, 5]], [[1, 3]]], \"expected\": [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [4, 3]], []], \"expected\": [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.445,"exit_code":0,"observations":[{"actual":[[[2,7],[3,7]],[[1,2],[1,7],[4,5]],[]],"check":"case 0","expected":[[[2,7],[3,7]],[[1,2],[1,7],[4,5]],[]],"passed":true},{"actual":[[[1,4]],[[4,6]],[]],"check":"case 1","expected":[[[1,4]],[[4,6]],[]],"passed":true},{"actual":[[[1,4],[1,7],[2,3]],[[1,6],[3,5],[4,6],[6,7]],[[1,3],[5,6]]],"check":"case 2","expected":[[[1,4],[1,7],[2,3]],[[1,6],[3,5],[4,6],[6,7]],[[1,3],[5,6]]],"passed":true},{"actual":[[[2,4],[5,6]],[[3,5],[3,6]],[]],"check":"case 3","expected":[[[2,4],[5,6]],[[3,5],[3,6]],[]],"passed":true},{"actual":[[[1,5],[2,5]],[[2,4]],[[4,5],[4,7]]],"check":"case 4","expected":[[[1,5],[2,5]],[[2,4]],[[4,5],[4,7]]],"passed":true},{"actual":[[[1,7],[3,5],[3,6],[4,5]],[[2,6]],[]],"check":"case 5","expected":[[[1,7],[3,5],[3,6],[4,5]],[[2,6]],[]],"passed":true},{"actual":[[[1,2],[3,6]],[[2,4],[3,4],[4,6],[5,7]],[[1,3]]],"check":"case 6","expected":[[[1,2],[3,6]],[[2,4],[3,4],[4,6],[5,7]],[[1,3]]],"passed":true},{"actual":[[[1,5],[2,6],[4,7],[5,6]],[[1,6],[3,4]],[]],"check":"case 7","expected":[[[1,5],[2,6],[4,7],[5,6]],[[1,6],[3,4]],[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []], \"expected\": [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[[1, 4]], [[4, 6]], []], \"expected\": [[[1, 4]], [[4, 6]], []], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]], \"expected\": [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []], \"expected\": [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]], \"expected\": [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []], \"expected\": [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]], \"expected\": [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []], \"expected\": [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}