[ODE] My brainless virtual creatures

Pete Graves pete_graves at hotmail.com
Mon Apr 21 18:29:02 2003


I’ve seen a lot posted about virtual creatures recently, and thought share 
what I’ve done so far. It’s very basic compared with what else I’ve seen 
posted, but I hoped to get some comments and advice.

A genetic algorithm is used to evolve a set of parameters for the phase, 
offset, and amplitude of sine waves controlling motor velocity for each of 
the creature’s 4 legs (instead of evolving a neural net, which is probably 
much better). The fitness function measures the distance each creature 
travels from the start point within a set time.

I’m quite new to C++, and I’m still struggling with getting my head around 
the physics involved. I’ve uploaded a windows executable and source code at 
http://www.geocities.com/pete_gravesathotmail/

The best bits to look at are in Creature.cpp and Simulation.cpp. I haven’t 
yet had much luck with evolving successful locomotion – the best I’ve got is 
creatures evolved to throw themselves about.

I think I need to re-examine how I have chosen to cross-over chromosomes 
(single-point cross-over), which ends up just copying some legs from one 
parent, and some from the other, and trying it again.

Any advice will be very much appreciated! Especially from people using ODE 
for similar projects.

Pete.


_________________________________________________________________
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger