generateOffspring {ecr} | R Documentation |
Helper functions for offspring generation
Description
Function mutate
expects a control object, a list of individuals, and a mutation
probability. The mutation operator registered in the control object is then applied
with the given probability to each individual.
Function recombinate
expects a control object, a list of individuals as well as
their fitness matrix and creates lambda
offspring individuals by recombining parents
from inds
. Which parents take place in the parent selection depends on
the parent.selector
registered in the control object.
Finally, function generateOffspring
is a wrapper for both recombinate
and mutate
. Both functions are applied subsequently to generate new individuals
by variation and mutation.
Usage
generateOffspring(control, inds, fitness, lambda, p.recomb = 0.7, p.mut = 0.1)
mutate(control, inds, p.mut = 0.1, slot = "mutate", ...)
recombinate(
control,
inds,
fitness,
lambda = length(inds),
p.recomb = 0.7,
slot = "recombine",
...
)
Arguments
control |
[ |
inds |
[ |
fitness |
[ |
lambda |
[ |
p.recomb |
[ |
p.mut |
[ |
slot |
[ |
... |
[any] |
Value
[list
] List of individuals.