next.gen: Create the next generation of chromosomes

Description Usage Arguments Value Examples

Description

Generate a subsequent population of chromosomes given a current population and their fitness values

Usage

1
next.gen(F0, fitness, m.rate)

Arguments

F0

A list containing a set of binary strings

fitness

A vector with the same length as F0 containing the fitness values

Value

Returns a list with the same dimensions as F0 whose entries correspond to the chromosomes of the next generation of models

Examples

1
2
3
4
5
F0 <- c('00101', '11100', '01000')
fitness <- c(220, 180, 200)
m.rate <- 0.01
next.gen(F0, fitness, m.rate)
[1] "11100" "10000" "11101" #<--NB: the 'elite' model (i.e., model with the best fitness) reappears in the first position

tjmassaro/ssga documentation built on May 6, 2019, 7:33 a.m.