efa-2-pendulum / README.md
dcharlot-physicalai-bmi's picture
efa-2-pendulum v0: EFA on the first external body (Pendulum-v1 exact spec) β€” gated, reload-exact
1439be2 verified
|
Raw
History Blame Contribute Delete
3.17 kB
metadata
license: apache-2.0
library_name: ferric
pipeline_tag: robotics
tags:
  - energy-based-model
  - control
  - physical-ai
  - deterministic
  - pendulum-v1
  - external-benchmark

EFA-2 Β· Pendulum-v1 (v0 of the external-body program)

The EFA recipe on the first body the world defines, measured on the metric the world publishes. Gym Pendulum-v1, exact published spec β€” dynamics, Β±2 torque limit (swing-up regime), reward function, start distribution, 200-step episodes. Nothing about the task is ours; every number below is externally reproducible against the same spec.

Charlot Lab Β· Institute for Physical AI @ Bailey Military Institute. Runtime: Ferric (pure-Rust, cross-fabric). Sibling flagship: physicalai-bmi/efa-1 (multi-body, certified, agency-gated).

The external card

policy mean return (100 spec episodes) upright at end cost per decision
random β‰ˆ βˆ’1200 β€” β€”
published anchor: SB3 SAC β‰ˆ βˆ’150 β€” 1 fwd pass (256-wide Γ—2)
efa-2-pendulum, flow K=1 βˆ’142.6 100% 1 forward pass (~21k FLOPs)
flow K=2 βˆ’127.9 100% 2 passes
flow K=4 βˆ’125.8 100% 4 passes
DP teacher (near-optimal) βˆ’124.5 100% 106 evals/decision

The thinking dial is real on the external metric: K=1 β†’ K=4 climbs βˆ’142.6 β†’ βˆ’125.8, converging toward the near-optimal teacher. The same potential verifies at 98.1% (ranks the demonstrator's action below random), and decisions are bit-exact deterministic. Swing-up β€” a discontinuous, energy-pumping optimal policy β€” is solved at K=1 closed-loop (100% upright from every spec start).

Honesty (read before citing)

  • This distills a model-based DP demonstrator (known dynamics, grid value iteration). The claim is SOTA-level control on the published metric at one forward pass, with verification and determinism β€” not "beats SAC at model-free RL." SAC learns from reward alone; this artifact does not.
  • One seed, 2-D body. The external-body program continues toward MuJoCo / SO-101-LeRobot.
  • The energy gate (Ο„ in config.json) escalated on ~0.1% of decisions β€” K=1 already succeeds closed-loop here, so the gate prices compute; it has nothing to rescue. Stated plainly, as on every EFA card.
  • Gated release: thresholds fixed before the run (return@K1 β‰₯ βˆ’160 ∧ upright 100% ∧ verify β‰₯ 90% ∧ bit-exact ∧ reload-exact); train β†’ gate β†’ save β†’ reload from disk β†’ re-verify. Provenance: experiments/ebm_efa2pend.rs in the EFA repo (69+-experiment ledger, negatives included).

Architecture

The coordinated pair on the env's own observation vector [cosΞΈ, sinΞΈ, ΞΈΜ‡]:

  • Flow head (5β†’96β†’96β†’1): conditional-flow-matched velocity field; u = clamp(flow(obs, a=0, t=0), Β±2) at K=1; K-step integration for the accuracy-vs-compute dial.
  • Potential head (4β†’96β†’96β†’1): contrastive energy β€” low = valid action; the model checking its own actions.

License: Apache-2.0.