generateOffspring {ecr}R Documentation

Helper functions for offspring generation


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.


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", ...)



Control object.


List of individuals.


Matrix of fitness values (each column contains the fitness value(s) of one individual).


Number of individuals generated in each generation.


Probability of two parents to perform crossover. Default is 0.7.


Probability to apply mutation to a child. Default is 0.1.


The slot of the control object which contains the registered operator to use. Default is “mutate” for mutate and “recombine” for recombinate. In most cases there is no need to change this. However, it might be useful if you make use of different mutation operators registerted, e.g., in the slots “mutate1” and “mutate2”.


Furhter arguments passed down to recombinator/mutator. There parameters will overwrite parameters in par.list.


[list] List of individuals.

[Package ecr version 2.1.0 Index]