|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Genome
A genome is the basic blueprint for creating an organism in Encog. A genome is made up of one or more chromosomes, which are in turn made up of genes.
| Method Summary | |
|---|---|
int |
calculateGeneCount()
|
void |
decode()
Use the genes to update the organism. |
void |
encode()
Use the organism to update the genes. |
double |
getAdjustedScore()
Get the adjusted score, this considers old-age penalties and youth bonuses. |
double |
getAmountToSpawn()
|
List<Chromosome> |
getChromosomes()
|
GeneticAlgorithm |
getGeneticAlgorithm()
|
long |
getGenomeID()
|
Object |
getOrganism()
|
Population |
getPopulation()
|
double |
getScore()
|
void |
mate(Genome father,
Genome child1,
Genome child2)
Mate with another genome and produce two children. |
void |
setAdjustedScore(double adjustedScore)
Set the adjusted score. |
void |
setAmountToSpawn(double amountToSpawn)
Set the amount to spawn. |
void |
setGeneticAlgorithm(GeneticAlgorithm ga)
Set the GA used by this genome. |
void |
setGenomeID(long genomeID)
Set the genome ID. |
void |
setPopulation(Population population)
Set the population that this genome belongs to. |
void |
setScore(double score)
Set the score. |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
int calculateGeneCount()
void decode()
void encode()
double getAdjustedScore()
double getAmountToSpawn()
List<Chromosome> getChromosomes()
GeneticAlgorithm getGeneticAlgorithm()
long getGenomeID()
Object getOrganism()
Population getPopulation()
double getScore()
void mate(Genome father,
Genome child1,
Genome child2)
father - The father genome.child1 - The first child.child2 - The second child.void setAdjustedScore(double adjustedScore)
adjustedScore - The adjusted score.void setAmountToSpawn(double amountToSpawn)
amountToSpawn - The amount to spawn.void setGeneticAlgorithm(GeneticAlgorithm ga)
ga - The GA.void setGenomeID(long genomeID)
genomeID - The genome id.void setPopulation(Population population)
population - The population that this genome belongs to.void setScore(double score)
score - The new score.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||