public class KozaFitness extends Fitness
Default Base
gp.koza.fitness
| Modifier and Type | Field and Description |
|---|---|
int |
hits
This auxillary measure is used in some problems for additional
information.
|
static String |
P_KOZAFITNESS |
protected double |
standardizedFitness
This ranges from 0 (best) to infinity (worst).
|
context, FITNESS_PREAMBLE, P_FITNESS, trials| Constructor and Description |
|---|
KozaFitness() |
| Modifier and Type | Method and Description |
|---|---|
double |
adjustedFitness()
Returns the adjusted fitness metric, which recasts the fitness
to the half-open interval (0,1], where 1 is ideal and 0 is worst.
|
boolean |
betterThan(Fitness _fitness)
Should return true if this fitness is clearly better than _fitness;
You may assume that _fitness is of the same class as yourself.
|
Parameter |
defaultBase()
Returns the default base for this prototype.
|
boolean |
equivalentTo(Fitness _fitness)
Should return true if this fitness is in the same equivalence class
as _fitness, that is, neither is clearly better or worse than the
other.
|
double |
fitness()
Returns the adjusted fitness metric, which recasts the
fitness to the half-open interval (0,1], where 1 is ideal and
0 is worst.
|
String |
fitnessToString()
Print to a string the fitness in a fashion intended
to be parsed in again via readFitness(...).
|
String |
fitnessToStringForHumans()
Print to a string the fitness in a fashion readable by humans, and not intended
to be parsed in again.
|
boolean |
isIdealFitness()
Should return true if this is a good enough fitness to end the run
|
double |
rawFitness()
Deprecated.
use standardizedFitness()
|
void |
readFitness(EvolutionState state,
DataInput dataInput)
Reads the binary form of an individual from a DataInput.
|
void |
readFitness(EvolutionState state,
LineNumberReader reader)
Reads in the fitness from a form outputted by fitnessToString() and thus
printFitnessForHumans(...).
|
void |
setFitness(EvolutionState state,
double _f)
Deprecated.
|
void |
setStandardizedFitness(EvolutionState state,
double _f)
Set the standardized fitness in the half-open interval [0.0,infinity)
which is defined (NOTE: DIFFERENT FROM fitness()!!!) as 0.0
being the IDEAL and infinity being worse than the worst possible.
|
void |
setToMeanOf(EvolutionState state,
Fitness[] fitnesses)
Sets the fitness to be the same value as the mean of the provided fitnesses.
|
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored
in state, built off of the parameter base base.
|
double |
standardizedFitness()
Returns the standardized fitness metric.
|
void |
writeFitness(EvolutionState state,
DataOutput dataOutput)
Writes the binary form of an individual out to a DataOutput.
|
clone, compareTo, contextIsBetterThan, getContext, merge, printFitness, printFitness, printFitness, printFitnessForHumans, printFitnessForHumans, readTrials, setContext, setContext, setToBestOf, setToMedianOf, writeTrialspublic static final String P_KOZAFITNESS
protected double standardizedFitness
public int hits
public Parameter defaultBase()
Prototypepublic void setFitness(EvolutionState state, double _f)
public void setStandardizedFitness(EvolutionState state, double _f)
public double fitness()
public double rawFitness()
public double standardizedFitness()
public double adjustedFitness()
public void setup(EvolutionState state, Parameter base)
PrototypeFor prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.
public boolean isIdealFitness()
FitnessisIdealFitness in class Fitnesspublic boolean equivalentTo(Fitness _fitness)
FitnessequivalentTo in class Fitnesspublic boolean betterThan(Fitness _fitness)
FitnessbetterThan in class Fitnesspublic String fitnessToString()
FitnessfitnessToString in class Fitnesspublic String fitnessToStringForHumans()
FitnessfitnessToStringForHumans in class Fitnesspublic void readFitness(EvolutionState state, LineNumberReader reader) throws IOException
FitnessreadFitness in class FitnessIOExceptionpublic void writeFitness(EvolutionState state, DataOutput dataOutput) throws IOException
FitnesswriteFitness in class FitnessIOExceptionpublic void readFitness(EvolutionState state, DataInput dataInput) throws IOException
FitnessreadFitness in class FitnessIOExceptionpublic void setToMeanOf(EvolutionState state, Fitness[] fitnesses)
FitnesssetToMeanOf in class FitnessCopyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.