
Show HN: Unity 3d Neuroevolution Flappy Bird - galleanv
https://github.com/KrzysztofBogdan/CsNeuroevolutionFlappyBird
======
plopz
Discussion of the original:
[https://news.ycombinator.com/item?id=12917538](https://news.ycombinator.com/item?id=12917538)

Seems to have the same problem as the original where its not actually
converging towards a solution but randomly stumbling onto it.

~~~
johnhenry
Is there a qualitative difference? I was under the impression that neuro
networks worked by converging to a solution BY randomly stumbling into it? Is
my rudimentary understanding off this off?

------
Rathmatik
This is pretty awesome. I am curious though, does this in any way use the same
algorithm as the project that inspired this
([https://xviniette.github.io/FlappyLearning/](https://xviniette.github.io/FlappyLearning/)).
That one appears to be vastly quicker at learning (reached over 13 million and
counting at generation 18).

~~~
galleanv
I think that environment in Unity version is more complex, it uses "real"
physics (box2d) to simulate the world. JS version use very simple collision
detection. But I am not 100% sure (this is my beginning in AI world)

------
azurelogic
It made it to 25k by gen 160. Then it deviated an started losing again. Gen
250 was virtually unstoppable, hitting 120k. Watching gen 251 right now, and
it just crushed 100k... 150k... 200k... 242k. Wow. And Gen 252 is killing it
too. Seems to have found a sweet spot.

------
indescions_2017
The Asteroids demo is cool too:

[https://xviniette.github.io/AsteroidsLearning/](https://xviniette.github.io/AsteroidsLearning/)

AI Lab at UTexas Austin has more Atari 2600 NEAT demos as well. The Kung Fu
Master "button masher" style makes me think a Street Fighter V agent would be
hilarious to see in Human vs AI competitive action!

[http://www.cs.utexas.edu/~ai-lab/?atari](http://www.cs.utexas.edu/~ai-
lab/?atari)

For a proof of concept, this shows the capability of ML in a web browser.
Creating an ad hoc cluster of a hundred webrtc peers would yield a formidable
(but slow) meta learner. And just to put it in perspective: sentient.ai's
petascale darkcycle cluster consists of ~1M CPUs and ~1k GPUs:

[https://www.sentient.ai/platform/scale/](https://www.sentient.ai/platform/scale/)

Distributed computation seems to give natural evolution a competitive
advantage: it is by design already parallel.

Reference for further study: Evolving Deep Neural Networks

[https://arxiv.org/pdf/1703.00548.pdf](https://arxiv.org/pdf/1703.00548.pdf)

------
mrspeaker
Why is there only ever one (sometimes two/three) decent players every
generation? Most will end up dying after one or two poles... how come once the
algorithm gets decent there are many more making through the game along with
the best one?

(Also, I'd like "number of taps per game segment" be a weight... fall until
the very last second then a couple of quick taps - none of this "spamming to
keep level" stuff: where's the style? ;)

~~~
galleanv
I am beginner in all of this and also I would like to know why this is
happening. In this example every generation have 20 new genomes (birds), 3
best stay from previous generation (elitism), rest are effect of mutation.
Maybe mutation rate/range have to be tweaked. Current solution is best what I
found so far.

------
lootsauce
After being stuck at ~24k for a long time on the 1051st round it scored 83170.
Seems to learn very slowly, perhaps the new generations are too random?

------
mipmap04
This is fun! Does it learn the same from many short, low scoring runs as it
does with fewer, longer, high scoring runs?

~~~
galleanv
It it example it learns form best 3 runs

------
Geee
It seems to get worse if run at 5X or 10X speeds.

~~~
galleanv
It is because physic simulation in unity gets worst when time speeds up

------
demarq
my experience is at 50 the first smart bird appeared, then at 121 they became
consistently good.

