org.encog.ml.genetic.species
Interface Species

All Known Implementing Classes:
BasicSpecies

public interface Species

Defines the features used in a species. A species is a group of genomes.


Method Summary
 void calculateSpawnAmount()
          Calculate the amount that a species will spawn.
 Genome chooseParent()
          Choose a worthy parent for mating.
 int getAge()
           
 double getBestScore()
           
 int getGensNoImprovement()
           
 Genome getLeader()
           
 List<Genome> getMembers()
           
 double getNumToSpawn()
           
 double getSpawnsRequired()
           
 long getSpeciesID()
           
 void purge()
          Purge old unsuccessful genomes.
 void setAge(int age)
          Set the age of this species.
 void setBestScore(double bestScore)
          Set the best score.
 void setGensNoImprovement(int gensNoImprovement)
          Set the number of generations with no improvement.
 void setLeader(Genome leader)
          Set the leader of this species.
 void setSpawnsRequired(double spawnsRequired)
          Set the number of spawns required.
 

Method Detail

calculateSpawnAmount

void calculateSpawnAmount()
Calculate the amount that a species will spawn.


chooseParent

Genome chooseParent()
Choose a worthy parent for mating.

Returns:
The parent genome.

getAge

int getAge()
Returns:
The age of this species.

getBestScore

double getBestScore()
Returns:
The best score for this species.

getGensNoImprovement

int getGensNoImprovement()
Returns:
How many generations with no improvement.

getLeader

Genome getLeader()
Returns:
Get the leader for this species. The leader is the genome with the best score.

getMembers

List<Genome> getMembers()
Returns:
The numbers of this species.

getNumToSpawn

double getNumToSpawn()
Returns:
The number of genomes this species will try to spawn into the next generation.

getSpawnsRequired

double getSpawnsRequired()
Returns:
The number of spawns this species requires.

getSpeciesID

long getSpeciesID()
Returns:
The species ID.

purge

void purge()
Purge old unsuccessful genomes.


setAge

void setAge(int age)
Set the age of this species.

Parameters:
age - The age.

setBestScore

void setBestScore(double bestScore)
Set the best score.

Parameters:
bestScore - The best score.

setGensNoImprovement

void setGensNoImprovement(int gensNoImprovement)
Set the number of generations with no improvement.

Parameters:
gensNoImprovement - The number of generations with no improvement.

setLeader

void setLeader(Genome leader)
Set the leader of this species.

Parameters:
leader - The leader of this species.

setSpawnsRequired

void setSpawnsRequired(double spawnsRequired)
Set the number of spawns required.

Parameters:
spawnsRequired - The number of spawns required.


Copyright © 2011. All Rights Reserved.