|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Breeder
ec.simple.SimpleBreeder
Breeds each subpopulation separately, with no inter-population exchange, and using a generational approach. A SimpleBreeder may have multiple threads; it divvys up a subpopulation into chunks and hands one chunk to each thread to populate. One array of BreedingPipelines is obtained from a population's Species for each operating breeding thread. Prior to breeding a subpopulation, a SimpleBreeder may first fill part of the new subpopulation up with the best n individuals from the old subpopulation. By default, n is 0 for each subpopulation (that is, this "elitism" is not done). The elitist step is performed by a single thread.
Parameters
base.elite.i int >= 0 (default=0) |
(the number of elitist individuals for subpopulation i) |
Field Summary | |
int[] |
elite
An array[subpop] of the number of elites to keep for that subpopulation |
static java.lang.String |
P_ELITE
|
Constructor Summary | |
SimpleBreeder()
|
Method Summary | |
void |
breedPopChunk(Population newpop,
EvolutionState state,
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)
A simple breeder that doesn't attempt to do any cross- population breeding. |
void |
loadElites(EvolutionState state,
Population newpop)
A private helper function for breedPopulation which loads elites into a subpopulation. |
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 |
Field Detail |
public static final java.lang.String P_ELITE
public int[] elite
Constructor Detail |
public SimpleBreeder()
Method Detail |
public void setup(EvolutionState state, Parameter base)
Setup
public Population breedPopulation(EvolutionState state)
breedPopulation
in class Breeder
public void breedPopChunk(Population newpop, EvolutionState state, int[] numinds, int[] from, int threadnum)
public void loadElites(EvolutionState state, Population newpop)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |