Function PGAPairwiseBestReplacement

Function Documentation

void PGAPairwiseBestReplacement(PGAContext *ctx)

Perform pairwise best replacement.

Description

Compare individuals with same index in PGA_OLDPOP and PGA_NEWPOP and select the one with better evalutation. Note that we may not use the fitness here: Fitness from two different populations are uncompareable! This replacement strategy is used in evolutionary algorithms that modify a single individual and replace the parent if the offspring is better. A popular example is Differential Evolution (DE). After this populations are swapped (exchange of PGA_NEWPOP and PGA_OLDPOP) for further processing.

Example

PGAContext *ctx;

...
PGAPairwiseBestReplacement (ctx);

Parameters
  • ctx – context variable

Returns

None