# libPByte — evolved walking studies

Experiment dates: June 21–23, 2026. Public research note prepared September 30, 2026.

## Question and apparatus

Can evolutionary search find a working gait for a jointed simulated body that it did not design?

Each body was described as a genome in the libPByte TypeScript library and developed into a jointed physical model. A Python translation of the same description built a MuJoCo model. Populations of controllers were evaluated in parallel on one NVIDIA A100 GPU (SMU SuperPOD), using MuJoCo MJX with JAX. The best controller of each recorded generation was simulated again and its body poses were saved for replay.

Body plans studied:

- **Quadruped** — four legs, each with hip, knee, and lateral hip (abduction) joints.
- **Radial walkers** — six and eight legs produced from one leg description by radial reflection.
- **Bipeds** — two legs with a heavy trunk; variants with an actuated waist, actuated arms, or a passive segmented tail.
- **Humanoid figure** — 15 bodies and 11 actuated joints: segmented spine, neck and head, jointed arms, and legs.

The bodies were authored and remained fixed within each run. Evolution acted on controllers only. These are not studies of evolved anatomy.

## Controllers

- Early runs (quadruped, radial walkers): an open-loop rhythm. Ten gait parameters set frequency and, for each joint type, amplitude, center angle, and phase lag. Radial walkers add one phase per leg, starting from a tripod-gait seed.
- Biped and humanoid runs: the rhythm is corrected by a small continuous-time recurrent neural network (CTRNN) that senses body lean, lean rate, height error, and, in later runs, foot contact. Feedback weights started at zero, with the open-loop gait included in the first population.
- The final humanoid runs share one network between the left and right sides, so the two sides remain mirror images.

## Evolutionary method

- Quadruped, radial walkers, and biped variants: an elitist genetic algorithm. Each generation keeps the highest-scoring controllers; the rest of the population is filled with Gaussian-mutated copies of them. The documented quadruped run evaluated 128 gaits per generation for 25 generations, about 80 seconds on one GPU. The hexapod run took about 100 seconds for 30 generations.
- Later humanoid runs: CMA-ES (covariance matrix adaptation evolution strategy), with the best controller found so far re-inserted each generation.
- Trials last five or six simulated seconds; distance is measured after a half-second settling period.

## Fitness

The early score was forward distance, reduced when the torso sank below standing height and penalized for sideways drift. Two-legged studies added requirements as weaknesses appeared: credit only while the body stays up, an uprightness requirement, a requirement to keep a foot on the ground, and rewards for alternating feet, bent knees, and arms swinging against the legs. Fitness definitions therefore differ between studies, and fitness values are not comparable across them.

## Observations

- **Quadruped.** The champion walked 4.15 m forward in a six-second trial with 4 cm of sideways drift and no loss of torso height.
- **Hexapod.** The best controller's forward distance rose from 1.74 m at generation 0 to 5.26 m at generation 29 in a five-second trial. The eight-legged walker's longest recorded replay was 6.49 m (generation 25). These are different bodies and settings, not a controlled comparison of leg number.
- **Feedback.** In the development log, adding CTRNN feedback increased the armless biped's distance from 0.84 m to 1.13 m and its time upright from 90% to 97%. The already-stable hexapod was essentially unchanged (about 5.3 m).
- **An exploited evaluator.** When survival was judged by pelvis height alone, the tailed biped scored best (2.88 m) by reclining about 73° onto its tail and scooting as a tripod. An uprightness requirement removed that strategy; re-evolved, it leaned about 20° and traveled 1.20 m.
- **Humanoid.** In the retained bent-knee run, generation 0 falls. By generation 188 the best controller walks upright with alternating steps, knee flexion, and counter-swinging arms, about 0.72 m in six seconds. Across roughly a dozen further runs, the method found slow, stable humanoid gaits (around 0.1 m/s) but not a fast dynamic walk. In the final bilateral run, the search did not improve on its seeded starting gait.

## Why the replays are recordings

libPByte's browser physics engine, Rapier, drives joints with motors that drift apart when several are chained in one leg. In the browser, a quadruped evolved for distance scrambled forward and fell; versions with posture feedback stayed upright but did not sustain a walk. MuJoCo's reduced-coordinate solver holds the chain together, and the same body description walks there. The browser therefore replays trajectories recorded from MuJoCo rather than simulating them live.

The clips on the notebook page were rendered on September 30, 2026 from the retained trajectory files listed in `walking-studies.json`. Geometry and part colors follow the original libPByte replay viewers; camera, lighting, labels, and the path line are presentation choices.

## Interpretation and limits

These studies show that evolutionary search found working gaits for authored bodies inside MuJoCo. They do not show evolved body forms, real-world locomotion, or transfer to other simulators. Each result depends on the chosen anatomy, the seeded starting rhythm, and fitness terms that were revised between runs. Most entries are single runs with one seed and no uncertainty estimates. Distances are simulated meters within each study's settings.

## Retained public records

- [Checkpoint metrics](https://protobytes.art/research/records/walking-studies.json)
- [Experiment notebook](https://protobytes.art/research/experiments/#walking)

These downloads are summaries. Complete trajectories, experiment code, and the development log remain in the local libPByte archive; this release is not a complete reproduction package.
