Evolved 2D Bipedal Walker

167 views
Skip to first unread message

Keith Nelson

unread,
May 23, 2012, 6:29:22 AM5/23/12
to shar...@googlegroups.com
Hello Colin,
    Here is the source code as referred to over on the Neat forum, a Novelty fitness system for the Evolved 2D Bipedal Walker.  I designed it to require minimum changes to SharpNeat, It is just a drop in replacement file for WalkerBox2dEvaluator.cs - the main addition being a new NoveltyKNN class. It does require removing the selective evaluator so previous genomes are re-evaluated for their novelty each generation. For those unfamiliar with the code: in the WalkerBox2dExperiment.cs/WalkerBox2dExperimentHyperNeat.cs files, CreateEvolutionAlgorithm method comment out SelectiveGenomeListEvaluator lines and set ea.Initialize to use innerEvaluator instead. Also be sure to set the population size down from the default 4000 (I found 150 worked well).

The main problem is saving (and viewing) the best found solution - The most novel solution does not mean it is the best solution. For the moment you have to save the best solution yourself.  Perhaps a possible future addition to SharpNeat is allowing the selection of any Alternative Fitness value to use for saving genomes on improvement, viewing the problem domain.

Regards,
Keith
WalkerBox2dEvaluator.cs

Keith Nelson

unread,
Jun 30, 2012, 7:17:29 AM6/30/12
to shar...@googlegroups.com
Hello Colin,
    After playing around with the walker code, I was consistently getting an blue screen system wide crash related to OpenGL drivers, but only after I viewed the walker or any other box2d "Problem Domain". This only seemed to happen on one machine out of the two I have access to, so may be driver specific. In any case, I finally managed to fix it by adding the following code to the Dispose methods of Box2dDomainView.Designer.cs and MainForm.Designer.cs:

if(disposing && (components != null))
{
   openGlControl.DestroyContexts();  // Cleanup OpenGL
   components.Dispose();
}

A StackOverlfow exception crashes the program if I change the Experiment name="Walker [Box2D] (HyperNEAT)" XML and set ActivationCppn to "CyclicFixedIters", and Activation to "Acyclic".  Not being very familiar with the hyperneat internals, I assume this is expected and an invalid configuration for Hyperneat?

Cheers,
Keith

Colin Green

unread,
Jul 1, 2012, 4:11:34 PM7/1/12
to shar...@googlegroups.com
Thanks Keith, I will fold the fixes and and novelty search class into the main source code and look into the stack overflow bug/issue when I next get chance. Are you seeing good walkers now with your novelty search?

Colin.

Keith Nelson

unread,
Jul 4, 2012, 4:53:48 AM7/4/12
to shar...@googlegroups.com

Novelty search certainly found plenty of perfeclty valid methods of locomotion, but nothing that I can yet report as walking like we would expect it to look.  So far I have tried evolving extra parameters for torso and leg density, lower leg friction and restitution, also played with adding applied torque as a extra behaviour to try and find energy efficient walkers.  There is quite a bit of knowledge over on the Box2d forums on constructing "Rag Dolls" (like this example), so going forward I may play with modifying the walker body structure and joints/motors based on some of the ideas coming from there, time permitting.

Thanks again for releasing this great library Colin, it has been fun experimenting with the code.

Keith.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages