An AI agent that learns to play Flappy Bird using the NEAT (NeuroEvolution of Augmenting Topologies) algorithm. This project uses Pygame for game rendering and NEAT-Python for training the neural networks. The agent evolves over generations, improving its ability to navigate pipes without human intervention.
- 🧠 AI-controlled bird using NEAT
- 🏞️ Real-time graphics using Pygame
- 📈 Generation tracking and scoring
- 💾 Configurable NEAT parameters
- 🔄 Replayable and reproducible simulations
- Python 3.x
- Pygame – for rendering and game mechanics
- NEAT-Python – for neuroevolution and fitness evaluation
- Each bird is controlled by a neural network.
- Networks are evolved using NEAT over multiple generations.
- Fitness is based on survival time and number of pipes passed.
- The best-performing networks survive and mutate to improve over time.
- 🐤 Bird’s vertical position
- 📏 Distance to the next pipe (top)
- 📏 Distance to the next pipe (bottom)
The single output decides:
➡️ Jump
if the value > 0.5
➡️ Do nothing
otherwise
Fitness increases with time survived, and decreases for collisions or bad jumps.
git clone https://github.com/Tynoee/AI-Flappy-Bird-Game.git