Skip to content

Showcase robots 2

Latest

Choose a tag to compare

@mpena2099 mpena2099 released this 17 Nov 14:04
· 12 commits to main since this release

showcase-2

showcase-2 is the second set of robots published from this project, with the code that trained them.
The robots are trained on 8 s episodes with BODY_MODEL 23 (showcase-1: 20).
New since showcase-1: larger wheels, a speed command, hardware kits per component, robots written by hand in YAML, plugins, URDF export and archive migration.

Robots

Each setting keeps its own archive of 800 cells:

Setting Cells filled Body types With legs
Terrain preset 164 72 131
Flat 193 84 162
Flat and steps 160 73 135
No wheels 85 45 74
Setting Robot Servos Wheels Fitness Validation
Terrain preset 5servos-low-roll 5 2 0.57 PASS
Flat 3servos-low-roll 3 2 1.15 PASS
Flat 10servos-mid-belly 10 0 1.07 PASS
Flat and steps 10servos-mid-belly 10 0 0.32 PASS
No wheels 6servos-low-belly-498 6 0 0.26 PASS

Each robot ships with its export package: STLs, bill of materials, assembly guide, control file and URDF.

New

Bodies and control

  • Driven wheels reach 100 mm radius, from 60 mm.
  • A wheel width gene sets the wheel from 10 to 60 mm, instead of deriving it from the radius.
  • The spine holds up to six segments, from two.
  • A random body can start a limb as a single wheel on the torso.
  • The speed command adds two genes per joint, so a robot can be asked to walk slower or faster; the steer task adds a half-speed episode.
  • The firmware core applies the speed command and the servo speed (set_speed).
  • Five optional score rules sit behind --rules: worse turn, forward turns, tilt, slip and servo on the ground.
  • --body limits the modules, servos, legs, size and print bed that evolution may build.
  • Servo count is an archive axis again: five CVT axes and 800 cells.

Hardware and own robots

  • Every hardware number comes from one YAML profile, stored in the archive (#55).
  • A kit names one file per component: servo, battery, electronics, material and printer (#58).
  • The electronics board is a kit component, with hole pattern, hole diameter, screw size and BOM text (#86).
  • A robot can be written by hand in YAML, seeded into an archive, with parts locked against mutation (#56).
  • check_kit checks ranges, units and cross checks of a kit; train.py --profile refuses a kit with errors (#62).
  • A power estimate from the simulated servo torque is part of the export and validate reports.

Tools

  • Plugins add tasks and terrains from a file named with --plugin, stored in the archive by name and SHA-256 (#59).
  • The progressive stairs example grows risers from 4 to 17 cm on 28 cm treads (#60).
  • Terrain parameters work on the command line, for example --terrains "steps:rise=0.08:run=0.3,slope:degrees=12" (#63).
  • replay --robot opens a hand-written robot file, standing, with no archive (#61).
  • replay --watch reloads the robot file in the same window when it is saved (#84).
  • replay --list shows body-part columns and filters with --where (#67).
  • migrate_archive.py moves an archive across BODY_MODEL versions (#74); --seconds re-evaluates every elite with a new episode length (#75).
  • validate passes a robot only when it is robust: mean and 5th percentile loss, falls, and every terrain; --unseen adds untrained grounds.
  • snapshot.py records archived robots so a later code version can still play them (#53).
  • showcase.py runs the showcase chain in one command.

Export and tests

  • export writes robot.urdf with the simulated masses, inertias, joint axes and limits (#64).
  • export --organic re-simulates with hollowed links and warns above 10% mass drop; polish --organic re-tunes on them (#65, #66).
  • dims.py is the one home for the printed-part dimensions (#79).
  • Behaviour is a named record of six fields instead of a positional vector (#83).
  • Golden tests pin MJCF, metrics, behaviour, type name and export hashes for fixed bodies, the same on any platform (#82, #85).
  • The per-step episode loop is compiled with Numba and is bit-identical to the Python loop, which stays behind DARWINBOT_PY_LOOP=1.
  • make_readme_figures --robot takes robots from different archives, each on its own terrain (#89).

Breaking changes

  • BODY_MODEL goes from 20 to 23; an archive from another model is refused with a message that names migrate_archive.py.
  • Migration: python experiments/migrate_archive.py old.pkl --out new.pkl.
  • 20 to 21 rescales the wheel radius gene to the 30 to 100 mm range and keeps the same radius.
  • 21 to 22 writes the wheel width gene and the two neutral speed genes of every controller slot.
  • 22 to 23 is identity: only the physics and the printed parts changed.
  • Migration searches each controller again, drops bodies that are no longer buildable, and keeps a custom kit only with --profile keep.
  • Migration also rebuilds the archive with five axes and 800 cells.
  • Episodes default to 8 s in train.py and seed.py, and replay uses the archive's length.
  • Scores change after migration: progress counts the second half of the episode, and the fixes below apply.
  • The control file format is 4, with the speed genes and servo_speed; formats 2 and 3 still load.
  • Snapshots of showcase-1 robots play unchanged with any later code.

Fixes

  • A run stays alive when one body fails to evaluate (#72).
  • fit_rules rebuilds the child map after dropping a link (#72).
  • A body without actuators skips CMA-ES and still gets its behaviour descriptor (#71).
  • mj_setConst runs after a physics perturbation, so the derived constants follow (#77).
  • Passive parts use their turned frame for the spawn height (#77).
  • The speed clip includes the load feedback (#77).
  • A fall before half-way scores no progress (#77).
  • A fully blocked joint keeps a 1 mrad limit each way instead of free travel (#73).
  • A blown-up GPU episode reports 0 displacement, yaw and progress (#69).
  • Derived archives keep ablate, rules, profile, locked and plugin (#69).
  • A servo is never placed on a torso face by default, and retyping a segment drops its child segment (#69).
  • Mutation no longer offers disabled module kinds, and rotation steps wrap around (#78).
  • No foot is billed for a free spring tip (#70).
  • Clean-up: builder no longer imports export, and dead code is gone (#76).
  • polish --workers starts its worker pool instead of respawning failing workers (#106).

Training

  • long8 ran as islands: five Kaggle CPU sessions, one Kaggle GPU island (two T4, with the MuJoCo Warp backend from branch warp-23, which ships in a later release) and two local machines.
  • The Kaggle CPU islands used the terrain preset twice, flat, flat and steps, and one no-wheels island.
  • The islands resume migrated long7 archives except the no-wheels one, which starts from scratch.
  • Islands with the same terrains and body options merge with experiments/merge_archives.py, one best elite per cell.
  • Episodes are 8 s and the task is steer.
  • MuJoCo 3.17.0 and mujoco-warp 3.17.0 are pinned in the Kaggle kernel, with Numba 0.68.
  • Wall clock: about three days, 2026-11-13 to 2026-11-16.
  • Hardware: five Kaggle CPU sessions, one Kaggle GPU session (two T4) and two local machines.