search
Class GeneticSearchObj1

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

public class GeneticSearchObj1
extends GeneticSearchObject

The GeneticSearchObj1 class is a specialization of the GeneticSearchObject.


Fields inherited from class search.GeneticSearchObject
chromosome, chromosomeLength, crossoverRate, fitness, fitnessComputed, mutationRate, searchAgent, vocabulary
 
Constructor Summary
GeneticSearchObj1()
          Creates a GeneticSearchObj1 object.
 
Method Summary
 double computeFitness()
          Computes the fitness value by adding up the number of ones 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

GeneticSearchObj1

public GeneticSearchObj1()
Creates a GeneticSearchObj1 object.
Method Detail

computeFitness

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