|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.EvolutionState
ec.steadystate.SteadyStateEvolutionState
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:
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 ) |
Field Summary | |
boolean |
firstTimeAround
|
boolean |
inNextPseudogeneration
|
int[] |
newIndividuals
|
static java.lang.String |
P_PSEUDOGENERATION
|
static java.lang.String |
P_STEADYSTATE
base parameter for steady-state |
int |
pseudogeneration
|
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 |
public static final java.lang.String P_STEADYSTATE
public static final java.lang.String P_PSEUDOGENERATION
public int[] newIndividuals
public boolean inNextPseudogeneration
public boolean firstTimeAround
public int pseudogeneration
Constructor Detail |
public SteadyStateEvolutionState()
Method Detail |
public void setup(EvolutionState state, Parameter base)
EvolutionState
setup
in interface Setup
setup
in class EvolutionState
public void run(int condition) throws java.io.IOException
run
in class EvolutionState
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |