- All Implemented Interfaces:
- Setup, Singleton, java.io.Serializable
public class SimpleEvolutionState
- extends EvolutionState
A SimpleEvolutionState is an EvolutionState which implements a simple form
of generational evolution.
First, all the individuals in the population are created.
(A)Then all individuals in the population are evaluated.
Then the population is replaced in its entirety with a new population
of individuals bred from the old population. Goto (A).
Evolution stops when an ideal individual is found (if quitOnRunComplete
is set to true), or when the number of generations (loops of (A))
exceeds the parameter value numGenerations. Each generation the system
will perform garbage collection and checkpointing, if the appropriate
parameters were set.
This approach can be readily used for
most applications of Genetic Algorithms and Genetic Programming.
- Sean Luke
- See Also:
- Serialized Form
Set to true if the state has already been set up.
|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
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public transient boolean setupPerformed
- Set to true if the state has already been set up.
public void setup(EvolutionState state,
- Description copied from interface:
- 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 in class
public void startFresh()
startFresh in class
public int evolve()
evolve in class
public void finish(int result)
finish in class