public class ParetoFitnessEvaluator extends TreeFitnessAbstract
OverallFitness
that calculates the values for the
different dimensions. It is best to only calculate the Pareto fitness when
the individual fitness values are know for the whole population.Modifier and Type | Class and Description |
---|---|
static class |
ParetoFitnessEvaluator.ParetoFitnessEvaluatorGUI
GUI interface for the
ParetoFitnessEvaluator class. |
TreeFitnessAbstract.TreeFitnessGUISettingsAbstract<F extends TreeFitnessAbstract>, TreeFitnessAbstract.TreeFitnessGUISettingsEmpty<F extends TreeFitnessAbstract>
Modifier and Type | Field and Description |
---|---|
static TreeFitnessInfo |
info |
protected ParetoFront |
paretoFront |
Constructor and Description |
---|
ParetoFitnessEvaluator(CentralRegistry registry)
Constructs a new
ParetoFitnessEvaluator instance. |
ParetoFitnessEvaluator(CentralRegistry registry,
ParetoFront paretoFront)
Constructs a new
ParetoFitnessEvaluator instance that can be used
directly to evaluate the Pareto fitness. |
Modifier and Type | Method and Description |
---|---|
double |
getFitness(NAryTree candidate,
java.util.List<? extends NAryTree> population)
Calculates a fitness score for the given candidate.
|
TreeFitnessInfo |
getInfo()
Returns the STATIC info for the metric instance
|
ParetoFront |
getParetoFront() |
double |
getRelativeDistance(NAryTree tree)
Returns the relative distance of the given tree to that of its neighbours
in the Pareto front.
|
static double |
getRelativeDistance(ParetoFront paretoFront,
NAryTree tree)
Returns the relative distance of the given tree to that of its neighbours
in the Pareto front.
|
void |
setParetoFront(ParetoFront paretoFront) |
deepClone, deepClone, getGUISettingsPanel, instantiateTreeFitness, isNatural
public static final TreeFitnessInfo info
protected ParetoFront paretoFront
public ParetoFitnessEvaluator(CentralRegistry registry)
ParetoFitnessEvaluator
instance. NOTE that you
need to call setParetoFront() before you can call getFitness()! Use this
constructor if you need to instantiate the evaluator without having a
ParetoFront
instance yet.registry
- public ParetoFitnessEvaluator(CentralRegistry registry, ParetoFront paretoFront)
ParetoFitnessEvaluator
instance that can be used
directly to evaluate the Pareto fitness.registry
- paretoFront
- public double getFitness(NAryTree candidate, java.util.List<? extends NAryTree> population)
FitnessEvaluator
FitnessEvaluator.isNatural()
). This method must always
return a value greater than or equal to zero. Framework behaviour is
undefined for negative fitness scores.candidate
- The candidate solution to calculate fitness for.population
- The entire population. This will include the specified
candidate. This is provided for fitness evaluators that
evaluate individuals in the context of the population that
they are part of (e.g. a program that evolves game-playing
strategies may wish to play each strategy against each of the
others). This parameter can be ignored by simple fitness
evaluators. When iterating over the population, a simple
reference equality check (==) can be used to identify which
member of the population is the specified candidate.public TreeFitnessInfo getInfo()
TreeFitnessAbstract
getInfo
in class TreeFitnessAbstract
public void setParetoFront(ParetoFront paretoFront)
public ParetoFront getParetoFront()
public double getRelativeDistance(NAryTree tree)
tree
- public static double getRelativeDistance(ParetoFront paretoFront, NAryTree tree)
paretoFront
- tree
-