func1
(expr1
) with a random subtree of
func2
(expr2
) and return the resulting function (expression), i.e.
the modified func1
(expr1
).
crossoverexpr
handles crossover of expressions instead of functions.
crossoverexprFast
is a fast (i.e. implemented in efficient C code)
albeit less flexible variant of crossoverexpr
.
crossoverTyped
and crossoverexprTyped
only exchage replace subtress
if the sTypes of their root nodes match.
crossoverTwoPoint
is a variant of crossover
that swaps subtrees
at uniform randomly selected points and returns both children.
crossoverexprTwoPoint
works analogously for expressions.
crossover(func1, func2, crossoverprob = 0.1, breedingFitness = function(individual) TRUE, breedingTries = 50)
crossoverexpr(expr1, expr2, crossoverprob)
crossoverexprFast(expr1, expr2)
crossoverexprTwoPoint(expr1, expr2)
crossoverTyped(func1, func2, crossoverprob = 0.1, breedingFitness = function(individual) TRUE, breedingTries = 50)
crossoverexprTyped(expr1, expr2, crossoverprob)
geneticProgramming
for details.c("recombinationOperator", "function")
.