Hide Comments
Hide Comments

Comments (0)

Controls the likelihood that a child's chromosomes will be mutated.

For genetic algorithms, this is the likelihood that each bit of a child's chromosome will be mutated (flipped) between 0 (no chance) and 1 (always). When 2 parents reproduce and create a new child, their chromosomes are combined using Crossover and then the child's chromosome may be mutated. Because this probability is used for each bit of a child's chromosome, its value should be set very low (like 0.01). As a general rule, the probability that a chromosome will be flipped should be no more than 1 bit per individual. Any more bits flipping will keep the genetic algorithms from finding a solution.

For genetic programs, this is the likelihood that one mutation will occur in the genetic program tree, so its value should be higher than for genetic algorithms. Genetic programming has a whole suite of mutations (subtree, point, constant, etc) that can occur; which mutation occurs depends on their MutationWeights.
The    Operations property controls whether mutation occurs at all during evolution.

Namespace: RSGeneticBase



  property MutationProbability: TGAProbability read FMutationProbability write SetMutationProbability stored IsMutationProbabilityStored;

Property Value

Type: TGAProbability


The following code modifies a child based on CrossOver, Mutation, and Inversion:


function TRSCustomGeneticComponent.DoReproduce(const Parent1, Parent2,
   Child: TRSIndividual): Boolean;
   // return true if any of the genetic operations besides initialize child occured
   result := False;
   InitializeChild(Parent1, Parent2, Child);
   // crossover
   if goCrossover in Operations then
     result := Crossover(Parent1, Parent2, Child);
   // mutate
   if goMutate in Operations then
     result := Mutate(Child) or result;
   // invert
   if goInvert in Operations then
     result := Invert(Child) or result;

expandingSee Also

Comments (0)