Selected projects Interactive demo

Learn to walk

A neural network controls 700 simulated muscles to make this model walk. Start walking to see how it handles an occasional ball throw.

Loading anatomy…

Drag to rotate. Scroll or pinch to zoom. Uncheck Throw balls to walk without throws.

Low to high activation

Average speed
—
Walk time
—
Displacement
—

MS-Human-700 · Biomechanics controller · 700 muscle actuators · 50 controller updates per simulated second

Walking takes coordination

At the end of a step, the calf pulls on the heel through the Achilles tendon. The tendon runs behind the ankle, so the pull lifts the heel as the forefoot presses against the ground.

  1. Side view of the walking model at 0.24 seconds0.24 s
  2. The same walker with its legs passing at 0.48 seconds0.48 s
  3. The same walker farther through the stride at 0.80 seconds0.80 s
Three frames from one stride. Each leg takes a turn supporting the body and swinging forward.
Side view schematic: the calf pulls upward through the Achilles tendon behind the ankle. With the forefoot on the ground, that pull helps raise the heel.
How the calf helps lift the heel at push-off.

Muscle activation

The red shading shows activation, or how active a muscle is in the model. Each muscle takes time to respond to the network’s command, called excitation. The force it produces also depends on its length and how fast that length changes.

Turn off Activation to see the anatomy without the overlay. The colors show simulated activation, which is different from muscle force or the electrical activity recorded by EMG.

Hip muscles help steady the pelvis over the planted foot. Muscles at the front of the shin lift the toes as the other foot swings forward. Gait studies compare muscle activity with movement and ground forces.

Training the controller

The controller, or policy, is a neural network that sends new muscle commands every 20 milliseconds of simulated time.

The new body state goes back to the controller.

The network reads joint motion, muscle state, foot contact, and a short preview of the target stride.

Reinforcement learning

  1. Set a target

    We fitted a stride from Gait120 motion capture to the simulated body.

  2. Run walking trials

    The network tried different muscle commands. It earned a higher reward for walking closer to the reference stride.

  3. Update the network

    We used proximal policy optimization (PPO) to update the network based on the rewards it earned.

The network is already trained. When you push the walker, it can react to the change in balance without retraining.

Walking with and without a push

Both runs start from the same state and use the same controller. One gets a sideways push. Use Jump to push, then switch between runs to compare the same moment.

0.00 s

Measurements

Loading trace…
No push
—
Sideways push
—

Distance to either side of the starting line. The shaded band marks the push.

This is one push at one point in the stride. To test recovery, repeat the trial and vary the direction, timing, and strength of the push.

Research applications

In the Learn to Move challenge, we tested whether controllers could make a simulated walker change speed, turn, and stop. We describe those experiments in our 2021 review of reinforcement learning for locomotion.

The demo uses one model on level ground. To check its predictions against real walking, researchers would need motion capture, ground forces, and recordings of muscle activity.

Tools, data, and references

Browser graphics
Three.js
Training
JAX · PPO algorithm
Arm model
MoBL-ARMS
Related research
Song et al., 2021 · MS-Emulator