|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ec.EvolutionState | +--ec.simple.SimpleEvolutionState | +--ec.es.ESEvolutionState
ESEvolutionState is an EvolutionState which accepts the (mu,lambda) and (mu+lambda) breeding strategies found in the ec.es.MuPlusLambdaBreeder and ec.es.MuCommaLambdaBreeder breeders, to do evolution-strategies style evolution.
Evolution strategies breeders require a "mu" parameter and a "lambda" parameter for each subpopulation. "mu" refers to the number of parents from which the new population will be built. "lambda" refers to the number of children generated by the mu parents. Subpopulation sizes will change as necessary to accommodate this fact in later generations. The only rule for initial subpopulation sizes is that they must be greater than or equal to the mu parameter for that subpopulation.
Earlier versions of ECJ specified that the initial subpopulation size would be lambda. This is no longer the case, as it does not jibe with the traditional (and IMHO, odd) ES approach of having the initial subpopulation size be *mu*, of all things. You can now set your initial subpopulation size to whatever you like, totally independent of lambda and mu, as long as it is >= mu.
ESEvolutionState stores mu and lambda values for each subpopulation in the population, as well as comparisons. A comparison tells you if >1/5, <1/5 or =1/5 of the new population was better than its parents (the so-called evolution strategies "one-fifth rule". Although the comparisons are gathered, no mutation objects are provided which actually use them -- you're free to use them in any mutation objects you care to devise which requires them.
To do evolution strategies evolution, you need to use an ESEvolutionState object, either MuCommaLambdaBreeder or MuPlusLambdaBreeder, and the breeding pipelines must contain exactly one ESSelection object called each time an individual is generated. For example, if you're just generating children by mutating a single selected individual into a child, then you use the ESSelection object to pick that individual. If you're generating two children at a time by selecting two parents and crossing them over, then each parent should be selected with ESSelection (and in this case, you had better have a population size that's an even number!) If you're generating one child at a time by selecting two parents and crossing them over, then throwing away one of the children and mutating the other, then you should have only one parent chosen through ESSelection; the other might be chosen with Tournament Selection, say.
Parameters
breed.lambda.subpop-num int >= 0 | Specifies the 'lambda' parameter for the subpopulation. |
breed.mu.subpop-num int: a multiple of "lambda" | Specifies the 'mu' parameter for the subpopulation. |
Field Summary | |
static byte |
C_EXACTLY_ONE_FIFTH_BETTER
|
static byte |
C_OVER_ONE_FIFTH_BETTER
|
static byte |
C_UNDER_ONE_FIFTH_BETTER
|
byte[] |
comparison
|
int[] |
count
Modified by multiple threads, don't fool with this |
int[] |
lambda
|
int[] |
mu
|
static java.lang.String |
P_LAMBDA
|
static java.lang.String |
P_MU
|
Fields inherited from class ec.simple.SimpleEvolutionState |
DEBUG_BREED, DEBUG_END, DEBUG_EVAL, DEBUG_FINAL_FAILURE, DEBUG_FINAL_SUCCESS, DEBUG_INIT, debugNum, debugState |
Constructor Summary | |
ESEvolutionState()
|
Method Summary | |
void |
go()
Steps through a run for debugging purposes. |
void |
run(int condition)
Starts the 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, 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_MU
public static final java.lang.String P_LAMBDA
public int[] mu
public int[] lambda
public byte[] comparison
public static final byte C_OVER_ONE_FIFTH_BETTER
public static final byte C_UNDER_ONE_FIFTH_BETTER
public static final byte C_EXACTLY_ONE_FIFTH_BETTER
public int[] count
Constructor Detail |
public ESEvolutionState()
Method Detail |
public void setup(EvolutionState state, Parameter base)
EvolutionState
setup
in interface Setup
setup
in class EvolutionState
Prototype.setup(EvolutionState,Parameter)
public void run(int condition) throws java.io.IOException
EvolutionState
run
in class SimpleEvolutionState
java.io.IOException
public void go()
EvolutionState
go
in class SimpleEvolutionState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |