ec.steadystate
Class SteadyStateEvolutionState
java.lang.Object
|
+--ec.EvolutionState
|
+--ec.steadystate.SteadyStateEvolutionState
- All Implemented Interfaces:
- java.io.Serializable, Setup, Singleton
- public class SteadyStateEvolutionState
- extends EvolutionState
A SteadyStateEvolutionState is an EvolutionState which implements a simple
form of steady-state evolution.
First, all the individuals in the population are created and evaluated.
(A) Then 1 individual is selected by the breder for removal from the
population. They are replaced by the result of breeding the other
individuals in the population. Then just those newly-bred individuals are
evaluted. Goto (A).
Evolution stops when an ideal individual is found (if quitOnRunComplete
is set to true), or when the number of individuals evaluated exceeds the
parameter value numGenerations. SteadyStateEvolutionState uses the "generations"
instance variable to store the number of individuals evaluated -- yes, that's
a bit dumb, but it's a historical weirdness. We might fix that in the future.
Every once in a while (once every pseudogeneration evaluations),
the system will garbage collect and write out a checkpoint file.
Additional constraints:
- The breeder must be SteadyStateBreeder, or a subclass of it.
- The evaluator must be a SteadyStateEvaluator, or a subclass of it.
- All Species must implement the SteadyStateSpeciesForm interface.
Parameters
breed
classname, inherits or = ec.steadystate.SteadyStateBreeder |
(the class for breeder) |
eval
classname, inherits or = ex.steadystate.SteadyStateEvaluator |
(the class for evaluator) |
pseudogeneration
int >= 1 |
(How often ) |
- See Also:
- Serialized Form
Fields inherited from class ec.EvolutionState |
aggressivegc, breeder, breedthreads, C_STARTED_FRESH, C_STARTED_FROM_CHECKPOINT, checkpoint, checkpointModulo, checkpointPrefix, evalthreads, evaluator, exchanger, finisher, gc, gcModulo, generation, initializer, numGenerations, output, P_AGGRESSIVEGC, P_BREEDER, P_CHECKPOINT, P_CHECKPOINTMODULO, P_CHECKPOINTPREFIX, P_EVALUATOR, P_EXCHANGER, P_FINISHER, P_GC, P_GCMODULO, P_GENERATIONS, P_INITIALIZER, P_QUITONRUNCOMPLETE, P_STATISTICS, parameters, population, quitOnRunComplete, R_FAILURE, R_SUCCESS, random, statics, statistics |
Method Summary |
void |
run(int condition)
Performs the evolutionary run. |
void |
setup(EvolutionState state,
Parameter base)
Unlike for other setup() methods, ignore the base; it will always be null. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
P_STEADYSTATE
public static final java.lang.String P_STEADYSTATE
- base parameter for steady-state
P_PSEUDOGENERATION
public static final java.lang.String P_PSEUDOGENERATION
newIndividuals
public int[] newIndividuals
inNextPseudogeneration
public boolean inNextPseudogeneration
firstTimeAround
public boolean firstTimeAround
pseudogeneration
public int pseudogeneration
SteadyStateEvolutionState
public SteadyStateEvolutionState()
setup
public void setup(EvolutionState state,
Parameter base)
- Description copied from class:
EvolutionState
- Unlike for other setup() methods, ignore the base; it will always be null.
- Overrides:
setup
in class EvolutionState
- Following copied from class:
ec.EvolutionState
- See Also:
Prototype.setup(EvolutionState,Parameter)
run
public void run(int condition)
throws java.io.IOException
- Performs the evolutionary run. Garbage collection and checkpointing are done only once every pseudogeneration evaluations. The only Statistics calls made are preInitializationStatistics(), postInitializationStatistics(), occasional postEvaluationStatistics (done once every pseudogeneration evaluations), and finalStatistics().
- Overrides:
run
in class EvolutionState