Description Usage Arguments Details Value
Replace a random subtree of 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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)
|
expr1 |
The first parent R expression. |
func1 |
The first parent R function. |
expr2 |
The second parent R expression. |
func2 |
The second parent R function. |
crossoverprob |
The probability of crossover at each node of the first parent function (expression). |
breedingFitness |
A breeding function. See the documentation for
|
breedingTries |
The number of breeding steps. |
All RGP recombination operators operating on functions have the S3 class
c("recombinationOperator", "function").
The child function (expression) or functions (expressions).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.