AcceptBest {xegaPopulation} | R Documentation |
Change the gene by a genetic operator pipeline and return the new gene only if the new gene has at least the same fitness as the gene.
AcceptBest(OperatorPipeline, gene, lF)
OperatorPipeline |
Genetic operator pipeline. |
gene |
Gene. |
lF |
Local configuration. |
The fitness of genes never decreases. New genes with inferior fitness do not survive.
The new gene, if it is at least as fit as gene
else
the old gene gene
.
Other Acceptance Rule:
AcceptIVMetropolis()
,
AcceptMetropolis()
,
AcceptNewGene()
OPpipe1<-function(g, lF){InitGene(lF)}
g1<-lFxegaGaGene$EvalGene(InitGene(lFxegaGaGene), lFxegaGaGene)
g2<-AcceptBest(OPpipe1, g1, lFxegaGaGene)
identical(g1, g2)