|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uncommons.watchmaker.framework.EvolutionUtils
public final class EvolutionUtils
Utility methods used by different evolution implementations. This class exists to avoid duplication of this logic among multiple evolution implementations.
| Method Summary | ||
|---|---|---|
static
|
getPopulationData(List<EvaluatedCandidate<T>> evaluatedPopulation,
boolean naturalFitness,
int eliteCount,
int iterationNumber,
long startTime)
Gets data about the current population, including the fittest candidate and statistics about the population as a whole. |
|
static
|
shouldContinue(PopulationData<T> data,
TerminationCondition... conditions)
Given data about the current population and a set of termination conditions, determines whether or not the evolution should continue. |
|
static
|
sortEvaluatedPopulation(List<EvaluatedCandidate<T>> evaluatedPopulation,
boolean naturalFitness)
Sorts an evaluated population in descending order of fitness (descending order of fitness score for natural scores, ascending order of scores for non-natural scores). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> List<TerminationCondition> shouldContinue(PopulationData<T> data,
TerminationCondition... conditions)
T - The type of entity that is being evolved.data - The current state of the population.conditions - One or more termination conditions. The evolution should not continue if
any of these is satisfied.
public static <T> void sortEvaluatedPopulation(List<EvaluatedCandidate<T>> evaluatedPopulation,
boolean naturalFitness)
T - The type of entity that is being evolved.evaluatedPopulation - The population to be sorted (in-place).naturalFitness - True if higher fitness scores mean fitter individuals, false otherwise.
public static <T> PopulationData<T> getPopulationData(List<EvaluatedCandidate<T>> evaluatedPopulation,
boolean naturalFitness,
int eliteCount,
int iterationNumber,
long startTime)
T - The type of entity that is being evolved.evaluatedPopulation - Population of candidate solutions with their
associated fitness scores.naturalFitness - True if higher fitness scores mean fitter individuals, false otherwise.eliteCount - The number of candidates preserved via elitism.iterationNumber - The zero-based index of the current generation/epoch.startTime - The time at which the evolution began, expressed as a number of milliseconds since
00:00 on 1st January 1970.
|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||