|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Statistics
ec.evolve.RandomRestarts
public class RandomRestarts
A special Statistics class which performs random restarts on the population, effectively reininitializing the population and starting over again. RandomRestarts has two ways of determining when to perform a restart. If the restart type is "fixed", then the restart will occur precisely when the generation is a multiple of restart-upper-bound, minus one. (That's hardly random, of course). If the restart type is "random", then at the beginning of the run, and after every restart, a new restart is chosen randomly from one to restart-upper-bound.
This class is compatible with populations which load from files -- it temporarily disables the load-from-file feature when telling the population to populate itself again, forcing the population to do so by creating random individuals.
Field Summary | |
---|---|
static java.lang.String |
P_RESTART_TYPE
Two options available here: "fixed" and "random"; "fixed" will initate the restart timer at the value specified for restart-upper-bound, "random" will initiate the restart timer somewhere below the value specified for restart-upper-bound |
static java.lang.String |
P_RESTART_UPPERBOUND
This is the highest value at which the "ticking" restart clock can initiate at. |
Fields inherited from class ec.Statistics |
---|
children, P_CHILD, P_NUMCHILDREN |
Constructor Summary | |
---|---|
RandomRestarts()
|
Method Summary | |
---|---|
void |
preEvaluationStatistics(EvolutionState state)
Checks the clock; if it's time to restart, we repopulate the population. |
void |
setup(EvolutionState state,
Parameter base)
Gets the clock ticking. |
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_RESTART_TYPE
public static final java.lang.String P_RESTART_UPPERBOUND
Constructor Detail |
---|
public RandomRestarts()
Method Detail |
---|
public void setup(EvolutionState state, Parameter base)
setup
in interface Setup
setup
in class Statistics
public void preEvaluationStatistics(EvolutionState state)
preEvaluationStatistics
in class Statistics
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |