org.encog.ml.ea.population
Interface Population
-
- All Superinterfaces:
- MLMethod, java.io.Serializable
- All Known Implementing Classes:
- BasicPopulation, NEATPopulation, PrgPopulation
public interface Population extends java.io.Serializable, MLMethod
Defines a population of genomes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidclear()Clear all genomes from this population.SpeciescreateSpecies()Create a species.SpeciesdetermineBestSpecies()Determine which species has the top genome.java.util.List<Genome>flatten()Flatten the species into a single list of genomes.GenomegetBestGenome()GenomeFactorygetGenomeFactory()intgetMaxIndividualSize()intgetPopulationSize()RuleHoldergetRules()java.util.List<Species>getSpecies()voidpurgeInvalidGenomes()Purge any invalid genomes.voidsetBestGenome(Genome bestGenome)Set the best genome.voidsetGenomeFactory(GenomeFactory factory)Set the gnome factory.voidsetPopulationSize(int populationSize)Set the max population size.voidsetRules(RuleHolder rules)Set the rules holder to use.intsize()
-
-
-
Method Detail
-
clear
void clear()
Clear all genomes from this population.
-
createSpecies
Species createSpecies()
Create a species.- Returns:
- The newly created species.
-
determineBestSpecies
Species determineBestSpecies()
Determine which species has the top genome.- Returns:
- The species with the top genome.
-
flatten
java.util.List<Genome> flatten()
Flatten the species into a single list of genomes.- Returns:
- The genomes that make up all species in the population.
-
getBestGenome
Genome getBestGenome()
- Returns:
- The best genome in the population.
-
getGenomeFactory
GenomeFactory getGenomeFactory()
- Returns:
- A factory used to create genomes.
-
getMaxIndividualSize
int getMaxIndividualSize()
- Returns:
- The max size that an individual can become.
-
getPopulationSize
int getPopulationSize()
- Returns:
- The max population size.
-
getSpecies
java.util.List<Species> getSpecies()
- Returns:
- The species that make up the population.
-
setBestGenome
void setBestGenome(Genome bestGenome)
Set the best genome.- Parameters:
bestGenome- The best genome.
-
setGenomeFactory
void setGenomeFactory(GenomeFactory factory)
Set the gnome factory.- Parameters:
factory- The genome factory.
-
setPopulationSize
void setPopulationSize(int populationSize)
Set the max population size.- Parameters:
populationSize- The max population size.
-
size
int size()
- Returns:
- The size of the population.
-
purgeInvalidGenomes
void purgeInvalidGenomes()
Purge any invalid genomes.
-
getRules
RuleHolder getRules()
- Returns:
- The rules holder, contains rewrite and constraint rules.
-
setRules
void setRules(RuleHolder rules)
Set the rules holder to use.- Parameters:
rules- The rules holder.
-
-
DMelt 3.0 © DataMelt by jWork.ORG