public class SPEA2Breeder extends SimpleBreeder
| Modifier and Type | Class and Description |
|---|---|
static class |
SPEA2Breeder.BreedingState
We use a state variable to make sure that the archive isn't built twice in a row.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
P_K |
static java.lang.String |
P_NORMALIZE |
backupPopulation, clonePipelineAndPopulation, elite, eliteFrac, newIndividuals, P_CLONE_PIPELINE_AND_POPULATION, P_ELITE, P_ELITE_FRAC, P_REEVALUATE_ELITES, P_SEQUENTIAL_BREEDING, pool, reevaluateElites, sequentialBreeding| Constructor and Description |
|---|
SPEA2Breeder() |
| Modifier and Type | Method and Description |
|---|---|
Population |
breedPopulation(EvolutionState state)
Use super's breeding, but also set our local state to record that breeding is complete.
|
double[] |
calculateDistancesFromIndividual(Individual ind,
java.util.ArrayList<Individual> inds) |
protected void |
loadElites(EvolutionState state,
Population newpop)
Extract the elite individuals from the current population and
both place in newpop and replace the current population
with the archive.
|
int |
numElites(EvolutionState state,
int subpopulation)
Return the number of individuals that we aim to see in the elitist
archive.
|
void |
postProcess(EvolutionState state)
A hook to do final modifications as necessary to the population after breeding has concluded.
|
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.
|
breedPopChunk, breedPopChunkProduce, nextSubpopulationSize, shouldBreedSubpop, unmarkElitesEvaluated, usingElitismpublic static final java.lang.String P_K
public static final java.lang.String P_NORMALIZE
public void setup(EvolutionState state, Parameter base)
Setupsetup in interface Setupsetup in class SimpleBreederpublic Population breedPopulation(EvolutionState state)
breedPopulation in class SimpleBreederpublic int numElites(EvolutionState state, int subpopulation)
numElites in class SimpleBreederprotected void loadElites(EvolutionState state, Population newpop)
loadElites in class SimpleBreederpublic void postProcess(EvolutionState state)
SimpleBreederpostProcess in class SimpleBreederpublic double[] calculateDistancesFromIndividual(Individual ind, java.util.ArrayList<Individual> inds)