ec.simple
Class SimpleEvolutionState
java.lang.Object
|
+--ec.EvolutionState
|
+--ec.simple.SimpleEvolutionState
- Direct Known Subclasses:
- ESEvolutionState
- 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.
- See Also:
- Serialized Form
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 |
Method Summary |
void |
go()
Steps through a run for debugging purposes. |
void |
run(int condition)
Starts the run. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DEBUG_INIT
public static int DEBUG_INIT
DEBUG_EVAL
public static int DEBUG_EVAL
DEBUG_BREED
public static int DEBUG_BREED
DEBUG_FINAL_SUCCESS
public static int DEBUG_FINAL_SUCCESS
DEBUG_FINAL_FAILURE
public static int DEBUG_FINAL_FAILURE
DEBUG_END
public static int DEBUG_END
debugState
public int debugState
debugNum
public int debugNum
SimpleEvolutionState
public SimpleEvolutionState()
run
public void run(int condition)
throws java.io.IOException
- Description copied from class: EvolutionState
- Starts the run. condition indicates whether or not the
run was restarted from a checkpoint (C_STARTED_FRESH vs
C_STARTED_FROM_CHECKPOINT). At the point that run(...) has been
called, the parameter database has already been set up, as have
the random number generators, the number of threads, and the
Output facility. This method should call this.setup(...) to
set up the EvolutionState object if condition equals C_STARTED_FRESH.
- Overrides:
- run in class EvolutionState
go
public void go()
throws java.io.IOException
- Description copied from class: EvolutionState
- Steps through a run for debugging purposes.
A debug-run is done by repeatedly pulsing the go() method. The
default form prints a message saying that nothing happens.
- Overrides:
- go in class EvolutionState