xegaGaReplicate2Gene {xegaGaGene}R Documentation

Replicates a gene.

Description

xegaGaReplicate2Gene replicates a gene by applying a gene reproduction pipeline which uses crossover and mutation. The control flow is as follows:

Usage

xegaGaReplicate2Gene(pop, fit, lF)

Arguments

pop

A population of binary genes.

fit

Fitness vector.

lF

The local configuration of the genetic algorithm.

Value

A list of either 1 or 2 binary genes.

See Also

Other Replication: xegaGaReplicateGene()

Examples

lFxegaGaGene$CrossGene<-xegaGaCross2Gene
lFxegaGaGene$MutationRate<-function(fit, lF) {0.001}
names(lFxegaGaGene)
pop10<-lapply(rep(0,10), function(x) xegaGaInitGene(lFxegaGaGene))
epop10<-lapply(pop10, lFxegaGaGene$EvalGene, lF=lFxegaGaGene)
fit10<-unlist(lapply(epop10, function(x) {x$fit}))
newgenes<-xegaGaReplicate2Gene(pop10, fit10, lFxegaGaGene)


[Package xegaGaGene version 1.0.0.1 Index]