Crossover
In genetic algorithms and evolutionary computation, crossover, also called recombination, is a genetic operator used to combine the genetic information of two parents to generate new offspring.
Recombination Interface
All recombination operations have following call interface: recombination(i1, i2)
where i1
and i2
are the same type individuals that involved in recombination to produce an offspring. The recombination function returns pair of recombined individuals.
Note: Some of the selection algorithms implemented as function closures, in order to provide additional parameters for the specified above recombination interface.
Operations
List of the ES strategy recombination operations:
Evolutionary.average
— Methodaverage(ss::Vector{<:AbstractStrategy})
Returns the average value of the mutation parameter $\sigma$ of strategies ss
.
List of the ES population recombination operations:
Evolutionary.average
— Methodaverage(population)
Returns an one offspring individual of a multi-parent recombination by averaging population
.
Evolutionary.marriage
— Functionmarriage(population)
Returns an one offspring individual of a multi-parent recombination by random copying from population
.
Binary crossovers:
Evolutionary.singlepoint
— Functionsinglepoint(v1, v2)
Single point crossover between v1
and v2
individuals.
Evolutionary.twopoint
— Functiontwopoint(v1, v2)
Two point crossover between v1
and v2
individuals.
Evolutionary.uniform
— Functionuniform(v1, v2)
Uniform crossover between v1
and v2
individuals.
uniform(r = 1.0)
Returns an in-place real valued mutation function that performs the uniform distributed mutation [1].
The mutation operator randomly chooses a number $z$ in from the uniform distribution on the interval $[-r,r]$, the mutation range. The mutated individual is given by
- $x_i^\prime = x_i + z_i$
Evolutionary.uniformbin
— Functionuniformbin(Cr::Real=0.5)
Returns a uniform (binomial) crossover function, see Recombination Interface, function with the propbabilty Cr
[2].
The crossover probability value must be in unit interval, $Cr \in [0,1]$.
Evolutionary.exponential
— Functionexponential(Cr::Real=0.5)
Returns an exponential crossover function, see Recombination Interface, function with the propbabilty Cr
[2].
The crossover probability value must be in unit interval, $Cr \in [0,1]$.
Real valued crossovers:
Base.identity
— Functionidentity(v1, v2)
Returns the same parameter individuals v1
and v2
as an offspring pair.
Evolutionary.discrete
— Functiondiscrete(v1, v2)
Returs a randomly assembled offspring and its inverse from the elements of parents v1
and v2
.
Evolutionary.waverage
— FunctionWeighted arithmetic mean recombination
Evolutionary.intermediate
— Functionintermediate(d::Real=0.0)
Returns an extended intermediate recombination operation, see Recombination Interface, which generates offspring u
and v
as
- $u_i = x_i + \alpha_i (y_i - x_i)$
- $v_i = y_i + \alpha_i (x_i - y_i)$
where $\alpha_i$ is chosen uniform randomly in the interval $[-d;d+1]$.
Evolutionary.line
— Functionline(d::Real=0.0)
Returns a extended line recombination operation, see Recombination Interface, which generates offspring u
and v
as
- $u_i = x_i + \alpha (y_i - x_i)$
- $v_i = y_i + \alpha (x_i - y_i)$
where $\alpha$ is chosen uniform randomly in the interval $[-d;d+1]$.
Evolutionary.HX
— FunctionHX(x, y)
Heuristic crossover (HX) recombination operation[3] generates offspring u
and v
as
- $u = x + r (x - y)$
- $v = y + r (y - x)$
where $r$ is chosen uniform randomly in the interval $[0;1)$.
Evolutionary.LX
— FunctionLX(μ::Real = 0.0, b::Real = 0.2)
Returns a Laplace crossover (LX) recombination operation[4], see Recombination Interface.
Evolutionary.MILX
— FunctionMILX(μ::Real = 0.0, b_real::Real = 0.15, b_int::Real = 0.35)
Returns a mixed integer Laplace crossover (MI-LX) recombination operation[5], see Recombination Interface.
Permutation crossovers:
Evolutionary.PMX
— FunctionPartially mapped crossover
Evolutionary.OX1
— FunctionOrder crossover
Evolutionary.CX
— FunctionCycle crossover
Evolutionary.OX2
— FunctionOrder-based crossover
Evolutionary.POS
— FunctionPosition-based crossover
Tree (expression) crossovers:
Evolutionary.crosstree
— Functioncrosstree(t1::Expr, t2::Expr)
Perform an arbitrary subtree swap between the expressions t1
and t2
.
References
- 1H. Mühlenbein, D. Schlierkamp-Voosen, "Predictive Models for the Breeder Genetic Algorithm: I. Continuous Parameter Optimization". Evolutionary Computation, 1 (1), pp. 25-49, 1993.
- 2K. V. Price and R. M. Storn and J. A. Lampinen, "Differential evolution: A practical approach to global optimization", Springer, 2005.
- 3Z. Michalewicz, T. Logan, S. Swaminathan. "Evolutionary operators for continuous convex parameter spaces." Proceedings of the 3rd Annual conference on Evolutionary Programming, 1994.
- 4K. Deep, M. Thakur, "A new crossover operator for real coded genetic algorithms", Applied Mathematics and Computation 188, 2007, 895–912
- 5K. Deep, K. P. Singh, M. L. Kansal, and C. Mohan, "A real coded genetic algorithm for solving integer and mixed integer optimization problems.", Appl. Math. Comput. 212, 505-518, 2009