JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.core.HFC
Class SteadyStateDiscreteBreeder

java.lang.Object
  extended bygov.nasa.javaGenes.core.Breeder
      extended bygov.nasa.javaGenes.core.HFC.Breeder
          extended bygov.nasa.javaGenes.core.HFC.SteadyStateDiscreteBreeder
All Implemented Interfaces:
java.io.Serializable

public class SteadyStateDiscreteBreeder
extends Breeder

implements a version of the Hierarchical Fair Competition Model (HFC, see http://www.egr.msu.edu/~hujianju/HFC.htm) with steady state breeding in discrete sub-popuations. Sub-populations are implemented as sub-breeders since the gov.nasa.javaGenes.core.Population class is subclassed by many representations of populations.

See Also:
Serialized Form

Field Summary
protected  Fitness considerOnlyHigherFitness
           
protected  int populationSize
           
protected  SubBreeder[] subBreeders
           
 
Fields inherited from class gov.nasa.javaGenes.core.Breeder
childMakerProvider, debug, tournamentProbability
 
Constructor Summary
SteadyStateDiscreteBreeder(Parameters p, Population population, double initialFitnessInterval, int numberOfSubBreeders, ChildMakerProvider childMakerProvider, FitnessFunction fitnessFunction, boolean killParents, RandomEvolvableProducer randomEvolvableProducer, Fitness considerOnlyHigherFitness)
           
SteadyStateDiscreteBreeder(Parameters p, Population population, double initialFitnessInterval, SubBreeder[] subBreeders, RandomEvolvableProducer randomEvolvableProducer, Fitness considerOnlyHigherFitness)
           
 
Method Summary
 void assertStatusValid(Population population)
          fail is anything wrong.
 Population breed(Population parents, int kidsPerGeneration)
           
protected static SubBreeder[] createSubBreeders(int numberOfSubBreeders, ChildMakerProvider childMakerProvider, FitnessFunction fitnessFunction, boolean killParents)
           
 SubBreeder getRandomSubBreeder()
           
 SubBreeder getSubBreeder(int i)
           
protected  void initializeBestFitnessAllowed(Population population, double initialFitnessInterval)
           
protected  void initializeIndexRange(Population population)
           
protected  void initializePromotionReferences()
           
protected  void initializeSubBreeders(Population population, double initialFitnessInterval)
           
 int numberOfSubBreeders()
           
protected  void promoteTooFitIndividuals(Population population)
           
 void reportOnGeneration(int generation, java.lang.String filename)
           
 void topSubPopulationReceivedNewBestIndividual(Individual individual)
           
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.javaGenes.core.HFC.Breeder
getRandomEvolvable
 
Methods inherited from class gov.nasa.javaGenes.core.Breeder
antiTournamentGetIndex, breed, chooseBest, chooseWorst, generationIsComplete, generationJustStarting, generationNotComplete, getFitnessFunction, getGenerationIndex, getTotalNumberOfKidsProduced, isProtected, newChild, newChildrenCreated, pickOne, setFitnessFunction, setGenerationIndex, setTotalNumberOfKidsProduced, stateRestore, stateSave, tournament, useTournament
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subBreeders

protected SubBreeder[] subBreeders

considerOnlyHigherFitness

protected Fitness considerOnlyHigherFitness

populationSize

protected int populationSize
Constructor Detail

SteadyStateDiscreteBreeder

public SteadyStateDiscreteBreeder(Parameters p,
                                  Population population,
                                  double initialFitnessInterval,
                                  int numberOfSubBreeders,
                                  ChildMakerProvider childMakerProvider,
                                  FitnessFunction fitnessFunction,
                                  boolean killParents,
                                  RandomEvolvableProducer randomEvolvableProducer,
                                  Fitness considerOnlyHigherFitness)

SteadyStateDiscreteBreeder

public SteadyStateDiscreteBreeder(Parameters p,
                                  Population population,
                                  double initialFitnessInterval,
                                  SubBreeder[] subBreeders,
                                  RandomEvolvableProducer randomEvolvableProducer,
                                  Fitness considerOnlyHigherFitness)
Parameters:
subBreeders - must be ordered with bottom at 0 and top at length-1
Method Detail

createSubBreeders

protected static SubBreeder[] createSubBreeders(int numberOfSubBreeders,
                                                ChildMakerProvider childMakerProvider,
                                                FitnessFunction fitnessFunction,
                                                boolean killParents)

initializeSubBreeders

protected void initializeSubBreeders(Population population,
                                     double initialFitnessInterval)

initializePromotionReferences

protected void initializePromotionReferences()

initializeBestFitnessAllowed

protected void initializeBestFitnessAllowed(Population population,
                                            double initialFitnessInterval)

initializeIndexRange

protected void initializeIndexRange(Population population)

promoteTooFitIndividuals

protected void promoteTooFitIndividuals(Population population)

breed

public Population breed(Population parents,
                        int kidsPerGeneration)
Specified by:
breed in class Breeder

assertStatusValid

public void assertStatusValid(Population population)
fail is anything wrong. Used for testing


topSubPopulationReceivedNewBestIndividual

public void topSubPopulationReceivedNewBestIndividual(Individual individual)
Specified by:
topSubPopulationReceivedNewBestIndividual in class Breeder

getRandomSubBreeder

public SubBreeder getRandomSubBreeder()

getSubBreeder

public SubBreeder getSubBreeder(int i)

numberOfSubBreeders

public int numberOfSubBreeders()

reportOnGeneration

public void reportOnGeneration(int generation,
                               java.lang.String filename)
Overrides:
reportOnGeneration in class Breeder

toString

public java.lang.String toString()

JavaGenes, NASA Ames. Written largely by Al Globus