Function PGARestrictedTournamentReplacement
Defined in File pop.c
Function Documentation
-
void PGARestrictedTournamentReplacement(PGAContext *ctx)
Perform restricted tournament replacement.
Description
For each individual in
PGA_NEWPOP
we select a window of individuals fromPGA_OLDPOP
, find the one genetically most like the new candidate and replace the individual if the new candidate has better evalutation. Note that we may not use the fitness here: Fitness from two different populations are uncompareable! After this populations are swapped (exchange ofPGA_NEWPOP
andPGA_OLDPOP
) for further processing.Example
PGAContext *ctx; ... PGARestrictedTournamentReplacement (ctx);
- Parameters:
ctx – context variable
- Returns:
None