|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anji.integration.TargetFitnessFunction
Determines fitness based on how close Activator
output is to a target.
Field Summary | |
static java.lang.String |
STIMULI_FILE_NAME_KEY
properties key, file containing strimuli |
static java.lang.String |
TARGETS_FILE_NAME_KEY
properties key, file containing output targets |
Constructor Summary | |
TargetFitnessFunction()
|
Method Summary | |
protected abstract int |
calculateErrorFitness(double[][] responses,
double minResponse,
double maxResponse)
|
void |
evaluate(java.util.List genotypes)
Iterates through chromosomes. |
int |
getMaxFitnessValue()
|
protected double[][] |
getStimuli()
|
protected double |
getTargetRange()
|
protected double[][] |
getTargets()
|
void |
init(Properties props)
See Parameter Details for specific property settings. |
protected void |
setMaxFitnessValue(int aMaxFitnessValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String STIMULI_FILE_NAME_KEY
public static final java.lang.String TARGETS_FILE_NAME_KEY
Constructor Detail |
public TargetFitnessFunction()
Method Detail |
public void init(Properties props)
init
in interface Configurable
props
- configuration parametersprotected void setMaxFitnessValue(int aMaxFitnessValue)
aMaxFitnessValue
- maximum raw fitness this function will returnpublic final void evaluate(java.util.List genotypes)
Activator
and
present the stimuli to the activator. The stimuli are presented in random order to ensure the
underlying network is not memorizing the sequence of inputs. Calculation of the fitness based
on error is delegated to the subclass. This method adjusts fitness for network size, based on
configuration.
evaluate
in interface BulkFitnessFunction
genotypes
- List
contains Chromosome
objects.calculateErrorFitness(double[][], double, double)
protected abstract int calculateErrorFitness(double[][] responses, double minResponse, double maxResponse)
responses
- minResponse
- maxResponse
-
evaluate(List)
protected double getTargetRange()
protected double[][] getStimuli()
protected double[][] getTargets()
public int getMaxFitnessValue()
getMaxFitnessValue
in interface BulkFitnessFunction
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |