[galib] how to inital a population
LarryZhang
larryzzl at sohu.com
Tue Jul 20 04:29:19 EDT 2004
Hello all
I have some problem with initial the population. The thing is I want
to set the initial population manually. For example, I use the GaRealGenome
and I set the pop number to 4. And I have 3 variables to be optimized. But I
want the initial population is just like this:
40 60 2
35 63 3
42 59 2.5
37 55 1.5
Now I know I can use the
ga.initializer(myInitializer)
to initial the population manually. But I don't know how to write the
myInitializer. Can anybody give me some examples about this?
Maybe it will just like:
void myInitializer(GAGenome(//or GAPopulation, I don't know//) & p)
{
.........
}
Thanks a lot.
=============================
Larry Zhang
ECNU Radiophysics Dept.
Sunny Every Day
^_^
=============================
More information about the galib
mailing list