xegaBestInPopulation {xegaPopulation}R Documentation

Best solution in the population.

Description

BestInPopulation() extracts the best individual of a population and reports fitness, value, genotype, and phenotype:

  1. fitness: The fitness value of the genetic algorithm.

  2. value: The function value of the problem environment.

  3. genotype: The gene representation.

  4. phenotype: The problem representation. E.g. a parameter list, a program, ...

We report one of the best solutions.

Usage

xegaBestInPopulation(pop, fit, lF, allsolutions = FALSE)

Arguments

pop

Population of genes.

fit

Vector of fitness values of pop.

lF

Local function configuration.

allsolutions

If TRUE, also return a list of all solutions.

Value

Named list with the following elements:

See Also

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

Examples

pop10<-xegaInitPopulation(10, lFxegaGaGene)
epop10<-xegaEvalPopulation(pop10, lFxegaGaGene)
xegaBestInPopulation(epop10$pop, epop10$fit, lFxegaGaGene)


[Package xegaPopulation version 1.0.0.0 Index]