Skip to content

sim_learning+agent_sdk: open-loop rollout residuals, combined-substrate probe, solve-prompt strategy blocks (sysID stack 8/8) - #103

Merged
yichao-liang merged 7 commits into
masterfrom
sysid-08-open-loop
Jul 30, 2026
Merged

sim_learning+agent_sdk: open-loop rollout residuals, combined-substrate probe, solve-prompt strategy blocks (sysID stack 8/8)#103
yichao-liang merged 7 commits into
masterfrom
sysid-08-open-loop

Conversation

@yichao-liang

Copy link
Copy Markdown
Collaborator

Last of eight PRs landing the domino-sysid branch on master in sequence (after #96-#102). Tree is identical to that branch's tip rebased onto current master, plus mypy/pylint cleanups of the newest test files.

This chunk

  • structs: unpickled entities recompute their cached hash
  • sim_learning: combined-substrate belief probe, pooled arbitration, open-loop residuals
  • configs: agent solve attempts back to 5
  • pybullet_domino: objective_description states the exact episode reward
  • agent_sdk: solve-prompt strategy blocks from the 001752 post-mortem
  • tests: mypy-clean the new agent_sdk test files
  • tests: silence W0106 in the pickle cached-hash test

The open-loop evidence stack: sim.residuals(rollout=True) free-runs the fit trajectories and sweeps each registry physical parameter so teacher-forced residuals can no longer hide compounding divergence (the run_20260728_111805 failure mode); the belief verdict probes the combined substrate (base sim + learned rules); cross-cycle arbitration pools evidence via survivor-set SSE. Plus the pickled-cached-hash fix (PYTHONHASHSEED-salted hashes broke State lookups cross-process), the env-published exact reward formula, and the solve-prompt strategy blocks (capture-first banking, ground-truth scoring section, journal epistemics, formula validation) from the run_20260729_001752 post-mortem.

🤖 Generated with Claude Code

_TypedEntity._hash caches hash(str(self)), which is salted per process
(PYTHONHASHSEED); pickling the cache made every State.data lookup on
objects loaded in another process miss its dict bucket (KeyError on
fit_data pickles consumed offline, which exist precisely for offline
post-mortems). __getstate__ now drops the cached _hash/_str and
__setstate__ scrubs legacy payloads on load.
…en-loop residuals

Three fixes from the 2026-07-27/28 al_margin seed1+seed2 post-mortems:

- Belief-side cascade probe replays on the combined substrate (base sim
  plus fitted process rules via BaseEnv.probe_process_model_factory,
  stamped by the approach at both option-model build sites and on
  fresh-env repoints); the real evaluator never sets a factory and
  still judges pure env physics. A passing combined verdict is
  double-checked base-only at the SAME attempt count as a load-bearing
  diagnostic; the earlier 3-vs-1 attempt asymmetry flagged physically
  no-op rules as load-bearing 14 times in run_20260728_111805.

- Cross-cycle INCONSISTENT holds are arbitrated on pooled evidence: the
  orchestrator hands its survivor-set SSE probe to the report adjuster,
  and a flagged jump that explains the pooled segments
  code_sim_learning_rollout_consistency_sse_ratio (3.0) times better
  than the held value is accepted. run_20260727_210827 held a sharp
  biased cycle-0 fit (0.9313) over the pooled-best 0.4748 all run.

- sim.residuals(rollout=True): open-loop counterpart of the
  teacher-forced residual report. Replays the recorded trajectories
  free-running (fresh env per rollout, the system-ID fit objective) and
  sweeps every env-registry physical parameter across its box with a
  per-parameter declare/flat verdict; the synthesis prompt now requires
  this evidence before omitting PHYSICAL_PARAMS. run_20260728_111805
  declined to declare on near-zero per-step residuals while the same
  data was explained two orders of magnitude better near the true
  friction open-loop.
run_20260728_111806 exhausted all 3 test attempts mid-tune with a
correct friction fit and an actionable journal roadmap; give the agent
arms two more attempts per task.
The solve agent previously reverse-engineered scores from opaque
numbers and induced false reward rules (run_20260729_001752 invented
a binary -0.10 flag and a -0.30 excess-blue penalty). The evaluator
now publishes the ground-truth arithmetic - success bonus minus
block cost times blues consumed, with worked examples - and states
that consumed blues cost reward but never invalidate a success.
Four general, non-leaky fixes for the failure modes that cost
run_20260729_001752 all five attempts while its sibling banked an
over-built solve:

- CAPTURE FIRST, OPTIMIZE SECOND in the submit guidance: bank a
  robust goal-reaching design early; states the verified capture
  semantics (validated replaces, rejections never displace).
- Scoring section: the solve prompt now renders the task
  evaluator's objective_description, so scores are decoded with
  the ground-truth rule instead of hypothesized penalties.
- Journal epistemics: prompt-side protocol (execute or retire
  untried leads first, negative claims scoped to the family
  actually swept, conflicting entries demote to open questions)
  plus matching scope requirements in record_journal's guidance.
- Formula validation in deep-tune advice: validate derived
  geometric predictions on one controlled experiment before
  letting them steer the search.
Full-repo mypy (the CI configuration) flagged 12 errors the targeted
per-file runs missed: raw _TypedEntity keys where State expects Object,
a float64 Action payload, an untyped toolkit helper, Protocol-mismatched
_FakeApproach arguments (now cast, as the stub is deliberately partial),
and None passed where the probe stepper takes an Action.
@yichao-liang
yichao-liang merged commit 1b72994 into master Jul 30, 2026
14 checks passed
@yichao-liang
yichao-liang deleted the sysid-08-open-loop branch July 30, 2026 10:10
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