The Crossover object that encapsulates the crossover operation and its configuration in the evolutionary algorithm.
More...
The Crossover object that encapsulates the crossover operation and its configuration in the evolutionary algorithm.
◆ CrossoverFunction_Multipoint()
void Grail.Evolution.Crossover.CrossoverFunction_Multipoint |
( |
Individual |
individual1, |
|
|
Individual |
individual2, |
|
|
int |
length |
|
) |
| |
|
inlineprotected |
Implementation of the standard k-point (multi-point) crossover operation.
- Parameters
-
individual1 | The first parent to produce offspring. |
individual2 | The second parent to produce offspring. |
◆ CrossoverFunction_Onepoint()
void Grail.Evolution.Crossover.CrossoverFunction_Onepoint |
( |
Individual |
individual1, |
|
|
Individual |
individual2 |
|
) |
| |
|
inlineprotected |
Implementation of the standard one-point crossover operation.
- Parameters
-
individual1 | The first parent to produce offspring. |
individual2 | The second parent to produce offspring. |
◆ CrossoverIndividuals()
virtual void Grail.Evolution.Crossover.CrossoverIndividuals |
( |
Individual |
individual1, |
|
|
Individual |
individual2 |
|
) |
| |
|
inlineprotectedvirtual |
The function that performs a single crossover operation between two individuals. The offspring is added to PopulationAfter.
- Parameters
-
individual1 | The first parent to produce offspring. |
individual2 | The second parent to produce offspring. |
◆ Perform()
void Grail.Evolution.Crossover.Perform |
( |
in List< Individual > |
constInputPopulation | ) |
|
|
inline |
The function that performs the crossover phase.
- Parameters
-
constInputPopulation | The population containing individuals that are candidates for the crossover. This population should not be changed. Instead add the results to PopulationAfter.
Please note that the crossover might not choose all individuals depending on its configuration. |
◆ CrossoverIndividualRate
double Grail.Evolution.Crossover.CrossoverIndividualRate = 1.0 |
|
getset |
The average rate of the crossover. The expected number of children is: PopulationSize*CrossoverIndividualRate
.
◆ CrossoverPhaseRate
The probability of a crossover phase to happen (globally). If a crossover is included in the algorithm, this value should most likely be equal to 1.0
.
◆ CrossoverSelectionType
Predefined ways in which individuals are selected from the population for crossover. Please refer to enum values for details about each of them.
◆ PopulationAfter
List<Individual> Grail.Evolution.Crossover.PopulationAfter = 0.3 |
|
getset |
The population of children, i.e., after the crossover operation has been performed.
◆ PseudoRouletteRandomPortion
double Grail.Evolution.Crossover.PseudoRouletteRandomPortion = 0.45 |
|
getset |
Used only with PseudoRoulette.
This method selects PseudoRouletteRandomPortion*100% of individuals at random and (1-PseudoRouletteRandomPortion)*100% according to roulette.
The documentation for this class was generated from the following file:
- GrailEvolution/source/Crossover.cs