gov.nasa.javaGenes.core
Class ParsimonyFitness
java.lang.Object
gov.nasa.javaGenes.core.FitnessFunction
gov.nasa.javaGenes.core.ParsimonyFitness
- All Implemented Interfaces:
- java.io.Serializable
- public class ParsimonyFitness
- extends FitnessFunction
this fitness function is used penalizes large evolvables. Returns 1 for the smallest
evolvables, greater numbers for larger ones. Is meant to be used with MultiplyFitnessFunction.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
minimumSize
protected int minimumSize
factor
protected double factor
ParsimonyFitness
public ParsimonyFitness()
ParsimonyFitness
public ParsimonyFitness(int m,
double f)
- Parameters:
m
- minimum size of evolvable for penalties to be assessedf
- the factor to be assessed for each increments in evolvable size above the minimum
evaluateFitness
public Fitness evaluateFitness(Evolvable evolvable)
- Specified by:
evaluateFitness
in class FitnessFunction
- Returns:
- the fitness. Low values are fitter than high values.
toString
public java.lang.String toString()