Function PGASelectTournamentWithReplacement
Defined in File select.c
Function Documentation
-
static int PGASelectTournamentWithReplacement(PGAContext *ctx, int pop)
Choose N strings randomly and return the one with best evaluation.
Description
The configuration parameter N is the value set with
PGASetTournamentSize()
, the default is 2. The selection happens with replacement. This is a generalization of Goldbergs description [Gol89], for the generalization see, e.g. in Goldberg and Deb [GD91].Example
PGAContext *ctx, int l; ... l = PGASelectTournamentWithReplacement (ctx, PGA_OLDPOP);
- Parameters:
ctx – context variable
pop – symbolic constant of population to select from
- Returns:
index of the selected string