[ODE] Reseting World Params

Rob Leclerc leclerc at cpsc.ucalgary.ca
Mon Apr 14 15:55:02 2003


1) Not sure which solver I am using. I am just using the standard
vanilla package. I did a search in the ODE directory for JOINT to try
and find the #define but I didn't come across anything. As well, I did a
search on just "rand" and didn't find any active code.

2) I found the other FAQ, (Not the one in the user manual) and went
through the checklist -- none of it seems to apply. The only data I save
is the neural network and each creature is loaded with the same initial:
body shape, position etc. This was why I thought it would be sufficient
to simply destroy the bodies, geometries (Except the ground), and
joints, and then recreate them. That is, I have one function called
"reset()" that gets called, *both* for the first creature, and then for
every additional creature created after that and I simply destroy all
the bodies in between each round. Again, I am setting precision pretty
high for output and I don't think this is the problem.

3) Basically, I should get identical behavior for every member in the
population if I don't increment to the new set of NN weights in the
population and just use the previous one, but I don't get the same
behavior. Hence, I am seeing this as some values not getting reset when
I just recreate the bodies, joints, and geometries. 

4) The only random numbers I use is on the mutation of the neural
network. Thus, reloading the same NN over and over again should just
replay the same behvior.

5) Maybe someone should put a link to the FAQ on the user manual FAQ,
since I had trouble finding it, and it didn't show up with searches like
"ODE FAQ physics engine". I just assumed that the FAQ was the one in the
user manual.

Any other guesses?

Since this code works "well enough" I thought I would put a link to some
Virtual Creature source code. Version 1 at least. It is nice and compact
(Only two files) and fairly simple: just compile and run (No args). View
the README file for instructions on how to load one of the files that
gets saved. Oh, and make a "./data" directory where the files runs so it
can save output somewhere (Best so far, and at every generation).
Although saved creatures won't have identical fitness when rerun, the
overall behavior should be close enough. 

www.cpsc.ucalgary.ca/~leclerc/VirtualCreat_v1.0.zip

Thanks,
RDL



-----Original Message-----
From: ode-admin@q12.org [mailto:ode-admin@q12.org] On Behalf Of David
Whittaker
Sent: Monday, April 14, 2003 3:07 PM
To: ode@q12.org
Subject: Re: [ODE] Reseting World Params

Would you happen to be using the iterative solver?  If so, comment out
#define RANDOMIZE_JOINT_ORDER
(I think that's what I called it... it's close anyway.)

If not, are you trying to save the initial state of the system or it's
state after it has moved?  If it's the initial setup, and your code sets
up the system the same way it was set up the first time, then you should
have the same behavior.  If you're trying to save the state after the
system has begun moving (or even just one step), you need to save every
parameter you set in the setup code, plus all of the bodies' current
linear and angular velocities.

The list of state that you save should include body position,
orientation,
mass, dimensions, and joint velocity and fmax.  Include body velocity
(linear and angular) in that list if it's not 0 when you save it.  I
don't
know if it's been proven or not, but it's possible that the order the
joints are created in matters (position in system matrix changes, might
give you a different mix of round-off errors).  It definitely matters in
my iterative solver, without RANDOMIZE_JOINT_ORDER defined.  Body order
shouldn't matter though.

David

> I was wondering what I need to know about resetting world parameters.
> Basically, I am evolving a virtual creature, but when I save it, and
> reload it later, I am unable to reproduce the behavior of the saved
> individual exactly.
>
> Since I didn't see any reset functions for bodies, geometries, or
> joints, I just destroy and recreate them for each individual. I was
> hoping that that would take care of everything but it looks like there
> are some artifacts that remain. I am using double precision, and have
> high precision set when out I output to a file. Does anyone have any
> ideas what this could be? Are there any parameters, say in the
planeGeom
> that need to be reset? Any other dynamics that I might not know about?
>
> I had the same problems with Vortex at one point, as there were
certain
> values that weren't getting cleared with the reset functions.
>
> Best,
> RDL
>
>
> ============================
> Rob Leclerc
> University of Calgary
> Department of Computer Science
> Office: ICT 728
> =============================
>
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode



_______________________________________________
ODE mailing list
ODE@q12.org
http://q12.org/mailman/listinfo/ode