JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.hillClimbing
Class Breeder

java.lang.Object
  extended bygov.nasa.javaGenes.core.Breeder
      extended bygov.nasa.javaGenes.hillClimbing.Breeder
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Breeder, Breeder

public class Breeder
extends Breeder

Population size must be 2. One climbs and the other holds the best so far.

See Also:
Serialized Form

Field Summary
protected  Accepter accepter
           
protected  ChildMaker randomChildMaker
           
protected  RestartPolicy restartPolicy
           
 
Fields inherited from class gov.nasa.javaGenes.core.Breeder
childMakerProvider, debug, tournamentProbability
 
Constructor Summary
Breeder(Parameters p, Accepter inAccepter, RestartPolicy inRestartPolicy, ChildMaker inRandomChildMaker)
           
 
Method Summary
 Population breed(Population parents, int kidsPerGeneration)
           
static int requiredPopulationSize()
           
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.javaGenes.core.Breeder
antiTournamentGetIndex, breed, chooseBest, chooseWorst, generationIsComplete, generationJustStarting, generationNotComplete, getFitnessFunction, getGenerationIndex, getTotalNumberOfKidsProduced, isProtected, newChild, newChildrenCreated, pickOne, reportOnGeneration, 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

accepter

protected Accepter accepter

restartPolicy

protected RestartPolicy restartPolicy

randomChildMaker

protected ChildMaker randomChildMaker
Constructor Detail

Breeder

public Breeder(Parameters p,
               Accepter inAccepter,
               RestartPolicy inRestartPolicy,
               ChildMaker inRandomChildMaker)
Method Detail

requiredPopulationSize

public static int requiredPopulationSize()

breed

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

toString

public java.lang.String toString()

JavaGenes, NASA Ames. Written largely by Al Globus