Interestingly, the updates are done on the basis of only 2 external inputs [1]: the height of the bird in the screen and height of the aperture in the next pipe. Using only these two parameters the neural network decides whether to flap or not. I would had expected at least also the horizontal distance from the next pipe... [1] https://github.com/xviniette/FlappyLearning/blob/gh-pages/ga...
Wow, that's really unexpected. This isn't my field, but given the simplicity of the inputs and network, and the way commenters are seeing the demo achieve perfect play after anything between 2 and 200 generations, it makes me wonder if this isn't more of a brute-force search than actual learning? That is, it smells like there's a "correct" set of neuron values - where any genome within some tolerance of those values…
NeuroEvolution – Flappy Bird
31–40 of 103 posts
Re: NeuroEvolution – Flappy Bird
#32At generation 83, a single bird emerged that successfully navigated through several hundred columns (current score 100000+) and showed no signs of failing. It took a few dozen generations to find versions that would make it through a few columns if those columns had gaps without too much vertical distance between them. Somewhere in generation 60-70, I could see versions figuring out how to transition between heights,…
Re: NeuroEvolution – Flappy Bird
#33At generation 83, a single bird emerged that successfully navigated through several hundred columns (current score 100000+) and showed no signs of failing. It took a few dozen generations to find versions that would make it through a few columns if those columns had gaps without too much vertical distance between them. Somewhere in generation 60-70, I could see versions figuring out how to transition between heights,…
Re: NeuroEvolution – Flappy Bird
#34At generation 83, a single bird emerged that successfully navigated through several hundred columns (current score 100000+) and showed no signs of failing. It took a few dozen generations to find versions that would make it through a few columns if those columns had gaps without too much vertical distance between them. Somewhere in generation 60-70, I could see versions figuring out how to transition between heights,…
Re: NeuroEvolution – Flappy Bird
#35Re: NeuroEvolution – Flappy Bird
#36At generation 83, a single bird emerged that successfully navigated through several hundred columns (current score 100000+) and showed no signs of failing. It took a few dozen generations to find versions that would make it through a few columns if those columns had gaps without too much vertical distance between them. Somewhere in generation 60-70, I could see versions figuring out how to transition between heights,…
Re: NeuroEvolution – Flappy Bird
#37one lone hero
Re: NeuroEvolution – Flappy Bird
#38At generation 83, a single bird emerged that successfully navigated through several hundred columns (current score 100000+) and showed no signs of failing. It took a few dozen generations to find versions that would make it through a few columns if those columns had gaps without too much vertical distance between them. Somewhere in generation 60-70, I could see versions figuring out how to transition between heights,…
Re: NeuroEvolution – Flappy Bird
#39Amazing that this can be done in 300 lines of perfectly readable JS without any libraries. And the author apparently wrote it in 2 days. Great intro to genetic algorithms and reinforcement learning. Universities should teach like that.
Edit: Somebody has asked about the big picture how the thing works:
You use a neuronal network to decide at each step to flap the birds wings or not. That is the only output. The input is only the birds height (y-position) and the height of the next hole. (https://en.wikipedia.org/wiki/Feedforward_neural_network)
The question now is how to find the correct weights for the net.
That net is not trained in a traditional supervised way like with gradient descent (which would be more complicated). Instead it uses a genetic algorithms to find new weights for neuronal networks of future generations. That is use some of the best individuals. Some randomly generated ones and some created by breeding from existing individuals. (https://en.wikipedia.org/wiki/Genetic_algorithm)
And that's basically it in this case.
Re: NeuroEvolution – Flappy Bird
#40Interestingly, the updates are done on the basis of only 2 external inputs [1]: the height of the bird in the screen and height of the aperture in the next pipe. Using only these two parameters the neural network decides whether to flap or not. I would had expected at least also the horizontal distance from the next pipe... [1] https://github.com/xviniette/FlappyLearning/blob/gh-pages/ga...