search
Class GeneticSearchObj2

java.lang.Object
  |
  +--search.GeneticSearchObject
        |
        +--search.GeneticSearchObj2

public class GeneticSearchObj2
extends GeneticSearchObject

The GeneticSearchObj2 class is a specialization of the GeneticSearchObject.


Fields inherited from class search.GeneticSearchObject
chromosome, chromosomeLength, crossoverRate, fitness, fitnessComputed, mutationRate, searchAgent, vocabulary
 
Constructor Summary
GeneticSearchObj2()
          Creates a GeneticSearchObj2 object.
 
Method Summary
 double computeFitness()
          Computes the fitness value by adding up the number of zeros in the chromosome.
 
Methods inherited from class search.GeneticSearchObject
binaryToInteger, generateRandomChromosome, getChromosome, getChromosomeLength, getCrossoverRate, getFitness, getMutationRate, getOperatorFitness, getRandomChromosome, getVocabulary, setChromosome, setCrossoverRate, setMutationRate, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeneticSearchObj2

public GeneticSearchObj2()
Creates a GeneticSearchObj2 object.
Method Detail

computeFitness

public double computeFitness()
Computes the fitness value by adding up the number of zeros in the chromosome. For early stopping, use a fitness threshold of 20.
Returns:
the computed fitness value
Overrides:
computeFitness in class GeneticSearchObject