Skip to content

This is a flappy bird game implemented using pygame in python. It offers three modes to users. First is the manual play mode. Second is the one where an AI learns to play the game and then plays it. Third mode provides the ability to play the game using previously used AI.

Notifications You must be signed in to change notification settings

DEV-D-GR8/FlappyBirdAI

Repository files navigation

FlappyBirdAI

This is a flappy bird game implemented using pygame in python. It offers three modes to users:-

  1. Manual play mode.
  2. AI learns to play the game and then plays it.
  3. Play the game using previously trained AI.

Tech Stack

  1. Python
  2. Pygame
  3. NEAT (NeuroEvolution of Augumenting Topologies)

Motivation

I am an AI/ML enthusiast and consistently work to improve my skills in this area. A few months back I came across a youtube video by "code bullet" in which he implemented the Flappy Bird game using AI. I wanted to do the same. After acquiring the necessary skill set, i did it!

Challenges

Major challenege for me was implementing the flappy bird game from scratch. I was not quite familiar with the pygame module. Then there were some issues with the neat module like creating a decent fitness function and dealing with the input genomes. Took help from various articles and youtube channels and eventually came up with a slution to every problem and hence made a fully functional project.

What I learnt

The best way to learn programming concepts is by implementing them. I learned a lot about the pygame module through this project. I learnt to deal with various errors that arise while working with pygame. Apart from that I learnt about the working of the genetic algorithms and how they create an AI.

Future plans

I will work on reducing the number of files used by grouping them in two major classes that will deal with Manual play and AI play. Moreover I would like to work on the UI of the game.

Video Demonstration

Watch this video to see the model being trained and then being implemented to play the game:- https://youtu.be/xxg-3QwgJwA

About

This is a flappy bird game implemented using pygame in python. It offers three modes to users. First is the manual play mode. Second is the one where an AI learns to play the game and then plays it. Third mode provides the ability to play the game using previously used AI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages