Submitted by Eric Muirhead on Fri, 2003-08-29 04:59
Hey all, just got bit by the Framstick bug. I forked over the $45 for the
upgrade :)
I'll start with my first noobie question.
Does the Fitness parameter for Distance measure the distance from the
starting point (as the crow flies), or the over all distance traveled
(mileage)?
Thanks in advance
Forums:
Re: Hello all! another noobie to kick around.
> Does the Fitness parameter for Distance measure the distance from the
> starting point (as the crow flies), or the over all distance traveled
> (mileage)?
Also, make sure you read
http://www.framsticks.com/a/al_params.html#exper
Section on "Experiment: Populations: ".
MacKo
Re: Hello all! another noobie to kick around.
Thanks MacKo,
Am I correct in assuming you are one of the developers?
If so, I just want to thank you for developing something I've been longing
for for a long time. A simulated evoluton lab for the people. An educational
toy for those curious about natural sciences.
Also, do you know of anyone producing something like this for just neural
networks and AI?
"Maciej Komosinski" wrote in message
news:bitunk$o2k$1@cancer.cs.put.poznan.pl...
> > Does the Fitness parameter for Distance measure the distance from the
> > starting point (as the crow flies), or the over all distance traveled
> > (mileage)?
>
> Also, make sure you read
>
> http://www.framsticks.com/a/al_params.html#exper
>
> Section on "Experiment: Populations: ".
>
>
>
> MacKo
>
Re: Hello all! another noobie to kick around.
> If so, I just want to thank you for developing something I've been longing
> for for a long time. A simulated evoluton lab for the people. An educational
> toy for those curious about natural sciences.
That is our goal...
Stay tuned for the Framsticks Theater :-)
> Also, do you know of anyone producing something like this for just neural
> networks and AI?
No, sorry.
MacKo
Re: Hello all! another noobie to kick around.
> Does the Fitness parameter for Distance measure the distance from the
> starting point (as the crow flies), or the over all distance traveled
> (mileage)?
usually it is the mileage but "your mileage may vary" ;-)
the distance calculation depends on the "performance sampling period"
parameter (experiment -> populations -> creatures).
it defines how often the distance is updated during the creature's lifetime.
the default sampling period is low. effectively, the distance is
calculated from many short segments. lowering the sampling parameter
increases the influence of small vibrations on the overall distance (it
may be useful sometimes).
on the other hand, if the sampling period exceeds the creature's
lifespan the distance will be caluculated from two points only - just
the straight line from the starting position.
sz.
Re: Hello all! another noobie to kick around.
Very cool. Thx :)
I was wondering why selecting for distance was resulting in critters
that walked in circles. Now it makes sence.
I was looking to select for distance from starting point to really try
and get the best travelers. I will try your selection.
Szymon Ulatowski wrote:
>> Does the Fitness parameter for Distance measure the distance from the
>> starting point (as the crow flies), or the over all distance traveled
>> (mileage)?
>
>
> usually it is the mileage but "your mileage may vary" ;-)
>
> the distance calculation depends on the "performance sampling period"
> parameter (experiment -> populations -> creatures).
> it defines how often the distance is updated during the creature's
> lifetime.
> the default sampling period is low. effectively, the distance is
> calculated from many short segments. lowering the sampling parameter
> increases the influence of small vibrations on the overall distance (it
> may be useful sometimes).
> on the other hand, if the sampling period exceeds the creature's
> lifespan the distance will be caluculated from two points only - just
> the straight line from the starting position.
>
> sz.
>
Re: Hello all! another noobie to kick around.
Looking only at the position of dying would jeopardize the frams that
actually manage to make a large full turn.
To get the greatest actual distance your fram managed to get away from its
location of birth at any point in its life you need to tweak the 'onborn'
method to store the location in the user-fields, and the 'onstep' function
to calculate the distance on every step, and store any improvement.
Also, the score calculation method must be adapted to take the maximum
recorded distance into account.
Alternative to using three user fields to keep the coordinates of birth, you
can also choose to let birth occur at the same location every time.
I admit I never managed to get all this done, though. My attempts failed
into all kinds of errors. I read some example in a recent post about setting
the user fields, but I cannot find it anymore.
Frans Verbaas
"Eric Muirhead" schreef in bericht
news:biok96$gpl$1@cancer.cs.put.poznan.pl...
> Very cool. Thx :)
>
> I was wondering why selecting for distance was resulting in critters
> that walked in circles. Now it makes sence.
>
> I was looking to select for distance from starting point to really try
> and get the best travelers. I will try your selection.
>
>
> Szymon Ulatowski wrote:
> >> Does the Fitness parameter for Distance measure the distance from the
> >> starting point (as the crow flies), or the over all distance traveled
> >> (mileage)?
> >
> >
> > usually it is the mileage but "your mileage may vary" ;-)
> >
> > the distance calculation depends on the "performance sampling period"
> > parameter (experiment -> populations -> creatures).
> > it defines how often the distance is updated during the creature's
> > lifetime.
> > the default sampling period is low. effectively, the distance is
> > calculated from many short segments. lowering the sampling parameter
> > increases the influence of small vibrations on the overall distance (it
> > may be useful sometimes).
> > on the other hand, if the sampling period exceeds the creature's
> > lifespan the distance will be caluculated from two points only - just
> > the straight line from the starting position.
> >
> > sz.
> >
>
Re: Hello all! another noobie to kick around.
[...]
> To get the greatest actual distance your fram managed to get away from its
> location of birth at any point in its life you need to tweak the 'onborn'
> method to store the location in the user-fields, and the 'onstep' function
> to calculate the distance on every step, and store any improvement.
> Also, the score calculation method must be adapted to take the maximum
> recorded distance into account.
>
> Alternative to using three user fields to keep the coordinates of birth, you
> can also choose to let birth occur at the same location every time.
right, it would simplify the whole thing.
setting the coordinates is quite easy.
the only problem is the birth position is not always the calculation
starting point (because of the "wait for freeze" option).
> I admit I never managed to get all this done, though. My attempts failed
> into all kinds of errors. I read some example in a recent post about setting
> the user fields, but I cannot find it anymore.
looks like the following should work:
(copy the standard.expdef file and modify it)
onBorn function - add somewhere at the end:
Creature.user1=Creature.center_x;
Creature.user2=Creature.center_y;
// only 2 coordinates - there are only 3 user fields
// and i was to lazy to use the array object here...
Creature.user3=0.0; // current maxdistance
add the new function:
function onCreaturesStep(cr)
{ // calculate the current distance
var dx=cr.user1-cr.center_x;
var dy=cr.user2-cr.center_y;
var d=Math.sqrt(dx*dx+dy*dy);
if (d>cr.user3) cr.user3=d;
}
change the genotype performance update function:
function updatePerformanceWithPopSize()
{
GenotypeLibrary.genotype=GenotypeLibrary.findGenotypeForCreature();
if (GenotypeLibrary.genotype<0) // not found in gene pool
{
GenotypeLibrary.getFromCreature();
Genotype.num=0; // 0 = it will be filled automatically
GenotypeLibrary.copyGenotype(0);
Genotype.popsiz=0;
Genotype.user3=0.0; // initial "maxdistance" for the new genotype
}
Genotype.user3=(Genotype.user3*Genotype.popsiz)+Creature.user3;
// update "maxdistance" for the genotype
GenotypeLibrary.addPerformanceFromCreature();
}
...and now the Genotype.user3 field will be calculated as the maximum
distance from the starting point (it can be used in the fitness formula).
(i know this solution is not quite correct, it is 2d only and doesn't
handle the "wait for freeze" feature, but maybe it will be useful for
someone?)
sz.
Re: Hello all! another noobie to kick around.
Thanks Frans,
I see how that would work now. I've just gotten into framsticks a couple of
days ago and have yet to figure out user fields. But you've given me a
direction to work twards.
"Frans Verbaas" wrote in message
news:bitsv3$o2e$1@cancer.cs.put.poznan.pl...
> Looking only at the position of dying would jeopardize the frams that
> actually manage to make a large full turn.
>
> To get the greatest actual distance your fram managed to get away from its
> location of birth at any point in its life you need to tweak the 'onborn'
> method to store the location in the user-fields, and the 'onstep' function
> to calculate the distance on every step, and store any improvement.
> Also, the score calculation method must be adapted to take the maximum
> recorded distance into account.
>
> Alternative to using three user fields to keep the coordinates of birth,
you
> can also choose to let birth occur at the same location every time.
>
> I admit I never managed to get all this done, though. My attempts failed
> into all kinds of errors. I read some example in a recent post about
setting
> the user fields, but I cannot find it anymore.
>
> Frans Verbaas
Re: Hello all! another noobie to kick around.
And I guess ill post my first Evolutionary Oddity
"Jack's beanstalk"
(C(,WX[Ch], RRAX[ChMux, 2:-1.763][@, 1:-2.292, p:1,p:1](mWX[Ch],
FW(RAfAfX[ChMux, 2:1.474, -4:4.247][@, 1:-7.348, p:1]rX[S](XX)), )),
Xl((AX(X[@, 1:4.019, p:1, p:1,p:1][S], )), ,X))