{"abstract":"End-of-step slope is evaluated at the midpoint and trajectories drift.","category":"Physics integrator stability","checks":8,"contract":"solve(x0, v0, k, c, F, wf, dt, steps): unit mass x''=-k*x-c*v+F*cos(wf*t) with wf in rad/s, t starting at 0, integrated with classical RK4. Return [x, v, t] rounded to 6.","contract_signature":"x0, v0, k, c, F, wf, dt, steps","evaluation_group":"w2-physics_integrator_stability-forced-oscillator-rk4","failed_approach":"Using k2 for the full-step offset still skips the third slope.","family":"w2-physics_integrator_stability-forced-oscillator-rk4-fourth-stage-offset","id":"FA-87011","implementations":{"attempt":{"sha256":"22b2622ddac803103f06fc526a63d0ac309eeee2e3c955d0f65ddff6535f4160","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x0, v0, k, c, F, wf, dt, steps):\n    def f(t, x, v):\n        return v, -k * x - c * v + F * math.cos(wf * t)\n    t = 0.0\n    x, v = x0, v0\n    for _ in range(steps):\n        k1x, k1v = f(t, x, v)\n        k2x, k2v = f(t + dt / 2, x + dt / 2 * k1x, v + dt / 2 * k1v)\n        k3x, k3v = f(t + dt / 2, x + dt / 2 * k2x, v + dt / 2 * k2v)\n        k4x, k4v = f(t + dt, x + dt * k2x, v + dt * k2v)\n        x = x + dt / 6 * (k1x + 2 * k2x + 2 * k3x + k4x)\n        v = v + dt / 6 * (k1v + 2 * k2v + 2 * k3v + k4v)\n        t = t + dt\n    return [round(x, 6), round(v, 6), round(t, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[0.037, 0.015, 18.944, 1.217, 0.336, 4.094, 0.05, 4], [0.032666, -0.056271, 0.2]], [[0.206, 0.096, 17.287, 0.284, 1.767, 2.847, 0.2, 1], [0.188435, -0.265686, 0.2]], [[0.039, -0.882, 11.673, 0.399, 0.713, 4.233, 0.2, 3], [-0.180777, 0.214002, 0.6]], [[0.477, 0.804, 9.463, 0.795, 0.343, 4.866, 0.2, 1], [0.539279, -0.178827, 0.2]], [[0.105, 0.838, 4.023, 1.065, 0.405, 4.968, 0.1, 5], [0.358254, 0.08841, 0.5]], [[0.594, 0.724, 5.574, 1.414, 0.54, 2.544, 0.2, 5], [0.050911, -1.000788, 1.0]], [[0.446, 0.832, 18.463, 0.804, 0.621, 3.458, 0.2, 3], [-0.159312, -1.479617, 0.6]], [[-0.109, -0.682, 16.643, 0.151, 1.208, 3.199, 0.05, 3], [-0.171504, -0.13078, 0.15]]], [[[0.35, 0.024, 2.459, 0.489, 1.678, 3.184, 0.2, 2], [0.401172, 0.137673, 0.4]], [[-0.032, 0.808, 18.227, 0.749, 0.437, 3.703, 0.1, 1], [0.04836, 0.775101, 0.1]], [[-0.017, 0.68, 3.032, 0.837, 0.432, 2.962, 0.05, 8], [0.225745, 0.477143, 0.4]], [[-0.926, 0.952, 5.429, 0.55, 1.365, 4.948, 0.2, 1], [-0.633361, 1.884933, 0.2]], [[-0.492, -0.144, 14.57, 1.424, 1.521, 1.605, 0.05, 3], [-0.421761, 1.012157, 0.15]], [[-0.137, -0.776, 8.235, 0.284, 1.595, 3.405, 0.05, 6], [-0.227382, 0.158148, 0.3]], [[0.5, 0.334, 18.653, 0.323, 1.653, 1.344, 0.2, 5], [-0.182262, 1.108817, 1.0]], [[-0.609, 0.599, 6.838, 1.12, 1.471, 2.154, 0.05, 4], [-0.404509, 1.365726, 0.2]]], [[[-0.297, 0.781, 2.001, 0.064, 0.974, 2.016, 0.1, 3], [-0.004067, 1.132644, 0.3]], [[-0.053, 0.994, 12.808, 0.487, 1.8, 1.164, 0.05, 5], [0.220226, 1.039905, 0.25]], [[-0.394, 0.849, 18.783, 1.27, 1.837, 1.788, 0.1, 10], [0.047492, -1.406422, 1.0]], [[-0.571, 0.019, 10.668, 1.333, 0.813, 4.88, 0.1, 10], [0.238859, -0.217571, 1.0]], [[0.94, -0.296, 5.863, 0.108, 0.67, 1.998, 0.05, 5], [0.725524, -1.365674, 0.25]], [[-0.82, -0.452, 6.501, 0.489, 1.04, 2.64, 0.1, 8], [0.231149, 1.692755, 0.8]], [[-0.367, -0.476, 6.934, 1.115, 0.351, 2.009, 0.05, 5], [-0.383984, 0.306397, 0.25]], [[0.156, -0.808, 12.089, 0.635, 0.926, 3.013, 0.05, 7], [-0.092465, -0.474045, 0.35]]], [[[-0.772, 0.752, 2.823, 0.497, 1.621, 2.92, 0.1, 6], [0.065151, 1.550767, 0.6]], [[-0.484, -0.908, 18.372, 0.481, 1.964, 2.315, 0.2, 2], [-0.051507, 2.343495, 0.4]], [[-0.198, -0.028, 4.048, 0.079, 1.642, 1.588, 0.2, 8], [0.361524, -1.100738, 1.6]], [[0.532, 0.956, 10.77, 1.064, 0.812, 2.846, 0.1, 4], [0.457971, -1.147408, 0.4]], [[-0.77, 0.902, 10.411, 0.846, 1.693, 1.454, 0.2, 1], [-0.438766, 2.258811, 0.2]], [[-0.442, 0.797, 6.557, 1.401, 1.795, 3.756, 0.1, 9], [0.25065, -0.396817, 0.9]], [[-0.481, 0.589, 9.513, 0.453, 0.932, 1.014, 0.1, 7], [0.468153, 0.929769, 0.7]], [[-0.93, -0.587, 15.161, 1.124, 1.467, 0.594, 0.1, 3], [-0.486864, 2.987903, 0.3]]], [[[-0.341, 0.921, 14.484, 0.78, 0.993, 4.954, 0.1, 11], [-0.092121, -0.961694, 1.1]], [[0.467, -0.477, 3.323, 0.374, 1.738, 2.046, 0.2, 1], [0.380232, -0.387088, 0.2]], [[0.059, -0.427, 15.895, 0.474, 0.892, 1.849, 0.1, 12], [0.043332, -0.18688, 1.2]], [[0.48, 0.991, 13.504, 0.938, 1.754, 1.99, 0.2, 8], [-0.112907, 0.598276, 1.6]], [[-0.653, 0.301, 2.747, 0.362, 0.302, 3.513, 0.1, 2], [-0.555676, 0.656608, 0.2]], [[0.639, -0.671, 17.636, 0.056, 1.617, 0.878, 0.05, 4], [0.339327, -2.145523, 0.2]], [[0.96, 0.368, 6.136, 0.868, 0.713, 4.277, 0.1, 13], [-0.632372, -0.226167, 1.3]], [[-0.795, -0.597, 18.803, 1.441, 1.505, 2.357, 0.2, 13], [0.139932, -0.532797, 2.6]]]]\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":"62da6bcdd12d93832ae42755116d663bde9ea1f45d34a8d4bb05d2ade3e9ee3e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x0, v0, k, c, F, wf, dt, steps):\n    def f(t, x, v):\n        return v, -k * x - c * v + F * math.cos(wf * t)\n    t = 0.0\n    x, v = x0, v0\n    for _ in range(steps):\n        k1x, k1v = f(t, x, v)\n        k2x, k2v = f(t + dt / 2, x + dt / 2 * k1x, v + dt / 2 * k1v)\n        k3x, k3v = f(t + dt / 2, x + dt / 2 * k2x, v + dt / 2 * k2v)\n        k4x, k4v = f(t + dt, x + dt / 2 * k3x, v + dt / 2 * k3v)\n        x = x + dt / 6 * (k1x + 2 * k2x + 2 * k3x + k4x)\n        v = v + dt / 6 * (k1v + 2 * k2v + 2 * k3v + k4v)\n        t = t + dt\n    return [round(x, 6), round(v, 6), round(t, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[0.037, 0.015, 18.944, 1.217, 0.336, 4.094, 0.05, 4], [0.032666, -0.056271, 0.2]], [[0.206, 0.096, 17.287, 0.284, 1.767, 2.847, 0.2, 1], [0.188435, -0.265686, 0.2]], [[0.039, -0.882, 11.673, 0.399, 0.713, 4.233, 0.2, 3], [-0.180777, 0.214002, 0.6]], [[0.477, 0.804, 9.463, 0.795, 0.343, 4.866, 0.2, 1], [0.539279, -0.178827, 0.2]], [[0.105, 0.838, 4.023, 1.065, 0.405, 4.968, 0.1, 5], [0.358254, 0.08841, 0.5]], [[0.594, 0.724, 5.574, 1.414, 0.54, 2.544, 0.2, 5], [0.050911, -1.000788, 1.0]], [[0.446, 0.832, 18.463, 0.804, 0.621, 3.458, 0.2, 3], [-0.159312, -1.479617, 0.6]], [[-0.109, -0.682, 16.643, 0.151, 1.208, 3.199, 0.05, 3], [-0.171504, -0.13078, 0.15]]], [[[0.35, 0.024, 2.459, 0.489, 1.678, 3.184, 0.2, 2], [0.401172, 0.137673, 0.4]], [[-0.032, 0.808, 18.227, 0.749, 0.437, 3.703, 0.1, 1], [0.04836, 0.775101, 0.1]], [[-0.017, 0.68, 3.032, 0.837, 0.432, 2.962, 0.05, 8], [0.225745, 0.477143, 0.4]], [[-0.926, 0.952, 5.429, 0.55, 1.365, 4.948, 0.2, 1], [-0.633361, 1.884933, 0.2]], [[-0.492, -0.144, 14.57, 1.424, 1.521, 1.605, 0.05, 3], [-0.421761, 1.012157, 0.15]], [[-0.137, -0.776, 8.235, 0.284, 1.595, 3.405, 0.05, 6], [-0.227382, 0.158148, 0.3]], [[0.5, 0.334, 18.653, 0.323, 1.653, 1.344, 0.2, 5], [-0.182262, 1.108817, 1.0]], [[-0.609, 0.599, 6.838, 1.12, 1.471, 2.154, 0.05, 4], [-0.404509, 1.365726, 0.2]]], [[[-0.297, 0.781, 2.001, 0.064, 0.974, 2.016, 0.1, 3], [-0.004067, 1.132644, 0.3]], [[-0.053, 0.994, 12.808, 0.487, 1.8, 1.164, 0.05, 5], [0.220226, 1.039905, 0.25]], [[-0.394, 0.849, 18.783, 1.27, 1.837, 1.788, 0.1, 10], [0.047492, -1.406422, 1.0]], [[-0.571, 0.019, 10.668, 1.333, 0.813, 4.88, 0.1, 10], [0.238859, -0.217571, 1.0]], [[0.94, -0.296, 5.863, 0.108, 0.67, 1.998, 0.05, 5], [0.725524, -1.365674, 0.25]], [[-0.82, -0.452, 6.501, 0.489, 1.04, 2.64, 0.1, 8], [0.231149, 1.692755, 0.8]], [[-0.367, -0.476, 6.934, 1.115, 0.351, 2.009, 0.05, 5], [-0.383984, 0.306397, 0.25]], [[0.156, -0.808, 12.089, 0.635, 0.926, 3.013, 0.05, 7], [-0.092465, -0.474045, 0.35]]], [[[-0.772, 0.752, 2.823, 0.497, 1.621, 2.92, 0.1, 6], [0.065151, 1.550767, 0.6]], [[-0.484, -0.908, 18.372, 0.481, 1.964, 2.315, 0.2, 2], [-0.051507, 2.343495, 0.4]], [[-0.198, -0.028, 4.048, 0.079, 1.642, 1.588, 0.2, 8], [0.361524, -1.100738, 1.6]], [[0.532, 0.956, 10.77, 1.064, 0.812, 2.846, 0.1, 4], [0.457971, -1.147408, 0.4]], [[-0.77, 0.902, 10.411, 0.846, 1.693, 1.454, 0.2, 1], [-0.438766, 2.258811, 0.2]], [[-0.442, 0.797, 6.557, 1.401, 1.795, 3.756, 0.1, 9], [0.25065, -0.396817, 0.9]], [[-0.481, 0.589, 9.513, 0.453, 0.932, 1.014, 0.1, 7], [0.468153, 0.929769, 0.7]], [[-0.93, -0.587, 15.161, 1.124, 1.467, 0.594, 0.1, 3], [-0.486864, 2.987903, 0.3]]], [[[-0.341, 0.921, 14.484, 0.78, 0.993, 4.954, 0.1, 11], [-0.092121, -0.961694, 1.1]], [[0.467, -0.477, 3.323, 0.374, 1.738, 2.046, 0.2, 1], [0.380232, -0.387088, 0.2]], [[0.059, -0.427, 15.895, 0.474, 0.892, 1.849, 0.1, 12], [0.043332, -0.18688, 1.2]], [[0.48, 0.991, 13.504, 0.938, 1.754, 1.99, 0.2, 8], [-0.112907, 0.598276, 1.6]], [[-0.653, 0.301, 2.747, 0.362, 0.302, 3.513, 0.1, 2], [-0.555676, 0.656608, 0.2]], [[0.639, -0.671, 17.636, 0.056, 1.617, 0.878, 0.05, 4], [0.339327, -2.145523, 0.2]], [[0.96, 0.368, 6.136, 0.868, 0.713, 4.277, 0.1, 13], [-0.632372, -0.226167, 1.3]], [[-0.795, -0.597, 18.803, 1.441, 1.505, 2.357, 0.2, 13], [0.139932, -0.532797, 2.6]]]]\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 and rounded float output; not a production physics engine or a proof of numerical stability. 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-physics_integrator_stability-forced-oscillator-rk4-fourth-stage-offset","generated_at":"2026-09-29T14:50:54.724071+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Game and robotics physics loops depend on integrator update order, step control and stabilization terms; a wrong decision point turns a stable simulation into drifting or exploding motion.","root_cause":"Stage four offsets the state by dt/2*k3.","sha256":"4152183010459aac02d070deaea78b48efa5bf605e5a13cd45bb860fa459ba51","title":"RK4 fourth stage advances only half a step · 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":42.459,"exit_code":1,"observations":[{"actual":[0.03266,-0.056251,0.2],"check":"case 0","expected":[0.032666,-0.056271,0.2],"passed":false},{"actual":[0.186301,-0.267216,0.2],"check":"case 1","expected":[0.188435,-0.265686,0.2],"passed":false},{"actual":[-0.17546,0.208594,0.6],"check":"case 2","expected":[-0.180777,0.214002,0.6],"passed":false},{"actual":[0.536023,-0.178877,0.2],"check":"case 3","expected":[0.539279,-0.178827,0.2],"passed":false},{"actual":[0.358094,0.08852,0.5],"check":"case 4","expected":[0.358254,0.08841,0.5],"passed":false},{"actual":[0.053002,-0.994687,1.0],"check":"case 5","expected":[0.050911,-1.000788,1.0],"passed":false},{"actual":[-0.160144,-1.36537,0.6],"check":"case 6","expected":[-0.159312,-1.479617,0.6],"passed":false},{"actual":[-0.171453,-0.130734,0.15],"check":"case 7","expected":[-0.171504,-0.13078,0.15],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [0.03266, -0.056251, 0.2], \"expected\": [0.032666, -0.056271, 0.2], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [0.186301, -0.267216, 0.2], \"expected\": [0.188435, -0.265686, 0.2], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [-0.17546, 0.208594, 0.6], \"expected\": [-0.180777, 0.214002, 0.6], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [0.536023, -0.178877, 0.2], \"expected\": [0.539279, -0.178827, 0.2], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [0.358094, 0.08852, 0.5], \"expected\": [0.358254, 0.08841, 0.5], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [0.053002, -0.994687, 1.0], \"expected\": [0.050911, -1.000788, 1.0], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [-0.160144, -1.36537, 0.6], \"expected\": [-0.159312, -1.479617, 0.6], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [-0.171453, -0.130734, 0.15], \"expected\": [-0.171504, -0.13078, 0.15], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.595,"exit_code":1,"observations":[{"actual":[0.032906,-0.057294,0.2],"check":"case 0","expected":[0.032666,-0.056271,0.2],"passed":false},{"actual":[0.194057,-0.273314,0.2],"check":"case 1","expected":[0.188435,-0.265686,0.2],"passed":false},{"actual":[-0.203225,0.236543,0.6],"check":"case 2","expected":[-0.180777,0.214002,0.6],"passed":false},{"actual":[0.555078,-0.182519,0.2],"check":"case 3","expected":[0.539279,-0.178827,0.2],"passed":false},{"actual":[0.36479,0.085174,0.5],"check":"case 4","expected":[0.358254,0.08841,0.5],"passed":false},{"actual":[0.041954,-1.078154,1.0],"check":"case 5","expected":[0.050911,-1.000788,1.0],"passed":false},{"actual":[-0.175884,-1.76739,0.6],"check":"case 6","expected":[-0.159312,-1.479617,0.6],"passed":false},{"actual":[-0.173985,-0.132768,0.15],"check":"case 7","expected":[-0.171504,-0.13078,0.15],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [0.032906, -0.057294, 0.2], \"expected\": [0.032666, -0.056271, 0.2], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [0.194057, -0.273314, 0.2], \"expected\": [0.188435, -0.265686, 0.2], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [-0.203225, 0.236543, 0.6], \"expected\": [-0.180777, 0.214002, 0.6], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [0.555078, -0.182519, 0.2], \"expected\": [0.539279, -0.178827, 0.2], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [0.36479, 0.085174, 0.5], \"expected\": [0.358254, 0.08841, 0.5], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [0.041954, -1.078154, 1.0], \"expected\": [0.050911, -1.000788, 1.0], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [-0.175884, -1.76739, 0.6], \"expected\": [-0.159312, -1.479617, 0.6], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [-0.173985, -0.132768, 0.15], \"expected\": [-0.171504, -0.13078, 0.15], \"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."}}