public class SteadyStateEvolutionState extends EvolutionState
At this point the system switches to its "steady state": individuals are bred from the population one by one, and sent off to be evaluated. Once again, in basic Steady-State Evolution the individuals are immediately evaluated and we wait for them; but in Asynchronous Evolution the individuals are evaluated for however long it takes and we don't wait for them to finish. When an individual returns, we mark an individual in the Population for death, then replace it with the new returning individual. Note that during the steady-state, Asynchronous Evolution could be still sending back some "new" individuals created during the initialization phase, not "bred" individuals.
The determination of how an individual is marked for death is done by the SteadyStateBreeder.
SteadyStateEvolutionState will run either for some N "generations" or for some M evaluations of individuals. A "generation" is defined as a Population's worth of evaluations. If you do not specify the number of evaluations (the M), then SteadyStateEvolutionState will use the standard generations parameter defined in EvolutionState.
Parameters
| evaluations int >= 1 |
(maximal number of evaluations to run.) |
| steady.replacement-probability 0.0 <= double <= 1.0 (default is 1.0) |
(probability that an incoming individual will unilaterally replace the individual marked for death, as opposed to replacing it only if the incoming individual is superior in fitness) |
| Modifier and Type | Field and Description |
|---|---|
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.
|
(package private) int[] |
individualCount
How many individuals have we added to the initial population?
|
(package private) HashMap[] |
individualHash
Hash table to check for duplicate individuals
|
(package private) boolean |
justCalledPostEvaluationStatistics |
static String |
P_REPLACEMENT_PROBABILITY |
double |
replacementProbability
When a new individual arrives, with what probability should it directly replace the existing
"marked for death" individual, as opposed to only replacing it if it's superior?
|
(package private) int |
whichSubpop
Holds which subpopulation we are currently operating on
|
breeder, breedthreads, C_STARTED_FRESH, C_STARTED_FROM_CHECKPOINT, checkpoint, checkpointDirectory, checkpointModulo, checkpointPrefix, evalthreads, evaluator, exchanger, finisher, generation, initializer, job, numEvaluations, numGenerations, output, P_BREEDER, P_CHECKPOINT, P_CHECKPOINTDIRECTORY, P_CHECKPOINTMODULO, P_CHECKPOINTPREFIX, P_EVALUATIONS, 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, UNDEFINED| Constructor and Description |
|---|
SteadyStateEvolutionState() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkStatistics(EvolutionState state,
Statistics stat,
Parameter base) |
int |
evolve() |
void |
finish(int result) |
void |
setup(EvolutionState state,
Parameter base)
Unlike for other setup() methods, ignore the base; it will always be null.
|
void |
startFresh() |
resetFromCheckpoint, run, startFromCheckpointpublic static final String P_REPLACEMENT_PROBABILITY
public boolean generationBoundary
public int generationSize
public long evaluations
public double replacementProbability
int[] individualCount
HashMap[] individualHash
int whichSubpop
protected boolean firstTime
boolean justCalledPostEvaluationStatistics
public void setup(EvolutionState state, Parameter base)
EvolutionStatesetup in interface Setupsetup in class EvolutionStatePrototype.setup(EvolutionState,Parameter)void checkStatistics(EvolutionState state, Statistics stat, Parameter base)
public void startFresh()
startFresh in class EvolutionStatepublic int evolve()
evolve in class EvolutionStatepublic void finish(int result)
finish in class EvolutionStateresult - Copyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.