xviniette / FlappyLearning

Program learning to play Flappy Bird by machine learning (Neuroevolution)
http://xviniette.github.io/FlappyLearning/
MIT License
3.98k stars 498 forks source link

Another AI flappy bird using genetic programming (evolutionary computation) #30

Open ShuhuaGao opened 5 years ago

ShuhuaGao commented 5 years ago

Appreciate this excellent work. I got a lot of inspiration from this work.

I have achieved to train an AI for a more difficult version flappy bird: the horizontal distance between adjacent pipes and the gap between up and down pipes are random within a certain range rather than being fixed. Instead of neural networks,I use evolutionary strategies and Cartesian genetic programming, which attempts to build the control function (a math expression) directly using only basic arithmetic operators. With a small population of size 10, the bird can learn to fly quite well in typically less than 50 generations, which seems to be much more efficient than simple neuron evolution.

I implement this algorithm with Python and pygame. For those who are interested, please check my GitHub repository. A demo is here.

xviniette commented 5 years ago

Well done !

brakdag commented 2 years ago

Well done !

I really appreciate your work, I want to share with you a branch of your project where I used tensorflow. brakdag.github.io/FlappyLearning