|
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.termination.Stagnation
public class Stagnation
A TerminationCondition
that halts evolution if no improvement in fitness
is observed within a specified number of generations.
Constructor Summary | |
---|---|
Stagnation(int generationLimit,
boolean naturalFitness)
Creates a TerminationCondition that will halt evolution after the
specified number of generations passes without any improvement in the population's
fittest individual. |
|
Stagnation(int generationLimit,
boolean naturalFitness,
boolean usePopulationAverage)
Creates a TerminationCondition that will halt evolution after the
specified number of generations passes without any improvement in the population's
fitness (either the fittest individual or the mean fitness of the entire population,
depending on the final parameter). |
Method Summary | |
---|---|
boolean |
shouldTerminate(PopulationData<?> populationData)
The condition is queried via this method to determine whether or not evolution should finish at the current point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stagnation(int generationLimit, boolean naturalFitness)
TerminationCondition
that will halt evolution after the
specified number of generations passes without any improvement in the population's
fittest individual.
generationLimit
- The number of generations without improvement that
will lead to termination.naturalFitness
- True if higher fitness scores are better, false otherwise.public Stagnation(int generationLimit, boolean naturalFitness, boolean usePopulationAverage)
TerminationCondition
that will halt evolution after the
specified number of generations passes without any improvement in the population's
fitness (either the fittest individual or the mean fitness of the entire population,
depending on the final parameter).
generationLimit
- The number of generations without improvement that
will lead to termination.naturalFitness
- True if higher fitness scores are better, false otherwise.usePopulationAverage
- If true uses the mean fitness of the population as the
criteria, otherwise uses the fittest individual.Method Detail |
---|
public boolean shouldTerminate(PopulationData<?> populationData)
shouldTerminate
in interface TerminationCondition
populationData
- Information about the current state of evolution. This may
be used to determine whether evolution should continue or not.
|
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 |