[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]

Neural nets control snakes and evolve.

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: 39
Thread images: 5

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.

https://github.com/indjev99/Evolving-Snakes

I also made a reddit and a video:

https://www.reddit.com/r/programming/comments/70lxap/snakes_controlled_by_neural_networks_learnevolve/
>>
Nice screensaver, you're hired
>>
>>62478805
I don't know if you heard, but neural networks is a meme.
>>
>>62478805
>They can reproduce
Normie stuff
>>
>>62478846
Lel.
>>
oh look it's another fucking neural network made by undergrads again
>>
>>62479081
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?
>>
>>62479326
>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.
>>
>>62479326
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
>>
>>62479345
Yeah I could have googled it but that's not the point.i want it in simple terms
>>
>>62479476
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.
>>
>>62479286
Yeah. It is linked in the reddit post.
>>
>>62479326
>>62479326
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.
>>
>>62480346
Thank you
>>
>>62480346
Thanks. I went to that thread watched video and read the stuffs. Made a lot of things clear.
>>
>>62478805
Can they eat niggers?
>>
>>62481039
>>62480546
No problem.
>>
>>62481339
fuck of
>>
File: 1441487061472.gif (998KB, 300x300px) Image search: [Google]
1441487061472.gif
998KB, 300x300px
pretty nice thread. bump.
>>
>>62481344
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?
>>
>>62481417
Google it.
>>
>>62481436
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.
>>
>>62481482
OP was asked this two times on reddit. This is what he said:

https://www.reddit.com/r/programming/comments/70lxap/snakes_controlled_by_neural_networks_learnevolve/dn4aw9z/

https://www.reddit.com/r/programming/comments/70lxap/snakes_controlled_by_neural_networks_learnevolve/dn4bge1/
>>
>>62480222
I see, pretty cool.

One thing I didn't catch while skimming is how do you input the food locations into the neural network?
>>
>>62481772
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.
>>
>>62481854
That's cool, I figured something like that.
Do you have any further improvements planned?
>>
>>62478805
great oc op, keep working hard and your dreams will come true!
>>
>>62478805

how do they fuck
>>
>>62482335
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.
>>
File: 1504039370772.png (100KB, 300x200px) Image search: [Google]
1504039370772.png
100KB, 300x200px
>>62481482
>> tfw op is a pajeet
>>
>>62482775
They don't.

>>62482723
Thanks!
>>
>>62482842
>pajeet

M8, I am slav.
>>
>>62482859

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.
>>
>>62482989
What does no genetics mean? The goal is to have the best possible snakes.
>>
File: no step on snek.jpg (16KB, 480x360px) Image search: [Google]
no step on snek.jpg
16KB, 480x360px
>>
>>62478805
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.
>>
>>62483810
Yeah, I really do.

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

https://www.youtube.com/watch?v=eQoa-uFyXFw
Thread posts: 39
Thread images: 5


[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.