ec.steadystate
Class SteadyStateBreeder

java.lang.Object
  extended byec.Breeder
      extended byec.simple.SimpleBreeder
          extended byec.steadystate.SteadyStateBreeder
All Implemented Interfaces:
java.io.Serializable, Setup, Singleton

public class SteadyStateBreeder
extends SimpleBreeder

A SteadyStateBreeder is an extension of SimpleBreeder which works in conjunction with SteadyStateEvolutionState to breed individuals using a steady-state breeding method.

SteadyStateBreeder marks 1 individual for death in each subpopulation. It then replaces those individuals in a subpopulation with new individuals bred from the rest of the subpopulation.

The selection method used to determine which individual to mark for death is called the deselector. There is one deselector for each subpopulation.

Parameters

steady.deselector.n
classname, inherits from ec.select.SelectionMethod, adheres to ec.steadystate.SteadyStateBSourceForm
The deselector for subpopulation n
base.duplicate-retries
int >= 0
(during breeding, when we produce an individual which already exists in the subpopulation, the number of times we try to replace it with something unique.)

See Also:
Serialized Form

Field Summary
 int numDuplicateRetries
          Do we allow duplicates?
static java.lang.String P_DESELECTOR
           
static java.lang.String P_RETRIES
           
 java.util.HashMap[] populationHash
          Hashed version of population for duplicate-retries.
 
Fields inherited from class ec.simple.SimpleBreeder
elite, P_ELITE
 
Constructor Summary
SteadyStateBreeder()
           
 
Method Summary
 Population breedPopulation(EvolutionState state)
          A simple breeder that doesn't attempt to do any cross- population breeding.
 void finishPipelines(EvolutionState state)
           
 void individualReplaced(SteadyStateEvolutionState state, int subpopulation, int thread, int individual)
          Called whenever individuals have been replaced by new individuals in the population.
 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 sourcesAreProperForm(SteadyStateEvolutionState state, BreedingPipeline[] breedingPipelines)
          Called to check to see if the breeding sources are correct -- if you use this method, you must call state.output.exitIfErrors() immediately afterwards.
 
Methods inherited from class ec.simple.SimpleBreeder
breedPopChunk, loadElites
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P_DESELECTOR

public static final java.lang.String P_DESELECTOR
See Also:
Constant Field Values

P_RETRIES

public static final java.lang.String P_RETRIES
See Also:
Constant Field Values

numDuplicateRetries

public int numDuplicateRetries
Do we allow duplicates?


populationHash

public java.util.HashMap[] populationHash
Hashed version of population for duplicate-retries. Should this be in the EvolutionState maybe?

Constructor Detail

SteadyStateBreeder

public SteadyStateBreeder()
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.

Specified by:
setup in interface Setup
Overrides:
setup in class SimpleBreeder

sourcesAreProperForm

public void sourcesAreProperForm(SteadyStateEvolutionState state,
                                 BreedingPipeline[] breedingPipelines)
Called to check to see if the breeding sources are correct -- if you use this method, you must call state.output.exitIfErrors() immediately afterwards.


individualReplaced

public void individualReplaced(SteadyStateEvolutionState state,
                               int subpopulation,
                               int thread,
                               int individual)
Called whenever individuals have been replaced by new individuals in the population.


breedPopulation

public Population breedPopulation(EvolutionState state)
                           throws java.lang.CloneNotSupportedException
Description copied from class: SimpleBreeder
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.

Overrides:
breedPopulation in class SimpleBreeder
Throws:
java.lang.CloneNotSupportedException

finishPipelines

public void finishPipelines(EvolutionState state)