This is a flappy bird game implemented using pygame in python. It offers three modes to users:-
- Manual play mode.
- AI learns to play the game and then plays it.
- Play the game using previously trained AI.
- Python
- Pygame
- NEAT (NeuroEvolution of Augumenting Topologies)
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!
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.
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.
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.
Watch this video to see the model being trained and then being implemented to play the game:- https://youtu.be/xxg-3QwgJwA