An AI that learns to play Flappy Bird using NEAT (NeuroEvolution of Augmenting Topologies).
I built this as an AI course project at university. It uses the NEAT algorithm to evolve neural networks that learn to play Flappy Bird through successive generations. Each bird in a generation is controlled by its own neural network, and the best performers are selected and mutated to produce the next generation. Within a few generations, the AI consistently clears pipes without human input.
- Python 3
- NEAT-Python — neuroevolution library
- Pygame — game rendering and input
git clone https://github.com/mosamaasif/NEAT_Flappy_Birds.git
cd NEAT_Flappy_Birds
pip3 install -r requirements.txt
python3 code/main.pyNote: Use
pythoninstead ofpython3if that's how your system is aliased.
The NEAT configuration is in code/config-feedforward.txt. You can tweak population size, mutation rates, and other parameters there.

