create_next_generation: Create next generation from parent chromosomes.

Description Usage Arguments

View source: R/create_next_generation.R

Description

Using fitness ranks of parent chromosomes, this function will select parents based upon their fitness rank, generate two children from each mate pair and mutate those child chromosomes. Function uses select_parents, crossover_parents, and mutate_child to generate children.

Usage

1
2
create_next_generation(generation_t0, obj_fun_output, select_parents,
  crossover_method, crossover_parents, pCrossover, mutate_child, mutation_rate)

Arguments

generation_t0

a matrix of parent chromosomes to be evaluated. Columns correspond to predictors/genes and rows correspond to parents/chromosomes.

obj_fun_output

a numeric vector containg the objective function output for each parent chromosome.

select_parents

function for selection of parents for crossover_parents. See select_parents.

crossover_method

a character string indicating which crossover method to use: c("method1", "method2", "method3"). Default is "method1". See crossover_parents

crossover_parents

a function for crossover between two parents. See crossover_parents.

pCrossover

a number between 0 and 1 indicating the probability of crossover between two parents.

mutate_child

a function for mutagenesis of child genes. See mutate_child.

mutation_rate

a number between 0 and 1 indicating the probability of mutation. See mutate_child.


yzhou63/GA documentation built on Dec. 15, 2017, 1:05 a.m.