org.encog.ml.ea.genome
Class BasicGenome
- java.lang.Object
-
- org.encog.ml.ea.genome.BasicGenome
-
- Direct Known Subclasses:
- DoubleArrayGenome, EncogProgram, IntegerArrayGenome, NEATGenome
public abstract class BasicGenome extends java.lang.Object implements Genome, java.io.Serializable
A basic abstract genome. Provides base functionality.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BasicGenome()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetAdjustedScore()Get the adjusted score, this considers old-age penalties and youth bonuses.intgetBirthGeneration()PopulationgetPopulation()doublegetScore()java.lang.StringgetSource()SpeciesgetSpecies()voidsetAdjustedScore(double theAdjustedScore)Set the adjusted score.voidsetBirthGeneration(int birthGeneration)Set the birth genertion (or iteration).voidsetPopulation(Population thePopulation)Set the population that this genome belongs to.voidsetScore(double theScore)Set the score.voidsetSource(java.lang.String theSource)Set the source of this genome.voidsetSpecies(Species s)Set the species for this genome.java.lang.StringtoString()
-
-
-
Method Detail
-
getAdjustedScore
public double getAdjustedScore()
Description copied from interface:GenomeGet the adjusted score, this considers old-age penalties and youth bonuses. If there are no such bonuses or penalties, this is the same as the score.- Specified by:
getAdjustedScorein interfaceGenome- Returns:
- The adjusted score, which considers bonuses.
-
getBirthGeneration
public int getBirthGeneration()
- Specified by:
getBirthGenerationin interfaceGenome- Returns:
- the birthGeneration
-
getPopulation
public Population getPopulation()
- Specified by:
getPopulationin interfaceGenome- Returns:
- the population
-
setAdjustedScore
public void setAdjustedScore(double theAdjustedScore)
Set the adjusted score.- Specified by:
setAdjustedScorein interfaceGenome- Parameters:
theAdjustedScore- The score.
-
setBirthGeneration
public void setBirthGeneration(int birthGeneration)
Description copied from interface:GenomeSet the birth genertion (or iteration).- Specified by:
setBirthGenerationin interfaceGenome- Parameters:
birthGeneration- the birthGeneration to set
-
setPopulation
public void setPopulation(Population thePopulation)
Description copied from interface:GenomeSet the population that this genome belongs to.- Specified by:
setPopulationin interfaceGenome- Parameters:
thePopulation- the population to set
-
setScore
public void setScore(double theScore)
Set the score.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getSpecies
public Species getSpecies()
- Specified by:
getSpeciesin interfaceGenome- Returns:
- the species
-
setSpecies
public void setSpecies(Species s)
Description copied from interface:GenomeSet the species for this genome.- Specified by:
setSpeciesin interfaceGenome- Parameters:
s- the species to set
-
getSource
public java.lang.String getSource()
-
-
DMelt 3.0 © DataMelt by jWork.ORG