gov.nasa.javaGenes.core.HFC
Class SubBreeder
java.lang.Object
gov.nasa.javaGenes.core.HFC.SubBreeder
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- BottomSubBreeder, MiddleSubBreeder, TopSubBreeder
- public class SubBreeder
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
Method Summary |
void |
acceptPromotion(Individual individual,
Population population)
|
boolean |
areIndividualsInFitnessRange(Population population)
|
boolean |
areValidIndices(int[] indices)
|
void |
assertIndividualsInFitnessRange(Population population)
|
void |
breedOnce(Population population)
|
protected void |
createRandomIndividual(int level,
int index,
Population population)
|
protected void |
createRandomIndividual(int index,
Population population)
|
Fitness |
getBestFitnessAllowed()
|
FitnessFunction |
getFitnessFunction()
|
int |
getIndexToKill(Population population)
|
int[] |
getParentIndices(int number,
Population population)
|
Evolvable |
getRandomEvolvable()
|
int |
getTotalNumberOfKidsProduced()
|
void |
incrementBestFitnessAllowed(double increment)
|
boolean |
isValidIndex(int index)
|
protected void |
makeChildren(ChildMaker maker,
int[] parentIndices,
Population population)
|
void |
newChild(Individual individual)
|
int |
numberOfIndices()
|
void |
parentsOfPromoted(int[] parentIndices,
Population population)
|
void |
promote(Individual individual,
Population population)
|
void |
promoteTooFitIndividuals(Population population)
|
void |
setAcceptRandomIndividualFitnessThreshold(Fitness acceptRandomIndividualFitnessThreshold)
|
void |
setBestFitnessAllowed(double value)
assumes best fitness is lower value |
void |
setBreeder(Breeder breeder)
|
void |
setGrimReaper(AntiTournament antiTournament)
|
void |
setIndexRange(int low,
int high)
|
protected void |
setIndividual(Population population,
int index,
Individual individual)
|
void |
setParentChooser(Tournament tournament)
|
void |
setPromotionsTo(SubBreeder subBreeder)
|
boolean |
shouldPromote(Individual individual)
|
void |
toDeathRow(int index)
|
void |
toDeathRow(int[] indices)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
debug
public static boolean debug
MAX_TRIES
public static int MAX_TRIES
breeder
protected Breeder breeder
childMakerProvider
protected ChildMakerProvider childMakerProvider
fitnessFunction
protected FitnessFunction fitnessFunction
promotionsTo
protected SubBreeder promotionsTo
bestFitnessAllowed
protected Fitness bestFitnessAllowed
indicesRange
protected IntegerInterval indicesRange
deathRow
protected java.util.TreeSet deathRow
parentChooser
protected ChooseParents parentChooser
grimReaper
protected ChooseForDeath grimReaper
acceptRandomIndividualFitnessThreshold
protected Fitness acceptRandomIndividualFitnessThreshold
SubBreeder
public SubBreeder(ChildMakerProvider childMakerProvider,
FitnessFunction fitnessFunction)
setAcceptRandomIndividualFitnessThreshold
public void setAcceptRandomIndividualFitnessThreshold(Fitness acceptRandomIndividualFitnessThreshold)
areIndividualsInFitnessRange
public boolean areIndividualsInFitnessRange(Population population)
assertIndividualsInFitnessRange
public void assertIndividualsInFitnessRange(Population population)
promote
public void promote(Individual individual,
Population population)
acceptPromotion
public void acceptPromotion(Individual individual,
Population population)
parentsOfPromoted
public void parentsOfPromoted(int[] parentIndices,
Population population)
promoteTooFitIndividuals
public void promoteTooFitIndividuals(Population population)
createRandomIndividual
protected void createRandomIndividual(int index,
Population population)
createRandomIndividual
protected void createRandomIndividual(int level,
int index,
Population population)
breedOnce
public void breedOnce(Population population)
makeChildren
protected void makeChildren(ChildMaker maker,
int[] parentIndices,
Population population)
setIndividual
protected void setIndividual(Population population,
int index,
Individual individual)
getParentIndices
public int[] getParentIndices(int number,
Population population)
setBreeder
public void setBreeder(Breeder breeder)
newChild
public void newChild(Individual individual)
getTotalNumberOfKidsProduced
public int getTotalNumberOfKidsProduced()
getRandomEvolvable
public Evolvable getRandomEvolvable()
setPromotionsTo
public void setPromotionsTo(SubBreeder subBreeder)
shouldPromote
public boolean shouldPromote(Individual individual)
toDeathRow
public void toDeathRow(int[] indices)
toDeathRow
public void toDeathRow(int index)
getIndexToKill
public int getIndexToKill(Population population)
areValidIndices
public boolean areValidIndices(int[] indices)
isValidIndex
public boolean isValidIndex(int index)
setBestFitnessAllowed
public void setBestFitnessAllowed(double value)
- assumes best fitness is lower value
getBestFitnessAllowed
public Fitness getBestFitnessAllowed()
incrementBestFitnessAllowed
public void incrementBestFitnessAllowed(double increment)
setIndexRange
public void setIndexRange(int low,
int high)
numberOfIndices
public int numberOfIndices()
setParentChooser
public void setParentChooser(Tournament tournament)
setGrimReaper
public void setGrimReaper(AntiTournament antiTournament)
getFitnessFunction
public FitnessFunction getFitnessFunction()
toString
public java.lang.String toString()