[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

This program uses neuroevolutionary algorithms to learn how

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 266
Thread images: 82

File: flappy-img[1].jpg (19KB, 530x298px) Image search: [Google]
flappy-img[1].jpg
19KB, 530x298px
This program uses neuroevolutionary algorithms to learn how to play Flappy Bird. I realize I don't have much room to judge as a human being who played 100 times before he could get a score of 10, but I kind of expected this thing to be a professional by generation 10. Mine is on gen 104 now and it's unstoppable.

Sometimes I wish I was a computer. I think I'll give my AI an identity if he's still on 104 in the morning. Robots have to earn their name.

https://xviniette.github.io/FlappyLearning/
>>
>>57438317
Did you made this?

Why use GA instead of neural network learning?
>>
>>57438317
I have a bird on generation 8 that doesn't seem to be stopping any time soon
>>
>>57438317
Shit becomes unstoppable at gen 21
>>
>>57438317
damn that code boggles my brain, especially with no dependencies

im too dumb for this shit. are you meant to be able to code something like that without a masters?
>>
Bump for more info
How much experience and time investment does this require?
>>
File: Screenshot_2016-11-08_08-54-52.png (16KB, 504x516px) Image search: [Google]
Screenshot_2016-11-08_08-54-52.png
16KB, 504x516px
D-did I break it? It won't die
>>
Gen 7 did quite good, 10 didn't stop at 20k points and 3 birds.
Good job.
>>
File: canvas.png (15KB, 500x512px) Image search: [Google]
canvas.png
15KB, 500x512px
>>57438761
same, my generation 5 one is still going. I thought that was about the time it would start getting used to it, but I opened a few more tabs and they got to like generation 25 quickly. My guy must just be lucky.
>>
>>57438761
my gen 8 is at 200k and counting
>>
first 6 generations were utterly stupid
gen 7 refuses to die
it's a pretty neat thing desu
>>
File: 161108-11.11.09.png (21KB, 508x553px) Image search: [Google]
161108-11.11.09.png
21KB, 508x553px
>>57438838
>>
File: retarded.webm (476KB, 620x454px) Image search: [Google]
retarded.webm
476KB, 620x454px
>gen 57
>my bird can't get past 1000
>>
My generation 106 is still stupid as fuck, can't pass 3 lines
>>
>>57438847
Scratch that.
Gen 62 and it know what to do.
The extra chromosome 21 was removed I guess
>>
>>57438856
Gen129 finally managed to pass ~10 lines, it's getting smarter now
>>
Mine always kept dying
but on 42 it suddenly managed to go extremely far
>>
File: finally.jpg (76KB, 535x568px) Image search: [Google]
finally.jpg
76KB, 535x568px
>>57438905
Mine was stupid as fuck until >>57438856
>>
File: a.png (19KB, 510x569px) Image search: [Google]
a.png
19KB, 510x569px
>>57438909
It's still running on 42, 27k points now
>>
>>57438317
That's actually really cool. Makes me wonder if different computers learn faster than the other.
>>
Gen 4 is inmortal
>>
>>57438942

Do computers with black casing learn slower than those with white casing?

>>t. pol
>>
>gen 141
>still dies after the first couple
JUST
>>
>>57438942
Course there is variation, that's the point. Random number generators are usually used to vary the variables for each generation.
>>
>>57438950
>mfw my black case only became smart in gen138
>>
File: chrome_2016-11-08_11-32-19.png (40KB, 643x658px) Image search: [Google]
chrome_2016-11-08_11-32-19.png
40KB, 643x658px
This gen 5 just can't be stopped
>>
>>57438951
in my 2 runs, they became smart (10k+ pts) in gen 118 and gen 138
>>
>>57438963
gen 186 is where it became smart for me
>>
>>57438976
>>57438963
tfw my gen 8 is at 600k now

I don't think it's gonna die
>>
>>57438317
Oh shit a friend of mine did that, he famous now
>>
>>57438983
impossible
>>
>>57438962
holy shit
>>
>>57438986
BTW if you have questions I can link him the thread
>>
Went full retard until Gen 22, then huge steps were made and by 25, all things were clear to the bird god.
>>
>>57438997
how hard it would be to make machine learning for games that have more than 2 commands? What about FPS games for example?
>>
File: canvas.png (15KB, 500x512px) Image search: [Google]
canvas.png
15KB, 500x512px
>>57438810 here, he's still going. I guess once it actually starts getting competent at avoiding then it will keep going on forever, and will never advance to the next generation? I'm not too familiar with Flappy Bird, it doesn't get gradually harder, does it?

Shame, I was wanting to see if all 50 could keep going at generation 6.
>>
File: gen4.png (19KB, 511x570px) Image search: [Google]
gen4.png
19KB, 511x570px
Only on gen 4 but seems like it won't die anytime soon
>>
>>57439002
in principle it works for all games
>>
>>57439002
Not that hard, it depends, check this out https://m.youtube.com/watch?v=qv6UVOQ0F44
>>
>>57439012
Same here
>>
File: 161108-11.52.41.png (21KB, 512x565px) Image search: [Google]
161108-11.52.41.png
21KB, 512x565px
>>57438988
>>57439007
>>57439012
>>
>>57438317
Sometimes generation X does better than generation X+1 (even when X has 2 digits)
How can you be so sure that your current "unstoppable" generation isn't just luck?
I mean I'm sure he didn't get a score of 100k+ just by being lucky, but maybe it still is not as perfect as you think it is.
There should be a way to force the next generation for comparison.
>>
>>57438957
>>57438950

I have a black and white case and it became smart in generation 39.
>>
>>57439022
What the fuck, youtube's layout changed it's again.
And I can't switch to the small player either.
>>
File: Screenshot (1).png (90KB, 1366x768px) Image search: [Google]
Screenshot (1).png
90KB, 1366x768px
Who has the dumbest simulation?

47 generations until it was stable
>>
File: UNSTOPPABLE.png (27KB, 423x697px) Image search: [Google]
UNSTOPPABLE.png
27KB, 423x697px
gen 16 is a monster
>>
>>57439138
61 here. Currently at 70k points
>>
File: 161108-12.11.57.png (25KB, 529x571px) Image search: [Google]
161108-12.11.57.png
25KB, 529x571px
>>57439062
>>57439012
>>57439007
>>57438988
1mil has been passed
>>
File: 1449969370188.jpg (35KB, 512x561px) Image search: [Google]
1449969370188.jpg
35KB, 512x561px
Still going strong
>>
So I haven't looked in depth at the code, but I was wondering what exactly the birds are learning. Are they learning the physics behind the game or the course itself? Also, do they have all the information about their location and the pipes location?

>many thanks for spoon feeding
>>
>>57439204
xD
>>
>>57439221
course is random
so it has to be physics
>>
>>57439221
90% they know their location and the gaps location and are learning the best way to get as far right as possible
>>
File: flappy.png (52KB, 783x859px) Image search: [Google]
flappy.png
52KB, 783x859px
>>57439138
Mine was completely retarded until around gen ~70. I'd love to know the principles by which the generations improve.
>>
>>57439221
2 inputs : position of the bird and position of the hole
>>
https://www.youtube.com/watch?v=yci5FuI1ovk

I love this kind of stuff.
Are there any interesting articles related to machine-learning and artificial neural networks?
>>
>First try
>gen 6 attain unkillable godhood
>Second try
>59th gen doing pretty good, hoping it's attained godhood; dies
>60th gen has a promising flock of 10 birds flying through
What the hell
What makes it take literally ten times longer to attain perfection?
>>
>>57439361
As far as I understand it it's a genetic algorithm selecting something like a neural network. GAs just generate random solutions and mutate them based on their performance using to some rules similar to natural evolution. That randomness means you'll sometimes stumble on a very good solution on the first generation but on another trial you might take many generations to arrive at something just as good.
You can sometimes improve how consistent they perform by improving your assumptions about the problem, how each solution's fitness is rated and the parameters that control how proposed solutions transform on each generation, but shit's not always easy.
>>
File: RETARD.png (23KB, 509x564px) Image search: [Google]
RETARD.png
23KB, 509x564px
>gen 81
>still a retard
>>
>>57438443

Not OP, but neural network learning works by adjusting the neuron weights based on labelled data, which are the examples to learn from.

If you don't have examples to learn from, you can't train the network with normal techniques.

What OP is doing is evolving the weights instead.

OP, have you tried out different network structures?
>>
Hello, i'm the developper behind Flappy Learning.

If you are interested, this video explains very well the process.
https://www.youtube.com/watch?v=P7XHzqZjXQs


I created another learning game : https://xviniette.github.io/AsteroidsLearning/

16 inputs (raycast around the ship for calculing distances) and 2 outputs (x/y).

If you have other questions, I am available.

Thanks for sharing OP
>>
>>57440766
Would the same procedure still be effective in a game more like the classic asteroids? ie each ship can rotate and shoot as well, and asteroids hit by a shot split.
Shit would be more like some crazy multi-agent system where you're optimizing more of a population as a whole as much as an individual.
>>
>>57440878
Yes, this procedure will be effective in a classic asteroids game.
The hardest thing is to correctly compute the fitness (score). It's this aspect which brings out a correct behaviour.
>>
160 gens, and this fuck can barely get past the first line.

Why?
>>
>8 generations for it to figure out flappy bird
>300 generations and it still sucks at asteroids
It never fails to amuse me how adding one single degree of freedom to the equations can fuck things up beyond measure.
>>
>>57441233
The network is much bigger for asteroids

FlappyBird : 2 inputs 1 hidden layer with 2 neurons and 1 output = 6 weights to adjust

Asteroids: 16 inputs 1 hidden layer with 20 neurons and 2 outputs = 360 weights to adjust
>>
>>57438317
Is this 2014 again?
>>
>>57439550
Have a look at recurrent neural networks
>>
>>57441367
So, by a naive estimate I should be getting better by the 480th iteration, or over 9000 if I'm unlucky enough to be stuck in a local extrema. Cool.
>>
>>57441410
yes
>>
>>57438317
where is the source code?
>>
>>57441608
https://github.com/xviniette/FlappyLearning
>>
>>57441616
thx
>>
>>57440766
Does the asteroids one actually work? I'm at gen 40 and they're still retarded.
https://xviniette.github.io/AsteroidsLearning/
>>
>>57441743
It's a much more complicated problem, anon. I'm beyond 500, they are no longer potatoes that just sit in one place forever but they still suicide by jumping from the screen left and right and other dumb stuff.
It also has much more variance in the score. Most of the time they still struggle to make it to 1000, but here and there one of them will break through 2000 and nearly reach 3000.

It would be cool if we bloated it with lots of fun features like performance graphs and boxes to tweak the parameters, just like boxcar2d
>>
File: download.png (218KB, 500x500px) Image search: [Google]
download.png
218KB, 500x500px
Gen 378 and still suck.
>>
File: Screenshot_2016-11-08_16-13-03.png (242KB, 503x505px) Image search: [Google]
Screenshot_2016-11-08_16-13-03.png
242KB, 503x505px
>>57442064
G I T G U D
I
T
G
U
D
>>
>generation 76
>they all just sit in the bottom left corner
reee
>>
>>57442273
Funny, in the two times I tried that game they also did that. It would be funny if it's actually evolutionary behavior and somehow they have better chances of surviving by sitting there rather than on any other place of the screen.
>>
>>57442273
>>57442323
Actually, I just noticed asteroids only spawn in the upper-left and bottom-right corners. That means it's fairly understandable that they transition from sitting in the center to sitting in the bottom left, although one would expect that they'd have high chances of sitting in the upper-right too
>>
File: 123.png (172KB, 500x500px) Image search: [Google]
123.png
172KB, 500x500px
>>57442273
Truly a shame. There were one or two that played the game right in gen 40 but they died out.
>>
File: download.png (224KB, 500x500px) Image search: [Google]
download.png
224KB, 500x500px
>>57442883
I'm tempted to pick the source and put asteroid spawners in the other two corners to end this faggotry desu
>>
>>57443075
>make the game harder
>the robots just get better at it
i need to build one of them underground shelters for when the Terminators come
>>
generation 80 and its failing at 1000
>>
File: download (1).png (227KB, 500x500px) Image search: [Google]
download (1).png
227KB, 500x500px
>>57443482
You'd better hurry, anon.
>>
File: broke.png (78KB, 1899x517px) Image search: [Google]
broke.png
78KB, 1899x517px
did i do good
>>
Can someone explain me what this is since I'm retarded?
>>
I submitted a pull request for the asteroids that adds a max speed button.. Seemed necessary since they take so long to learn. Clone that if you want it.
>>
>>57439550
Except you could do neural reinforcement learning here, because flappy bird has a scoring metric.

Neural reinforcement learning recently learned how to play doom from the raw pixels, you bet your ass it could play flappy bird
>>
File: oh boy.png (81KB, 1887x513px) Image search: [Google]
oh boy.png
81KB, 1887x513px
>>
>>57443836
Thank's, it's great ! I merged !
>>
>>57443892
>Neural reinforcement learning recently learned how to play doom from the raw pixels
I didn't know about that, really cool. But man, just wait until the alarmist media hears of it.
>>
>>57444157
They did, and it's old news now
https://www.cmu.edu/news/stories/archives/2016/september/AI-agent-survives-doom.html
https://arxiv.org/abs/1605.02097
>>
>>57444157
next step : https://deepmind.com/blog/deepmind-and-blizzard-release-starcraft-ii-ai-research-environment/
>>
I forgot I had it running when I left a few hours ago, looks like gen 12's got it
>>
>>57444205
Honestly, after they managed to defeat Lee Sedol at go Starcraft sounds like a breeze. I've seem some AI bots quite a few years ago that could micro those dropships in a way the ground units they transport didn't take any damage at all.
>>
>>57438317
This is really nice work OP, I've been looking into this for quite a while now (was looking into RL just the other day), nice to have a practical example though

By the way, Generation 33 and score is 56500 and counting
>>
>tfw didn't get a gen 8 superbird
>gen 52 just died at <6k
>>
File: download (2).png (228KB, 500x500px) Image search: [Google]
download (2).png
228KB, 500x500px
It's happening lads
>>
File: Screenshot_20161108_161517.png (67KB, 980x1072px) Image search: [Google]
Screenshot_20161108_161517.png
67KB, 980x1072px
I think gen 10-15 is where it's at. This one managed to make it with 9 birds somewhere around 10-20k
>>
>>57444938
Mine took 75 generations. :^(
>>
File: 2016-11-08 23_44_27-Greenshot.png (134KB, 2560x1440px) Image search: [Google]
2016-11-08 23_44_27-Greenshot.png
134KB, 2560x1440px
Gen 6, bitches.
>>
Soooo.....

How long until this thing starts automating jobs?

Or even better, how long until it beats reCaptcha and starts automatically shit posting every where?
>>
File: download (1).png (24KB, 500x512px) Image search: [Google]
download (1).png
24KB, 500x512px
>Generation : 3

This thing learns too well sometimes.
>>
File: DUMB ASS FUCKING BIRD.png (18KB, 513x565px) Image search: [Google]
DUMB ASS FUCKING BIRD.png
18KB, 513x565px
>>
I changed the algorithm for the asteroids. Instead of doing the sensor directions, I'm passing the neural net the locations and velocities of each asteroid, and the location of the ship itself. This will take much longer to train I'm sure (gen 351 and still pretty stupid) but I'll let you guys know the results if the thread stays alive.
>>
File: .png (197KB, 514x558px) Image search: [Google]
.png
197KB, 514x558px
>>57445931
you made this stuff? yeah it's pretty dumb. is asteroids already updated?
>>
>>57445942
I didn't make it, but I added the "max" button a while ago. Been messing with it a while. My changes are not online.
>>
>>57445956
can you put a max button on the flappy bird?

it gets boring sometimes
>>
>>57445931
Hi anon, I'm >>57443075 and I'm a lazy fucker. Would you consider adding spawners in the remaining two corners of the screen so I don't have to?
>>
>>57446034
>>57446054
Nah I only did it because I was bored at work. Maybe if there's a thread tomorrow.
>>
>>57439007
No, Flappy Bird doesn't get harder. It has a pretty small chance of success due to limited maneuverability and relies on human error.
>>
File: 2xDLvQH.png (191KB, 500x498px) Image search: [Google]
2xDLvQH.png
191KB, 500x498px
damn this thing is pretty shitty
>>
>Written entirely in JS, not Python
'Atta boy
>>
>gen 7
>30k and running
damn it learned fast
>>
File: download (4).png (229KB, 500x500px) Image search: [Google]
download (4).png
229KB, 500x500px
>>57446085
Nah dude, you just suck at it
>>
>>57438950
black cases run faster
>>
>>57439550
Not necessarily. Checkout generative adversarial networks for an example of training neural nets on non labeled data.
>>
>>57446118
> Gen 20
> 1.9k score
Mine seems to be retarded.
>>
File: ti86.png (158KB, 1920x1080px) Image search: [Google]
ti86.png
158KB, 1920x1080px
Up to Gen 17 they barely got beyond the first line then all of a sudden in gen 18 one of them was born as an organically overclocked Ti-86 or some shit.
>>
>>57438443
>neuroevolution
I think he is.
>>
>>57446962
It learns by evolution, that is to say tiny random changes and then weighting in favor of the most successful.

Sometimes it only takes 7 generations. Sometimes it takes 104.
The two times I've ran through it they became unkillable at generations 53 and 61
>>
>>57438317
What kind of network are you using OP?
How many hidden layers?
How many neurons?
>>
>>57438317
Mines become unstoppable at generation 10
>>
This is literally AI by brute force....


when will /g/ start learning again..-_-
>>
https://www.youtube.com/watch?v=xOCurBYI_gY
>>
>>57438942
No. it's mainly influenced by the original population.
Sometimes you'll be lucky and start out with a population that is a bit better than others.
Having a larger population increases the diversity of solutions, requiring less generations to converge on an optimal solution.
>>
>>57439138
gen 94 here
>>
>>57447143
Fucking retard. when will YOU start learning.
Evolution is not brute force.
>>
File: chrome_2016-11-09_04-22-58.png (36KB, 647x652px) Image search: [Google]
chrome_2016-11-09_04-22-58.png
36KB, 647x652px
Kek I forgot I had this open
>>
>>57439550
A simple perceptron network trained by bruteforce is ideal for task like this.

>Not OP, but neural network learning works by adjusting the neuron weights based on labelled data, which are the examples to learn from.

Different kind of network. This is not classifier.

The "data" are generated by trial and error. In lowly engineering terms, you simply spawn small net and train weights monte carlo + GP.

Now if you were training to crack captchas, that would take ridiculously long (to discover proper glyphs by trial and error) - so you need to restrict the search domain by using training set.
>>
>>57445931
But it does not scale now right? You have as many inputs as asteroids
>>
File: WzfUPd7.png (185KB, 492x496px) Image search: [Google]
WzfUPd7.png
185KB, 492x496px
it's still going
>>
>>57440766
What if I tie the code to 2 inputs (me giving a grade from A to F, and a word processor's spellcheck), and 101 outputs (all the traditional keys on a US keyboard), will it write my essay eventually?
>>
>>57447690
https://medium.com/@ageitgey/machine-learning-is-fun-part-2-a26a10b68df3 You have here a part on text writing from book "inspiration".
>>
>>57443730

>i do good
You literally did nothing but press a button, retard. Kill yourself for feeling a sense of accomplishment for other people's work.
>>
>>57438761
Sometimes you start with a pretty damn good seed. My first one worked at gen 6. My second took until Gen 96.
>>
>>57438317
Nice OP.. and I use neuroevolutionary algorithms to fuck your sister in her ass.
>>
>>57447654
this is retarded, the ships have no knowledge of the edge of the screen.
>>
File: go.png (25KB, 634x608px) Image search: [Google]
go.png
25KB, 634x608px
my dude seems to have learned it real fast
>>
this is very impressive
>>
>>57447459

There is no functional difference between control problems and classification problems.

The only difference is how the outputs are interpreted. All control problems can be though of as answering the classification problem: "Identify the the best set of controls to activate for a given situation".

I agree with your assessment that for a game this simple, the single hidden layer perceptron used is perfectly adequate. In my post, I was trying to point out that, lacking training data, there must be some mechanism of trial and error, which isn't exactly the colloquial idea of learning. The evolutionary aspect fulfills that requirement in this case.
>>
>>57448637
Yes they have
>>
>>57438736
What? The codebase isn't even big? Why would you need dependencies? Fucking webdevs I swear
>>
Mines been on gen 27 since last night, score is now 1263473
>>
>>57438317
84 gen yeah
>>
File: XJx55iW.png (8KB, 672x332px) Image search: [Google]
XJx55iW.png
8KB, 672x332px
left asteroidlearning overnight. this happened. lol
>>
File: flap.png (40KB, 649x715px) Image search: [Google]
flap.png
40KB, 649x715px
Am I smart enough now mom
>>
posting some AI, you guys might like this, it plays mario.

http://pastebin.com/ZZmSNaHX

>as a human being who played 100 times before he could get a score of 10
git gud, all you have to do is look ahead and not panic and twitch into a pipe.
>>
File: we gettin it.png (29KB, 421x699px) Image search: [Google]
we gettin it.png
29KB, 421x699px
unstoppable gen 7 ft retarded gen 109
>>
I take it you've seen the AI made to play mario games? that motherfucker cheats in ways you wouldn't believe.
Also has quirks like randomly jumping for no reason because it didn't lead to a negative outcome.
>>
File: Untitled.png (37KB, 1366x768px) Image search: [Google]
Untitled.png
37KB, 1366x768px
Holy shit, did i just broke a record?? 1st gen and already can't die
>>
Test
>>
File: Untitled.png (39KB, 1366x768px) Image search: [Google]
Untitled.png
39KB, 1366x768px
>>57449244
at 100k now. first gen ftw
>>
>>57449231
>Also has quirks like randomly jumping for no reason because it didn't lead to a negative outcome.
That's fine. it doesn't use mario's energy.

Humans don't do that in real life because it uses our energy. if MarI/O took into account energy use, maybe it wouldn't jump randomly.
>>
>>57449231
check out >>57447145
this one uses a very different approach, it simply looks for rising values in ram as a means of gauging progress, doesn't even use visuals at all
there's no game-specific hacks involved (though the approach naturally won't work well on all games)
>>
>>57440766
I'm a total beginner in technolgy, I know I'm somewhat more literate than soccer moms and old people, but I can't even begin to understand how that works, but I'm very interested in it. How can I go deeper? I'm already learning programming, but how can I go over the code monkey barrier? I want to do cool science stuff like that.
>>
File: Untitled.png (38KB, 1366x768px) Image search: [Google]
Untitled.png
38KB, 1366x768px
>>57449244
>>57449256
500k and still going strong!
>>
>>57449389
https://medium.com/@ageitgey/machine-learning-is-fun-80ea3ec3c471
A very good introduction about Machine Learning
>>
File: flappy.jpg (45KB, 531x572px) Image search: [Google]
flappy.jpg
45KB, 531x572px
brehs.. I think it's starting to gain consciousness.
>>
>>57438317
Pretty neat OP.
I only made some shitty text evolver that doesn't involve neural nets at all.

$ ./evolve "Sometimes I wish I was a computer. I think I'll give my AI an identity if he's still on 104 in the morning. Robots have to earn their name." 
gen 8016: best=134/139, worst=107/139, overallBest=138/139, avg=121/139 : "Sometimes I wish I was a computer. I think I'll give my AI an identity if he's still on 104 inUthe vorning. zo<ots have to earn their n8me."
>>
>>57438317
>>57439221
>>57439348
>>57440766
>>57441743
>>57445942

for those who want I have a c++ asteroids implementation, it's kinda ugly but it learns much faster https://github.com/znoraka/asteroids
>>
File: stats.png (28KB, 640x480px) Image search: [Google]
stats.png
28KB, 640x480px
>>57449759
with stats !
>>
File: astroidthingies.png (397KB, 646x698px) Image search: [Google]
astroidthingies.png
397KB, 646x698px
Left the astroids running for a while, they average around 1500-2000 so they're getting better. But it's still slow.
>>
>>57447493
What do you mean it doesn't scale? I don't think it needs to in this case. There's a set number of asteroids (they don't all spawn at once but still).
>>
>>57449794
The number of asteroids actually increases, but still, it's also interesting to try with smaller but more asteroids, I'm >>57449759 and played with different parameters, it's fun
>>
>>57449813
The number of asteroids increases until it reaches the max number. I've been playing around a bit with it too, but I can't seem to get it to go beyond a score of 2-3k.
>>
>>57449828
It should be much faster right? The raycasts cost a lot to compute. Also try changing the parameters like the mutation rate, it reaches a good configuration much faster with a high mutation rate for me
>>
>>57449851
It is quite a bit faster but the neural net still slows it down.

I found the same thing with mutation rate. I also increased mutation range to .9 with a decay to .1 seeing if maybe it needs more granular changes.

It learns faster but ends up just as stupid.
>>
>>57449867
You should try my c++ implementation if you have a linux machine, it's much faster
>>
>>57449903
I'm on macOS. Do you think it'll work?
>>
>>57449959
Maybe, try running cmake and make and see what it tells you
>>
>>57444266

Yeah, the problem with these sorts of games is that its very easy for the AI to start "cheating".

You need to put some APM cap on them or something to stop them from completely cheesing the game mechanics.
>>
>>57449989
i have to install a LOT of dependencies but i think it'll work.
>>
File: Sketch (1).png (146KB, 1074x1103px) Image search: [Google]
Sketch (1).png
146KB, 1074x1103px
every single one of you needs to gitgud
>>
File: Facepalm.gif (427KB, 400x271px) Image search: [Google]
Facepalm.gif
427KB, 400x271px
>>57450433
>I'm better than you at rolling dice
you fucking retard
>>
File: Sketch (3).png (138KB, 1040x1104px) Image search: [Google]
Sketch (3).png
138KB, 1040x1104px
>>57450446
>having fun is not allowed
You are just mad that you didn't get the UBERVOGEL breed :^)
>>
File: pepe dunce.png (64KB, 658x901px) Image search: [Google]
pepe dunce.png
64KB, 658x901px
What the fuck is ths shit?
>>
>>57450534
why are you even on /g/, anon?
>>
File: Sketch (4).png (1MB, 2247x1263px) Image search: [Google]
Sketch (4).png
1MB, 2247x1263px
not every machine was created equal, I guess :/
>>
How do i get into this? How can i get started?
>>
>>57449231
How is that AI cheating? It just registers when to walk forward and when to jump.
>>
File: iindxf.png (17KB, 499x513px) Image search: [Google]
iindxf.png
17KB, 499x513px
Look at this gen 4 bastard go.
>>
File: 3475.png (181KB, 513x509px) Image search: [Google]
3475.png
181KB, 513x509px
my pussy ass ships decided to just go hide out in a corner
>>
Gen 49's got it
>>
>>57449437

Thanks anon this is good
>>
>>57453224
ships hiding in the corner fucks up the evolution so much that's incredible
>>
>>57453736
ships=us
asteroid spawners=jews
asteroids=blacks and arabs
the bottom left corner=a richer part of the town

t.knower
>>
Can someone with a beefy single core performance run the asteroids one?

it's taking too fucking long here
>>
>>57454316
or even better, can someone write that to run on a gpu?
>>
File: KBVDez[1].png (170KB, 500x500px) Image search: [Google]
KBVDez[1].png
170KB, 500x500px
>>57454316
>>
>>57454396
so, are they still dumbfucks who rarely pass 2000 points or they're getting better?
>>
>>57454411
best I've seen is 3,000

the ships are still pathetic
>>
>>57454415
only if that thing supported multithreading...
>>
>>57438736
A 12 year old could write this.
>>
How does this compares to the Mario Bros one?

Anyone here has heard of that one before hasnt it
>>
File: 1475778496670.png (31KB, 556x591px) Image search: [Google]
1475778496670.png
31KB, 556x591px
>>57450433
>>57450470
There's plenty of people in this thread who have rolled much luckier dice than you.
You have nothing to brag about.

Pic related is me.
>>
10 million
>>
Wait, can you make a neuroevolutionary algorithm that writes neuroevolutionary algorithms to play flappy bird?
>>
Is there any intro books for this kind of stuff? Would like to learn the history and fundamentals.
>>
File: screengrab.png (383KB, 4096x2160px) Image search: [Google]
screengrab.png
383KB, 4096x2160px
>>57438317
FINALLY, I HAVE FOUND A PURPOSE TO JUSTIFY ALL THIS HARDWARE
>>
>>57455650
neat
>>
brute force
>>
>>57454341
see >>57449759
>>
>>57439002
Look into Reinforcement Learning, especially DeepMind. They trained computers from first principles (the computer knows what buttons it can press, how the screen currently looks, and whether or not they win or lose but not things like the point of the game or what different controls do) to the point where they were world class in various Atari games. Reinforcement Learning is a very general and exciting area of Machine Learning with applications spanning from games like these and Go to Self-Driving cars and various other "human-like" tasks.
>>
Genetic Algorithms, while not the best approach to these sorts of tasks, are definitely entertaining to watch play out.
>>
>>57455526
This is pretty much the standard book for reinforcement learning: http://webdocs.cs.ualberta.ca/~sutton/book/ebook/the-book.html

Warning, it is fairly technical. Multivariate Calculus and Linear Algebra will be very helpful in understanding a lot of the math behind the approaches (although it might still be able to pick up the general concepts without it).

The author is currently working on a 2nd edition and has draft notes somewhere online, but the 1st edition is still largely relevant. The biggest advances in the field have come from better approximations of reward functions like in Deep Q Nets rather than a fundamentally different approach.
>>
>>57438317
>Sometimes I wish I was a computer. I think I'll give my AI an identity if he's still on 104 in the morning. Robots have to earn their name.
To us, flappy bird is a game. Take away the challenge from a game and you have defeated the entire purpose.

By wishing for the ability to trivialize every game, you're basically just wishing for the ability to be unable to enjoy games. If that's what you're after, it's easier to just stop playing games, isn't it?

An AI that can master a game within minutes will never get to experience the joy that comes from playing it and failing.
>>
>>57455937
more like neet
>>
>>57456571
So it's useful because you can give it tools and a goal it will work out the best way to use the tools to achieve the goal?
>>
File: 2016-11-10_02-13-56.png (186KB, 503x497px) Image search: [Google]
2016-11-10_02-13-56.png
186KB, 503x497px
Still averaging only 1000.
>>
>>57456956
How long has it been running for you?
>>
>>57439348

3:10 - 3:25

kek
>>
>>57457139
Something like 24 hours.
>>
>>57457197
Well RIP then. I guess the training method is just too shitty to handle a game as complex as asteroid avoiding.

It probably keeps getting stuck in random fluctuations around local optimum forever
>>
>>57438317
Hey if you could selectively breed humans to play flappy bird for 100 generations you'd prolly find them to be as good at it as your bot.
>>
>>57440766
Here's a protip: Remove game.display(); from your game.update function, and put that shit to run in requestAnimationFrame
>>
>>57440766
Make it run multithreaded please
>>
File: grdefvgd.png (16KB, 498x505px) Image search: [Google]
grdefvgd.png
16KB, 498x505px
My Gen 19 has got this shit locked
>>
File: god.png (32KB, 546x689px) Image search: [Google]
god.png
32KB, 546x689px
>>57438317
:>
>>
>>57454840
Can you explain how it works simply then ?
>>
>>57456571
They were world class in a couple Atari games but for some games it did worse than a retarded child could do.
>>
File: 312456789.png (143KB, 1805x1498px) Image search: [Google]
312456789.png
143KB, 1805x1498px
>>57455159
sure :^)
>>57458017
qt
>>
File: flappybirds.png (20KB, 548x585px) Image search: [Google]
flappybirds.png
20KB, 548x585px
the other 48 died right at the start

best couple
>>
>>57439022
It's overfitting to that specific level
>>
>>57457207
Left it running overnight and the webpage crashed in chrome with an out of memory error. Was hoping to get to generation 50,000 at least. Oh well.
>>
NEAT paper had a cool bar graph showing that they are better than reinforcement learning, therefore they must be the best
>>
File: Screenshot_20161110_105956.png (30KB, 513x648px) Image search: [Google]
Screenshot_20161110_105956.png
30KB, 513x648px
After 138 generations of inbreeding, we finally have some usable birds.
>>
>>57438317
What input data would be taken in as input nodes?
I'm thinking of the bird's position as the input data. What else?
>>
>>57461601
The pipes.
It only has one control and it needs to just guide itself between the gaps.
>>
>>57461723
Two input nodes. One or two hidden layers and one output.
Activation function Sigmoid and backward propagation as optimization method to get the weights?

I really like ML. Are there some easy problems I can try to solve with ML?
>>
File: smart_birb.png (97KB, 1023x1043px) Image search: [Google]
smart_birb.png
97KB, 1023x1043px
>>57438317
My gen 1 is still alive...
>>
>>57462097
fake and gay
>>
File: ok.png (549KB, 3200x1800px) Image search: [Google]
ok.png
549KB, 3200x1800px
>>57462136
>>
File: neuro.png (164KB, 572x1171px) Image search: [Google]
neuro.png
164KB, 572x1171px
>>57461083
Here's my overnight score
>>
>>57462321
btw, my trained ships all have a tendency to zip right into the bottom right corner immediately after spawning, then they stay around in that corner for a while

I noticed that trend happening very early (with the first few learnt iterations) and it simply hasn't stopped, 14000 generations later they still all end up in the bottom right corner after a second
>>
>>57456922
More or less. It's essentially a very general way of learning a task. If you know what your possible actions are and you can observe whether or not what you did improved things or made them worse, along with an understanding of what "state" you are currently in, then a reinforcement learning approach can work very well.
>>
>>57458346
DQNs aren't state of the art anymore. Policy Gradients generally work better. And the approaches they used for AlphaGo were even more complicated. I'm sure that if they reapplied all of the new state-of-the-art techniques, then they'd reach world-class in almost every game. But they have their sights set higher now. And no one else really cares to spend that much money investing in the infrastructure just to beat them in Atari games.
>>
Someone should try this with Street Fighter 3 3rd strike instead. Just make it not able to parry
>>
File: _20161111_101824.jpg (70KB, 897x921px) Image search: [Google]
_20161111_101824.jpg
70KB, 897x921px
>>
File: image.png (241KB, 499x499px) Image search: [Google]
image.png
241KB, 499x499px
Andriods still had trouble learning before I closed it.
>>
File: Oh my.png (19KB, 512x522px) Image search: [Google]
Oh my.png
19KB, 512x522px
Gen 39 cannot be stopped
>>
have we gone to far?
>>
File: Capture.png (21KB, 509x521px) Image search: [Google]
Capture.png
21KB, 509x521px
fuck
>>
How to fix asteroids:

Create a 4x4 grid around the ship, for each square in the grid that has a asteroid, the value is 1, otherwise 0 (you could be fancy and calculate how much intersection there is). Each grid square could be around ~24 pixels or so.

Anyway, that should be a better solution than the shitty raycast or the current system.
>>
File: Capture.png (284KB, 1461x502px) Image search: [Google]
Capture.png
284KB, 1461x502px
im going to leave them on this overnight
>>
>>57467627
don't bother, asteroids will basically never learn to last longer than a few seconds and flappy really quickly survives forever
>>
File: god.png (18KB, 473x491px) Image search: [Google]
god.png
18KB, 473x491px
HELP


I FEAR WHAT I HAVE UNLEASHED
>>
File: god.png (18KB, 485x497px) Image search: [Google]
god.png
18KB, 485x497px
o god he isn't stopping
>>
File: god.png (19KB, 479x493px) Image search: [Google]
god.png
19KB, 479x493px
2 spooky
>>
>>57467471
what about giving them a larger network? or would that just increase the training time?
>>
File: god.png (17KB, 483x499px) Image search: [Google]
god.png
17KB, 483x499px
>>
>>57467989
The current method is just shit, the size of the network is already good enough.
>>
File: asteroids.webm (2MB, 320x240px) Image search: [Google]
asteroids.webm
2MB, 320x240px
>>57467458
>>57467471
>>57467720
>>57467989
It should work though, I have the same network implementation
>>
File: ieshdv.png (17KB, 497x507px) Image search: [Google]
ieshdv.png
17KB, 497x507px
This is fucking sad
how are yours so good
>>
>>57468581
I'm on gen 111 and it's still garbage
>>
>>57468617
Scratch that, at generation 140 it just became amazing.
>>
File: npaoxr.png (21KB, 537x533px) Image search: [Google]
npaoxr.png
21KB, 537x533px
>>57468628
I switched to Chromium (from firefox) and this mother fucker went nuts
>>
>>57468581
>>57468617
>>57468628
>>57468712
It's random

the browser doesn't matter shit
>>
Really interesting how you can end up with such huge differences in learning ability
>>
>>57468772
But it does always get it in a short amount of time.
>>
>>57468502
How do you even decide on how big a network should be?
>>
>>57468772
It's because the population size is small so there's less diversity in the original population, decreasing the chance that a good solution will be generated accidently.
>>
This is so fucking cool, OP. Gen 10 going strong af
>>
>>57447143
>>57456360
Spotted the butthurt creationists.
Go learn a thing or two you retards. Evolution isn't a random walk.
Thread posts: 266
Thread images: 82


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.