aima.search.informed.ga
Class GeneticAlgorithm

java.lang.Object
  extended by aima.search.informed.ga.GeneticAlgorithm

public class GeneticAlgorithm
extends java.lang.Object


Field Summary
protected static java.lang.String ITERATIONS
           
protected  Metrics metrics
           
protected static java.lang.String POPULATION_SIZE
           
 
Constructor Summary
GeneticAlgorithm(int individualLength, java.util.Set<java.lang.Character> finiteAlphabet, double mutationProbability)
           
 
Method Summary
 void clearInstrumentation()
           
 java.lang.String geneticAlgorithm(java.util.Set<java.lang.String> population, FitnessFunction fitnessFn, GoalTest goalTest)
           
 java.lang.String geneticAlgorithm(java.util.Set<java.lang.String> population, FitnessFunction fitnessFn, int iterations)
           
 int getIterations()
           
 Metrics getMetrics()
           
 int getPopulationSize()
           
 void setIterations(int cnt)
           
 void setPopulationSize(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metrics

protected Metrics metrics

POPULATION_SIZE

protected static final java.lang.String POPULATION_SIZE
See Also:
Constant Field Values

ITERATIONS

protected static final java.lang.String ITERATIONS
See Also:
Constant Field Values
Constructor Detail

GeneticAlgorithm

public GeneticAlgorithm(int individualLength,
                        java.util.Set<java.lang.Character> finiteAlphabet,
                        double mutationProbability)
Method Detail

geneticAlgorithm

public java.lang.String geneticAlgorithm(java.util.Set<java.lang.String> population,
                                         FitnessFunction fitnessFn,
                                         GoalTest goalTest)

geneticAlgorithm

public java.lang.String geneticAlgorithm(java.util.Set<java.lang.String> population,
                                         FitnessFunction fitnessFn,
                                         int iterations)

clearInstrumentation

public void clearInstrumentation()

getMetrics

public Metrics getMetrics()

getPopulationSize

public int getPopulationSize()

setPopulationSize

public void setPopulationSize(int size)

getIterations

public int getIterations()

setIterations

public void setIterations(int cnt)