[galib] returning a really, really unfit gene
Peter Jay Salzman
p at dirac.org
Tue Dec 11 10:11:19 EST 2007
Hi all,
Suppose I have an objective function that gets the objective score from some
external place (here "f()"), like this:
double objective(GAGenome &g)
{
GARealGenome &genome = (GARealGenome &)g;
double objScore = f( g, badFlag, other stuff );
return objScore;
}
There's a boolean flag, badFlag, which indicates (for whatever reason) this
particular genome is bad. If badFlag is true, then the genome should find
it very difficult survive.
I'm fuzzy here. I think the relative survival rates are computed via:
obj score --scaling--> fitness score --selection--> new population
Is there some way of telling the scaling function to assign the lowest
possible fitness to a particular genome from within the objective function?
Is there some global variable that allows the objective and fitness
functions to communicate this kind of information?
Thanks!
Pete
--
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
Last night I dreamt of 09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
"A mathematician is a machine for converting coffee p at dirac.org
into theorems." -- Paul Erdös http://www.dirac.org
More information about the galib
mailing list