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)
A protected helper function for breedPopulation which loads elites into a subpopulation.
|
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, numElites, shouldBreedSubpop, unmarkElitesEvaluated, usingElitism
public static final java.lang.String P_K
public static final java.lang.String P_NORMALIZE
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class SimpleBreeder
public Population breedPopulation(EvolutionState state)
breedPopulation
in class SimpleBreeder
protected void loadElites(EvolutionState state, Population newpop)
SimpleBreeder
loadElites
in class SimpleBreeder
public void postProcess(EvolutionState state)
SimpleBreeder
postProcess
in class SimpleBreeder
public double[] calculateDistancesFromIndividual(Individual ind, java.util.ArrayList<Individual> inds)