Learning Agile Soccer Skills for a Bipedal Robot with Deep Reinforcement Learning

Tuomas Haarnoja, Ben Moran, Guy Lever, Sandy H. Huang, Dhruva Tirumala, Jan Humplik, Markus Wulfmeier, Saran Tunyasuvunakool, Noah Y. Siegel, Roland Hafner, Michael Bloesch, Kristian Hartikainen, Arunkumar Byravan, Leonard Hasenclever, Yuval Tassa, Fereshteh Sadeghi, Nathan Batchelor, Federico Casarini, Stefano Saliceti, Charles Game, Neil Sreendra, Kushal Patel, Marlon Gwira, Andrea Huber, Nicole Hurley, Francesco Nori, Raia Hadsell, Nicolas Heess · DOI

TL;DR

Researchers at Google DeepMind have successfully used Deep Reinforcement Learning (Deep RL) to train miniature humanoid robots to play 1v1 soccer, achieving agility and strategic depth far beyond traditional scripted methods. By combining a two-stage training pipeline—distilling basic skills into a complex policy through self-play—they achieved zero-shot transfer from simulation to real hardware, resulting in robots that walk 181% faster and turn 302% faster than previous baselines.

What Problem Does This Paper Address?

Humanoid robots are notoriously difficult to control. Unlike quadrupeds, which are inherently more stable, bipeds must manage 20+ degrees of freedom while maintaining balance in dynamic environments. Traditionally, these robots rely on "scripted" controllers—manually designed, rigid movement patterns that are safe but slow and incapable of adapting to the chaos of a soccer match.

The challenge is two-fold:

  1. Complexity: How do you teach a robot to not just walk, but to transition fluidly between getting up, sprinting, turning, and kicking?
  2. Sim-to-Real Gap: How do you train an agent in a perfect simulation and have it work on "fragile," low-cost hardware where joints get loose, batteries drain, and floor friction varies?

Methods

The team utilized a two-stage training pipeline centered on Maximum a Posteriori Policy Optimization (MPO) with a distributional critic (DMPO).

  • Stage 1: Skill Training: They first trained two separate policies in simulation: one for scoring goals against an untrained opponent and one for getting up from various fallen positions.
  • Stage 2: Distillation and Self-Play: These skills were distilled into a single "full" policy. To ensure the robot could handle dynamic opponents, they used self-play. The agent practiced against previous versions of itself, creating an automatic curriculum where the challenge scaled with its ability.
The two-stage training setup: initial skill training followed by distillation and self-play.

To bridge the sim-to-real gap, the researchers employed:

  • System Identification: Measuring real motor parameters to improve the simulation.
  • Domain Randomization: Varying friction, mass, and joint offsets during training so the policy became robust to hardware imperfections.
  • Regularization: Adding penalties for high knee torque and rewards for staying upright to prevent the robot from breaking itself or adopting unstable "rolling" behaviors.

Datasets

The study did not use a static dataset. Instead, training data was generated through millions of steps in the MuJoCo physics engine within a custom soccer environment. Evaluation was performed on a physical 5m x 4m pitch equipped with an Optitrack motion capture (mocap) system to provide state information (ball and opponent positions) to the robots in real-time.

The robot soccer environment, showing both the simulated (left) and real (right) setups.

Key Insights and Ideas

  • Emergent Agility: The learned policy discovered movements that would be nearly impossible to script manually. For example, the robot learned to pivot on the corner of its foot to turn rapidly—a highly dynamic move that utilizes the system's full physics.
  • Strategic Anticipation: Through self-play, the robots didn't just learn to chase the ball; they learned to block shots and anticipate ball trajectories.
  • The "Minimal Skill" Requirement: The authors found that training "end-to-end" from scratch often failed. Providing a pre-trained "get-up" skill was the minimal nudge needed to prevent the agent from getting stuck in local optima, like simply rolling toward the ball.
  • Safety through Regularization: By penalizing knee torque, the researchers enabled the robot to perform agile kicks and sprints without snapping its gears, proving that "safe" and "agile" are not mutually exclusive in RL.

Key Results

The Deep RL agent significantly outperformed the optimized scripted baseline across all locomotion and task-specific metrics:

Metric Scripted Baseline Learned Policy (Real Robot) Improvement
Walking Speed 0.20 m/s 0.57 m/s +181%
Turning Speed 0.71 rad/s 2.85 rad/s +302%
Get-up Time 2.52 s 0.93 s -63%
Kicking Speed 2.07 m/s 2.77 m/s (with run-up) +34%

Qualitatively, the robots showed a remarkable ability to transition between behaviors. As seen in the joint angle embeddings (Figure 4), the learned policy covers a much richer, more fluid space of movement compared to the rigid, periodic loops of the scripted controller.

Joint angle embeddings comparing the periodic scripted gait (A) to the diverse, fluid learned behaviors (B, C).

Limitations and Future Work

Despite the success, several hurdles remain:

  • Hardware Fragility: The robots required frequent maintenance as hip joints loosened and encoders drifted.
  • Mocap Dependency: The current system relies on external motion capture. The authors have begun preliminary work on "Soccer from Raw Vision," using onboard cameras and NeRF-based simulations, but this remains significantly harder.
  • Scale: The study used small (51cm) robots. Applying these techniques to full-sized humanoids introduces much higher risks regarding fall damage and energy management.
  • Multi-agent Collaboration: While 1v1 was successful, 2v2 experiments showed that agents often struggled to coordinate effectively without losing their individual agility.

Summary updated

Abstract

We investigate whether Deep Reinforcement Learning (Deep RL) is able to synthesize sophisticated and safe movement skills for a low-cost, miniature humanoid robot that can be composed into complex behavioral strategies in dynamic environments. We used Deep RL to train a humanoid robot with 20 actuated joints to play a simplified one-versus-one (1v1) soccer game. The resulting agent exhibits robust and dynamic movement skills such as rapid fall recovery, walking, turning, kicking and more; and it transitions between them in a smooth, stable, and efficient manner. The agent's locomotion and tactical behavior adapts to specific game contexts in a way that would be impractical to manually design. The agent also developed a basic strategic understanding of the game, and learned, for instance, to anticipate ball movements and to block opponent shots. Our agent was trained in simulation and transferred to real robots zero-shot. We found that a combination of sufficiently high-frequency control, targeted dynamics randomization, and perturbations during training in simulation enabled good-quality transfer. Although the robots are inherently fragile, basic regularization of the behavior during training led the robots to learn safe and effective movements while still performing in a dynamic and agile way -- well beyond what is intuitively expected from the robot. Indeed, in experiments, they walked 181% faster, turned 302% faster, took 63% less time to get up, and kicked a ball 34% faster than a scripted baseline, while efficiently combining the skills to achieve the longer term objectives.
BibTeX
@article{haarnoja2024learning,
  author = {Tuomas Haarnoja and Ben Moran and Guy Lever and Sandy H. Huang and Dhruva Tirumala and Jan Humplik and Markus Wulfmeier and Saran Tunyasuvunakool and Noah Y. Siegel and Roland Hafner and Michael Bloesch and Kristian Hartikainen and Arunkumar Byravan and Leonard Hasenclever and Yuval Tassa and Fereshteh Sadeghi and Nathan Batchelor and Federico Casarini and Stefano Saliceti and Charles Game and Neil Sreendra and Kushal Patel and Marlon Gwira and Andrea Huber and Nicole Hurley and Francesco Nori and Raia Hadsell and Nicolas Heess},
  title = {{Learning Agile Soccer Skills for a Bipedal Robot with Deep Reinforcement Learning}},
  journal = {Sci. Robotics},
  year = {2024},
  doi = {10.1126/scirobotics.adi8022},
}
Figure