[galib] help with allele set bounds

Lorena Kreda lorena.kreda at REVEALIMAGING.com
Tue Mar 2 21:27:17 EST 2004


Hi,

Thanks for a terrific resource!

I'm using the Steady State GA with a GARealAlleleSetArray genome.

here is a code snippet from GARealGenome.cpp from GARealBlendCrossover():
[...]
      float lo = (GAMin(mom.gene(i), dad.gene(i))) - 0.5*dist;
      float hi = (GAMax(mom.gene(i), dad.gene(i))) + 0.5*dist;
      sis.gene(i, GARandomFloat(lo, hi));
      bro.gene(i, GARandomFloat(lo, hi));

[...]

In my experience, the above code allows sis.gene(i) and bro.gene(i) to 
take on values that are not within the defined allele set for these genes
because lo and hi are allowed to exceed the set bounds.

In my application, a particular gene is defined as an set [10,2000]. If 
mom and dad differ by 500, for example, and the min of mom and dad is 100, 
lo will be -250 and sis and bro have the potential to assign negative values 
to this gene, which are outside the defined range of [10, 2000].

I'm not sure of the best way to address this problem.

Is there an easy way to know the allele bounds in this subroutine?

Any suggestions would be much appreciated!

Lorena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20040302/0668a39c/attachment.htm


More information about the galib mailing list