|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.ea.species.BasicSpecies
public class BasicSpecies
Provides basic functionality for a species.
| Constructor Summary | |
|---|---|
BasicSpecies()
Default constructor, used mainly for persistence. |
|
BasicSpecies(Population thePopulation,
Genome theFirst)
Construct a species. |
|
| Method Summary | |
|---|---|
void |
add(Genome genome)
Add a genome to this species. |
double |
calculateShare(boolean shouldMinimize,
double maxScore)
Calculate this genome's share of the next population. |
int |
getAge()
|
double |
getBestScore()
|
int |
getGensNoImprovement()
|
Genome |
getLeader()
|
List<Genome> |
getMembers()
|
int |
getOffspringCount()
|
double |
getOffspringShare()
|
Population |
getPopulation()
|
void |
purge()
Purge all members, increase age by one and count the number of generations with no improvement. |
void |
setAge(int theAge)
Set the age of this species. |
void |
setBestScore(double theBestScore)
Set the best score for this species. |
void |
setGensNoImprovement(int theGensNoImprovement)
Set the number of generations with no improvement. |
void |
setLeader(Genome theLeader)
Set the leader of this species. |
void |
setOffspringCount(int offspringCount)
Set the offspring count. |
void |
setPopulation(Population thePopulation)
Set the population. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicSpecies()
public BasicSpecies(Population thePopulation,
Genome theFirst)
thePopulation - The population the species belongs to.theFirst - The first genome in the species.| Method Detail |
|---|
public void add(Genome genome)
add in interface Speciesgenome - The genome to add.
public double calculateShare(boolean shouldMinimize,
double maxScore)
calculateShare in interface SpeciesshouldMinimize - True if we see to minimize the score.maxScore - The best score.
public int getAge()
getAge in interface Speciespublic double getBestScore()
getBestScore in interface Speciespublic int getGensNoImprovement()
getGensNoImprovement in interface Speciespublic Genome getLeader()
getLeader in interface Speciespublic List<Genome> getMembers()
getMembers in interface Speciespublic int getOffspringCount()
getOffspringCount in interface Speciespublic double getOffspringShare()
getOffspringShare in interface Speciespublic Population getPopulation()
getPopulation in interface Speciespublic void purge()
public void setAge(int theAge)
setAge in interface SpeciestheAge - The age.public void setBestScore(double theBestScore)
setBestScore in interface SpeciestheBestScore - The best score.public void setGensNoImprovement(int theGensNoImprovement)
setGensNoImprovement in interface SpeciestheGensNoImprovement - The generation count with no improvement.public void setLeader(Genome theLeader)
setLeader in interface SpeciestheLeader - The leader.public void setOffspringCount(int offspringCount)
setOffspringCount in interface SpeciesoffspringCount - The offspring count.public void setPopulation(Population thePopulation)
setPopulation in interface SpeciesthePopulation - The population.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||