Genetic Policy Optimization

Tanmay Gangwani, Jian PengarXiv 2017

TL;DR

Genetic Policy Optimization (GPO) combines the exploration power of genetic algorithms with the efficiency of deep reinforcement learning. By replacing "catastrophic" parameter-swapping crossovers with a novel state-space crossover based on imitation learning, GPO achieves superior performance and sample efficiency compared to standard policy gradient methods on complex locomotion tasks.

What Problem Does This Paper Address?

Deep Reinforcement Learning (RL) typically relies on policy gradient methods, which can be prone to local optima and sensitive to hyperparameters. Evolution Strategies (ES) and Genetic Algorithms (GAs) offer an alternative by searching the policy space directly. However, GAs have historically struggled with deep neural networks.

The primary culprit is the crossover operator. In traditional GAs, "offspring" are created by swapping parameters (weights) between two parents. In deep networks, these weights are highly co-dependent; swapping them usually destroys the internal representations, leading to a "child" policy that performs significantly worse than either parent. Because of this, most successful "evolutionary" deep RL approaches have abandoned crossover entirely, relying only on mutation (random noise).

Conceptual comparison between state-space crossover (desired) and parameter-space crossover (undesired).

Methods

The authors introduce Genetic Policy Optimization (GPO), which reimagines the three pillars of genetic algorithms for the deep learning era:

  1. State-Space Crossover (The "Genetic Distillation"): Instead of swapping weights, GPO performs crossover in the behavioral space. It trains a "selector" policy to decide which parent is better suited for a given state based on high-reward trajectories, then uses Imitation Learning (specifically the DAgger algorithm) to train a child policy to mimic this combined behavior.
  2. Policy Gradient Mutation: Instead of adding random Gaussian noise to weights, GPO uses standard policy gradient updates (like PPO or A2C) as the mutation operator. This provides a "directed" mutation that follows the reward signal more efficiently than random search.
  3. Selection and Data Sharing: Policies are selected for the next generation based on their fitness (returns). Crucially, policies in the ensemble can share data, allowing for more stable, lower-variance gradient estimates during the mutation phase.

Datasets and Evaluation

The algorithm was evaluated using the MuJoCo physics simulator on 9 different locomotion tasks. These included standard benchmarks like HalfCheetah, Walker2d, and Ant, as well as "Hilly" variants featuring uneven terrain to test robustness and exploration capabilities.

Key Insights

  • Behavior over Parameters: Crossover should happen at the level of actions, not weights. Distilling behaviors preserves functional strengths without breaking the underlying neural architecture.
  • Mutation as Optimization: Using policy gradients for mutation bridges the gap between black-box optimization and gradient-based RL, leveraging the efficiency of gradients while maintaining genetic diversity.
  • Diversity via Ensembles: A population of policies naturally encourages wider exploration. The selection process ensures that only the most successful exploratory "experiments" survive.

Key Results

  • Crossover Efficacy: The authors demonstrated that while parameter-space crossover leads to a total collapse in performance, state-space crossover (GPO) consistently produces children that match or exceed the performance of their best parent.
Performance comparison of state-space vs. parameter-space crossover across multiple trials.
  • Superior Performance: GPO outperformed strong baselines. On Walker2d, GPO achieved a score of ~1464 (vs. ~540 for independent runs). On the challenging Ant environment, GPO reached ~1337 (vs. ~393 for the baseline).
  • Scalability: Performance improved with population size, suggesting GPO is a robust framework for parallel optimization.

Limitations and Future Work

GPO is computationally expensive in terms of wall-clock time due to ensemble training and distillation overhead. Additionally, the quality of the crossover depends heavily on the imitation learning phase. Future directions include exploring more sophisticated selection criteria and applying GPO to higher-dimensional tasks where standard RL often plateaus.

Summary updated

BibTeX
@misc{gangwani2017genetic,
  author = {Tanmay Gangwani and Jian Peng},
  title = {{Genetic Policy Optimization}},
  year = {2017},
  eprint = {1711.01012},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.01012},
}
Figure