Neuroevolutionary Algorithms

This program uses neuroevolutionary algorithms to learn how to play Flappy Bird and Asteroids. I hit over a million points last night with only 42 levels. Feel free to try it out for yourself

We had a good thread before
Anyways here are the links:
xviniette.github.io/FlappyLearning/
xviniette.github.io/AsteroidsLearning/

Other urls found in this thread:

github.com/znoraka/asteroids
youtube.com/watch?v=qv6UVOQ0F44
twitter.com/ID_AA_Carmack/status/352192259418103809
twitter.com/NSFWRedditImage

Absolutely Cool!

teach it how to play dota next

asteroids is missing the max score

Man my birdie is a retard this time, last time I managed to get a perfect flight after only 3 generations, now I'm at 70 and still going.

How long does it take Asteroids to start getting good? I'm two thousand generations in and the ships still suck.

im at around 400,000 and it still it slightly dumb

Shit. How long did that take you?

around 3 1/2 days

I think that's because there is a lot of luck in the game. Doofus can suvive the longest time.

post webm

the algorithm is flawed for the ships. you're wasting electricity training it beyond ~300 gens. it won't improve from there.

i bet it will play better than autistic russians and peruvians

...

Dunno what implementation that is, but algorithm looks good

>github.io
what is this new meme

dont know know much about ai, how complex games can algorithms like these handle?

it is not a meme you dumbfuck, the gift you a domain with github.io at the end, and you use it, and that's that

It's pretty much the same implementation, I did it in c++ github.com/znoraka/asteroids

Probably anything where the data can be collected.
3D FPS games are possible too.

i wish we had mmorpgs with ai that actually gets better al the time

sounds cool, any links where i can learn more?

getting buttfucked by ai wouldn't make much of a game tho

I'm no expert, but I have read somewhere that it's easily possible.
Basically you need a way to collect the data of everything relevant (your own information and information about the environment)
The algorithm then does something random and when it dies, it checks how well it did in the run.
It then does another run that is similar to the first one, but has slightly different behaviour. If it did better than before, then it will try new things based on THAT result. If not, it will scrap the idea and try something new.
Because of that it will constantly improve by trying random new things and only keeping the good results.

So for something like this to work, you need information about what's happening and a way to find out whether it did good or bad (a score system).
In a FPS game it would sooner or later realise that it gets points for shooting at enemies, and does bad if it gets shot, so it will improve on that with random new actions to reach the best possible kill to death ratio.

i'm a stupid fuck, can this work on that bash on ubuntu on windows thing?

I honestly have no idea, sorry, but it is worth a try

Since when do MMORPGs have AI?

I wish I had proper Advance Wars AI.
So lonely ;_;

Dude, this thing basically became unstoppable after only gen 7.

actually it all depends how its allowed to evolve

He's still going, the absolute madman!

todays progress

poor green blobs, look so vulnerable and frightened

Holy shit, get to about generation 30 and it just quad-triples its score, and then it becomes a wizard.

tfw its better than me

It depends...

Pretty cool OP

There's actually a university trying to do that

It's in the workshop somewhere, look it up

When do we get AI gf's?

workin on it
how much should i charge for it?

Release it under gpl

you have an idea of how much $$$$$$$$$$$$$$$$$$$$$$$ & pussei you can get outta that?

You're targetting neet, you won't be able to make money with it.

Not reading through your source code could you briefly describe how it works?

I assume flappy birds is a simple enough game you can access it directly while
Dota has no simple api or easy way to grab the players state. I would assume you would have to process the screen with some computer vision and then make your machine learn what to do from that. Obviously a more computationally expensive task.

By the time AI will be able to hold coherent conversations it will be smart enough to know that you're no good for dating, user.

D-don't say that

My guy is going strong!

I think it's starcraft

Would be cool if the ships could be somewhat slower, so that the predictive intelligence could be tested. Also gravity of asteroids would be nice so we can check if the AI could learn something about Physics (indirect observable world rules)

It would make the game a hell lot more interesting.

What do you mean gravity of asteroids? I'm want to try to add inertia to the ships to see how the can handle it
Bonus: stats

>Dota has no simple api or easy way to grab the players state. I would assume you would have to process the screen with some computer vision and then make your machine learn what to do from that. Obviously a more computationally expensive task.
No it doesn't have to. A person well versed with cheatengine will be able to grab pretty much everything from the game and send movement and attack commands. Problem would be that you are more or less cheating at that point since you have more information than a human at that point.

jesus christ how horrifying

Not if I define it's fitness function to be how much they like me.

so is the neural network code only works on flappy bird and asteroids or can i use it on other things?

The network is not specialized for those games, you can use it on anything

holy shit. studying the code now. i'm too lazy to read books on AI but this might get me interested. Thanks!

This thread reminded me of this video.
youtube.com/watch?v=qv6UVOQ0F44

You could try StarCraf / StarCraft II. The latter has recently opened up a client API for the purposes of machine learning, and the former has already been the subject of machine learning projects in the past. (google “overmind”)

...

How do you increase the amount of birds like that?

You dl the repository and you hack into it.

...

>200 generations
>flappy bird still dumb as fuck

your CPU might just be retarded m8

I reduced the pip hole size from 120 to 90. It's hard for those poor little birds.

Try increasing the density of the pipes.

That's what I just did.

...

Amazing if true.

Quake3 didn't have self-learning AI

Then explain the pic.

either that guy modified his game / server, or he lied on the internet (would you believe people do that??)

He lied and you fell for it.

There's no logical reason why he would lie. I refuse to believe it.

My birds start to survive in very hard mode.

>explain the pic
>it's a Sup Forums thread
IHBT

inspect element on the x5 button in chrome, go to sources, game.js, and change this one line:

setTimeout(function(){
self.update();
}, 1000/FPS);

to 0 instead of 1000/FPS.

Much MUCH faster learning.

I'm at 30k in 2 minutes.

proof

64000 in 46 generations. Your birds are fucking dumb.

twitter.com/ID_AA_Carmack/status/352192259418103809

Does it seem like in Flappy Bird that the faster you go the slower they learn?

No. I don't think it's real time. It looks like it's scheduled on frames.

Still going strong