An AI that plays Flappy Bird. The AI is powered by a feedforward neural network created using an evolutionary algorithm, NEAT (NeuroEvolution of Augmenting Topologies). In collaboration with Tim Ruscica.
In short, the algorithm mimics Darwin's natural selection by assigning fitness scores to each bird; these scores are incremented based on how long each bird lives, and those with the highest fitness scores play in the next generation with a set mutation rate. As generations progress, the best artificial neural network architectures and weights that lead to the highest fitness score will be discovered and used.
The AI will usually find an optimal neural network within five generations, but may take up to ten and as little as three generations.
Pygame 1.9.6, NEAT 0.92, Python 3.8.3
Download the files, run flappybird.py, and watch the AI train itself to conquer Flappy Bird. Enjoy!