ec.multiobjective.spea2
Class SPEA2Breeder

java.lang.Object
  extended by ec.Breeder
      extended by ec.multiobjective.spea2.SPEA2Breeder
All Implemented Interfaces:
Setup, Singleton, java.io.Serializable

public class SPEA2Breeder
extends Breeder

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.

Version:
1.0
Author:
Robert Hubley (based on Breeder.java by Sean Luke)
See Also:
Serialized Form

Field Summary
static int V_DEBUG
          Debug messages for this object
 
Constructor Summary
SPEA2Breeder()
           
 
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 loadArchive(EvolutionState state, Population newpop)
          A private helper function for breedPopulation which loads the archive (top end of indivudal array) with the SPEA2 elites.
 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.
 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
 

Field Detail

V_DEBUG

public static final int V_DEBUG
Debug messages for this object

See Also:
Constant Field Values
Constructor Detail

SPEA2Breeder

public SPEA2Breeder()
Method Detail

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.


breedPopulation

public Population breedPopulation(EvolutionState state)
A simple breeder that doesn't attempt to do any cross- population breeding. Basically it applies pipelines, one per thread, to various subchunks of a new population.

Specified by:
breedPopulation in class Breeder

breedPopChunk

public 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. Although this method is declared public (for the benefit of a private helper class in this file), you should not call it.


loadArchive

public void loadArchive(EvolutionState state,
                        Population newpop)
A private helper function for breedPopulation which loads the archive (top end of indivudal array) with the SPEA2 elites.


sort

public void sort(Individual[] a)
Private helper function which calls quicksort