ec.multiobjective.spea2
Class SPEA2TournamentSelection

java.lang.Object
  extended by ec.BreedingSource
      extended by ec.SelectionMethod
          extended by ec.select.TournamentSelection
              extended by ec.multiobjective.spea2.SPEA2TournamentSelection
All Implemented Interfaces:
Prototype, Setup, SteadyStateBSourceForm, RandomChoiceChooser, java.io.Serializable, java.lang.Cloneable

public class SPEA2TournamentSelection
extends TournamentSelection

Does a simple tournament selection, limited to the subpopulation it's working in at the time and only within the boundry of the SPEA2 archive (between 0-archiveSize).

NOTE: The SPEA2Breeder class leaves the individuals vector with only archiveSize number indviduals. All positions in the individuals vector above archiveSize are null.

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

Field Summary
 
Fields inherited from class ec.select.TournamentSelection
DEFAULT_SIZE, P_PICKWORST, P_SIZE, P_TOURNAMENT, pickWorst, probabilityOfSelection, size
 
Fields inherited from class ec.SelectionMethod
INDS_PRODUCED
 
Fields inherited from class ec.BreedingSource
CHECKBOUNDARY, DEFAULT_PRODUCED, NO_PROBABILITY, P_PROB, probability, UNUSED
 
Constructor Summary
SPEA2TournamentSelection()
           
 
Method Summary
 int produce(int subpopulation, EvolutionState state, int thread)
          An alternative form of "produce" special to Selection Methods; selects an individual from the given subpopulation and returns its position in that subpopulation.
 int produce(int min, int max, int start, int subpopulation, Individual[] inds, EvolutionState state, int thread)
          Produces n individuals from the given subpopulation and puts them into inds[start...start+n-1], where n = Min(Max(q,min),max), where q is the "typical" number of individuals the BreedingSource produces in one shot, and returns n.
 
Methods inherited from class ec.select.TournamentSelection
defaultBase, individualReplaced, setup, sourcesAreProperForm
 
Methods inherited from class ec.SelectionMethod
finishProducing, preparePipeline, prepareToProduce, produces, typicalIndsProduced
 
Methods inherited from class ec.BreedingSource
clone, getProbability, pickRandom, setProbability, setupProbabilities
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPEA2TournamentSelection

public SPEA2TournamentSelection()
Method Detail

produce

public int produce(int subpopulation,
                   EvolutionState state,
                   int thread)
Description copied from class: SelectionMethod
An alternative form of "produce" special to Selection Methods; selects an individual from the given subpopulation and returns its position in that subpopulation.

Overrides:
produce in class TournamentSelection

produce

public int produce(int min,
                   int max,
                   int start,
                   int subpopulation,
                   Individual[] inds,
                   EvolutionState state,
                   int thread)
Description copied from class: BreedingSource
Produces n individuals from the given subpopulation and puts them into inds[start...start+n-1], where n = Min(Max(q,min),max), where q is the "typical" number of individuals the BreedingSource produces in one shot, and returns n. max must be >= min, and min must be >= 1. For example, crossover might typically produce two individuals, tournament selection might typically produce a single individual, etc.

Overrides:
produce in class TournamentSelection