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
- Host: GitHub
- URL: https://github.com/indivar0508/flappybirdai
- Owner: indiVar0508
- Created: 2019-07-15T17:56:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-30T16:36:18.000Z (over 3 years ago)
- Last Synced: 2025-06-13T00:07:27.073Z (12 months ago)
- Topics: ai, evolutionary-algorithms, flappy-bird, ml, neat-python, pygame, python3, reinforcement-learning
- Language: Python
- Homepage:
- Size: 12.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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.