Jumping, help

Hi,

I am trying to evolve a jumping creature, but I have some problems. I hope
you will be able to help me.

I want to try to get a creature which jumps and I don't care if it stays at
the same place or moves, as long as it jumps.

My first problem : Fitness. I tried to set a high value to "vertical
velocity", but when a creature jumps, it vertical velocity is not constant.
As a matter of fact, it should be something like sin(t). How is vertical
velocity evaluated? Is it an average? Is it possible to take max(vertical
velocity)?

Then, I can't get creatures that rally jumps. Their bodies oscillate
vertically, but they are never really jumping : There is not a single moment
where there is no part of the body touching the ground. Setting the vertical
position in the fitness does not help, as far as I tried.

After a while, evolution saturates, and my gene pool gets smaller and
smaller, every mutation creates a creature that already exists, and after
some hundreds M steps, I had only about 10 different genotype in my pool.
Why? I don't understand why there was no mutation that would modify the
number of body parts and so on...

Thank for the help

Samuel

### Re: Jumping, help

[...]
> I want to try to get a creature which jumps and I don't care if it stays
at
> the same place or moves, as long as it jumps.
>
> My first problem : Fitness. I tried to set a high value to "vertical
> velocity", but when a creature jumps, it vertical velocity is not
constant.
> As a matter of fact, it should be something like sin(t). How is vertical
> velocity evaluated? Is it an average? Is it possible to take max(vertical
> velocity)?

vertical velocity is the average value, sampled according to the
"performance sampling period".
you can't directly write "max(...)" in the fitness formula but it is
possible to calculate the maximum value by testing it each simulation step.
here is an example how to modify the standard experiment definition:

1.make a copy of the "standard.expdef" file and name if (for example)
"jumping.expdef" (in the "scripts" directory)

2.modify the following sections
- in the "onBorn" function, place
==============================
Creature.user1=0.0; // will be used to store the maximum velocity
==============================
after the line 111 ("Creature.energy=Creature.energ0;")

- insert the new function, for example after the "onBorn" function (line
122)
==============================
function onCreaturesStep(c)
{ // maintain the maximum vertical velocity
if (c.perf==1) // performance calculation enabled?
if (c.user1 < c.c_vertvelocity)
c.user1=c.c_vertvelocity;
}
===============================

- in the "updatePerformanceWithPopSize" function, insert
===============================
Creature.vertvel=Creature.user1; // use the maximum, not the average
===============================
in the begining, just after "{" (line 167)

3.now you can select the new experiment definition in framsticks (simulator
parameters/experiment). in this experiment, the "vertical velocity" in
fitness formula refers to the maximum vertical velocity achieved during