Allele and random initial population

Fajian Shi shifj at electron.lbl.gov
Thu Jul 22 21:11:58 EDT 1999


Hi,

I am asking for help for two related problems:

First, I want to generate random initial populations. So I use 
AlleleSetArray with a range [a,b] and hope to get random values within the
range. But I only get value equal to a. Here is the program.

    GAAlleleSetArray<float> posAlleleSet;
 
    for(i=0;i<14;i++)
    posAlleleSet.add(-2.0,2.0);
   
    for(i=0;i<14;i++)
    posAlleleSet.add(0,7);

    LEEDGenome genome(posAlleleSet,Objective);

Here LEEDGenome is a defined genome by myself, which is not very different
from GAGenome. I don't know why I got all -2.0's and 0.0's. 

Second, I try to run the exemple file ex21 which include  5 different
test on Allele. The first one is finished very soon. But the second one 
seems to enter a dead loop without any output in 30 minutes. 

By the way, all programs are run in Cray machine. 

Fajian Shi
Lawrence Berkeley National Laboratory
Berkeley, CA 94720 






More information about the galib mailing list