Neuroevolution
The neuroevolution module provides evolutionary algorithms for optimizing neural network topologies and weights, including NEAT, HyperNEAT, and CMA-ES. These methods are particularly effective for reinforcement learning and optimization problems where gradient-based methods struggle.Overview
Neuroevolution evolves neural networks through:- Topology Evolution: Discovering optimal network architectures
- Weight Optimization: Finding effective connection weights
- Feature Learning: Evolving representations without supervision
NEAT (NeuroEvolution of Augmenting Topologies)
NEAT evolves both the topology and weights of neural networks simultaneously, starting from minimal structures and complexifying over generations.Basic Usage
NEAT Configuration
Working with Genomes
HyperNEAT
HyperNEAT extends NEAT to evolve large-scale networks by using a CPPN (Compositional Pattern Producing Network) to generate connection weights based on geometric patterns.Custom Substrate
CMA-ES (Covariance Matrix Adaptation Evolution Strategy)
CMA-ES is a state-of-the-art evolutionary algorithm for continuous optimization.Optimizing Neural Networks with CMA-ES
CMA-ES Configuration
Evolution Strategies
General evolution strategies framework.Genetic Algorithms
Example: Cart-Pole with NEAT
Example: Function Optimization with CMA-ES
Best Practices
- Population Size: Larger populations explore more thoroughly but evolve slower
- Mutation Rates: Start with low rates and adjust based on performance
- Fitness Evaluation: Use multiple trials to reduce noise
- Speciation: NEAT’s speciation protects innovation and prevents premature convergence
- Termination: Monitor both fitness improvement and population diversity
When to Use Neuroevolution
Use NEAT when:- Network topology is unknown
- Starting from minimal structures
- Sparse connectivity is desired
- Large-scale networks are needed
- Geometric patterns are important
- Regular structure is beneficial
- Optimizing continuous parameters
- Gradient information is unavailable
- Robustness to noise is needed
References
- Stanley & Miikkulainen (2002) - “Evolving Neural Networks through Augmenting Topologies”
- Stanley et al. (2009) - “A Hypercube-Based Indirect Encoding for Evolving Large-Scale Neural Networks”
- Hansen & Ostermeier (2001) - “Completely Derandomized Self-Adaptation in Evolution Strategies”