ec.coevolve
Class IncrementalAveragedFitness

java.lang.Object
  |
  +--ec.simple.SimpleFitness
        |
        +--ec.coevolve.IncrementalAveragedFitness
All Implemented Interfaces:
java.lang.Cloneable, Fitness, IncrementalFitness, Prototype, java.io.Serializable, Setup

public class IncrementalAveragedFitness
extends SimpleFitness
implements IncrementalFitness

IncrementalAveragedFitness is a SimpleFitness which adheres to the IncrementalFitness protocol, then bases its fitness value on the average results of each of the updateFitness() methods received.

See Also:
Serialized Form

Fields inherited from class ec.simple.SimpleFitness
fitness, FITNESS_PREAMBLE, isIdeal, P_FITNESS
 
Constructor Summary
IncrementalAveragedFitness()
           
 
Method Summary
 void postprocessFitness()
          A function to be called for finalizing the calculation of the fitness.
 void preprocessFitness()
          A function to be called before the repeated fitness assessment starts.
 void updateFitness(float newFitness)
          Update the cumulative fitness of the individual
 
Methods inherited from class ec.simple.SimpleFitness
betterThan, defaultBase, equivalentTo, fitness, isIdealFitness, printFitness, printFitness, printFitnessForHumans, protoClone, protoCloneSimple, readFitness, setFitness, setFitness, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncrementalAveragedFitness

public IncrementalAveragedFitness()
Method Detail

preprocessFitness

public void preprocessFitness()
A function to be called before the repeated fitness assessment starts. It initializes the variables needed to calculate the averaged fitness.
Specified by:
preprocessFitness in interface IncrementalFitness

postprocessFitness

public void postprocessFitness()
A function to be called for finalizing the calculation of the fitness. It transforms the cumulative fitness to a mean fitness
Specified by:
postprocessFitness in interface IncrementalFitness

updateFitness

public void updateFitness(float newFitness)
Update the cumulative fitness of the individual
Specified by:
updateFitness in interface IncrementalFitness