Interactive Control of Diverse Complex Characters with Neural Networks

Igor Mordatch, Kendall Lowrey, Galen Andrew, Zoran Popovic, Emanuel TodorovNeurIPS 2015

Creating realistic movement for 3D characters in games, simulations, and robotics is a notoriously difficult challenge. Traditionally, developers have relied on two primary methods, both of which come with significant drawbacks. Motion Capture (MoCap) requires recording real actors, limiting behaviors to those that already exist and making it incredibly difficult to adapt to non-humanoid shapes. Alternatively, Manual State Machines involve hand-coding rules for every phase of a gait, a process that is both time-consuming and highly fragile.

While Reinforcement Learning (RL) and Trajectory Optimization offer automated alternatives, they have historically struggled with high-dimensional 3D spaces. Trajectory optimization produces high-quality movement but is far too slow for real-time interaction. Conversely, standard neural network policies often become unstable or chaotic when running in a closed loop.

To bridge this gap, researchers from the University of Washington and Google have developed a powerful framework for training recurrent neural networks (RNNs) to act as near-optimal feedback controllers. This unified approach allows diverse 3D characters to exhibit stable, realistic, and interactive behaviors without requiring motion capture data or manually designed state machines.

Diverse 3D characters controlled by the unified framework

A "Best of Both Worlds" Methodology

The authors propose a hybrid approach that uses a slow, high-quality optimizer to "teach" a fast neural network. This is achieved through several key innovations:

  • Joint Optimization: Instead of training on a static, pre-computed dataset, the method alternates between optimizing trajectories (using Contact-Invariant Optimization) and updating the neural network. This ensures the training data evolves alongside the controller’s capabilities. The authors found that training on a fixed dataset performed two orders of magnitude worse than this alternating method.
  • Learning Dynamics Over Policy: The network does not simply output raw control forces. Instead, it predicts the desired velocity and contact forces. By defining the network's output as velocity, it acts as a regularizer, leading to much smoother and more predictable character movement compared to standard RL approaches. The network effectively learns the dynamics of the character under an implicit optimal policy.
  • Feedback Gains via Perturbation: A major technical contribution is the extraction of "feedback gains" from the trajectory optimizer. This provides the neural network with critical information: not just the "perfect" move to make, but how to correct itself if it gets pushed off-track.
  • Noise Injection: To prevent the network from overfitting to perfect trajectories, Gaussian noise is injected into both the sensory inputs and the hidden layers during training. This forces the controller to be robust to the inevitable jitters of real-time execution.

Synthetic Data Generation

Notably, the framework does not use external datasets like MoCap libraries. Instead, it synthesizes its own data using the MuJoCo physics engine. The system generates 100–200 trials, each starting from different initial poses and aiming for different goal locations. To simulate real-time interaction, the researchers use "branched segments" where a character is mid-stride and suddenly assigned a new target location, forcing the network to learn how to seamlessly transition between behaviors.

Key Insights and Results

The results of this joint optimization approach are highly versatile and robust controllers capable of real-time interaction.

  • Emergent Behavior: Perhaps the most striking insight is that complex gaits emerged naturally from the optimization of simple costs (e.g., "move to target" and "minimize effort"). No one programmed the bird to flap its wings; the system simply discovered that flapping was the most efficient way to stay airborne.
  • Unprecedented Versatility: The exact same architecture successfully controlled a massive variety of morphologies, including a 4-finned swimmer, a 2-winged bird, three different bipedal humanoids, and two different quadrupeds (both dog-like and spider-like).
  • Stability and Robustness: The resulting controllers are stable enough for real-time user interaction. A user can move a target around in 3D space, and the character will adjust its gait and direction instantly to follow it. Thanks to the feedback gains and noise injection, the characters can recover from physical perturbations that would typically cause a standard neural policy to fail.

Limitations and Future Work

While highly effective, the method does have limitations. The physics are enforced "softly" during optimization, which can sometimes result in unrealistic "root forces" pulling the character if the costs aren't tuned perfectly. Additionally, while the final controller runs in real-time, the training process is computationally heavy, requiring a distributed architecture of about 30 optimization nodes running for roughly 2.5 hours.

Future work may look to incorporate more realistic muscle actuation models to see if the emergent behaviors align even more closely with biological realities, further blurring the line between artificial control and natural movement.

Summary updated

BibTeX
@inproceedings{mordatch2015interactive,
  author = {Igor Mordatch and Kendall Lowrey and Galen Andrew and Zoran Popovic and Emanuel Todorov},
  title = {{Interactive Control of Diverse Complex Characters with Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2015},
  url = {https://openreview.net/forum?id=Hy-nxPWu-S},
}
Figure