FA-87231 / Physics integrator stability / Open access
Friction impulse increment has the sliding direction sign reversed · case 01
Friction accelerates sliding instead of opposing it.
ROOT CAUSE
d = vt/w instead of -vt/w.
THE FAILURE
d = vt/w instead of -vt/w.
Unsuccessful approach: Using -|vt| always pushes the same way.
Case contract
solve(vn0, vt0, w, mu, iterations, cached, warm): several contact points share one relative normal and tangent velocity with inverse mass w. Warm start each point with warm*cached [jn, jt] and apply it to the velocities. Each iteration visits points in order: friction first (accumulated jt clamped to |jt|<=mu*jn), then normal (accumulated jn clamped >=0). Return [jn list, jt list, vn, vt] rounded to 6.
Why this case matters
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.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(vn0, vt0, w, mu, iterations, cached, warm):
vn, vt = vn0, vt0
jn = [p[0] * warm for p in cached]
jt = [p[1] * warm for p in cached]
for i in range(len(cached)):
vn += jn[i] * w
vt += jt[i] * w
for _ in range(iterations):
for i in range(len(cached)):
d = vt / w
old = jt[i]
lim = mu * jn[i]
jt[i] = max(-lim, min(lim, old + d))
vt += (jt[i] - old) * w
d = -vn / w
old = jn[i]
jn[i] = max(0.0, old + d)
vn += (jn[i] - old) * w
return [[round(a, 6) for a in jn], [round(b, 6) for b in jt], round(vn, 6), round(vt, 6)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[-0.717, 2.25, 1.239, 0.977, 1, [[1.943, 0.223], [1.215, -0.282], [0.426, -0.176]], 0.8], [[0.0, 0.237892, 0.3408], [-1.449581, -0.2256, -0.1408], 0.0, -0.0]], [[0.063, -1.293, 1.407, 0.807, 4, [[1.093, -0.549], [0.115, -0.535], [0.867, 0.965]], 1.0], [[0.0, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.063, -1.293]], [[0.947, 1.031, 0.325, 0.552, 1, [[0.694, 0.484]], 0.0], [[0.0], [-0.0], 0.947, 1.031]], [[-0.613, -1.854, 0.241, 0.22, 4, [[0.578, -0.932], [1.115, -0.595], [0.339, -0.863]], 0.5], [[1.816568, 0.5575, 0.1695], [0.399645, 0.12265, 0.03729], 0.0, -1.71914]], [[-4.0, -2.691, 0.93, 0.864, 4, [[1.529, -0.198]], 0.5], [[4.301075], [2.893548], 0.0, 0.0]], [[-1.029, -2.814, 0.539, 0.151, 2, [[1.249, 0.914], [1.809, -0.191], [0.04, -0.518]], 0.0], [[1.909091, 0.0, 0.0], [0.288273, -0.0, -0.0], 0.0, -2.658621]], [[-0.196, -1.872, 0.742, 0.597, 1, [[0.945, -0.432]], 1.0], [[0.264151], [0.564165], 0.0, -1.45339]], [[-2.166, 1.711, 1.507, 0.848, 1, [[0.445, 0.579]], 0.0], [[1.437293], [-0.0], 0.0, 1.711]]], [[[-3.123, 2.671, 0.465, 0.579, 3, [[1.075, -0.367]], 0.5], [[6.716129], [-3.888639], 0.0, 0.862783]], [[-0.637, -2.299, 1.18, 0.606, 4, [[1.575, 0.495]], 0.8], [[0.539831], [0.327137], 0.0, -1.912978]], [[-1.981, -2.068, 0.556, 0.937, 2, [[0.091, 0.771], [0.183, 0.742], [0.226, 0.981]], 1.0], [[3.15395, 0.183, 0.226], [2.955251, 0.171471, 0.211762], 0.0, -0.211803]], [[-2.207, -0.694, 1.701, 0.859, 3, [[1.102, 0.619], [1.905, -0.489], [1.896, 0.485]], 0.0], [[1.297472, 0.0, 0.0], [0.407995, -0.0, -0.0], 0.0, 0.0]], [[0.807, 2.09, 1.205, 0.649, 3, [[1.642, 0.551], [0.696, 0.018], [1.374, 0.741]], 0.0], [[0.0, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.807, 2.09]], [[0.905, 2.296, 0.766, 0.488, 3, [[0.186, 0.569], [0.028, 0.557]], 0.0], [[0.0, 0.0], [-0.0, -0.0], 0.905, 2.296]], [[-0.841, -1.775, 0.992, 0.481, 2, [[1.485, 0.489], [1.011, -0.526], [0.962, 0.23]], 0.5], [[0.0, 0.366782, 0.481], [-0.0, 0.176422, 0.231361], 0.0, -1.370479]], [[-0.817, -1.918, 1.765, 0.758, 1, [[1.446, 0.713]], 0.0], [[0.46289], [-0.0], 0.0, -1.918]]], [[[-1.791, -0.845, 0.278, 0.933, 4, [[1.428, -0.393]], 0.0], [[6.442446], [3.039568], 0.0, 0.0]], [[-2.965, 0.007, 0.968, 0.693, 1, [[0.12, -0.839], [1.259, 0.044], [0.007, -0.589]], 0.0], [[3.063017, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.0, 0.007]], [[-0.275, 2.934, 1.249, 0.642, 2, [[1.968, -0.641]], 0.5], [[0.220176], [-0.141353], 0.0, 2.75745]], [[-2.695, -2.671, 1.218, 0.392, 2, [[1.6, 0.5], [1.074, -0.899]], 1.0], [[1.138644, 1.074], [0.446348, 0.421008], -0.0, -1.61456]], [[0.12, -0.695, 1.779, 0.991, 4, [[0.265, 0.534]], 0.8], [[0.0], [-0.0], 0.12, -0.695]], [[-3.654, 2.519, 0.846, 0.279, 1, [[1.236, 0.513], [1.034, -0.459]], 0.0], [[4.319149, 0.0], [-0.0, -0.0], 0.0, 2.519]], [[-1.036, -1.06, 1.92, 0.272, 3, [[0.84, -0.95], [0.702, 0.203], [1.948, 0.397]], 0.5], [[0.0, 0.0, 0.539583], [-0.0, -0.0, 0.146767], 0.0, -0.778208]], [[0.972, 0.928, 1.615, 0.496, 4, [[0.104, -0.383]], 1.0], [[0.0], [-0.0], 0.972, 0.928]]], [[[0.642, 1.312, 0.774, 0.276, 3, [[0.568, 0.395]], 1.0], [[0.0], [-0.0], 0.642, 1.312]], [[-2.243, -0.297, 1.266, 0.015, 2, [[1.481, 0.357], [0.63, -0.064], [1.608, 0.249]], 0.0], [[1.771722, 0.0, 0.0], [0.026576, -0.0, -0.0], 0.0, -0.263355]], [[0.86, -2.298, 1.261, 0.619, 1, [[0.197, 0.851]], 0.0], [[0.0], [-0.0], 0.86, -2.298]], [[-0.362, 0.03, 1.957, 0.414, 1, [[1.903, -0.559], [1.562, 0.459], [0.48, 0.011]], 1.0], [[0.0, 0.0, 0.184977], [-0.48533, 0.459, 0.011], 0.0, 0.0]], [[0.172, 0.45, 1.287, 0.945, 3, [[1.304, 0.63], [0.827, 0.647]], 0.5], [[0.0, 0.0], [-0.0, -0.0], 0.172, 0.45]], [[-1.212, 0.083, 1.778, 0.106, 2, [[0.634, 0.148]], 0.8], [[0.681665], [-0.046682], 0.0, 0.0]], [[-2.826, -2.285, 1.331, 0.257, 2, [[1.964, 0.08]], 1.0], [[2.123216], [0.545666], -0.0, -1.558718]], [[-0.826, -2.129, 0.465, 0.979, 2, [[1.549, 0.328], [1.647, -0.412], [0.839, 0.41]], 1.0], [[0.0, 0.937344, 0.839], [-0.0, 0.91766, 0.821381], 0.0, -1.320346]]], [[[-1.915, -0.673, 1.751, 0.041, 1, [[0.226, -0.299]], 0.8], [[1.093661], [0.007413], -0.0, -0.66002]], [[0.977, -0.644, 0.452, 0.107, 1, [[0.272, -0.393], [1.275, -0.698]], 0.0], [[0.0, 0.0], [-0.0, -0.0], 0.977, -0.644]], [[-1.015, 2.538, 1.639, 0.83, 2, [[0.954, -0.635], [0.827, 0.498], [1.201, 0.936]], 0.5], [[0.0, 0.01878, 0.6005], [-0.0, -0.015587, -0.498415], 0.0, 1.69555]], [[-2.401, -2.168, 0.734, 0.846, 3, [[0.732, -0.632]], 0.5], [[3.271117], [2.767365], 0.0, -0.136754]], [[-1.103, 2.647, 1.706, 0.083, 4, [[0.166, -0.336], [0.433, -0.922], [0.293, -0.641]], 0.8], [[0.065742, 0.3464, 0.2344], [-0.005457, -0.028751, -0.019455], 0.0, 2.555451]], [[-3.869, -1.566, 1.822, 0.635, 3, [[0.99, 0.726], [1.396, -0.851]], 0.0], [[2.123491, 0.0], [0.859495, -0.0], 0.0, 0.0]], [[0.814, 0.436, 1.973, 0.367, 4, [[1.713, -0.788], [0.347, 0.941]], 0.5], [[0.0, 0.0], [-0.0, -0.0], 0.814, 0.436]], [[0.988, -2.811, 0.95, 0.848, 2, [[0.663, -0.637], [0.688, -0.272]], 0.5], [[0.0, 0.0], [-0.0, -0.0], 0.988, -2.811]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("case %d" % i, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| case 0 | [[0.0, 0.237892, 0.3408], [1.518649, 0.949644, 0.332962], 0.0, 5.720754] | [[0.0, 0.237892, 0.3408], [-1.449581, -0.2256, -0.1408], 0.0, -0.0] | Failed |
| case 1 | [[0.0, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.063, -1.293] | [[0.0, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.063, -1.293] | Passed |
| case 2 | [[0.0], [-0.0], 0.947, 1.031] | [[0.0], [-0.0], 0.947, 1.031] | Passed |
| case 3 | [[1.816568, 0.5575, 0.1695], [-0.399645, -0.12265, -0.03729], 0.0, -1.98886] | [[1.816568, 0.5575, 0.1695], [0.399645, 0.12265, 0.03729], 0.0, -1.71914] | Failed |
| case 4 | [[4.301075], [-3.716129], 0.0, -6.147] | [[4.301075], [2.893548], 0.0, 0.0] | Failed |
| case 5 | [[1.909091, 0.0, 0.0], [-0.288273, -0.0, -0.0], 0.0, -2.969379] | [[1.909091, 0.0, 0.0], [0.288273, -0.0, -0.0], 0.0, -2.658621] | Failed |
| case 6 | [[0.264151], [-0.564165], 0.0, -2.29061] | [[0.264151], [0.564165], 0.0, -1.45339] | Failed |
| case 7 | [[1.437293], [-0.0], 0.0, 1.711] | [[1.437293], [-0.0], 0.0, 1.711] | Passed |
SHA-256 / 558c470a6a9ce9fa33049cceba6ce57660821e7beae67e2bb1f2be3e5d5162a6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(vn0, vt0, w, mu, iterations, cached, warm):
vn, vt = vn0, vt0
jn = [p[0] * warm for p in cached]
jt = [p[1] * warm for p in cached]
for i in range(len(cached)):
vn += jn[i] * w
vt += jt[i] * w
for _ in range(iterations):
for i in range(len(cached)):
d = -abs(vt) / w
old = jt[i]
lim = mu * jn[i]
jt[i] = max(-lim, min(lim, old + d))
vt += (jt[i] - old) * w
d = -vn / w
old = jn[i]
jn[i] = max(0.0, old + d)
vn += (jn[i] - old) * w
return [[round(a, 6) for a in jn], [round(b, 6) for b in jt], round(vn, 6), round(vt, 6)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[-0.717, 2.25, 1.239, 0.977, 1, [[1.943, 0.223], [1.215, -0.282], [0.426, -0.176]], 0.8], [[0.0, 0.237892, 0.3408], [-1.449581, -0.2256, -0.1408], 0.0, -0.0]], [[0.063, -1.293, 1.407, 0.807, 4, [[1.093, -0.549], [0.115, -0.535], [0.867, 0.965]], 1.0], [[0.0, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.063, -1.293]], [[0.947, 1.031, 0.325, 0.552, 1, [[0.694, 0.484]], 0.0], [[0.0], [-0.0], 0.947, 1.031]], [[-0.613, -1.854, 0.241, 0.22, 4, [[0.578, -0.932], [1.115, -0.595], [0.339, -0.863]], 0.5], [[1.816568, 0.5575, 0.1695], [0.399645, 0.12265, 0.03729], 0.0, -1.71914]], [[-4.0, -2.691, 0.93, 0.864, 4, [[1.529, -0.198]], 0.5], [[4.301075], [2.893548], 0.0, 0.0]], [[-1.029, -2.814, 0.539, 0.151, 2, [[1.249, 0.914], [1.809, -0.191], [0.04, -0.518]], 0.0], [[1.909091, 0.0, 0.0], [0.288273, -0.0, -0.0], 0.0, -2.658621]], [[-0.196, -1.872, 0.742, 0.597, 1, [[0.945, -0.432]], 1.0], [[0.264151], [0.564165], 0.0, -1.45339]], [[-2.166, 1.711, 1.507, 0.848, 1, [[0.445, 0.579]], 0.0], [[1.437293], [-0.0], 0.0, 1.711]]], [[[-3.123, 2.671, 0.465, 0.579, 3, [[1.075, -0.367]], 0.5], [[6.716129], [-3.888639], 0.0, 0.862783]], [[-0.637, -2.299, 1.18, 0.606, 4, [[1.575, 0.495]], 0.8], [[0.539831], [0.327137], 0.0, -1.912978]], [[-1.981, -2.068, 0.556, 0.937, 2, [[0.091, 0.771], [0.183, 0.742], [0.226, 0.981]], 1.0], [[3.15395, 0.183, 0.226], [2.955251, 0.171471, 0.211762], 0.0, -0.211803]], [[-2.207, -0.694, 1.701, 0.859, 3, [[1.102, 0.619], [1.905, -0.489], [1.896, 0.485]], 0.0], [[1.297472, 0.0, 0.0], [0.407995, -0.0, -0.0], 0.0, 0.0]], [[0.807, 2.09, 1.205, 0.649, 3, [[1.642, 0.551], [0.696, 0.018], [1.374, 0.741]], 0.0], [[0.0, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.807, 2.09]], [[0.905, 2.296, 0.766, 0.488, 3, [[0.186, 0.569], [0.028, 0.557]], 0.0], [[0.0, 0.0], [-0.0, -0.0], 0.905, 2.296]], [[-0.841, -1.775, 0.992, 0.481, 2, [[1.485, 0.489], [1.011, -0.526], [0.962, 0.23]], 0.5], [[0.0, 0.366782, 0.481], [-0.0, 0.176422, 0.231361], 0.0, -1.370479]], [[-0.817, -1.918, 1.765, 0.758, 1, [[1.446, 0.713]], 0.0], [[0.46289], [-0.0], 0.0, -1.918]]], [[[-1.791, -0.845, 0.278, 0.933, 4, [[1.428, -0.393]], 0.0], [[6.442446], [3.039568], 0.0, 0.0]], [[-2.965, 0.007, 0.968, 0.693, 1, [[0.12, -0.839], [1.259, 0.044], [0.007, -0.589]], 0.0], [[3.063017, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.0, 0.007]], [[-0.275, 2.934, 1.249, 0.642, 2, [[1.968, -0.641]], 0.5], [[0.220176], [-0.141353], 0.0, 2.75745]], [[-2.695, -2.671, 1.218, 0.392, 2, [[1.6, 0.5], [1.074, -0.899]], 1.0], [[1.138644, 1.074], [0.446348, 0.421008], -0.0, -1.61456]], [[0.12, -0.695, 1.779, 0.991, 4, [[0.265, 0.534]], 0.8], [[0.0], [-0.0], 0.12, -0.695]], [[-3.654, 2.519, 0.846, 0.279, 1, [[1.236, 0.513], [1.034, -0.459]], 0.0], [[4.319149, 0.0], [-0.0, -0.0], 0.0, 2.519]], [[-1.036, -1.06, 1.92, 0.272, 3, [[0.84, -0.95], [0.702, 0.203], [1.948, 0.397]], 0.5], [[0.0, 0.0, 0.539583], [-0.0, -0.0, 0.146767], 0.0, -0.778208]], [[0.972, 0.928, 1.615, 0.496, 4, [[0.104, -0.383]], 1.0], [[0.0], [-0.0], 0.972, 0.928]]], [[[0.642, 1.312, 0.774, 0.276, 3, [[0.568, 0.395]], 1.0], [[0.0], [-0.0], 0.642, 1.312]], [[-2.243, -0.297, 1.266, 0.015, 2, [[1.481, 0.357], [0.63, -0.064], [1.608, 0.249]], 0.0], [[1.771722, 0.0, 0.0], [0.026576, -0.0, -0.0], 0.0, -0.263355]], [[0.86, -2.298, 1.261, 0.619, 1, [[0.197, 0.851]], 0.0], [[0.0], [-0.0], 0.86, -2.298]], [[-0.362, 0.03, 1.957, 0.414, 1, [[1.903, -0.559], [1.562, 0.459], [0.48, 0.011]], 1.0], [[0.0, 0.0, 0.184977], [-0.48533, 0.459, 0.011], 0.0, 0.0]], [[0.172, 0.45, 1.287, 0.945, 3, [[1.304, 0.63], [0.827, 0.647]], 0.5], [[0.0, 0.0], [-0.0, -0.0], 0.172, 0.45]], [[-1.212, 0.083, 1.778, 0.106, 2, [[0.634, 0.148]], 0.8], [[0.681665], [-0.046682], 0.0, 0.0]], [[-2.826, -2.285, 1.331, 0.257, 2, [[1.964, 0.08]], 1.0], [[2.123216], [0.545666], -0.0, -1.558718]], [[-0.826, -2.129, 0.465, 0.979, 2, [[1.549, 0.328], [1.647, -0.412], [0.839, 0.41]], 1.0], [[0.0, 0.937344, 0.839], [-0.0, 0.91766, 0.821381], 0.0, -1.320346]]], [[[-1.915, -0.673, 1.751, 0.041, 1, [[0.226, -0.299]], 0.8], [[1.093661], [0.007413], -0.0, -0.66002]], [[0.977, -0.644, 0.452, 0.107, 1, [[0.272, -0.393], [1.275, -0.698]], 0.0], [[0.0, 0.0], [-0.0, -0.0], 0.977, -0.644]], [[-1.015, 2.538, 1.639, 0.83, 2, [[0.954, -0.635], [0.827, 0.498], [1.201, 0.936]], 0.5], [[0.0, 0.01878, 0.6005], [-0.0, -0.015587, -0.498415], 0.0, 1.69555]], [[-2.401, -2.168, 0.734, 0.846, 3, [[0.732, -0.632]], 0.5], [[3.271117], [2.767365], 0.0, -0.136754]], [[-1.103, 2.647, 1.706, 0.083, 4, [[0.166, -0.336], [0.433, -0.922], [0.293, -0.641]], 0.8], [[0.065742, 0.3464, 0.2344], [-0.005457, -0.028751, -0.019455], 0.0, 2.555451]], [[-3.869, -1.566, 1.822, 0.635, 3, [[0.99, 0.726], [1.396, -0.851]], 0.0], [[2.123491, 0.0], [0.859495, -0.0], 0.0, 0.0]], [[0.814, 0.436, 1.973, 0.367, 4, [[1.713, -0.788], [0.347, 0.941]], 0.5], [[0.0, 0.0], [-0.0, -0.0], 0.814, 0.436]], [[0.988, -2.811, 0.95, 0.848, 2, [[0.663, -0.637], [0.688, -0.272]], 0.5], [[0.0, 0.0], [-0.0, -0.0], 0.988, -2.811]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("case %d" % i, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| case 0 | [[0.0, 0.237892, 0.3408], [-1.449581, -0.2256, -0.1408], 0.0, -0.0] | [[0.0, 0.237892, 0.3408], [-1.449581, -0.2256, -0.1408], 0.0, -0.0] | Passed |
| case 1 | [[0.0, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.063, -1.293] | [[0.0, 0.0, 0.0], [-0.0, -0.0, -0.0], 0.063, -1.293] | Passed |
| case 2 | [[0.0], [-0.0], 0.947, 1.031] | [[0.0], [-0.0], 0.947, 1.031] | Passed |
| case 3 | [[1.816568, 0.5575, 0.1695], [-0.399645, -0.12265, -0.03729], 0.0, -1.98886] | [[1.816568, 0.5575, 0.1695], [0.399645, 0.12265, 0.03729], 0.0, -1.71914] | Failed |
| case 4 | [[4.301075], [-3.716129], 0.0, -6.147] | [[4.301075], [2.893548], 0.0, 0.0] | Failed |
| case 5 | [[1.909091, 0.0, 0.0], [-0.288273, -0.0, -0.0], 0.0, -2.969379] | [[1.909091, 0.0, 0.0], [0.288273, -0.0, -0.0], 0.0, -2.658621] | Failed |
| case 6 | [[0.264151], [-0.564165], 0.0, -2.29061] | [[0.264151], [0.564165], 0.0, -1.45339] | Failed |
| case 7 | [[1.437293], [-0.0], 0.0, 1.711] | [[1.437293], [-0.0], 0.0, 1.711] | Passed |
SHA-256 / 0022386a462bd8584298103b330e6981c95b192b182c7bda72317131e6656241
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:50:56.909814+00:00.
Case digest / d5932edf5a56833c8612f34e5a357e69bc7b0beb952c99632db83c01bad48e9c