ec.multiobjective.spea2
Class SPEA2Breeder
java.lang.Object
ec.Breeder
ec.simple.SimpleBreeder
ec.multiobjective.spea2.SPEA2Breeder
- All Implemented Interfaces:
- Setup, Singleton, java.io.Serializable
public class SPEA2Breeder
- extends SimpleBreeder
Breeds each subpopulation separately, with no inter-population exchange,
and using the SPEA2 approach. A SPEA2Breeder 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 SPEA2Breeder will first fill part of the
new subpopulation (the archive) with the individuals with an SPEA2 fitness
of less than 1.0 from the old subpopulation. If there are less individuals
with this cutoff than can fit in the archive the free slots are filled with
the lowest scoring SPEA2fitness individuals. If there are more individuals
with an SPEA2Fitness less than 1 than can fit in the archive then a density
metric is used to truncate the archive and remove individuals which are close
to others.
The archive filling step is performed by a single thread.
- See Also:
- Serialized Form
Method Summary |
int |
computeSubpopulationLength(EvolutionState state,
int subpopulation)
Elites are often stored in the top part of the subpopulation; this function returns what
part of the subpopulation contains individuals to replace with newly-bred ones
(up to but not including the elites). |
void |
loadElites(EvolutionState state,
Population newpop)
A private helper function for breedPopulation which loads elites into
a subpopulation. |
void |
setup(EvolutionState state,
Parameter base)
Debug messages for this object |
void |
sort(Individual[] a)
Private helper function which calls quicksort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPEA2Breeder
public SPEA2Breeder()
setup
public void setup(EvolutionState state,
Parameter base)
- Debug messages for this object
- Specified by:
setup
in interface Setup
- Overrides:
setup
in class SimpleBreeder
computeSubpopulationLength
public int computeSubpopulationLength(EvolutionState state,
int subpopulation)
- Description copied from class:
SimpleBreeder
- Elites are often stored in the top part of the subpopulation; this function returns what
part of the subpopulation contains individuals to replace with newly-bred ones
(up to but not including the elites).
- Overrides:
computeSubpopulationLength
in class SimpleBreeder
loadElites
public void loadElites(EvolutionState state,
Population newpop)
- Description copied from class:
SimpleBreeder
- A private helper function for breedPopulation which loads elites into
a subpopulation.
- Overrides:
loadElites
in class SimpleBreeder
sort
public void sort(Individual[] a)
- Private helper function which calls quicksort