JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.core
Class FitnessFunctionWorstFitness

java.lang.Object
  extended bygov.nasa.javaGenes.core.FitnessFunction
      extended bygov.nasa.javaGenes.core.FitnessFunctionWorstFitness
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FitnessFunctionWorstFitnessManyTries

public class FitnessFunctionWorstFitness
extends FitnessFunction

this fitness function will run another fitness function N times on variations of the Evolvable. Usually the variations will be in the phenotype. The worst fitness of the variations will be the fitness of the Evolvable.

See Also:
Serialized Form

Field Summary
static boolean debug
           
static java.lang.String debugFilename
           
protected  FitnessFunction fitnessFunction
           
protected  PhenotypeChanger phenotypeChanger
           
 
Fields inherited from class gov.nasa.javaGenes.core.FitnessFunction
name
 
Constructor Summary
FitnessFunctionWorstFitness(FitnessFunction fitnessFunction, PhenotypeChanger phenotypeChanger)
           
 
Method Summary
 Fitness evaluateFitness(Evolvable evolvable)
           
 FitnessFunction getFitnessFunction()
           
protected  Fitness getWorst(Evolvable[] allEvolvables, Fitness[] forDebuging)
           
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.javaGenes.core.FitnessFunction
bestDouble, getFunction, getName, getNameArray, isNewFunction, makeFiles, numberOfObjectives, report, setName, worstDouble
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static boolean debug

debugFilename

public static final java.lang.String debugFilename
See Also:
Constant Field Values

fitnessFunction

protected FitnessFunction fitnessFunction

phenotypeChanger

protected PhenotypeChanger phenotypeChanger
Constructor Detail

FitnessFunctionWorstFitness

public FitnessFunctionWorstFitness(FitnessFunction fitnessFunction,
                                   PhenotypeChanger phenotypeChanger)
Method Detail

evaluateFitness

public Fitness evaluateFitness(Evolvable evolvable)
Specified by:
evaluateFitness in class FitnessFunction
Returns:
the fitness. Low values are fitter than high values.

getWorst

protected Fitness getWorst(Evolvable[] allEvolvables,
                           Fitness[] forDebuging)

getFitnessFunction

public FitnessFunction getFitnessFunction()

toString

public java.lang.String toString()

JavaGenes, NASA Ames. Written largely by Al Globus