|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.solve.genetic.GeneticAlgorithm
public class GeneticAlgorithm
Implements a genetic algorithm. This is an abstract class. Other classes are provided by Encog use this base class to train neural networks or provide an answer to the traveling salesman problem. The genetic algorithm is also capable of using a thread pool to speed execution.
| Constructor Summary | |
|---|---|
GeneticAlgorithm()
|
|
| Method Summary | |
|---|---|
void |
addSpeciesMember(Species species,
Genome genome)
Add a genome. |
void |
calculateScore(Genome g)
Calculate the score for this genome. |
CalculateGenomeScore |
getCalculateScore()
|
GenomeComparator |
getComparator()
|
Crossover |
getCrossover()
|
double |
getMatingPopulation()
Get the mating population. |
Mutate |
getMutate()
|
double |
getMutationPercent()
Get the mutation percent. |
double |
getPercentToMate()
Get the percent to mate. |
Population |
getPopulation()
|
void |
iteration()
Modify the weight matrix and bias values based on the last call to calcError. |
void |
setCalculateScore(CalculateGenomeScore calculateScore)
Set the score calculation object. |
void |
setComparator(GenomeComparator comparator)
Set the comparator. |
void |
setCrossover(Crossover crossover)
Set the crossover object. |
void |
setMatingPopulation(double matingPopulation)
Set the mating population percent. |
void |
setMutate(Mutate mutate)
Set the mutate object. |
void |
setMutationPercent(double mutationPercent)
Set the mutation percent. |
void |
setPercentToMate(double percentToMate)
Set the percent to mate. |
void |
setPopulation(Population population)
Set the population. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeneticAlgorithm()
| Method Detail |
|---|
public void calculateScore(Genome g)
g - The genome to calculate for.public CalculateGenomeScore getCalculateScore()
public GenomeComparator getComparator()
public Crossover getCrossover()
public double getMatingPopulation()
public Mutate getMutate()
public double getMutationPercent()
public double getPercentToMate()
public Population getPopulation()
public void iteration()
NeuralNetworkExceptionpublic void setCalculateScore(CalculateGenomeScore calculateScore)
calculateScore - The score calculation object.public void setComparator(GenomeComparator comparator)
comparator - The comparator.public void setCrossover(Crossover crossover)
crossover - The crossover object.public void setMatingPopulation(double matingPopulation)
matingPopulation - The mating population percent.public void setMutate(Mutate mutate)
mutate - The mutate object.public void setMutationPercent(double mutationPercent)
mutationPercent - The percent to mutate.public void setPercentToMate(double percentToMate)
percentToMate - The percent to mate.public void setPopulation(Population population)
population - The population.
public void addSpeciesMember(Species species,
Genome genome)
species - The species to add.genome - The genome to add.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||