ec.steadystate
Class SteadyStateBreeder

java.lang.Object
  |
  +--ec.Breeder
        |
        +--ec.simple.SimpleBreeder
              |
              +--ec.steadystate.SteadyStateBreeder

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.

See Also:
Serialized Form

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 individualReplaced(SteadyStateEvolutionState state, int subpopulation, int thread, int individual)
          Called whenever individuals have been replaced by new individuals in the population.
 void sourcesAreProperForm(SteadyStateEvolutionState state, BreedingPipeline[] bp)
          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, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SteadyStateBreeder

public SteadyStateBreeder()
Method Detail

sourcesAreProperForm

public void sourcesAreProperForm(SteadyStateEvolutionState state,
                                 BreedingPipeline[] bp)
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