Skip to content

Keep the from-assets arm's untested physics uncertain - #214

Merged
yichao-liang merged 2 commits into
masterfrom
from-assets-honest-belief
Oct 9, 2026
Merged

yichao-liang merged 2 commits into
masterfrom
from-assets-honest-belief

Conversation

@yichao-liang

Copy link
Copy Markdown
Collaborator

Stacked on #210 (from-assets-prompt-fixes); review that one first.

Why

Seed 1 of the Domino fixes_r1 round (EMPIRIC from assets) lost its test level.
Replaying its recorded test episode in the real environment shows the failing push needs the world's spinning friction (0.5) and rolling friction (0.006) on the dominoes, together with the gripper's follow-through touching the first bridge.
The agent never declared either friction, so its model ran both at PyBullet's 0 and predicted a cascade in every rehearsal.
Its level-1 recording, a straight chain, could not identify either value.
Declaring them would not have helped yet: the fit kept a parameter the data did not constrain at its starting value with a narrow belief, because its prior is 0.75 times the starting value.
A spinning friction started at 0.05 came out with a 68% interval of 0.057 to 0.12.

What changes

  • A prior that spans the declared range.
    Under code_sim_learning_prior_spans_bounds, no parameter's prior is narrower than its declared range in fit space, so a parameter the recordings do not constrain keeps that whole range in the belief.
    The from_assets_opus menu entry sets it, and the arm refuses to start without it.
    The supplied-base arms keep the anchored prior, since their starting values are the base's calibrated defaults.
  • Sampled undeclared materials.
    SceneBase.sampled_material_specs offers every engine material the scene does not declare as a parameter over a plausible range around the scene's own value (SAMPLED_MATERIALS: spinning friction 0 to 1, rolling friction 0 to 0.02, mass within a factor of 3, ...).
    The from-assets arm joins these prior-only factors to its belief (join_beliefs), so joint draws and physics sweeps vary them.
    They are never fitted and cost no replays.
    A rollout world applies a draw's value to the whole group; a fit that pins the material to its default gives each body its own value back, so a group the scene made different (the ground and the tables) stays different.
  • Prompts.
    The from-assets system prompt and scene contract say that undeclared materials are sampled, how to fit or fix one, and that a declared parameter's prior spans its declared range.
    docs/amps/empiric-from-assets.md records the design.

Evidence

A scripted run of the from-assets harness on seed 1's round: level 1 is seed 1's own simulator.py and recorded actions.
On level 2 it fits, then rehearses two plans from the level's start on 16 joint draws each: seed 1's chain (3 blues, the 46-degree first hit, lost in the world) and the oracle-dynamics arm's arc (2 blues, won in the world).

parent branch this branch
Fit on the same data SSE 3.245 to 2.285, support friction 0.80 to 0.30 same
Spinning and rolling friction in the draws absent (PyBullet's 0) sampled
Seed 1's chain, joint draws solved 12/16 10/16
Oracle arc, joint draws solved 11/16 9/16
Physics sweep of seed 1's chain 11/11 pass 21/23 pass; fails at spinning friction 0.97 and rolling friction 0.019

The sweep now names the two materials the chain hangs on.
The draws do not yet separate the two plans: the agent's own scene still predicts that seed 1's chain cascades at the world's material values, where the world's chain slides.
Real-environment replays rule out the materials, friction anchors, continuous collision detection, damping and the dominoes' massless top link as that difference.
The likely remaining cause is the push: the model replans it from its noisy estimate of the scene, and whether the gripper's follow-through catches a bridge 8.7 cm away decides the outcome.

Domino round fixes_r2 ran this head on 2 seeds and solved 1 of 2.
Seed 0 lost its test level because it declared both frictions, with ranges that exclude the world's values (spinning friction 0 to 0.05, rolling friction 0 to 0.002; the world has 0.5 and 0.006).
Neither change here reaches a declared range, so its 16 joint draws all cascaded.
A real-environment replay of its episode stalls at the world's values and cascades with either friction anywhere inside its ranges.
Covering declared materials whose range the recordings do not test is a follow-up.

The first acceptance run also caught a bug in the first version of the sampling: pinning a material's default homogenized the support group to the ground plane's friction, and the fit started at three times the error on the same data.
The per-body restore fixes it.

Tests

🤖 Generated with Claude Code

@yichao-liang
yichao-liang changed the base branch from from-assets-prompt-fixes to master October 9, 2026 07:24
Yichao Liang added 2 commits October 9, 2026 03:25
Seed 1 of the Domino fixes_r1 round lost its test level on two engine
materials its scene never declared: the dominoes' spinning and rolling
friction ran at PyBullet's 0 (the world: 0.5 and 0.006), and every
rehearsal predicted a cascade that the world did not produce. Its
level-1 recording, a straight chain, could not identify either value,
and declaring them would not have helped: the fit kept them at their
starting values with a narrow belief, because its prior is 0.75 times
the starting value (a spinning friction started at 0.05 came out
0.057-0.12).

- code_sim_learning_prior_spans_bounds widens the fit's prior on every
  parameter to at least its declared range, so a parameter the
  recordings do not constrain keeps that whole range in the belief. The
  from_assets_opus menu entry sets it, and the arm refuses to start
  without it; the supplied-base arms keep the anchored prior, whose
  starting values are calibrated defaults.
- SceneBase.sampled_material_specs offers every material the scene does
  not declare as a parameter over a plausible range around the scene's
  own value (SAMPLED_MATERIALS), and accepts a value for it, as a
  rehearsal draw sets one. The from-assets arm joins these prior-only
  factors to its belief (join_beliefs), so joint draws and physics
  sweeps vary them; they are never fitted and cost no replays.
- The from-assets prompts say so: undeclared materials are sampled, and
  a declared parameter's prior spans its declared range.
The fit pins every parameter it does not estimate to its default. For an
undeclared material that default is read from its group's first body, so
applying it set every body of the group to that value: the fit worlds of
seed 1's Domino scene ran its tables at the ground plane's friction, and
the fit started from three times the error on the same data. A default
now restores each body's own value; a rehearsal draw's value still sets
the whole group.
@yichao-liang
yichao-liang force-pushed the from-assets-honest-belief branch from b32d3e8 to d753bd3 Compare October 9, 2026 07:25
@yichao-liang
yichao-liang merged commit 0894b23 into master Oct 9, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant