My goal was to develop an AI that can fly through the pipelines. This project uses Evolutionary Algorithms to improve the performance of agents over time.
The development of the AI was quita a fun project. Contrary to using Q-learning where the agents are trained in a βclassicβ fashion (using Stochastic Gradient Descent), evolutionary algorithms are purely random: they can have success in evolving an agent that has a good performance, they can fail as well.
Nonetheless, it was fun to see the agents improve over time and to see that from a completely random set of weights, evolutionary and biological principles were able to evolve an agent that performs well in the Flappy Birds environment:
And it works! After 50 generations, agents had evolved that were able to steer perfectly through the pipes! π€©
In just 50 generations, evolution was able to create an AI that scores perfectly in the environment. It feels like order from chaos: we started with 100 agents with randomly chosen weights. By just following the principles of survival of the fittest πͺ and biologically-inspired transmission of encoded information from parent generations to their children π¨βπ©βπ§βπ¦, we were able to get better and better agents (although we were lucky that we randomly chose those weights from parents that created a good behavior of the agent). π€―
You can find more detail in the projects documentation, where I explains more about the approach that I have followed while developing the Game framework and the AI itself: Github: brakid/FlappyBirdAi