Implement improvement plan (phases 0-8): agent-native creature workbench - #15
Merged
Merged
Conversation
Turns Creature Lab from a single stationary tripod demo into an agent-native
articulated-creature workbench. Each phase is verified against the live backend.
Phase 0 - Demo UX: diagnosed the real "stationary creature" cause (1m spawn
crash-land + no-thrust tripod gait). Default demo is now a forward-walking
quadruped; added a worm; `demo --creature {quadruped,worm,tripod}`.
Phase 1 - Scaffolds: scaffold/ generators (worm, quadruped, hexapod, humanoid)
+ mirror_limb; export-urdf (loads in PyBullet).
Phase 2 - Creature Zoo: curated gallery (zoo.py + zoo/ data) with baselines;
`zoo list|run|validate-all`.
Phase 3 - Failure diagnosis: diagnosis.py with 8 locomotion failure patterns;
`diagnose` explains why a run failed and suggests fixes.
Phase 4 - Closed-loop control: ObservationSpec/ActionSpec, Gymnasium-style
CreatureEnv, CPG/PID/pose-sequence controllers; `run --controller`.
Phase 5 - Debug viewer: CoM/root trails, fall marker, side-by-side `compare`,
and matplotlib `plot`.
Phase 6 - Humanoid kit: humanoid_minimal/humanoid_12dof zoo entries, impulse
events for push-recovery, 4 biped-specific diagnosis patterns.
Phase 7 - Evolution: typed mutation operators + crossover and four strategies
(hill_climb, genetic, map_elites, cmaes); `lineage` tree; archive/lineage JSON.
Phase 8 - Bridges: full MJCF export + MuJoCo backend, URDF transmissions,
best-effort URDF import; `export-mjcf`, `import-urdf`, `run --backend mujoco`.
Re-audit fixes:
- CreatureEnv velocity/torque actions silently applied as POSITION targets, and
the env could not drive hinges without a MotorSpec. Added
PyBulletBackend.apply_joint_control (drives any hinge by id, in
position/velocity/torque); env now uses it. MuJoCo supports position only
(raises clearly otherwise).
- CI now installs the evolve + mujoco extras so those paths are exercised.
- gitignore MUJOCO_LOG.TXT and *.urdf; fix a FutureWarning/latent bug in URDF
import (childless-element truthiness).
232 tests pass; ruff check + format clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Implements all 8 phases of
docs/IMPROVEMENT_PLAN.md, turning Creature Lab from a single stationary tripod demo into an agent-native articulated-creature workbench. Every behavioural claim was verified against the live PyBullet/MuJoCo backends.What's in it
demo --creature {quadruped,worm,tripod}.scaffold/generators (worm, quadruped, hexapod, humanoid) +mirror_limb;export-urdf(verified loadable in PyBullet).zoo.py+zoo/data) with computed baselines;zoo list|run|validate-all.diagnosis.pywith 8 locomotion failure patterns;diagnoseexplains why a run failed and suggests fixes.ObservationSpec/ActionSpec, a Gymnasium-styleCreatureEnv, and CPG/PID/pose-sequence controllers;run --controller {sinusoid,cpg}.compare, and matplotlibplot.humanoid_minimal/humanoid_12dofzoo entries, impulse events for push-recovery, and 4 biped-specific diagnosis patterns.hill_climb,genetic,map_elites,cmaes);lineagetree; archive/lineage JSON.<transmission>blocks, and best-effort URDF import;export-mjcf,import-urdf,run --backend mujoco.Re-audit fixes (post-implementation review)
CreatureEnvvelocity/torqueactions were silently applied as position targets, and the env could not drive hinges lacking aMotorSpec. AddedPyBulletBackend.apply_joint_control(drives any hinge by id in position/velocity/torque); the env now uses it. MuJoCo supports position only (raises clearly otherwise). Regression tests added.evolve+mujocoextras so CMA-ES and the MuJoCo backend are actually exercised (previously always skipped).MUJOCO_LOG.TXTand*.urdf; fixed aFutureWarning/latent bug in URDF import (childless-element truthiness).Notable judgments (documented in the plan)
<position>servos (not plain<motor>) so the exported model is actually drivable; added joint damping/armature +implicitfastintegrator for solver stability.lineage.jsonrather than newTraceMetafields.Tests
232 passing (from 132), ruff check + format clean. MuJoCo/CMA-ES tests skip gracefully when their extras are absent.