Repository navigation
Keep a declared material's range at least as wide as its plausible range - #216
Merged
Merged
Conversation
yichao-liang
force-pushed
the
from-assets-plausible-ranges
branch
from
October 9, 2026 08:38
a5e88e7 to
038db71
Compare
A fit centred its prior on the planning model's parameter registry, and that model carries every applied fit: for a parameter the agent declares, the registry reports the applied value as the default. So each sim.fit() started from the previous fit's answer, although the runs set code_sim_learning_carry_posterior to False. Seed 0 of the Domino round fixes_r3 refit the same 10 segments three times and watched restitution move from 0.05 to 0.47; it called the fit unstable and stopped rehearsing with the joint draws. The anchors, and the value a parameter dropped from the declaration reverts to, now come from the registry of a freshly built model, built once per model class. A carried posterior still sets the anchors when its flag is on.
Seed 0 of the Domino round fixes_r2 declared spinning friction on [0, 0.05] and rolling friction on [0, 0.002]; the world has 0.5 and 0.006. Its level-1 recording could not identify either, its unfitted prior spanned only the declared boxes, and all 16 joint draws cascaded where the world's chain stalls at the second bridge. A replay of its episode in the real environment stalls at the world's values and cascades with either friction anywhere inside the declared ranges. The from-assets arm now binds SceneBase with plausible_floor. Its registry names each declared material's plausible range (PLAUSIBLE_MATERIALS, renamed from SAMPLED_MATERIALS; a mass relative to the declared value), and stamp_physical_spec_scales widens a narrower declared box to it, so the fit, the prior, the joint draws and the physics sweep all use the wider range. The range comes from the declaration alone, because the approach stamps the specs before its world binds any observed body. The model status lists each widened range and the scene contract states the ranges. Real-to-sim keeps its declared boxes.
yichao-liang
force-pushed
the
from-assets-plausible-ranges
branch
from
October 10, 2026 13:36
038db71 to
950cd14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #219 (fit-anchors-never-fitted); review that one first.
Why
Seed 0 of the Domino round
fixes_r2, which ran #214's code (merged), lost its test level.It declared the dominoes' spinning friction on [0, 0.05] and rolling friction on [0, 0.002]; the world has 0.5 and 0.006.
Its level-1 recording, a straight chain, could not identify either, its unfitted prior spanned only the declared boxes, and its rehearsal said 16 of 16 joint draws cascade.
A replay of its episode in the real environment stalls at the world's values and cascades with either friction anywhere inside the declared ranges.
#214 samples only the materials an agent leaves undeclared, so a narrow declaration hides a material just as well.
What changes
SceneBasewithplausible_floor.Its parameter registry then names each declared material's plausible range (
PLAUSIBLE_MATERIALS, renamed fromSAMPLED_MATERIALS; a mass relative to the declared value).The range comes from the name and the declaration alone, because the approach stamps the specs before its world binds any observed body.
stamp_physical_spec_scaleswidens a declared box narrower than a registry entry's plausible range, so the fit, the prior, the joint draws and the physics sweep all use the wider range.Evidence
A scripted run of the from-assets harness on seed 0's round: level 1 is seed 0's own
simulator.pyand its recorded actions.On level 2 it makes seed 0's opening 120-step wait, then rehearses three plans from the current state on 16 joint draws and runs the physics sweep, unfitted as seed 0 played it:
The joint draws now separate the robust plan from seed 0's knife-edge turn, which won once and lost once in the world.
Seven of the Oct 8 plan's 14 failing draws stall the chain; the other seven stall the push, mostly at lateral friction 0.1 to 0.15, which an unfitted prior over the widened box reaches.
The level-1 cascade constrains lateral friction strongly, so a fit (required on test levels by the next PR) narrows that part of the belief.
Tests
🤖 Generated with Claude Code