Skip to content

pybullet_domino+agent_sdk: certificate criterion experiments, BeliefProbe rename, dense sigma grid (sysID stack 5/8) - #100

Merged
yichao-liang merged 7 commits into
masterfrom
sysid-05-certificates
Jul 30, 2026
Merged

pybullet_domino+agent_sdk: certificate criterion experiments, BeliefProbe rename, dense sigma grid (sysID stack 5/8)#100
yichao-liang merged 7 commits into
masterfrom
sysid-05-certificates

Conversation

@yichao-liang

Copy link
Copy Markdown
Collaborator

Fifth of eight PRs landing the domino-sysid branch on master in sequence (after #96, #97, #98, #99). Tree is identical to the corresponding slice of that branch rebased onto current master.

This chunk

  • pybullet_domino: off-table "topples" no longer score - certificate onset rule
  • agent_sdk: rename ProbeSim -> BeliefProbe (probe_api.py -> belief_probe.py)
  • pybullet_domino: believed-side K* probes use the planner's roll-only topple criterion
  • Revert "pybullet_domino: believed-side K* probes use the planner's roll-only topple criterion"
  • Revert "pybullet_domino: off-table "topples" no longer score - certificate onset rule"
  • main: train-driven early stopping requires a learned model
  • agent_sdk: dense physics-margin grid + sim.run(physics_sweep=True) preview

Two certificate-criterion experiments and their deliberate reverts are kept as history (the off-table loophole close broke believed-K* test-task generation; both were backed out on purpose). Net changes: the BeliefProbe rename, the model-has-learned eligibility gate so cycle-0 can't early-stop before any learning has happened, and the 32-point sigma grid with the agent-side physics_sweep preview (16 points empirically missed the k*-boundary failure hole at true friction; 32 catches it).

🤖 Generated with Claude Code

…set rule

A target rammed off the table upright acquires its roll only in freefall
and lands flat on the floor; the roll-only Toppled classifier scored that
as a solve (caught in run_20260723_110212's explore replay at mu=0.1,
where the low-friction relay slides like a puck and shoves purple off
the edge still standing).

The Toppled predicate deliberately stays roll-only so a topple that
happens on the table and then slides off still counts at the final
state. The loophole is closed trajectory-side instead: on goal-reaching
episodes the certificate now requires every goal target's fall to have
BEGUN at table level (z at its first fallen-threshold crossing; new
_fall_index helper, _topple_onset refactored onto it). On-table
crossings pivot on the base edge at z 0.42-0.47 while an off-table
shove crosses in freefall at z 0.07, so the band separates cleanly.
DominoComponent.toppled_on_table (roll + table level) survives as the
design-time check in both min-block generation probes, and the goal
texts state the enforced rule.

Also: the two test classes in test_pybullet_domino_composed.py had
__init__ constructors, so pytest silently never collected them; fixing
that exposed a stale grid test and a real grid_component bug
(extract_feature crashed on grid-index loc names instead of the
documented None fall-through; it now prefers the stored coordinate
attributes and parses names defensively).

Note on task caches: any .py edit under the domino packages changes
_domino_code_digest, so min-block tasks regenerate and same-seed tasks
can differ from old runs; replays of old runs must load the run's
cached task JSON (regeneration is not byte-stable).
…be.py)

The agent-facing sim handle is a stateful probe over the belief
simulator (BeliefSim), not an env; name the class for what it probes.
Mechanical rename across source, prompt text, and tests; the
explore_python namespace now binds BeliefProbe for extra instances.
Probe result/exception types and build_probe_namespace keep their
names (probe stays the verb).
…topple criterion

The on-table topple requirement (81cbf0b) broke min-block TEST task
generation: the turn tasks' differentiation filter probes each leg at
the planning friction (0.1), where the rammed leg target slides off the
probe table - with on-table required, no k ever counted as toppling,
so believed K* was None for every candidate, the filter dropped them
all, and the 76-attempt cap shipped empty caches ("generates 0 test
tasks", launches 13:53-14:09 on 2026-07-23).

New _probe_toppled dispatches on whose physics is loaded: at the TRUE
friction the probe stands in for the certificate (topple must happen
on the table); at the believed/planning friction it stands in for the
uncalibrated planner, whose success check is the roll-only Toppled
goal atom - an off-table shove convinces that planner, and believed-K*
must measure what the planner believes, not what would certify. Probe
memo keys already include the physical override, so the two criteria
never share entries.

Verified standalone: seeds 0-2 each generate 1/1 turn test task
(k*=2) again; the broken window's empty caches are orphaned by the
code-digest change.
The all-train-attempts-solved criterion certifies the learned model, but
it could fire on cycle 0 before any learning ran (explorer successes
come from the initial mental model), skipping learning for the whole run
(e.g. run_20260723_141019 tested an untrained model). Gate early
stopping on model_has_learned: offline demos, a loaded approach, or a
prior online learning update.
…eview

The capture gate's +-1-sigma margin check was two endpoint rollouts;
near a feasibility boundary success is speckled in the physical params,
and run_20260724_140531's capture passed both endpoints while failing
deterministically at the true friction between them. physics_sigma_points
now returns an even fit-space grid (agent_plan_validation_physics_margin_points,
default 32: empirically a 16-point grid missed that capture's failure
hole, 32 catches it), and the agent can pre-check its exact plan with
sim.run(plan, physics_sweep=True) - one deterministic rollout per gate
point - instead of discovering PARAM-SENSITIVE one submission at a time.
Also refreshes the stale heavy-block settings comment (heavy generation
verified at the default true friction 0.5).
@yichao-liang
yichao-liang merged commit 30fde6d into master Jul 30, 2026
14 checks passed
@yichao-liang
yichao-liang deleted the sysid-05-certificates branch July 30, 2026 09:31
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