|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Population
Defines a population of genomes.
| Field Summary | |
|---|---|
static String |
PROPERTY_GENOMES
Property tag for the genomes collection. |
static String |
PROPERTY_INNOVATIONS
Property tag for the innovations collection. |
static String |
PROPERTY_NEXT_GENE_ID
Property tag for the next gene id. |
static String |
PROPERTY_NEXT_GENOME_ID
Property tag for the next genome id. |
static String |
PROPERTY_NEXT_INNOVATION_ID
Property tag for the next innovation id. |
static String |
PROPERTY_NEXT_SPECIES_ID
Property tag for the next species id. |
static String |
PROPERTY_OLD_AGE_PENALTY
Property tag for the old age penalty. |
static String |
PROPERTY_OLD_AGE_THRESHOLD
Property tag for the old age threshold. |
static String |
PROPERTY_POPULATION_SIZE
Property tag for the population size. |
static String |
PROPERTY_SPECIES
Property tag for the species collection. |
static String |
PROPERTY_SURVIVAL_RATE
Property tag for the survival rate. |
static String |
PROPERTY_YOUNG_AGE_BONUS
Property tag for the young age bonus. |
static String |
PROPERTY_YOUNG_AGE_THRESHOLD
Property tag for the young age threshold. |
| 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 |
claim(GeneticAlgorithm ga)
Claim the population, before training. |
void |
clear()
Clear all genomes from this population. |
Genome |
get(int i)
Get a genome by index. |
Genome |
getBest()
|
List<Genome> |
getGenomes()
|
InnovationList |
getInnovations()
|
double |
getOldAgePenalty()
|
int |
getOldAgeThreshold()
|
int |
getPopulationSize()
|
List<Species> |
getSpecies()
|
double |
getSurvivalRate()
|
int |
getYoungBonusAgeThreshold()
|
double |
getYoungScoreBonus()
|
void |
setInnovations(InnovationList innovations)
Set the innovations collection. |
void |
setOldAgePenalty(double oldAgePenalty)
Set the old age penalty. |
void |
setOldAgeThreshold(int oldAgeThreshold)
Set the age at which a genome is considered "old". |
void |
setPopulationSize(int populationSize)
Set the max population size. |
void |
setSurvivalRate(double survivalRate)
Set the survival rate. |
void |
setYoungBonusAgeThreshhold(int youngBonusAgeThreshhold)
Set the age at which genoms are considered young. |
void |
setYoungScoreBonus(double youngScoreBonus)
Set the youth score bonus. |
int |
size()
|
void |
sort()
Sort the population by best score. |
| Field Detail |
|---|
static final String PROPERTY_NEXT_GENE_ID
static final String PROPERTY_NEXT_GENOME_ID
static final String PROPERTY_NEXT_INNOVATION_ID
static final String PROPERTY_NEXT_SPECIES_ID
static final String PROPERTY_OLD_AGE_PENALTY
static final String PROPERTY_OLD_AGE_THRESHOLD
static final String PROPERTY_POPULATION_SIZE
static final String PROPERTY_SURVIVAL_RATE
static final String PROPERTY_YOUNG_AGE_BONUS
static final String PROPERTY_YOUNG_AGE_THRESHOLD
static final String PROPERTY_GENOMES
static final String PROPERTY_INNOVATIONS
static final String PROPERTY_SPECIES
| Method Detail |
|---|
void add(Genome genome)
genome - The genome to add.void addAll(List<? extends Genome> newPop)
newPop - A list of new genomes to add.long assignGeneID()
long assignGenomeID()
long assignInnovationID()
long assignSpeciesID()
void clear()
Genome get(int i)
i - The genome to get.
Genome getBest()
List<Genome> getGenomes()
InnovationList getInnovations()
double getOldAgePenalty()
int getOldAgeThreshold()
int getPopulationSize()
List<Species> getSpecies()
double getSurvivalRate()
int getYoungBonusAgeThreshold()
double getYoungScoreBonus()
void setInnovations(InnovationList innovations)
innovations - The innovations collection.void setOldAgePenalty(double oldAgePenalty)
oldAgePenalty - The old age penalty.void setOldAgeThreshold(int oldAgeThreshold)
oldAgeThreshold - The old age threshold.void setPopulationSize(int populationSize)
populationSize - The max population size.void setSurvivalRate(double survivalRate)
survivalRate - The survival rate.void setYoungBonusAgeThreshhold(int youngBonusAgeThreshhold)
youngBonusAgeThreshhold - The age.void setYoungScoreBonus(double youngScoreBonus)
youngScoreBonus - The bonus.int size()
void sort()
void claim(GeneticAlgorithm ga)
ga - The GA that is claiming.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||