Welcome to Flappy Runner, a fun and challenging game where you control a bird that must jump over randomly spawning pipes! The twist? The game features AI-powered gameplay using NEAT (Neuroevolution of Augmenting Topologies), an advanced machine learning technique that allows the bird to learn how to play the game by evolving neural networks over generations.
In this project, I've combined game development with my passion for artificial intelligence to create a unique AI-driven experience.
- AI Training with NEAT: The AI learns to control the bird by evolving its decision-making over multiple generations.
- Dynamic Difficulty: As the game progresses, the speed increases and pipes spawn closer together, making the game more challenging.
- Play Yourself Mode: Want to test your skills? Take control of the bird and try to beat your high score.
- Save and Test AI: The best-performing AI can be saved and tested to showcase its capabilities.
- Interactive Main Menu: Navigate through the main menu and choose whether to train the AI, test the AI, or play the game yourself.
The objective of the game is simple: control the bird to jump over the pipes and avoid collisions. You can either:
- Let the AI train and evolve to control the bird.
- Play yourself and test your skills against the AI.
- Test the best AI and see how well the AI performs in the game.
The game progressively becomes harder as the bird speeds up, and pipes spawn more frequently. Each AI learns from its previous generations, improving its performance over time.
- Python: Main programming language.
- Pygame: Library used to create the game environment and render the graphics.
- NEAT (Neuroevolution of Augmenting Topologies): For training AI using genetic algorithms.
To play the game and test the AI, follow these steps:
- Python 3.x installed on your system.
- Virtual environment (recommended) for managing dependencies.
- Clone the repository:
git clone https://github.com/yourusername/Flappy_runner-with-Neat-A.i.git pip install -r requirements.txt cd Flappy_runner-with-Neat-A.i python Neat_dino.py