Hacker Newsnew | past | comments | ask | show | jobs | submit | rednuht's commentslogin

That's every time the legs switch places. Without that bonus, you'd get a lot of QWOP-ish individuals dragging one foot behind. :)


Thanks, I'll look into it!


The genome is represented by a set of parameters that control the rotation speed on each joint, 3 parameters per joint.

The rotation speed for each joint on each simulation step is given by:

  x * cos(y + z * simulation_steps);
where x, y, and z are the parameters. I've experimented with more sophisticated models, but it was hard to get any kind of evolution in the attention span people give to a browser game. :D


I've worked on similar projects during my Master's degree. An important trick I learned was to make the controller a function of some kind of discrete feedback in the world (e.g. when the foot hits the ground). In your equation above for example, a simple way to incorporate this would be to reset simulation_steps to zero every time a foot hits the ground.

This is also an important feature in the SIMBICON controller, which is arguably the simplest and most robust walker system. (http://www.cs.ubc.ca/~van/papers/Simbicon.htm)

EDIT: and yes, Reinforcement Learning is much more effective way of attacking this type of problem (e.g. see some recent work from Sergey Levine http://www.eecs.berkeley.edu/~svlevine/), but I also agree with the author that GA are fun :)


Good point!


It's quite hard to get any better than 10 or so steps, luck starts playing a major role after a while.

Some gait branches seem to reach a dead-end where any improvement would need to come from a major overhaul of the gene combination instead of small mutations.

The terrain starts to get more variation as the distance increases, so that's another piece of evil against the walkers. :D Maybe I should turn that off.

I've let it run for a couple of days. I don't think I got past 12 steps, but it looked pretty regular walking for a while. :)


I was thinking about writing something similar in C. How long is the genome( bytes/chars )?


The genome is pretty simple, just a few motor parameters for each joint in the body.

3 floats for each joint, to be precise. Then those are combined to set the speed of the motor in each joint on every simulation step.

I tried more complex genomes, but it just takes way too long to get any kind of improvement. It didn't make for a fun casual browser experience. :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: