Welcome to a colorful Flappy Bird clone where an AI learns to fly using NEAT (NeuroEvolution of Augmenting Topologies) — watch neural networks evolve to master the game!
- 🧠 AI-powered gameplay using NEAT to evolve bird behavior
- 🌈 Smooth animations and polished visuals
- 📈 Score tracking and fitness evaluation
- 🧩 Modular design: Bird, Pipe, Base, and Game loop
- Python 3.8+
- Dependencies:
pygameneat-python
pip install pygame neat-pythonpython flappy.py- The NEAT config is loaded from
config-feedforward.txt(already included). - A window will open and the AI will start learning over generations.
- Each bird is controlled by a small neural network.
- Inputs include the bird's
yposition and distances to the next pipe openings. - Networks are evolved with NEAT over generations to maximize survival and score.
.
├── flappy.py # Main game + NEAT training loop
├── config-feedforward.txt # NEAT configuration
├── imgs/ # Game assets (bird, pipes, background)
└── screenshots/ # Project screenshots
- Adjust pipe gap in
Pipe.GAPfor difficulty. - Modify bird physics in
Bird.move()for different behavior. - Evolve more generations by changing
p.run(main, 50)inflappy.py.
- Built with ❤️ using Pygame and NEAT-Python.
This project is for learning and experimentation. Add a license if you plan to share/distribute.

