Skip to main content

T-Rex Model

A dinosaur-inspired bipedal simulation model with an oversized head and vestigial forelimbs. Its stage 3 task uses contact from a fixed head geom as a bite proxy; the model has no articulated jaw.

Since policy interface r14 the T-Rex's observation reads no world heading: the policy sees the direction of gravity in its own body frame, its velocity relative to the way it faces and the prey's direction relative to its body, so turning the whole scene changes nothing it observes. T-Rex trains on Stable-Baselines3 only.

Generated specifications

These values are generated from the environment and compiled MJCF model. “Dynamic mass” is a simulator property, not an anatomical weight estimate.

GaitBipedal
Observation dimension63
Action dimension / actuators15
Generalized coordinates (nq)28
Generalized velocities (nv)27
Compiled dynamic model mass85.7 kg
Plant contract revisionsPolicy r15 · physics r9 · visual r4
Modelenvironments/tyrannosaurus_rex/anatomical/assets/tyrannosaurus_rex_anatomical.xml

Current curriculum configuration

The Stable-Baselines3 budgets and early-advancement gates below come from the current TOML files and can differ from older published runs. A stage also ends when its configured budget is exhausted. The recipe column names the behavior a stage belongs to and whether its checkpoint is a published deliverable; the warm-start column names the stage it starts from.

StageRecipeWarm-start fromObjectiveSB3 configured budgetSB3 early-advancement gate
1 — Stancestand (deliverable)—Learn to stand and balance without falling12Mseeds clean at all six headings (whole scene turned -90, -45, 0, 45, 90, 180°) LCB95 ≥ 0.8 over ≥ 40 seeds (settle 200 steps); at every heading, clean stance episodes LCB95 ≥ 0.8 over the same seeds; an episode is clean when it reaches the horizon with min_all_feet_support ≥ 0.98, max_touchdown_rate ≤ 0.25, max_window_displacement_m ≤ 0.1, min_foot_load_share ≥ 0.4, max_actuator_saturation_fraction ≤ 0.1, max_settle_airborne_substeps ≤ 0, max_settle_peak_floor_force_bw ≤ 1.5, min_foot_load_share_windowed ≥ 0.35, max_foot_contact_fraction ≤ 0.02, max_phantom_support_fraction ≤ 0.05, max_nonfoot_load_fraction ≤ 0.02, max_settle_stance_width_change_m ≤ 0.08, max_sole_tilt_deg ≤ 2, max_sole_corner_lift_m ≤ 0.004, min_sole_contacts ≥ 1.5, max_episode_yaw_change_deg ≤ 25, max_settle_touchdowns ≤ 2, max_sole_cop_fore_aft ≤ 0.8; full-horizon episodes ≥ 95.0% at every heading; hop-or-fall episodes ≤ 1 at every heading; reward rail ≥ 2,250 at every heading; reward rail ≥ 0.6 × the statue's at the same heading; verdict from the six-heading stance_heading_report.json on the handoff pair (post-stage; fail-closed when absent, never the yaw-zero panel)
recovery — Recoveryrecover (deliverable)1 — StanceHold the stance against scheduled external pushes and recover from each3Mrecovery success LCB95 ≥ 0.3; paired Δ vs each required frozen null LCB95 ≥ 0.2; re-entry ≤ 100 steps + 50-step dwell; ≥ 40 episodes/evaluation; verdict from the frozen gate_resolution.json (post-stage; fail-closed when absent or stale)
2 — Locomotionwalk (deliverable)1 — StanceLearn forward walking/running8Mreward ≥ 100; episode length ≥ 750; avg. velocity ≥ 1 m/s; ≥ 10 episodes/evaluation; 3 consecutive passes
3 — Bitehunt (deliverable)2 — LocomotionSprint to prey and make contact with the head bite proxy8Mtask success LCB95 ≥ 0.5; reward rail ≥ 361; ≥ 30 episodes/evaluation; verdict from the selected checkpoint's evaluation_selected.csv (post-stage; fail-closed when absent)

Backend-specific task-success semantics

  • Stable-Baselines3 — Head-contact bite proxy: The head-bite geom contacts the prey geom while the bite reward is enabled; the model has no articulated jaw.

Per-deliverable success semantics

  • stand (1 — Stance) · Stable-Baselines3 — Stance quality at six headings (stance_quality_heading/v1): The stance checkpoint clears the stance_quality_heading/v1 gate (the six-heading certificate, decision D-D32), judged post-stage on the handoff pair: the 40 certification-panel seeds are rolled with the whole scene turned -90, -45, 0, 45, 90 and 180 degrees; at every heading the stance_quality/v2 decision on floor truth (horizon reached, no hop or impact in the settle window, both feet down and loaded, flat pads, no actuator held at its limit) passes against the statue rolled at that heading, and the one-sided 95% lower bound on the share of seeds clean at every heading meets the configured bound, with the reward rails as collapse floors only. The clean-seed count and its bound are recorded in gate_verdict.json but not exported to summary.json until a later phase (decision D-A9, deferred by D-B15), so the catalog names them with no value.
  • recover (recovery — Recovery) · Stable-Baselines3 — Recovery under pushes (recovery_quality/v1): The recovery checkpoint clears the recovery_quality/v1 gate, judged post-stage against the run's frozen gate_resolution.json: recovery-success LCB95 and the paired delta against each required frozen null meet the frozen thresholds, with re-entry inside the configured step budget and dwell. The statistics are not exported to summary.json until a later phase (decision D-A9, deferred by D-B15).
  • walk (2 — Locomotion) · Stable-Baselines3 — Gated forward velocity (reward_and_length/v1): The locomotion checkpoint clears the reward_and_length/v1 gate: mean forward velocity at or above the stage's configured minimum, with its reward and episode-length floors, over the required consecutive evaluations.
  • hunt (3 — Bite) · Stable-Baselines3 — Head-contact bite success (task_success/v1): The hunt checkpoint clears the task_success/v1 gate: the one-sided 95% Clopper-Pearson lower bound on per-episode head-contact bite success (the head-bite geom contacts the prey geom while the bite reward is enabled; the model has no articulated jaw) over the selected checkpoint's evaluation_selected.csv at the stage's declared min_eval_episodes, hash-bound to that checkpoint, meets the configured min_success_lcb bar (provisional until the first Phase-B pilot re-freezes it; decision D-B2), with the reward rail as a collapse floor only. The bound is exported to summary.json as selected_model_success_lcb beside the raw selected-checkpoint rate.

Published run summaries

These are historical experiment records. A result is not evidence for the current model revision unless its provenance is explicitly marked current and verified.

PPO · Stable-Baselines3 · 2026-03-18

Provenance: Historical model · unverified · evaluation episode count not recorded · Stable-Baselines3 (version not recorded)

StageTrained stepsBest eval rewardAvg. forward velocityTask success (Stable-Baselines3)Passed
1 — Stance6M3008.660.02 m/s—passed retired gate (reward gate)
2 — locomotion8M1936.013.47 m/s—passed retired gate (reward gate)
3 — bite8M1294.281.68 m/s96.7%passed retired gate (reward gate)

Current Stable-Baselines3 definition for this task label: The head-bite geom contacts the prey geom while the bite reward is enabled; the model has no articulated jaw.

Curriculum​

The T-Rex manifest (configs/tyrannosaurus_rex/anatomical/stages.toml, schema mesozoic.stage-manifest/v2) declares four nodes and four recipes — stand, recover, walk and hunt — every one of them a published deliverable:

  1. stance (recipe stand; root, historical stage 1) — settle from a randomized spawn and hold a stable upright pose; gated on physical stance quality, not reward, because a zero-action "statue" earns nearly all the reward the undisturbed task pays. Since physics r8 the gate is stance_quality/v2: every episode of a 40-episode panel is judged on the floor's force under each foot (no hop at reset, both feet planted, pads flat and not stood on an edge, no actuator held at its limit, no turning away), and the stance certifies when at least 37 of 40 are clean and at most one hops for the whole episode or falls. Since 2026-10-11 (decision D-D32) the gate is the six-heading certificate stance_quality_heading/v1: the same panel is rolled with the whole scene turned −90°, −45°, 0°, 45°, 90° and 180°, every heading must pass that decision, and at least 37 of the 40 seeds must be clean at all six, so a stance that stands only at the heading it trained at fails.
  2. recovery (recipe recover; warm_start_from = "stance"; no legacy number, addressed by id) — the same task plus scheduled external pushes (165.5 N for 0.20 s on the current plant, derived from the plant's own mass and stance geometry), warm-started from the certified stance checkpoint. Only a disturbance can certify active balance control; the recovery_quality/v1 gate judges per-shove recovery against frozen null baselines. It was frozen on 2026-08-28 with measured thresholds; the verdict comes from the stage directory's gate_resolution.json, written by freeze_recovery_gate.py.
  3. locomotion (recipe walk; warm_start_from = "stance", historical stage 2) — forward walking/running. Its edge is declared stance today; the plan is to re-declare it as recovery by a manifest edit once a recovery run passes the frozen gate (plan assumption A2) — nothing re-parents it on its own.
  4. behavior (recipe hunt; warm_start_from = "locomotion", historical stage 3) — the head-contact "bite" proxy task.

Each recipe label names one node: the notebook's BEHAVIOR = "stand" trains the stance node alone (as "stance" does), and BEHAVIOR = "recover" trains stance and then recovery and enforces the recovery verdict. Until decision D-D35 (2026-10-16) the recovery node was labelled stand too, so "stand" meant that stance-then-recovery chain here. Integer stage references keep their historical meaning everywhere (stage 2 remains locomotion). The catalog table above shows each node's recipe and warm-start parent, and the video cards below are keyed by stage id. See Behavior Recipes.

Anatomy​

The T-Rex model includes:

  • Torso - Forward-leaning body (~30 deg from horizontal) with ribcage and belly
  • Neck + Skull - Short neck assembly with an elongated skull shape and brow-ridge geoms
  • Head - Fixed contact geom used as a bite proxy; there is no articulated jaw
  • Legs - Digitigrade-style hind limbs (hip pitch/roll, knee, ankle; 3 passive toe digits per leg since physics r7; hip-roll servos sized for the body mass since physics r8; an elliptic friction cone since physics r9, so every heading is physically identical)
  • Arms - Tiny vestigial forelimbs with 2-fingered hands (passive, not actuated)
  • Tail - 5-segment heavy counterbalance to skull (4 actuated segments)

Diagnostic Metrics (behavior node, hunt)​

After each training stage the eval command reports:

MetricDescription
mean_forward_velocityAverage forward speed (m/s)
gait_symmetryLeft/right stride symmetry ∈ [0, 1]
stride_frequencyStep frequency (Hz)
cost_of_transportEnergy efficiency (lower is better)
mean_pelvis_heightUpright stability (m)
mean_heading_alignmentcos θ toward prey ∈ [-1, 1]
success_rateFraction of episodes where the fixed head-contact proxy touches the prey target
success_lcbOne-sided 95% lower bound on that fraction over the selected checkpoint's 30-episode panel — the task_success/v1 hunt gate statistic (bar 0.5, provisional), published as selected_model_success_lcb
min_prey_distanceClosest approach to prey (m)

Training Videos​

Published videos for Tyrannosaurus Rex (Anatomical), where available. Artifact provenance is shown on each stage.

STAGE 1
stand · deliverable

Stance

Learn to stand and balance without falling

PPO · Stable-Baselines3 artifact · historical model · unverified · backend version not recorded. It is not evidence for the current model or stage config.

STAGE RECOVERY
recover · deliverable

Recovery

Hold the stance against scheduled external pushes and recover from each

No published video is available for this stage.

STAGE 2
walk · deliverable

Locomotion

Learn forward walking/running

PPO · Stable-Baselines3 artifact · historical model · unverified · backend version not recorded. It is not evidence for the current model or stage config.

STAGE 3
hunt · deliverable

Bite

Sprint to prey and make contact with the head bite proxy

PPO · Stable-Baselines3 artifact · historical model · unverified · backend version not recorded. It is not evidence for the current model or stage config.

Usage​

# From the repository root. View the model
python environments/tyrannosaurus_rex/scripts/view_model.py --embodiment anatomical

# Train the stance node using its current TOML-configured budget
python -m environments.shared.train --species tyrannosaurus_rex --embodiment anatomical train --stage 1

# The advancing stages (stance, locomotion, behavior) in manifest order
python -m environments.shared.train --species tyrannosaurus_rex --embodiment anatomical curriculum --algorithm ppo

# Reuse an earlier run's certified stance and walk; train hunt in a fresh directory
python -m environments.shared.train --species tyrannosaurus_rex --embodiment anatomical curriculum --algorithm ppo \
--trunk-from logs/<earlier_run> --output-dir logs/<new_run>

# The recovery node, entering from a certified stance handoff (PPO-only)
python -m environments.shared.train --species tyrannosaurus_rex --embodiment anatomical train --stage recovery \
--algorithm ppo --load logs/<run>/01_stance/models/robust_best_model.zip \
--load-mode initialize_next_stage

See Behavior Recipes for the notebook workflow.