TRSCustomGeneticComponent.Reproduce(TRSIndividual,TRSIndividual,TRSIndividual) Method |
Scroll Prev Top Next More |
The Reproduce method takes the two Parents and "mates" them to create the new Children. The Child parameters must exist but all of their information will be overwritten by the Parents. The New Child is copied from its first parent and then Crossover, Mutate, and Invert are called according to the Operations property and the respective probability of the operation. Finally, an OnReproduction event occurs.
The Evolve method calls the Reproduce methods.
Namespace: RSGeneticBase
Delphi |
public |
Parameters
Parent1
Type: TRSIndividual
Parent2
Type: TRSIndividual
Child1
Type: TRSIndividual
Type: Boolean
This example goes through the population, which is current a copy of the PreviousGeneration, selects parents and reproduces them:
|