Slightly modified the formula: the worst individual had "fitness" 0 in hte case of linear scaling with pressure=2. Now it has fitness 1/[P(P-1)/2]
Thanks to Gilles BAUDRILLARD (EADS)
This commit is contained in:
parent
0f8244e694
commit
45a2d08432
1 changed files with 2 additions and 2 deletions
|
|
@ -81,7 +81,7 @@ public:
|
|||
for (unsigned i=0; i<pSize; i++)
|
||||
{
|
||||
int which = lookfor(rank[i], _pop);
|
||||
value()[which] = alpha*(pSizeMinusOne-i)+beta;
|
||||
value()[which] = alpha*(pSize-i)+beta; // worst -> 1/[P(P-1)/2]
|
||||
}
|
||||
}
|
||||
else // exponent != 1
|
||||
|
|
@ -91,7 +91,7 @@ public:
|
|||
{
|
||||
int which = lookfor(rank[i], _pop);
|
||||
// value in in [0,1]
|
||||
double tmp = ((double)(pSizeMinusOne-i))/pSizeMinusOne;
|
||||
double tmp = ((double)(pSize-i))/pSize;
|
||||
// to the exponent, and back to [m,M]
|
||||
value()[which] = gamma*pow(tmp, exponent)+beta;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue