Neural nets control snakes and evolve

Check out my project. The idea is that there are snakes like in the game Snake. Each is controlled by a neural network. They can reproduce. And thus eventually evolve. It's on my Github.

github.com/indjev99/Evolving-Snakes

I also made a reddit and a video:

reddit.com/r/programming/comments/70lxap/snakes_controlled_by_neural_networks_learnevolve/

Other urls found in this thread:

reddit.com/r/programming/comments/70lxap/snakes_controlled_by_neural_networks_learnevolve/dn4aw9z/
reddit.com/r/programming/comments/70lxap/snakes_controlled_by_neural_networks_learnevolve/dn4bge1/
youtube.com/watch?v=eQoa-uFyXFw
twitter.com/SFWRedditVideos

Nice screensaver, you're hired

I don't know if you heard, but neural networks is a meme.

>They can reproduce
Normie stuff

Lel.

oh look it's another fucking neural network made by undergrads again

What do you think about the Fucsia OS, Mr. Torvalds?

saw this on /sci/, have you made a video yet?

Can someone explain to a retard what neural network and machine learning is and if they are related?

>what neural network and machine learning is
let us know what you understood and what you didn't understand and we'll take it from there.

This pls.

Also how does your program run OP? Pls give step by step intro like X happens then Y then Z comes along to give A.... I am very interested. I don't know c++ and I don't have patience to watch video

Yeah I could have googled it but that's not the point.i want it in simple terms

it doesn't get much simpler than quora. if you don't understand something, tell us the bit that didn't make sense and we'll try to dumb it down further.

if you're not going to make any effort at all, don't expect us to bother either.

Yeah. It is linked in the reddit post.

OP here.

Basically a neural network is a set of neurons in layers. There is an input layer with senses like sight and such. The last layer is the output layer, it controls the actions of the snake. The middle layers are there for calculation purposes and don't directly do anything.

In between layers there are connections with different weights. These weights determine how the snake is going to react to different inputs. They are what we're trying to optimize.

And yes neural nets are related to machine learning.

> Also how does your program run OP? Pls give step by step intro like X happens then Y then Z comes along to give A.... I am very interested. I don't know c++ and I don't have patience to watch video

Really you should at least watch the first 1-2 minutes to see it. And I can't really explain all steps, but the just of it is:

1) For a particular snake collect the date for its senses. (See what it's going to see, how long its body is, stuff like that).

2) Forward propagate trough it neural network.

3) Decode the values of the output layer and apply the actions of the snake.

4) See if it collided with another snake, or ate a piece of food, or split into two and apply the results of that.

5) Repeat with the next snake.

If you want to ask more questions please do it in the reddit thread, though, because most of the discussion is there and that's where I check more often.

Thank you

Thanks. I went to that thread watched video and read the stuffs. Made a lot of things clear.

Can they eat niggers?

No problem.

fuck of

pretty nice thread. bump.

How do I into neural nets? I know C but I use it for numerical analysis only. What should I read to make a simple neural net in an hour?

Google it.

Fuck you. Ain't using search engine. Full of pajeets sucking dicks. I want an expert recommendation from op hime/her/itself because op seems to know his shit quite well.

OP was asked this two times on reddit. This is what he said:

reddit.com/r/programming/comments/70lxap/snakes_controlled_by_neural_networks_learnevolve/dn4aw9z/

reddit.com/r/programming/comments/70lxap/snakes_controlled_by_neural_networks_learnevolve/dn4bge1/

I see, pretty cool.

One thing I didn't catch while skimming is how do you input the food locations into the neural network?

OP here.

Well, the snake has several eyes, each of each sees in a straight line. It knows the distance to the nearest object and whether it is food or a snake/nothing. That is the only way in which it knows about the food.

That's cool, I figured something like that.
Do you have any further improvements planned?

great oc op, keep working hard and your dreams will come true!

how do they fuck

Yeah, colour vision, the snakes having the ability to produce sounds and hear them, refactoring a tiny bit of the code so it's more flexible, ability to expend more energy to boost (move faster), and something like a scoreboard which shows how long the snakes have been alive for.

>> tfw op is a pajeet

They don't.

Thanks!

>pajeet

M8, I am slav.

aw nigger that's boring. no genetics, no intelligent fitness function, no real goal. what's the point?

yeah neural nets, woo fancy, sure, but I'm gonna go ahead and say that's the worst possible way to use them.

apply yourself.

What does no genetics mean? The goal is to have the best possible snakes.

...

You need to comment your source code, even your header files don't have any documentation. Other than that, looks really good and look forward to playing around with it.

Yeah, I really do.

BTW for anyone who doesn't feel like going trough the reddit post:

youtube.com/watch?v=eQoa-uFyXFw