Skip to content

Latest commit

 

History

History
67 lines (33 loc) · 1.74 KB

README.md

File metadata and controls

67 lines (33 loc) · 1.74 KB

Optimization of Flappy Bird using NEAT

This project implements the classic Flappy Bird game using the NEAT (NeuroEvolution of Augmenting Topologies) algorithm along with XOR mechanism, allowing an AI agent to learn to play the game autonomously. NEAT is a genetic algorithm that evolves neural networks to perform tasks, in this case, playing Flappy Bird.

Clone the repository to your local machine:

git clone https://github.com/Shubhampatel001/Flappy-Bird-With-NEAT-Algorithm

Install the required Python modules using pip:

pip install -r requirements.txt

This command will install the necessary dependencies, including neat-python and pygame.

Usage

To play Flappy Bird manually:

Open the "Base Model Flappy Bird.ipynb" notebook. Execute the cells to control the bird and navigate through the pipes.

To watch the AI agent train itself:

Open the "NEAT Algo Flappy Bird.ipynb" notebook. Run the cells to train the NEAT algorithm and observe the AI gameplay.

To watch the AI agent play:

Run

python test.py

Notes

Ensure that you have Python and Jupyter Notebook installed on your system before running the notebooks.

Configuration

The feedforward.txt file contains the NEAT configuration parameters. You can adjust these parameters to change the behavior of the NEAT algorithm and experiment with different settings to improve the AI's performance.

Additional Folders

Documentations: Contains abstracts, references, and notes related to the implementation.

Visuals: Includes photos, videos, results, graphs, and block diagrams related to the game.

Acknowledgments

This project is based on the implementation of Flappy Bird by sourabhv. NEAT algorithm implementation is provided by NEAT-Python.