ec.es
Class MuCommaLambdaBreeder
java.lang.Object
|
+--ec.Breeder
|
+--ec.es.MuCommaLambdaBreeder
- All Implemented Interfaces:
- ESBreederForm, java.io.Serializable, Setup, Singleton
- Direct Known Subclasses:
- MuPlusLambdaBreeder
- public class MuCommaLambdaBreeder
- extends Breeder
- implements ESBreederForm
MuCommaLambdaBreeder is a Breeder which, together with ESEvolutionState
and ESSelection, implements the (mu,lambda) breeding strategy and gathers
the comparison data you can use to implement a 1/5-rule mutation mechanism.
For more information, see the ESEvolutionState class documentation.
- See Also:
- Serialized Form
Method Summary |
void |
breedPopChunk(Population newpop,
ESEvolutionState state,
int[][] bettercount,
int[] numinds,
int[] from,
int threadnum)
A private helper function for breedPopulation which breeds a chunk
of individuals in a subpopulation for a given thread. |
Population |
breedPopulation(EvolutionState state)
Breeds state.population, returning a new population. |
boolean |
childBetter(Population newpop,
int subpopulation,
int thread,
ESEvolutionState ess)
|
Population |
postProcess(Population newpop,
Population oldpop,
ESEvolutionState state)
A hook for Mu+Lambda, not used in Mu,Lambda |
Population |
setToLambda(Population pop,
ESEvolutionState state)
Sets all subpopulations in pop to the expected lambda size. |
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored
in state, built off of the parameter base base. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MuCommaLambdaBreeder
public MuCommaLambdaBreeder()
setup
public void setup(EvolutionState state,
Parameter base)
- Description copied from interface:
Setup
- 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.
setToLambda
public Population setToLambda(Population pop,
ESEvolutionState state)
- Sets all subpopulations in pop to the expected lambda size. Does not fill new slots with individuals.
breedPopulation
public Population breedPopulation(EvolutionState state)
throws java.lang.CloneNotSupportedException
- Description copied from class:
Breeder
- Breeds state.population, returning a new population. In general,
state.population should not be modified.
- Overrides:
breedPopulation
in class Breeder
postProcess
public Population postProcess(Population newpop,
Population oldpop,
ESEvolutionState state)
- A hook for Mu+Lambda, not used in Mu,Lambda
childBetter
public boolean childBetter(Population newpop,
int subpopulation,
int thread,
ESEvolutionState ess)
breedPopChunk
public void breedPopChunk(Population newpop,
ESEvolutionState state,
int[][] bettercount,
int[] numinds,
int[] from,
int threadnum)
throws java.lang.CloneNotSupportedException
- A private helper function for breedPopulation which breeds a chunk
of individuals in a subpopulation for a given thread.
Although this method is declared
public (for the benefit of a private helper class in this file),
you should not call it.