# What I learned from 10 Yrs of "playing" with Neuroevolution -

- Speaker: [Al Yaros](/wiki/speakers/al-yaros.md)
- Event: [Reversim Summit 2018](/wiki/years/2018.md)
- Video: https://www.youtube.com/watch?v=c_oAlYJ6k4s
- Transcript: [/transcripts/2018/22-c_oAlYJ6k4s.md](/transcripts/2018/22-c_oAlYJ6k4s.md)
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: [Machine Learning](/wiki/topics/machine-learning.md), [Algorithms](/wiki/topics/algorithms.md), [Game Development](/wiki/topics/game-development.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

This talk explores the application of neuroevolution—training deep neural networks using evolutionary algorithms—to solve reinforcement learning problems. The speaker shares insights gained from a decade of experimenting with AI agents in computer games like car simulators and first-person shooters. The audience learns about the core challenges of reinforcement learning and examines three key neuroevolution algorithms: NEAT, DeepNEAT, and DeepGA. Ultimately, attendees discover how evolutionary approaches can achieve comparable results to traditional gradient-descent methods while offering superior parallelism and debugging simplicity.

## Key points

- [4:30](https://www.youtube.com/watch?v=c_oAlYJ6k4s&t=270s) Reinforcement learning involves an agent interacting with an environment by performing actions and receiving a state and a numerical reward.
- [5:30](https://www.youtube.com/watch?v=c_oAlYJ6k4s&t=330s) Designing a proper reward function is one of the biggest challenges because a poorly defined reward can lead to unintended agent behaviors.
- [14:10](https://www.youtube.com/watch?v=c_oAlYJ6k4s&t=850s) Evolutionary algorithms iteratively optimize a population of candidate solutions through selection, crossover, and mutation.
- [18:42](https://www.youtube.com/watch?v=c_oAlYJ6k4s&t=1122s) The NEAT algorithm evolves both network topology and weights by starting with minimal networks and using historical markings for crossover alignment.
- [22:08](https://www.youtube.com/watch?v=c_oAlYJ6k4s&t=1328s) DeepNEAT extends traditional NEAT by treating graph nodes as entire neural network layers to handle image inputs and construct deep architectures.
- [23:10](https://www.youtube.com/watch?v=c_oAlYJ6k4s&t=1390s) DeepGA fixes a known network topology and uses an evolutionary approach exclusively to optimize millions of weight parameters.
- [26:30](https://www.youtube.com/watch?v=c_oAlYJ6k4s&t=1590s) Evolutionary algorithms offer massive parallelization benefits, drastically reducing training wall-clock time compared to traditional gradient descent.

## Takeaways

- Carefully design reward functions to avoid unintended shortcuts and undesirable behaviors in reinforcement learning agents.
- Leverage evolutionary algorithms as a simpler, highly parallelizable alternative to traditional gradient-based optimization for neural networks.
- Break down complex environments like first-person shooters into separate networks for movement and combat to simplify training.

## Questions this talk answers

- How do evolutionary algorithms solve the problem of finding optimal neural network topologies without manual design?
- What are the main advantages of using DeepGA over traditional gradient descent methods like stochastic gradient descent?
- How can you handle complex game environments with large branching action spaces when training reinforcement learning agents?

## Technologies

OpenCV, Unreal Tournament, Doom, Python

## Tags

evolutionary algorithms, game ai, machine learning, neural networks, neuroevolution, reinforcement learning
