org.encog.ml.ea.species
Interface Species
-
- All Known Implementing Classes:
- BasicSpecies
public interface SpeciesDefines a species.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidadd(Genome genome)Add a genome to this species.doublecalculateShare(boolean shouldMinimize, double maxScore)Calculate this genome's share of the next population.intgetAge()doublegetBestScore()intgetGensNoImprovement()GenomegetLeader()java.util.List<Genome>getMembers()intgetOffspringCount()doublegetOffspringShare()PopulationgetPopulation()voidsetAge(int theAge)Set the age of this species.voidsetBestScore(double theBestScore)Set the best score for this species.voidsetGensNoImprovement(int theGensNoImprovement)Set the number of generations with no improvement.voidsetLeader(Genome theLeader)Set the leader of this species.voidsetOffspringCount(int offspringCount)Set the offspring count.voidsetPopulation(Population thePopulation)Set the population.
-
-
-
Method Detail
-
add
void add(Genome genome)
Add a genome to this species.- Parameters:
genome- The genome to add.
-
calculateShare
double calculateShare(boolean shouldMinimize, double maxScore)Calculate this genome's share of the next population.- Parameters:
shouldMinimize- True if we see to minimize the score.maxScore- The best score.- Returns:
- The share of this species, as a percent ratio.
-
getAge
int getAge()
- Returns:
- The age of this species.
-
getBestScore
double getBestScore()
- Returns:
- The best score for this species.
-
getGensNoImprovement
int getGensNoImprovement()
- Returns:
- The number of generations with no imrpvement.
-
getLeader
Genome getLeader()
- Returns:
- The leader of this species.
-
getMembers
java.util.List<Genome> getMembers()
- Returns:
- The members of this species.
-
getOffspringCount
int getOffspringCount()
- Returns:
- Get the offspring count.
-
getOffspringShare
double getOffspringShare()
- Returns:
- The offspring share for the next iteration's population.
-
getPopulation
Population getPopulation()
- Returns:
- The population.
-
setAge
void setAge(int theAge)
Set the age of this species.- Parameters:
theAge- The age.
-
setBestScore
void setBestScore(double theBestScore)
Set the best score for this species.- Parameters:
theBestScore- The best score.
-
setGensNoImprovement
void setGensNoImprovement(int theGensNoImprovement)
Set the number of generations with no improvement.- Parameters:
theGensNoImprovement- The generation count with no improvement.
-
setLeader
void setLeader(Genome theLeader)
Set the leader of this species.- Parameters:
theLeader- The leader.
-
setOffspringCount
void setOffspringCount(int offspringCount)
Set the offspring count.- Parameters:
offspringCount- The offspring count.
-
setPopulation
void setPopulation(Population thePopulation)
Set the population.- Parameters:
thePopulation- The population.
-
-
DMelt 3.0 © DataMelt by jWork.ORG