ec.steadystate
Class SteadyStateEvolutionState

java.lang.Object
  |
  +--ec.EvolutionState
        |
        +--ec.steadystate.SteadyStateEvolutionState

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. Every once in a while (once every pseudogeneration evaluations), the system will garbage collect and write out a checkpoint file.

Additional constraints:

Parameters

See Also:
Serialized Form

breed
classname, inherits or = ec.steadystate.SteadyStateBreeder
(the class for breeder)
eval
classname, inherits or = ex.steadystate.SteadyStateEvaluator
(the class for evaluator)
Field Summary
 int[] newIndividuals
           
static java.lang.String P_PSEUDOGENERATION
           
static java.lang.String P_STEADYSTATE
          base parameter for steady-state
 int pseudogeneration
           
 
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, statistics
 
Constructor Summary
SteadyStateEvolutionState()
           
 
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 ec.EvolutionState
aggressiveGC, gc, go, go, resetFromCheckpoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

pseudogeneration

public int pseudogeneration
Constructor Detail

SteadyStateEvolutionState

public SteadyStateEvolutionState()
Method Detail

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
Tags copied from class: 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