An open API service indexing awesome lists of open source software.

https://github.com/indivar0508/flappybirdai

Implemented FlappyBird in Python, and developed NeuralNetwork from scratch and built a bot using NEAT to let Bot evolve to play the game. Turtrial Referenced from in p5.js TheCodingTrain and Code-Bullet, tutorial for pygame Referenced from sentdex
https://github.com/indivar0508/flappybirdai

ai evolutionary-algorithms flappy-bird ml neat-python pygame python3 reinforcement-learning

Last synced: about 1 month ago
JSON representation

Implemented FlappyBird in Python, and developed NeuralNetwork from scratch and built a bot using NEAT to let Bot evolve to play the game. Turtrial Referenced from in p5.js TheCodingTrain and Code-Bullet, tutorial for pygame Referenced from sentdex

Awesome Lists containing this project

README

          

# FlappyBirdAI

FlappyBirdAI is a python implementation using pygame from tutorials of [The Coding Train](https://www.youtube.com/c/TheCodingTrain) implementing [NEAT algorithm using p5.js](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Yd3975YwxrR0x40XGJ_KGO)



# Setup

If you want to give it a try you can clone the project

```
git clone git@github.com:indiVar0508/FappyBirdAI.git
```

Install the requirements into your Python virtual environment, make sure you are in `FlappyBirdAI` directory

```
python3 -m venv venv # create virtual environment
source venv/bin/activate # activate virtual environment in terminal
pip install -r requirements.txt
```

# How to Play

If you want to run the game once your virtual environment is setup, you can simply run main.py file to intialize the prompt to start the game.

```
python main.py
```

The prompt will give options to either play yourself where you can press `S` to play yourself, use `Space bar` as a signal to let bird jump in screen. if you want to see how ai Evolves using NeuroEvolution algorithm press `A` to let AI play the game and you can watch AI play the game.