Skip to content

Release 3: fixes and tools

Latest

Choose a tag to compare

@mpena2099 mpena2099 released this 30 Nov 22:44
· 16 commits to main since this release

showcase-3

showcase-3 is a fixes and tools release. It has no new robots: the showcase stays the robots of showcase-1 and showcase-2.
It fixes the printed elbow of the showcase-2 robots, moves the code to BODY_MODEL 26 (showcase-2: 23), and adds coupled phase oscillators, a faster inner loop, the ESP32 firmware layer (not yet tested on hardware), stable robot names and new training and judging tools.

Robots

No new robots. The showcase-2 robots whose printed parts carry a servo on an elbow are re-exported with the elbow fin: migrated to BODY_MODEL 26, polished, validated and checked for assembly again.

Package Robot Score showcase-2 Score now Validation now Why it fails
preset-5servos-low-roll 5 servos, 2 wheels 0.57 0.50 PASS
nowheels-6servos-low-belly-498 6 servos, no wheels 0.26 0.32 FAIL slides on its body 99% of the time
flatsteps-10servos-mid-belly 10 servos, no wheels 0.32 0.40 FAIL slides on its body 99% of the time; does not turn
flat-10servos-mid-belly 10 servos, no wheels 1.07 0.58 FAIL slides on its body 97% of the time; does not turn; large losses under varied physics

Each package keeps the showcase body (polished, not pruned), so the printed robot matches the showcase images; only the elbow parts and the controller change. Every package passes the assembly check with no clash.
The body-sliding check is new in this release: in showcase-2 the three belly robots passed validation, and they still move by sliding on their torso. flat-10servos-mid-belly lost about half its score with the elbow fin and no longer turns: build it only as a demonstration of the elbow, not as a walking robot.

flat-3servos-low-roll has no elbow: its showcase-2 package is unchanged.
Each package holds STLs, bill of materials, assembly guide, control file (format 5) and URDF.
showcase-3-reexport.snap.pkl holds the re-exported robots, so a later code version can play them without the archives.

New

Bodies and control

  • Coupled phase oscillators (#118): each joint's phase is pulled toward its nearest joint ancestor, and limb roots form a ring. Two genes per slot: COUPLE_K 0 to 4 rad/s and COUPLE_LAG.
  • Coupling starts at 0 in a random controller, so strength 0 is exactly the old controller; evolution raises it only where it helps.
  • Coupling runs on the CPU only: the GPU backends refuse a coupled controller.
  • Elbow fin (#119): a servo on an elbow used to hang 12 to 20 mm from its link with no part in between. The fin now exists in the simulation and in the printed link, and the spawn check refuses a floating elbow.

Training and search

  • Diagonal and focused CMA-ES steps, and one physics variant per candidate (--inner-strategy diagonal+focused --variant-mode first): about twice the batches in the same time.
  • train.py --deterministic takes batch results in submission order, so the same seed and workers give the same archive.
  • A new flat and rubble island feeds the four-environment GIF.
  • train.py --axes r1: the four release-1 archive descriptors, without the servo count, on a 500-cell grid. Stored in the archive, new archives only.
  • train.py --mutation-bias remove: weigh the add/remove mutation operators towards smaller bodies. Stored in the archive.
  • train.py --tie-parts EPS: a child with fewer parts may take an occupied cell when its objective is within EPS relative of the incumbent's; 0 (default) turns it off. Stored in the archive.
  • Search options, all off by default and stored in the archive: --parent-selection novelty-rank (parents by novelty and objective), --axes c300 (300 cells), --clip-mode headroom (the servo speed clip keeps the steering difference), --face-fix (no joint or wheel drawn on the core face slots), body token live-servos (rejects joints with under 8° of range), --mirror-ctrl (a mirrored limb copies its source's controller), --reeval N (the top 20 elites re-scored on N new terrain seeds), --dns K (a Dominated Novelty Search population of K drives parent selection; the 800-cell grid still keeps every niche).
  • train.py --novel-class F: a child whose body class (legs, wheels, servo band, segments, passive parts) has no elite with objective above 0.3 gets F times the inner-loop budget.

Score rules

  • The body on the ground is measured (body_ground), and a robot that slides on its body is named belly, not roll.
  • Behaviour gains body_ground as a seventh field. Records without it load with 0.0.
  • The optional rules energy_abs, turn_forward, fall_zero, body_ground and basal stay off by default (see below).
  • Rule basal: a standing cost per servo and per kg, charged once per evaluation for the idle draw of every servo and the weight carried.
  • train.py --basal-scale SCALE multiplies the basal costs (default 1).
  • train.py --basal-mode relative keeps (1 - f) of a positive score instead, f = servo share * servos + part share * passive parts, capped at 0.8; --basal-servo-share and --basal-part-share set the shares (defaults 0.04 and 0.02).
  • train.py --turn-scale M/RAD (default 0.2), --turn-in-place (a pivot earns credit capped by the straight walk, off by default) and --turn-cap-deg DEG (default 90) tune turn credit.
  • train.py --turn-tight W adds credit for a small turning radius.
  • The score settings above are all stored in the archive, so polish, prune, validate and showcase score like training.

Firmware

  • firmware/esp32 (PlatformIO): a Wi-Fi web page with a joystick and live telemetry, and USB serial commands.
  • An optional micro-ROS build speaks ROS 2.
  • Built in CI. Not yet tested on hardware.

Tools

  • prune.py runs its leaf trials in parallel.
  • validate and showcase.py take --max-body.
  • experiments/strip_test.py, next to validate.py, runs a robot across a low-friction strip at several positions (a grip change) and reports how often it stays upright and crosses.
  • Stable robot names, <type>-<uid>, kept through polish, prune and migrate.
  • showcase.py validates both the polished and the pruned version of each robot and ships the one that passes.
  • showcase.py runs polish and prune once per robot, each on a one-robot archive, so two robots in one cell cannot evict each other.
  • experiments/critic.py prints a numeric defect report (useless and heavy limbs, one-sided turning, drag, posture) for chosen robots, to screen them before an eye review. Never a score.
  • snapshot.py records robots from several archives in one snapshot.

Not in this release

Release 4:

  • Better robots. Training with the release-3 code and every search option above, judged at equal machine time with two or more seeds against the plain search, found no option that is better on both flat ground and terrain: the full set raised the re-scored quality on terrain but cost 7 to 34% of the body types, and a body census showed that new body shapes appear but rarely find a gait. The search for better robots moves to release 4.
  • The optional score rules energy_abs, turn_forward, fall_zero, body_ground and basal stay off by default. Together they left almost no robot moving.
  • More speed levers.
  • The IMU.

Breaking changes

  • BODY_MODEL goes from 23 to 26. Archives of BODY_MODEL 20 to 25 migrate: python experiments/migrate_archive.py old.pkl --out new.pkl. The migration re-tunes each controller briefly (--budget, 60 evaluations by default), because the elbow fin and the coupling change the physics and the controller; polish a robot you care about afterwards (experiments/polish.py or showcase.py).
  • Robot names change to <type>-<uid>; a name from an older archive (<type>-<cell>) does not carry over.
  • The control file format is 5, with the coupling genes. Older formats still load.
  • --device gpu and --device warp refuse a coupled controller.

Fixes

  • Elbow fin: a servo on an elbow hung 12 to 20 mm from its link with no part between them, in the simulation and in the printed link (PR #119). The showcase-2 packages with elbows are re-exported (see Robots).