public class ParetoEngine extends LoggingEvolutionEngine<ParetoFront>
NAryTree
but a whole
group of Trees in a ParetoFront
.centralRegistry, generation
evolutionScheme, fitnessEvaluator, selectionStrategy
candidateFactory, rng, satisfiedTerminationConditions
Constructor and Description |
---|
ParetoEngine(ETMParamPareto params) |
Modifier and Type | Method and Description |
---|---|
java.util.List<EvaluatedCandidate<NAryTree>> |
evolvePopulation(int populationSize,
int eliteCount,
java.util.Collection<NAryTree> seedCandidates,
TerminationCondition... conditions)
Execute the evolutionary algorithm until one of the termination conditions is met,
then return all of the candidates from the final generation.
|
ParetoFront |
getParetoFront() |
java.lang.String |
logResult(java.util.List<EvaluatedCandidate<NAryTree>> result)
Write the current result to a file, should be implemented by each
specific engine
|
protected java.util.List<EvaluatedCandidate<NAryTree>> |
nextEvolutionStep(java.util.List<EvaluatedCandidate<NAryTree>> evaluatedPopulation,
int eliteCount,
java.util.Random rng)
This method performs a single step/iteration of the evolutionary process.
|
evaluatePopulation, evolve, evolvePopulation, getGeneration, getLogModulo, logPopulation, setCentralRegistry, setLogModulo, setParameterObject
addEvolutionObserver, evolve, evolve, evolvePopulation, getSatisfiedTerminationConditions, notifyPopulationChange, removeEvolutionObserver, setSingleThreaded
public ParetoEngine(ETMParamPareto params)
public java.util.List<EvaluatedCandidate<NAryTree>> evolvePopulation(int populationSize, int eliteCount, java.util.Collection<NAryTree> seedCandidates, TerminationCondition... conditions)
EvolutionEngine.evolve(int, int, Collection, TerminationCondition[])
method instead.evolvePopulation
in interface EvolutionEngine<NAryTree>
evolvePopulation
in class AbstractEvolutionEngine<NAryTree>
populationSize
- The number of candidate solutions present in the population
at any point in time.eliteCount
- The number of candidates preserved via elitism. In elitism, a
sub-set of the population with the best fitness scores are preserved unchanged in
the subsequent generation. Candidate solutions that are preserved unchanged through
elitism remain eligible for selection for breeding the remainder of the next generation.
This value must be non-negative and less than the population size. A value of zero
means that no elitism will be applied.seedCandidates
- A set of candidates to seed the population with. The size of
this collection must be no greater than the specified population size.conditions
- One or more conditions that may cause the evolution to terminate.EvolutionEngine.evolve(int, int, Collection, TerminationCondition[])
,
EvolutionEngine.evolvePopulation(int, int, Collection, TerminationCondition[])
protected java.util.List<EvaluatedCandidate<NAryTree>> nextEvolutionStep(java.util.List<EvaluatedCandidate<NAryTree>> evaluatedPopulation, int eliteCount, java.util.Random rng)
GenerationalEvolutionEngine
nextEvolutionStep
in class GenerationalEvolutionEngine<NAryTree>
evaluatedPopulation
- The population at the beginning of the process.eliteCount
- The number of the fittest individuals that must be preserved.rng
- A source of randomness.public ParetoFront getParetoFront()
public java.lang.String logResult(java.util.List<EvaluatedCandidate<NAryTree>> result)
LoggingEvolutionEngine
logResult
in class LoggingEvolutionEngine<ParetoFront>