com.anji.integration
Class ExponentialTargetFitnessFunction

java.lang.Object
  extended bycom.anji.integration.TargetFitnessFunction
      extended bycom.anji.integration.ExponentialTargetFitnessFunction
All Implemented Interfaces:
BulkFitnessFunction, Configurable, java.io.Serializable

public class ExponentialTargetFitnessFunction
extends TargetFitnessFunction

Fitness function where error is exponential; i.e., as the error gets closer to 0, the fitness increases exponentially, at a greater rate than simply squaring the error. Fitness is skewed such that max fitness is Integer.MAX_VALUE. See calculateErrorFitness() and calculateSkewedFitness() for details.

Author:
Philip Tucker
See Also:
TargetFitnessFunction, Serialized Form

Field Summary
 
Fields inherited from class com.anji.integration.TargetFitnessFunction
STIMULI_FILE_NAME_KEY, TARGETS_FILE_NAME_KEY
 
Constructor Summary
ExponentialTargetFitnessFunction()
           
 
Method Summary
protected  int calculateErrorFitness(double[][] responses, double minResponse, double maxResponse)
           
 void init(Properties newProps)
          See Parameter Details for specific property settings.
 
Methods inherited from class com.anji.integration.TargetFitnessFunction
evaluate, getMaxFitnessValue, getStimuli, getTargetRange, getTargets, setMaxFitnessValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExponentialTargetFitnessFunction

public ExponentialTargetFitnessFunction()
Method Detail

init

public void init(Properties newProps)
See Parameter Details for specific property settings.

Specified by:
init in interface Configurable
Overrides:
init in class TargetFitnessFunction
Parameters:
newProps - configuration parameters

calculateErrorFitness

protected int calculateErrorFitness(double[][] responses,
                                    double minResponse,
                                    double maxResponse)
Specified by:
calculateErrorFitness in class TargetFitnessFunction
Parameters:
responses -
minResponse -
maxResponse -
Returns:
int exponential fitness, calculated by squaring the error of each response, summing those errors, and using that error as an exponent to Math.E.
See Also:
TargetFitnessFunction.evaluate(List)