Convergence study: where the defaults come from

Regenerate this file and the literal tables in src/pusht_sim/envs/recommended.py with:

PYTHONPATH=src .venv/bin/python scripts/convergence_study.py

Measured pymunk on 2026-09-24T15:51:08+00:00, superdex on 2026-09-24T15:52:47+00:00.

Result

backend recommended worst error vs reference cost/episode published defaults score
pymunk sim_hz=640, solver_iterations=1, pusher_sides=16 0.468 u / 0.0034 rad (t7) 47 ms (reference 95 ms) 2.7 u
superdex sim_hz=320, solver_iterations=64, pusher_sides=64, contact_stiffness=10000 0.000 u / 0.0000 rad (t7) 200 ms (reference 200 ms) 24.8 u

Read the last column against the second: on pymunk it is a real convergence result with headroom left, 2.0x cheaper than the yardstick; on superdex the recommendation is the yardstick itself - nothing cheaper held tolerance, so this engine has no measured headroom on this suite. What both replace is the same thing - hand-picked defaults that miss the tolerance by orders of magnitude. The rest of this document is how those numbers were obtained.

Method

Open-loop replay. The scripted driver reacts to what the physics does, so re-running it at a coarser setting changes the commands as well as the response, and the two effects are then impossible to separate. Instead the command sequence is generated once per scenario at the reference setting and replayed verbatim by every rung of every ladder. What is left over is integration error and nothing else.

Worst case over the suite. The seven scenarios each stress a different part of the simulator - pure sliding (t1), torque from an off-centre push (t2, t7), wall contact (t3), a long contact history (t4), a small contact patch on a long lever (t5), sub-degree alignment (t6). Averaging over them would let the one case that breaks disappear into six that do not, so every verdict below is the worst scenario, not the mean. Scenarios used: t1, t2, t3, t4, t5, t6, t7.

Tolerances. 1 workspace unit of final block position, 0.02 rad (1.1 degrees) of final block angle, 0.01 of goal coverage. These are pusht_sim.runs.TOL_POSITION/TOL_ANGLE/TOL_COVERAGE, the same numbers a run diff calls "the same answer", so a default chosen here and a run compared there cannot disagree. One unit is one millimetre of table; the block is 120 units across.

The reference has to earn it. There is no closed form for a frictional push, so the finest rung of each ladder stands in for the true answer - but only if refining actually helps. Before anything is measured, every rung takes a rest test: the pusher is commanded to hold its starting position and the block, which nothing is pushing, must stay put. The best rung of a ladder sets the floor, and the yardstick is the finest rung whose drift is no more than double that floor. Rungs coarser than the yardstick are still swept - failing to be a good ruler does not disqualify a setting from being measured. This is not a formality: on superdex the rest test rejects sim_hz past 320, contact_stiffness past 10000 as a yardstick.

Selection rule. The cheapest rung that is inside tolerance and whose every finer rung is also inside tolerance. The second clause matters: a coarse setting can cross the reference by luck, and a table that stopped at the first pass would ship that crossing point. Then a stability margin: a value within 2x of a setting measured to diverge is stepped one rung away from the cliff. Finally the whole combination is re-measured together, because the knobs interact.

Horizon. Episodes are scored at 40 control steps (4 s at 10 Hz control), not the full 120-step episode, and that is deliberate. Push-T under open-loop replay is a contact problem: once two runs disagree about whether a corner caught, the gap grows on its own. The sim_hz tables below show how little headroom there is - even a factor-of-two refinement at the top of the ladder still moves the final pose by more than the tolerance at 4 s - and the agreement windows show the published defaults parting company with the reference within a fraction of a second. Scoring at the full episode length would measure that amplification rather than integration error, and every rung would fail for the same reason. The agreement window is where the limit gets reported instead of hidden.

Cost. Wall-clock seconds per episode over the same 40 steps, run serially so the number describes the setting rather than the machine's core count. Absolute values are laptop-CPU specific; the ratios are the point.

pymunk

pymunk: rest test (choosing the yardstick)

Pusher commanded to hold its starting position; the number is the worst distance the block travels anyway, over the suite. Scenario t7 starts with the pusher already overlapping the block, so some separation motion is unavoidable on any setting - the question is which rungs stay near that floor and which invent motion of their own. A rung that more than doubles the floor is not a yardstick others can be measured against, however small its step; it is still swept as a candidate if it is coarser than the one that is.

knob value block drift (u) worst case role
sim_hz 20 1.160 t7 swept
sim_hz 40 1.161 t7 swept
sim_hz 80 1.161 t7 swept
sim_hz 160 1.162 t7 swept
sim_hz 320 1.162 t7 swept
sim_hz 640 1.162 t7 swept
sim_hz 1280 1.162 t7 reference
solver_iterations 1 1.162 t7 swept
solver_iterations 2 1.162 t7 swept
solver_iterations 4 1.162 t7 swept
solver_iterations 8 1.162 t7 swept
solver_iterations 16 1.162 t7 swept
solver_iterations 32 1.162 t7 swept
solver_iterations 64 1.162 t7 reference
pusher_sides 4 0.281 t7 swept
pusher_sides 8 1.162 t7 swept
pusher_sides 16 1.165 t7 swept
pusher_sides 32 1.156 t7 swept
pusher_sides 64 1.149 t7 reference

Reference setting, each knob at the finest rung the rest test trusts: sim_hz=1280, solver_iterations=64, pusher_sides=64, control_hz=10 - 95 ms per episode.

pymunk: sim_hz

Physics steps per simulated second. The primary resolution knob: halving the step should stop changing the outcome once the run has converged.

value worst pos (u) mean pos (u) worst ang (rad) mean ang (rad) worst cov worst case diverged ms/episode verdict
20 65.271 19.623 0.1698 0.0641 0.6053 t3 - 26.6 out
40 8.498 4.765 0.0485 0.0240 0.1256 t1 - 26.2 out
80 4.052 2.188 0.0233 0.0086 0.0793 t1 - 29.1 out
160 1.864 0.929 0.0148 0.0040 0.0491 t7 - 33.8 out
320 0.888 0.457 0.0090 0.0025 0.0224 t7 - 42.5 out
640 0.292 0.162 0.0035 0.0008 0.0068 t7 - 60.9 within
1280 0.000 0.000 0.0000 0.0000 0.0000 t7 - 95.3 within

Chosen: sim_hz=640 - cheapest rung inside tolerance with every finer rung also inside it.

pymunk: solver_iterations

Constraint iterations per step in pymunk, Newton iterations per step in SuperDex.

value worst pos (u) mean pos (u) worst ang (rad) mean ang (rad) worst cov worst case diverged ms/episode verdict
1 0.147 0.057 0.0017 0.0008 0.0013 t5 - 72.5 within
2 0.082 0.022 0.0014 0.0003 0.0003 t7 - 73.2 within
4 0.039 0.012 0.0008 0.0002 0.0002 t7 - 73.5 within
8 0.041 0.011 0.0009 0.0002 0.0003 t7 - 75.5 within
16 0.035 0.009 0.0008 0.0002 0.0002 t7 - 78.3 within
32 0.023 0.005 0.0005 0.0001 0.0002 t7 - 84.6 within
64 0.000 0.000 0.0000 0.0000 0.0000 t7 - 95.3 within

Chosen: solver_iterations=1 - cheapest rung inside tolerance with every finer rung also inside it.

pymunk: pusher_sides

Polygon resolution of the pusher disc. Geometric discretisation of the contact patch.

value worst pos (u) mean pos (u) worst ang (rad) mean ang (rad) worst cov worst case diverged ms/episode verdict
4 11.086 4.480 0.0435 0.0138 0.1717 t2 - 92.2 out
8 2.421 0.809 0.0103 0.0032 0.0271 t6 - 96.4 out
16 0.377 0.134 0.0032 0.0014 0.0051 t6 - 94.8 within
32 0.173 0.074 0.0022 0.0010 0.0007 t6 - 93.6 within
64 0.000 0.000 0.0000 0.0000 0.0000 t7 - 95.3 within

Chosen: pusher_sides=16 - cheapest rung inside tolerance with every finer rung also inside it.

pymunk: the recommendation

knob recommended reference ladder top why
sim_hz 640 1280 1280 cheapest rung inside tolerance with every finer rung also inside it
solver_iterations 1 64 64 cheapest rung inside tolerance with every finer rung also inside it
pusher_sides 16 64 64 cheapest rung inside tolerance with every finer rung also inside it

Verified jointly, not just knob by knob: at sim_hz=640, solver_iterations=1, pusher_sides=16 the whole suite replays 0.468 units and 0.0034 rad from the reference at worst (t7), 0.252 units on average, no scenario diverged, 46.8 ms per episode against the reference's 95.3 ms (2.0x cheaper).

What this replaces. The hand-picked SimParams defaults - sim_hz=100, solver_iterations=10, pusher_sides=24 - score 2.720 units and 0.0224 rad from the reference at worst (t1) for 26.3 ms per episode. That is 3x the tolerance, at 0.56x the recommendation's cost - which is the whole reason this study exists.

Agreement window. Over a full 120-step episode the recommended setting tracks the reference for 63 control steps (6.3 s) before the worst scenario (t2) drifts past 1 unit; the published defaults manage 5 steps (0.5 s). Per scenario: t1 106, t2 63, t3 120, t4 120, t5 120, t6 120, t7 120. The gap between those two numbers is the cost of the hand-picked defaults: an open-loop replay of a contact-rich push amplifies any disagreement, so a setting that is slightly wrong early is arbitrarily wrong later.

Not gratuitously conservative: sim_hz=20, solver_iterations=1, pusher_sides=16 - the recommendation with one knob stepped back down - misses by 76.20 units on t3, 76x the tolerance. tests/test_recommended.py re-runs exactly that.

superdex

superdex: rest test (choosing the yardstick)

Pusher commanded to hold its starting position; the number is the worst distance the block travels anyway, over the suite. Scenario t7 starts with the pusher already overlapping the block, so some separation motion is unavoidable on any setting - the question is which rungs stay near that floor and which invent motion of their own. A rung that more than doubles the floor is not a yardstick others can be measured against, however small its step; it is still swept as a candidate if it is coarser than the one that is.

knob value block drift (u) worst case role
sim_hz 20 1.580 t7 swept
sim_hz 40 0.924 t7 swept
sim_hz 80 0.878 t7 swept
sim_hz 160 2.412 t7 swept
sim_hz 320 1.435 t7 reference
sim_hz 640 20.816 t7 rejected as yardstick
sim_hz 1280 71.488 t7 rejected as yardstick
solver_iterations 1 10.541 t7 swept
solver_iterations 2 5.161 t7 swept
solver_iterations 4 6.652 t7 swept
solver_iterations 8 3.491 t7 swept
solver_iterations 16 5.180 t7 swept
solver_iterations 32 0.698 t7 swept
solver_iterations 64 0.666 t7 reference
pusher_sides 4 44.334 t7 swept
pusher_sides 8 3.482 t7 swept
pusher_sides 16 6.407 t7 swept
pusher_sides 32 4.380 t7 swept
pusher_sides 64 1.476 t7 reference
contact_stiffness 1000 1.576 t7 swept
contact_stiffness 10000 1.614 t7 reference
contact_stiffness 100000 4.843 t7 rejected as yardstick
contact_stiffness 1e+06 4.926 t7 rejected as yardstick
contact_stiffness 1e+07 7.487 t7 rejected as yardstick

Reference setting, each knob at the finest rung the rest test trusts: sim_hz=320, solver_iterations=64, pusher_sides=64, contact_stiffness=10000, control_hz=10 - 200 ms per episode.

superdex: sim_hz

Physics steps per simulated second. The primary resolution knob: halving the step should stop changing the outcome once the run has converged.

value worst pos (u) mean pos (u) worst ang (rad) mean ang (rad) worst cov worst case diverged ms/episode verdict
20 180.171 50.297 0.8758 0.3842 0.6847 t3 - 60.5 out
40 35.421 7.974 0.9430 0.2230 0.3199 t3 - 80.0 out
80 34.589 8.217 1.1268 0.2431 0.3216 t3 - 91.9 out
160 15.921 3.182 0.0646 0.0198 0.0638 t7 - 134.9 out
320 0.000 0.000 0.0000 0.0000 0.0000 t7 - 200.1 within

Chosen: sim_hz=320 - no cheaper rung held tolerance, so this is the reference itself - this knob has not demonstrated convergence, it has run out of headroom.

superdex: solver_iterations

Constraint iterations per step in pymunk, Newton iterations per step in SuperDex.

value worst pos (u) mean pos (u) worst ang (rad) mean ang (rad) worst cov worst case diverged ms/episode verdict
1 144.561 45.951 0.5520 0.2030 0.6847 t3 - 180.9 out
2 44.822 24.256 0.4384 0.1312 0.2548 t5 - 188.1 out
4 4.837 1.851 0.9530 0.1571 0.1321 t7 - 190.5 out
8 10.050 1.501 0.9726 0.1401 0.1300 t7 - 202.6 out
16 57.858 8.270 0.4119 0.0589 0.0047 t7 - 200.5 out
32 4.692 0.685 0.0021 0.0004 0.0157 t7 - 205.8 out
64 0.000 0.000 0.0000 0.0000 0.0000 t7 - 200.1 within

Chosen: solver_iterations=64 - no cheaper rung held tolerance, so this is the reference itself - this knob has not demonstrated convergence, it has run out of headroom.

superdex: pusher_sides

Polygon resolution of the pusher disc. Geometric discretisation of the contact patch.

value worst pos (u) mean pos (u) worst ang (rad) mean ang (rad) worst cov worst case diverged ms/episode verdict
4 200.194 49.483 2.4700 0.7145 0.3607 t7 - 186.0 out
8 36.120 8.288 0.3767 0.1073 0.3217 t3 - 198.0 out
16 3.684 1.045 0.0712 0.0177 0.0663 t3 - 196.6 out
32 1.370 0.355 0.0238 0.0056 0.0088 t7 - 200.4 out
64 0.000 0.000 0.0000 0.0000 0.0000 t7 - 200.1 within

Chosen: pusher_sides=64 - no cheaper rung held tolerance, so this is the reference itself - this knob has not demonstrated convergence, it has run out of headroom.

superdex: contact_stiffness

Penalty coefficient of the contact model. Too soft and the pusher sinks into the block; too stiff and the solver needs more iterations.

value worst pos (u) mean pos (u) worst ang (rad) mean ang (rad) worst cov worst case diverged ms/episode verdict
1000 15.788 5.346 1.0963 0.2493 0.2685 t7 - 208.3 out
10000 0.000 0.000 0.0000 0.0000 0.0000 t7 - 200.1 within

Chosen: contact_stiffness=10000 - no cheaper rung held tolerance, so this is the reference itself - this knob has not demonstrated convergence, it has run out of headroom.

superdex: the step/stiffness corner

Each sweep above holds the other knobs at their finest trustworthy rung, which is the most stable corner of the space - so a stiffness/step interaction cannot show up there. This grid puts them back together at the recommended solver effort and facet count, over the whole ladder of both knobs rather than only the rungs the rest test trusts: a blow-up is an absolute fact about a setting and is worth knowing wherever a user might go. Cells show the worst-case position error in units against the reference, or the scenarios that diverged; cells marked ~ use a rung the rest test rejected as a yardstick, so read their error as indicative and their stability as exact.

sim_hz \ contact_stiffness 1000 10000 100000 1e+06 1e+07
20 Hz (dt=0.0500 s) 180.171 180.171 ~180.171 diverged: t2 diverged: t1, t2, t6, t7
40 Hz (dt=0.0250 s) 15.429 35.421 ~25.347 ~70.265 diverged: t1, t2, t3, t6, t7
80 Hz (dt=0.0125 s) 21.643 34.589 ~13.684 ~51.493 ~60.648
160 Hz (dt=0.0063 s) 28.388 15.921 ~13.706 ~38.836 ~65.862
320 Hz (dt=0.0031 s) 15.788 0.000 ~12.551 ~36.175 ~62.224
640 Hz (dt=0.0016 s) ~23.995 ~32.850 ~146.344 ~18.819 ~65.316
1280 Hz (dt=0.0008 s) ~24.253 ~35.654 ~206.280 ~239.723 ~62.130

Divergence boundary. Nothing diverges above 40 Hz (dt = 0.0250 s); at or below it the solver gives up once the contact is at least 1e+06 N/m stiff. Cell by cell: 20 Hz at stiffness 1e+06 diverges on t2; 20 Hz at stiffness 1e+07 diverges on t1, t2, t6, t7; 40 Hz at stiffness 1e+07 diverges on t1, t2, t3, t6, t7. The recommended rate sits 8x above that boundary and the recommended stiffness 100x below it. tests/test_recommended.py re-runs the diverging cell nearest safety (sim_hz=40, contact_stiffness=1e+07, solver_iterations=64, pusher_sides=64) and requires it to blow up, so this boundary cannot quietly become a claim about an engine that has since been fixed.

superdex: the recommendation

knob recommended reference ladder top why
sim_hz 320 320 1280 no cheaper rung held tolerance, so this is the reference itself - this knob has not demonstrated convergence, it has run out of headroom
solver_iterations 64 64 64 no cheaper rung held tolerance, so this is the reference itself - this knob has not demonstrated convergence, it has run out of headroom
pusher_sides 64 64 64 no cheaper rung held tolerance, so this is the reference itself - this knob has not demonstrated convergence, it has run out of headroom
contact_stiffness 10000 10000 1e+07 no cheaper rung held tolerance, so this is the reference itself - this knob has not demonstrated convergence, it has run out of headroom

The recommendation is the reference setting itself: no cheaper rung of any ladder held tolerance, so this engine has no measured headroom on this suite. It costs 200.1 ms per episode. That is a real result, not a missing one - the tables above show every rung that was tried and by how much it missed.

What this replaces. The hand-picked SimParams defaults - sim_hz=100, solver_iterations=10, pusher_sides=24, contact_stiffness=100000 - score 24.831 units and 1.1244 rad from the reference at worst (t3) for 97.4 ms per episode. That is 25x the tolerance, at 0.49x the recommendation's cost - which is the whole reason this study exists.

Agreement window. The recommendation is the reference here, so asking how long it tracks the reference is vacuous. The informative comparison is the published defaults: over a full 120-step episode they track it for 1 control steps (0.1 s) before t7 drifts past 1 unit. Per scenario: t1 11, t2 9, t3 23, t4 120, t5 17, t6 14, t7 1.

Not gratuitously conservative: sim_hz=320, solver_iterations=64, pusher_sides=4, contact_stiffness=10000 - the recommendation with one knob stepped back down - misses by 200.19 units on t7, 200x the tolerance. tests/test_recommended.py re-runs exactly that.

Caveats