
Creatures avoiding planks - pavel_lishin
http://blog.otoro.net/2015/05/07/creatures-avoiding-planks/
======
devindotcom
Hilarious. I love generational learning like this (though I feel bad for the
entities).

My friend and I one night spent about 2 hours in front of my laptop live-
commentating the BreveCreatures screensaver, in which procedurally generated
polygonal creatures attempt to walk, and pass on patterns and configurations
to the next generation.

"Looks like we've got another flopper here. That might have flown a couple
generations ago but you know, we've been seeing some really effective writhing
lately."

"I totally agree. The bipedal taildraggers were a force to be reckoned with in
season 56, but — oh my god! Look at that one go!"

"Almost got as far as that three-legged galloper we saw just a few minutes
back. This is a heck of a race, my friend!"

For _hours_. We were drunk.

~~~
benten10
I would invest a bit to encourage you and your friend to put this on youtube.
: )

I bring this up because these things are really entertaining, and with a bit
of witty commentary and nice graphics, I would probably end up spending hours
watching these. Like all stories, you have to have an 'arc', themes, etc, but
these come later.

In college, I must have spent thousands of hours watching let's play for
SimCity and Minecraft. My friends were always amused how I enjoyed watching
the gameplays more than actually playing those games.

On the other hand, you don't need me at all.

Edited for clarity.

------
swk82
I've noticed that those who bunch together reproduce very well but the planks
sometimes form death traps killing the entire group. Some creatures are left
over but they seem to avoid each other; sometimes one creature is chasing the
other and they don't seem to reproduce very much.

Bunching and spreading out are two different behaviors which both have their
pros and cons. I wonder if the neural net is complex enough to enable them to
switch between these behaviors depending on the age and ability to reproduce.

~~~
sdrothrock
I wondered the same thing; I suppose it depends on how frequent those kinds of
mass extinction events are. You might end up with two species:

1\. The kinds that clump and are subject to rare mass extinctions, but get
along well enough otherwise.

2\. The kinds that are really good at avoiding converging obstacles by
avoiding clumps.

Edit: I just realized that the clumps are kind of a communication network and
eventually you might be able to get a kind of clump that either is able to
quickly evade converging obstacles or be self-sacrificing to save a part of
the whole.

~~~
hardmaru
I guess (1) or (2) would depend on the culture that gets evolved :)

------
ljk
pretty funny how sometimes the agents move away from the planks like in a "The
Prometheus School of Running Away From Things" fashion

~~~
crystalmeph
I liked how some of them would "impale" themselves on the end of a plank, like
they couldn't see it if it was pointed along their direction of travel.

~~~
yetihehe
It's probably because they have eight "sensing rays" and plank may be located
between them.

~~~
hardmaru
Yeah, I can make them have 16 but it slows things down esp on mobile phones.

------
cba9
Evolutionary algorithms may work ok here, but I have not seen any high-
performance ML tasks done with evolutionary training of neural networks in a
long time. It's all backprop and, increasingly, reinforcement learning these
days.

Have you ever looked at
[https://github.com/karpathy/reinforcejs](https://github.com/karpathy/reinforcejs)
? Karpathy already has demos similar to yours which you could build on. The
trained agents might be better.

~~~
hardmaru
Yeah reinforcement learning and policy gradients can possibly attack the same
problem.

Although for a simple task like this demo, I stand by simple conventional
neuroevolution as they would work best and are easy to train as the nets are
quite small.

~~~
cba9
> Although for a simple task like this demo, I stand by simple conventional
> neuroevolution as they would work best and are easy to train as the nets are
> quite small.

They may be easy to train but I'm not sure about 'work best'. Watching your
final trained agents, I see a lot of dumb obvious mistakes where the agent
runs right into a line; and I see little higher-level strategic planning like
trying to maximize free space around one or run away from a incoming line.

------
kuschku
I’m not sure why, but the page is completely unreadable:
[http://i.imgur.com/YgP34SE.png](http://i.imgur.com/YgP34SE.png)

And this is with Firefox, which usually renders fonts a bit fatter than
competing browsers.

~~~
anonred
Looks fine on my Mac:
[http://i.imgur.com/wxZAbgk.png](http://i.imgur.com/wxZAbgk.png)

~~~
kuschku
Well, you have 3.5 times as many pixels, of course fine fonts are readable
there.

~~~
hardmaru
Hi Kuschku

Can you let me know the resolution of your device? I'm trying to play around
with the CSS for blog.otoro.net, and trying to find a good balance for
different resolutions.

Thanks

