Andrew-Tsegaye /
AI-Powered-Flappy-Bird
This repository is a project that showcases an implementation of an AI (Artificial Intelligence) algorithm playing the famous Flappy Bird game.
Loading repository data…
charang2003 / repository
A Python implementation of the classic Flappy Bird game using Pygame for graphics and NEAT (NeuroEvolution of Augmenting Topologies) for AI-based gameplay. Watch AI agents learn to play the game automatically, or play yourself and see how high you can score!
This project implements a Flappy Bird clone using the NEAT (NeuroEvolution of Augmenting Topologies) algorithm for AI-driven gameplay. The game allows users to experience the classic Flappy Bird mechanics while showcasing the capabilities of neuroevolution in training AI agents. Players control a bird navigating through pipes, with the goal of achieving the highest score possible. The project demonstrates the integration of Pygame for game development and NEAT-Python for evolving intelligent agents.
The NEAT Flappy Bird project implements a neural network approach to train agents to play the classic Flappy Bird game using the NEAT (NeuroEvolution of Augmenting Topologies) algorithm. This project demonstrates the application of evolutionary algorithms in game AI, allowing the birds to learn and adapt to the game environment.
Follow these steps to set up and run the project on your local machine.
Make sure you have the following installed:
Clone the Repository:
Clone this repository to your local machine:
git clone https://github.com/charang2003/NEAT-Flappy-bird.git
cd NEAT-Flappy-bird
Install Dependencies:
pip install -r requirements.txt
To train the AI agent and watch it play Snake game:
python flappy_bird.py
The project uses Pygame for rendering the game and NEAT for evolving a population of birds. Each bird is represented by a neural network that makes decisions based on its position relative to the pipes. The birds are trained over multiple generations, improving their performance with each iteration.
Bird Class: Handles bird movement, drawing, and collision detection.
Pipe Class: Manages the creation, movement, and collision of pipes.
Base Class: Draws and moves the ground in the game.
NEAT Configuration: Defines the structure and parameters for the NEAT algorithm.
Before running the project, you'll need to configure the config-feedforward.txt file. This file contains the settings for the NEAT algorithm. Customize parameters such as:
Population Size: Determines how many genomes will be evaluated in each generation.
Fitness Evaluation: Set how the fitness of each bird is calculated.
Neural Network Architecture: Adjust the number of inputs, hidden layers, and outputs based on your requirements.
Feel free to explore the various configurations and experiment with different settings to see how they affect the performance of your neural networks!
Contributions are welcome! Please follow these steps to contribute:
git checkout -b feature-branch).git commit -m 'Add new feature').git push origin feature-branch).This project was inspired by NeuroEvolution of Augmenting Topologies (NEAT) a genetic algorithm (GA) developed by Kenneth Stanley and Risto Miikkulainen in 2002. Special thanks to the following resources that contributed to the development of this project:
NEAT-Python: The implementation of the NEAT algorithm used for neuroevolution.
Pygame: The library used for creating the game environment.
Flappy Bird: Inspiration for the project, showcasing the mechanics of the original game.
And special thanks to Tech with Tim --> Watch the Video
Pygame for the game development library.NEAT for the neuroevolution algorithm.Selected from shared topics, language and repository description—not editorial ratings.
Andrew-Tsegaye /
This repository is a project that showcases an implementation of an AI (Artificial Intelligence) algorithm playing the famous Flappy Bird game.
alexjmiller5 /
An implementation of the NEAT (Neuroevolution of Augmenting Topologies) algorithm in the game DoodleJump
PranayKotian /
Flappy Bird created in Python using pygame. AI which plays flappy bird implemented using the neat-python library.
MaxineXiong /
The project showcases the implementation of the NEAT algorithm in Python to play a Flappy Bird-like game. It orchestrates the evolution and evaluation of a bird population through successive generations until the fitness threshold is met. The ultimate winner genome, demonstrating exceptional gameplay, is saved as a pickle file as the main output.
oEnzoRibas /
This project implements an AI to play the Flappy Bird game using the NEAT (NeuroEvolution of Augmenting Topologies) algorithm. The AI learns to navigate between pipes and achieve higher scores through evolution over generations.
CrazyCoder009 /
A simple from scratch implementation of Feed Forward Neural Network on the famous Flappy Bird game. The network teaches itself how to play the game through simultaneous generations over a period of time. The framework used is NEAT in Python to teach the AI.