Function PGASetCrossoverProb

Function Documentation

void PGASetCrossoverProb(PGAContext *ctx, double p)

Set Probability that a selected string will undergo crossover.

Description

The default is 0.85.

Example

Make crossover happen infrequently.

PGAContext *ctx;

...
PGASetCrossoverProb (ctx, 0.001);

Parameters
  • ctx – context variable

  • p – the crossover probability

Returns

None