|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.solve.genetic.population.BasicPopulation
public class BasicPopulation
Defines the basic functionality for a population of genomes.
| Constructor Summary | |
|---|---|
BasicPopulation()
Construct an empty population. |
|
BasicPopulation(int populationSize)
Construct a population. |
|
| Method Summary | |
|---|---|
void |
add(Genome genome)
Add a genome to the population. |
void |
addAll(List<? extends Genome> newPop)
Add all of the specified members to this population. |
long |
assignGeneID()
|
long |
assignGenomeID()
|
long |
assignInnovationID()
|
long |
assignSpeciesID()
|
void |
clear()
Clear all genomes from this population. |
Persistor |
createPersistor()
Create a persistor for this object. |
Genome |
get(int i)
Get a genome by index. |
Genome |
getBest()
|
EncogCollection |
getCollection()
|
String |
getDescription()
|
List<Genome> |
getGenomes()
|
InnovationList |
getInnovations()
|
String |
getName()
|
double |
getOldAgePenalty()
|
int |
getOldAgeThreshold()
|
int |
getPopulationSize()
Get the population size. |
List<Species> |
getSpecies()
|
double |
getSurvivalRate()
|
int |
getYoungBonusAgeThreshold()
|
double |
getYoungScoreBonus()
|
void |
setCollection(EncogCollection collection)
Set the Encog collection that this object belongs to. |
void |
setDescription(String theDescription)
Set the description. |
void |
setInnovations(InnovationList innovations)
Set the innovation list. |
void |
setName(String theName)
Set the name. |
void |
setOldAgePenalty(double oldAgePenalty)
Set the old age penalty. |
void |
setOldAgeThreshold(int oldAgeThreshold)
Set the threshold at which a genome is considered "old". |
void |
setPopulationSize(int populationSize)
Set the population size. |
void |
setSurvivalRate(double survivalRate)
Set the survival rate. |
void |
setYoungBonusAgeThreshhold(int youngBonusAgeThreshold)
Set the young bonus age threshold. |
void |
setYoungScoreBonus(double youngScoreBonus)
Set the young genome bonus. |
int |
size()
|
void |
sort()
Sort the population. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicPopulation()
public BasicPopulation(int populationSize)
populationSize - The population size.| Method Detail |
|---|
public void add(Genome genome)
add in interface Populationgenome - The genome to add.public void addAll(List<? extends Genome> newPop)
addAll in interface PopulationnewPop - A list of new genomes to add.public long assignGeneID()
assignGeneID in interface Populationpublic long assignGenomeID()
assignGenomeID in interface Populationpublic long assignInnovationID()
assignInnovationID in interface Populationpublic long assignSpeciesID()
assignSpeciesID in interface Populationpublic void clear()
clear in interface Populationpublic Persistor createPersistor()
EncogPersistedObject
createPersistor in interface EncogPersistedObjectpublic Genome get(int i)
get in interface Populationi - The genome to get.
public Genome getBest()
getBest in interface Populationpublic String getDescription()
getDescription in interface EncogPersistedObjectpublic List<Genome> getGenomes()
getGenomes in interface Populationpublic InnovationList getInnovations()
getInnovations in interface Populationpublic String getName()
getName in interface EncogPersistedObjectpublic double getOldAgePenalty()
getOldAgePenalty in interface Populationpublic int getOldAgeThreshold()
getOldAgeThreshold in interface Populationpublic int getPopulationSize()
getPopulationSize in interface Populationpublic List<Species> getSpecies()
getSpecies in interface Populationpublic double getSurvivalRate()
getSurvivalRate in interface Populationpublic int getYoungBonusAgeThreshold()
getYoungBonusAgeThreshold in interface Populationpublic double getYoungScoreBonus()
getYoungScoreBonus in interface Populationpublic void setDescription(String theDescription)
setDescription in interface EncogPersistedObjecttheDescription - The description.public void setInnovations(InnovationList innovations)
setInnovations in interface Populationinnovations - The innovations, or null to disable.public void setName(String theName)
setName in interface EncogPersistedObjecttheName - The new name.public void setOldAgePenalty(double oldAgePenalty)
setOldAgePenalty in interface PopulationoldAgePenalty - The percent the score is affected by.public void setOldAgeThreshold(int oldAgeThreshold)
setOldAgeThreshold in interface PopulationoldAgeThreshold - The age.public void setPopulationSize(int populationSize)
setPopulationSize in interface PopulationpopulationSize - The population size.public void setSurvivalRate(double survivalRate)
setSurvivalRate in interface PopulationsurvivalRate - The survival rate.public void setYoungBonusAgeThreshhold(int youngBonusAgeThreshold)
setYoungBonusAgeThreshhold in interface PopulationyoungBonusAgeThreshold - The age.public void setYoungScoreBonus(double youngScoreBonus)
setYoungScoreBonus in interface PopulationyoungScoreBonus - The score bonus.public int size()
size in interface Populationpublic void sort()
sort in interface Populationpublic EncogCollection getCollection()
getCollection in interface EncogPersistedObjectpublic void setCollection(EncogCollection collection)
setCollection in interface EncogPersistedObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||