xegaNextPopulation: Computes the next population of genes.

View source: R/xegaNextPopulation.R

xegaNextPopulationR Documentation

Computes the next population of genes.

Description

xegaNextPopulation() builds the next population by repeatedly calling ReplicateGene().

Usage

xegaNextPopulation(pop, fit, lF)

Arguments

pop

Population of genes.

fit

Fitness.

lF

Local configuration.

Details

Generating the next population is sequential. However, in order to shift more computations into the evaluation step, genetic operator pipelines have been implemented by lF$ReplicateGene(). xegaNextPopulation() only has to convert elitist solutions into function closures.

For adaptive genetic operators, population statistics and the current generation are stored as constant functions in lF.

Value

Population of genes.

See Also

Other Population Layer: xegaBestGeneInPopulation(), xegaBestInPopulation(), xegaEvalPopulation(), xegaInitPopulation(), xegaLogEvalsPopulation(), xegaObservePopulation(), xegaRepEvalPopulation(), xegaSummaryPopulation()

Examples

lFxegaGaGene$cGeneration<-function() {0}
lFxegaGaGene$MutationRate<-MutationRateFactory(method="Const")
lFxegaGaGene$ReplicateGene<-ReplicateGene
lFxegaGaGene$Accept<-AcceptFactory(method="All")
pop10<-xegaInitPopulation(10, lFxegaGaGene)
epop10<-xegaEvalPopulation(pop10, lFxegaGaGene)
newpop<-xegaNextPopulation(epop10$pop, epop10$fit, lFxegaGaGene)


xegaPopulation documentation built on Aug. 22, 2025, 5:14 p.m.