ec.steadystate
Class SteadyStateEvolutionState

java.lang.Object
  extended by ec.EvolutionState
      extended by ec.steadystate.SteadyStateEvolutionState
All Implemented Interfaces:
Setup, Singleton, java.io.Serializable
Direct Known Subclasses:
SteadyStateEvolutionState

public class SteadyStateEvolutionState
extends EvolutionState

See Also:
Serialized Form

Field Summary
 long evaluations
          How many evaluations have we run so far?
protected  boolean firstTime
          First time calling evolve
 boolean generationBoundary
          Did we just start a new generation?
 int generationSize
          how big is a generation? Set to the size of subpopulation 0 of the initial population.
protected  int[] individualCount
          How many individuals have we added to the initial population?
protected  java.util.HashMap[] individualHash
          Hash table to check for duplicate individuals
 long numEvaluations
          How many evaluations should we run for? If set to UNDEFINED (0), we run for the number of generations instead.
static java.lang.String P_NUMEVALUATIONS
           
static java.lang.String P_STEADYSTATE
          base parameter for steady-state
static long UNDEFINED
           
protected  int whichSubpop
          Holds which subpopulation we are currently operating on
 
Fields inherited from class ec.EvolutionState
breeder, breedthreads, C_STARTED_FRESH, C_STARTED_FROM_CHECKPOINT, checkpoint, checkpointModulo, checkpointPrefix, context_, evalthreads, evaluator, exchanger, finisher, generation, initializer, job, numGenerations, output, P_BREEDER, P_CHECKPOINT, P_CHECKPOINTMODULO, P_CHECKPOINTPREFIX, P_EVALUATOR, P_EXCHANGER, P_FINISHER, P_GENERATIONS, P_INITIALIZER, P_QUITONRUNCOMPLETE, P_STATISTICS, parameters, population, quitOnRunComplete, R_FAILURE, R_NOTDONE, R_SUCCESS, random, randomSeedOffset, runtimeArguments, statistics
 
Constructor Summary
SteadyStateEvolutionState()
           
 
Method Summary
 int evolve()
           
 void finish(int result)
           
 void setup(EvolutionState state, Parameter base)
          Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.
 void startFresh()
           
 
Methods inherited from class ec.EvolutionState
performCheckpoint, resetFromCheckpoint, run, startFromCheckpoint
 
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

See Also:
Constant Field Values

P_NUMEVALUATIONS

public static final java.lang.String P_NUMEVALUATIONS
See Also:
Constant Field Values

generationBoundary

public boolean generationBoundary
Did we just start a new generation?


numEvaluations

public long numEvaluations
How many evaluations should we run for? If set to UNDEFINED (0), we run for the number of generations instead.


UNDEFINED

public static long UNDEFINED

generationSize

public int generationSize
how big is a generation? Set to the size of subpopulation 0 of the initial population.


evaluations

public long evaluations
How many evaluations have we run so far?


individualCount

protected int[] individualCount
How many individuals have we added to the initial population?


individualHash

protected java.util.HashMap[] individualHash
Hash table to check for duplicate individuals


whichSubpop

protected int whichSubpop
Holds which subpopulation we are currently operating on


firstTime

protected boolean firstTime
First time calling evolve

Constructor Detail

SteadyStateEvolutionState

public SteadyStateEvolutionState()
Method Detail

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from interface: Setup
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.

Specified by:
setup in interface Setup
Overrides:
setup in class EvolutionState

startFresh

public void startFresh()
Overrides:
startFresh in class EvolutionState

evolve

public int evolve()
Overrides:
evolve in class EvolutionState

finish

public void finish(int result)
Overrides:
finish in class EvolutionState
Parameters:
result -