Flappy Bird is an arcade-style game in which the player controls the bird which moves persistently to the right. The player is tasked with navigating bird through pairs of pipes that have equally sized gaps placed at random heights. Bird automatically descends and only ascends when the player says to ascend.
I have used two different approaches to play flappy bird which is built using pygame.
- Using Advantage Actor Critic (A2C) which is a model-free, on-policy, reinforcement learning algorithm.
- And also using NeuroEvolution of Augmenting Topologies (NEAT) which belongs to family of NeuroEvolution algorithms. I have used neat-python library to implement it.
A2C |
NEAT |
Using A2C, agent started playing well after 500 episodes and using NEAT, agents started playing well after 5 Generations.