FAILURE MAP
← Case archive

FA-86991 / Physics integrator stability / Open access

Render interpolation factor is returned as raw leftover seconds · case 01

Interpolation weights are tiny and rendering visibly snaps between states.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

alpha is acc instead of acc/dt.

VERIFIED REPAIR

Normalize leftover time by the fixed step.

Unsuccessful approach: Normalizing by max_frame scales alpha by the wrong duration.

Case contract

solve(frames, dt, max_frame, max_steps): game loop accumulator. Each frame delta is clamped to max_frame and added; run steps while acc >= dt up to max_steps; if a full dt still remains, whole multiples of dt are dropped (spiral-of-death guard). Return [steps per frame, acc/dt after last frame, dropped time].

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(frames, dt, max_frame, max_steps):
    acc = 0.0
    dropped = 0.0
    steps = []
    for delta in frames:
        acc += min(delta, max_frame)
        n = 0
        while acc >= dt and n < max_steps:
            acc -= dt
            n += 1
        if acc >= dt:
            keep = acc % dt
            dropped += acc - keep
            acc = keep
        steps.append(n)
    return [steps, acc, dropped]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[0.015625], 0.03125, 0.25, 2], [[0], 0.5, 0.0]], [[[0.25, 0.078125, 0.625, 0.015625, 0.046875, 0.0625], 0.0625, 0.125, 3], [[2, 1, 2, 0, 1, 1], 0.25, 0.0]], [[[0.046875, 0.015625, 0.046875], 0.015625, 0.25, 4], [[3, 1, 3], 0.0, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.03125, 0.0625], 0.0625, 0.25, 3], [[0, 1], 0.5, 0.0]], [[[0.125, 0.25, 0.0, 0.046875, 0.046875, 0.078125], 0.03125, 0.25, 4], [[4, 4, 0, 1, 2, 2], 0.5, 0.125]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.0, 0.03125, 0.625, 0.015625], 0.0625, 0.125, 5], [[0, 0, 2, 0], 0.75, 0.0]]], [[[[0.625, 0.0, 0.25, 0.015625], 0.03125, 0.125, 1], [[1, 0, 1, 0], 0.5, 0.1875]], [[[0.25, 0.0, 0.078125], 0.0625, 0.25, 4], [[4, 0, 1], 0.25, 0.0]], [[[0.625, 0.0625, 0.25, 0.0625, 0.015625], 0.0625, 0.125, 2], [[2, 1, 2, 1, 0], 0.25, 0.0]], [[[0.0625, 0.0, 0.078125, 0.0625], 0.03125, 0.25, 3], [[2, 0, 2, 2], 0.5, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.0], 0.0625, 0.125, 2], [[0], 0.0, 0.0]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.0625, 0.125, 0.015625, 0.125], 0.03125, 0.25, 2], [[2, 2, 0, 2], 0.5, 0.125]]], [[[[0.078125, 0.25, 0.0625, 0.125], 0.0625, 0.25, 3], [[1, 3, 1, 2], 0.25, 0.0625]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.03125, 0.125, 0.0625, 0.0, 0.015625], 0.03125, 0.125, 2], [[1, 2, 2, 0, 0], 0.5, 0.0625]], [[[0.046875, 0.046875, 0.015625, 0.03125], 0.03125, 0.125, 3], [[1, 2, 0, 1], 0.5, 0.0]], [[[0.25, 0.0625, 0.125, 0.0625, 0.046875, 0.125], 0.015625, 0.125, 1], [[1, 1, 1, 1, 1, 1], 0.0, 0.453125]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.078125, 0.078125, 0.046875, 0.0625, 0.078125], 0.0625, 0.25, 3], [[1, 1, 1, 1, 1], 0.5, 0.0]], [[[0.046875, 0.078125, 0.046875], 0.0625, 0.125, 5], [[0, 2, 0], 0.75, 0.0]]], [[[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.125, 0.625, 0.046875, 0.0625, 0.0, 0.625], 0.0625, 0.25, 2], [[2, 2, 0, 1, 0, 2], 0.75, 0.25]], [[[0.0625, 0.078125, 0.078125, 0.125, 0.015625], 0.03125, 0.125, 5], [[2, 2, 3, 4, 0], 0.5, 0.0]], [[[0.25, 0.125, 0.015625, 0.0625, 0.25, 0.046875], 0.03125, 0.125, 1], [[1, 1, 0, 1, 1, 1], 0.0, 0.34375]], [[[0.625, 0.0625, 0.03125, 0.0], 0.0625, 0.25, 1], [[1, 1, 0, 0], 0.5, 0.1875]], [[[0.0, 0.015625, 0.0625], 0.03125, 0.25, 5], [[0, 0, 2], 0.5, 0.0]], [[[0.078125], 0.0625, 0.25, 3], [[1], 0.25, 0.0]]], [[[[0.0, 0.625, 0.046875], 0.03125, 0.125, 4], [[0, 4, 1], 0.5, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.015625], 0.0625, 0.25, 5], [[0], 0.25, 0.0]], [[[0.125, 0.0, 0.0, 0.046875, 0.125, 0.078125], 0.0625, 0.125, 2], [[2, 0, 0, 0, 2, 2], 0.0, 0.0]], [[[0.25, 0.078125, 0.046875, 0.046875, 0.125], 0.03125, 0.125, 5], [[4, 2, 2, 1, 4], 0.5, 0.0]], [[[0.25], 0.03125, 0.125, 3], [[3], 0.0, 0.03125]], [[[0.046875, 0.25, 0.25, 0.625], 0.0625, 0.125, 4], [[0, 2, 2, 2], 0.75, 0.0]]]]
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 fixtureActualExpectedOutcome
case 0[[0], 0.015625, 0.0][[0], 0.5, 0.0]Failed
case 1[[2, 1, 2, 0, 1, 1], 0.015625, 0.0][[2, 1, 2, 0, 1, 1], 0.25, 0.0]Failed
case 2[[3, 1, 3], 0.0, 0.0][[3, 1, 3], 0.0, 0.0]Passed
case 3[[1], 0.0, 0.0][[1], 0.0, 0.0]Passed
case 4[[0, 1], 0.03125, 0.0][[0, 1], 0.5, 0.0]Failed
case 5[[4, 4, 0, 1, 2, 2], 0.015625, 0.125][[4, 4, 0, 1, 2, 2], 0.5, 0.125]Failed
case 6[[0], 0.0, 0.0][[0], 0.0, 0.0]Passed
case 7[[0, 0, 2, 0], 0.046875, 0.0][[0, 0, 2, 0], 0.75, 0.0]Failed

SHA-256 / fe41581ea075e64067abcfdd59283db51d53bd298d07e4128fe35bbbb8aa6467

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames, dt, max_frame, max_steps):
    acc = 0.0
    dropped = 0.0
    steps = []
    for delta in frames:
        acc += min(delta, max_frame)
        n = 0
        while acc >= dt and n < max_steps:
            acc -= dt
            n += 1
        if acc >= dt:
            keep = acc % dt
            dropped += acc - keep
            acc = keep
        steps.append(n)
    return [steps, acc / max_frame, dropped]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[0.015625], 0.03125, 0.25, 2], [[0], 0.5, 0.0]], [[[0.25, 0.078125, 0.625, 0.015625, 0.046875, 0.0625], 0.0625, 0.125, 3], [[2, 1, 2, 0, 1, 1], 0.25, 0.0]], [[[0.046875, 0.015625, 0.046875], 0.015625, 0.25, 4], [[3, 1, 3], 0.0, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.03125, 0.0625], 0.0625, 0.25, 3], [[0, 1], 0.5, 0.0]], [[[0.125, 0.25, 0.0, 0.046875, 0.046875, 0.078125], 0.03125, 0.25, 4], [[4, 4, 0, 1, 2, 2], 0.5, 0.125]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.0, 0.03125, 0.625, 0.015625], 0.0625, 0.125, 5], [[0, 0, 2, 0], 0.75, 0.0]]], [[[[0.625, 0.0, 0.25, 0.015625], 0.03125, 0.125, 1], [[1, 0, 1, 0], 0.5, 0.1875]], [[[0.25, 0.0, 0.078125], 0.0625, 0.25, 4], [[4, 0, 1], 0.25, 0.0]], [[[0.625, 0.0625, 0.25, 0.0625, 0.015625], 0.0625, 0.125, 2], [[2, 1, 2, 1, 0], 0.25, 0.0]], [[[0.0625, 0.0, 0.078125, 0.0625], 0.03125, 0.25, 3], [[2, 0, 2, 2], 0.5, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.0], 0.0625, 0.125, 2], [[0], 0.0, 0.0]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.0625, 0.125, 0.015625, 0.125], 0.03125, 0.25, 2], [[2, 2, 0, 2], 0.5, 0.125]]], [[[[0.078125, 0.25, 0.0625, 0.125], 0.0625, 0.25, 3], [[1, 3, 1, 2], 0.25, 0.0625]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.03125, 0.125, 0.0625, 0.0, 0.015625], 0.03125, 0.125, 2], [[1, 2, 2, 0, 0], 0.5, 0.0625]], [[[0.046875, 0.046875, 0.015625, 0.03125], 0.03125, 0.125, 3], [[1, 2, 0, 1], 0.5, 0.0]], [[[0.25, 0.0625, 0.125, 0.0625, 0.046875, 0.125], 0.015625, 0.125, 1], [[1, 1, 1, 1, 1, 1], 0.0, 0.453125]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.078125, 0.078125, 0.046875, 0.0625, 0.078125], 0.0625, 0.25, 3], [[1, 1, 1, 1, 1], 0.5, 0.0]], [[[0.046875, 0.078125, 0.046875], 0.0625, 0.125, 5], [[0, 2, 0], 0.75, 0.0]]], [[[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.125, 0.625, 0.046875, 0.0625, 0.0, 0.625], 0.0625, 0.25, 2], [[2, 2, 0, 1, 0, 2], 0.75, 0.25]], [[[0.0625, 0.078125, 0.078125, 0.125, 0.015625], 0.03125, 0.125, 5], [[2, 2, 3, 4, 0], 0.5, 0.0]], [[[0.25, 0.125, 0.015625, 0.0625, 0.25, 0.046875], 0.03125, 0.125, 1], [[1, 1, 0, 1, 1, 1], 0.0, 0.34375]], [[[0.625, 0.0625, 0.03125, 0.0], 0.0625, 0.25, 1], [[1, 1, 0, 0], 0.5, 0.1875]], [[[0.0, 0.015625, 0.0625], 0.03125, 0.25, 5], [[0, 0, 2], 0.5, 0.0]], [[[0.078125], 0.0625, 0.25, 3], [[1], 0.25, 0.0]]], [[[[0.0, 0.625, 0.046875], 0.03125, 0.125, 4], [[0, 4, 1], 0.5, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.015625], 0.0625, 0.25, 5], [[0], 0.25, 0.0]], [[[0.125, 0.0, 0.0, 0.046875, 0.125, 0.078125], 0.0625, 0.125, 2], [[2, 0, 0, 0, 2, 2], 0.0, 0.0]], [[[0.25, 0.078125, 0.046875, 0.046875, 0.125], 0.03125, 0.125, 5], [[4, 2, 2, 1, 4], 0.5, 0.0]], [[[0.25], 0.03125, 0.125, 3], [[3], 0.0, 0.03125]], [[[0.046875, 0.25, 0.25, 0.625], 0.0625, 0.125, 4], [[0, 2, 2, 2], 0.75, 0.0]]]]
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 fixtureActualExpectedOutcome
case 0[[0], 0.0625, 0.0][[0], 0.5, 0.0]Failed
case 1[[2, 1, 2, 0, 1, 1], 0.125, 0.0][[2, 1, 2, 0, 1, 1], 0.25, 0.0]Failed
case 2[[3, 1, 3], 0.0, 0.0][[3, 1, 3], 0.0, 0.0]Passed
case 3[[1], 0.0, 0.0][[1], 0.0, 0.0]Passed
case 4[[0, 1], 0.125, 0.0][[0, 1], 0.5, 0.0]Failed
case 5[[4, 4, 0, 1, 2, 2], 0.0625, 0.125][[4, 4, 0, 1, 2, 2], 0.5, 0.125]Failed
case 6[[0], 0.0, 0.0][[0], 0.0, 0.0]Passed
case 7[[0, 0, 2, 0], 0.375, 0.0][[0, 0, 2, 0], 0.75, 0.0]Failed

SHA-256 / ee799b5f21d8aff0b646f9e5a164d64d0a7ad0c8a060b602de4c244d2e706672

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames, dt, max_frame, max_steps):
    acc = 0.0
    dropped = 0.0
    steps = []
    for delta in frames:
        acc += min(delta, max_frame)
        n = 0
        while acc >= dt and n < max_steps:
            acc -= dt
            n += 1
        if acc >= dt:
            keep = acc % dt
            dropped += acc - keep
            acc = keep
        steps.append(n)
    return [steps, acc / dt, dropped]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[0.015625], 0.03125, 0.25, 2], [[0], 0.5, 0.0]], [[[0.25, 0.078125, 0.625, 0.015625, 0.046875, 0.0625], 0.0625, 0.125, 3], [[2, 1, 2, 0, 1, 1], 0.25, 0.0]], [[[0.046875, 0.015625, 0.046875], 0.015625, 0.25, 4], [[3, 1, 3], 0.0, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.03125, 0.0625], 0.0625, 0.25, 3], [[0, 1], 0.5, 0.0]], [[[0.125, 0.25, 0.0, 0.046875, 0.046875, 0.078125], 0.03125, 0.25, 4], [[4, 4, 0, 1, 2, 2], 0.5, 0.125]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.0, 0.03125, 0.625, 0.015625], 0.0625, 0.125, 5], [[0, 0, 2, 0], 0.75, 0.0]]], [[[[0.625, 0.0, 0.25, 0.015625], 0.03125, 0.125, 1], [[1, 0, 1, 0], 0.5, 0.1875]], [[[0.25, 0.0, 0.078125], 0.0625, 0.25, 4], [[4, 0, 1], 0.25, 0.0]], [[[0.625, 0.0625, 0.25, 0.0625, 0.015625], 0.0625, 0.125, 2], [[2, 1, 2, 1, 0], 0.25, 0.0]], [[[0.0625, 0.0, 0.078125, 0.0625], 0.03125, 0.25, 3], [[2, 0, 2, 2], 0.5, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.0], 0.0625, 0.125, 2], [[0], 0.0, 0.0]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.0625, 0.125, 0.015625, 0.125], 0.03125, 0.25, 2], [[2, 2, 0, 2], 0.5, 0.125]]], [[[[0.078125, 0.25, 0.0625, 0.125], 0.0625, 0.25, 3], [[1, 3, 1, 2], 0.25, 0.0625]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.03125, 0.125, 0.0625, 0.0, 0.015625], 0.03125, 0.125, 2], [[1, 2, 2, 0, 0], 0.5, 0.0625]], [[[0.046875, 0.046875, 0.015625, 0.03125], 0.03125, 0.125, 3], [[1, 2, 0, 1], 0.5, 0.0]], [[[0.25, 0.0625, 0.125, 0.0625, 0.046875, 0.125], 0.015625, 0.125, 1], [[1, 1, 1, 1, 1, 1], 0.0, 0.453125]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.078125, 0.078125, 0.046875, 0.0625, 0.078125], 0.0625, 0.25, 3], [[1, 1, 1, 1, 1], 0.5, 0.0]], [[[0.046875, 0.078125, 0.046875], 0.0625, 0.125, 5], [[0, 2, 0], 0.75, 0.0]]], [[[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.125, 0.625, 0.046875, 0.0625, 0.0, 0.625], 0.0625, 0.25, 2], [[2, 2, 0, 1, 0, 2], 0.75, 0.25]], [[[0.0625, 0.078125, 0.078125, 0.125, 0.015625], 0.03125, 0.125, 5], [[2, 2, 3, 4, 0], 0.5, 0.0]], [[[0.25, 0.125, 0.015625, 0.0625, 0.25, 0.046875], 0.03125, 0.125, 1], [[1, 1, 0, 1, 1, 1], 0.0, 0.34375]], [[[0.625, 0.0625, 0.03125, 0.0], 0.0625, 0.25, 1], [[1, 1, 0, 0], 0.5, 0.1875]], [[[0.0, 0.015625, 0.0625], 0.03125, 0.25, 5], [[0, 0, 2], 0.5, 0.0]], [[[0.078125], 0.0625, 0.25, 3], [[1], 0.25, 0.0]]], [[[[0.0, 0.625, 0.046875], 0.03125, 0.125, 4], [[0, 4, 1], 0.5, 0.0]], [[[0.015625], 0.015625, 0.25, 2], [[1], 0.0, 0.0]], [[[0.0], 0.015625, 0.25, 2], [[0], 0.0, 0.0]], [[[0.015625], 0.0625, 0.25, 5], [[0], 0.25, 0.0]], [[[0.125, 0.0, 0.0, 0.046875, 0.125, 0.078125], 0.0625, 0.125, 2], [[2, 0, 0, 0, 2, 2], 0.0, 0.0]], [[[0.25, 0.078125, 0.046875, 0.046875, 0.125], 0.03125, 0.125, 5], [[4, 2, 2, 1, 4], 0.5, 0.0]], [[[0.25], 0.03125, 0.125, 3], [[3], 0.0, 0.03125]], [[[0.046875, 0.25, 0.25, 0.625], 0.0625, 0.125, 4], [[0, 2, 2, 2], 0.75, 0.0]]]]
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 fixtureActualExpectedOutcome
case 0[[0], 0.5, 0.0][[0], 0.5, 0.0]Passed
case 1[[2, 1, 2, 0, 1, 1], 0.25, 0.0][[2, 1, 2, 0, 1, 1], 0.25, 0.0]Passed
case 2[[3, 1, 3], 0.0, 0.0][[3, 1, 3], 0.0, 0.0]Passed
case 3[[1], 0.0, 0.0][[1], 0.0, 0.0]Passed
case 4[[0, 1], 0.5, 0.0][[0, 1], 0.5, 0.0]Passed
case 5[[4, 4, 0, 1, 2, 2], 0.5, 0.125][[4, 4, 0, 1, 2, 2], 0.5, 0.125]Passed
case 6[[0], 0.0, 0.0][[0], 0.0, 0.0]Passed
case 7[[0, 0, 2, 0], 0.75, 0.0][[0, 0, 2, 0], 0.75, 0.0]Passed

SHA-256 / 021ac7aba2cca2850f3c39fbc74b4d8740950c056d352ec5b4bedf85159ed75a

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:54.630041+00:00.

Case digest / fdb48a611b9f2d423d48ef18ca922cc14882b01f2017109e31426dc4ed9d2135