The numeric rank of an Individual in an Environment.
Fitness provides a numeric representation of an Individual's performance in an Environment. This is one of the most important parts of the Genetic Programming algorithm since it determines how new Individuals will be created. Because of this, it is important to choose a fitness calculation that matches the goal of the problem.
For example, in the case of the path-finding Artificial Ant problem, the goal is to find all of the food in the minimum number of steps. If you were to measure the only the number of steps taken, you would probably evolve an ant that never moved (the minimum number of steps possible), which would not be very useful.
The idea of fitness includes several related concepts [Note: only the common fitness processing concepts are listed below]:
Sometimes, other metrics (such as the size of an Individual or the number of steps that Individual took in the environment) are incorporated into the final fitness value.
In this framework, the various fitness concepts are used as follows:
No restrictions are placed on the output values of the Aggregator and Normalizer methods by the framework, though some selection techniques require such a format (such as fitness-proportional selection requiring a normalized value between 0 and 1).
As for the use of external metrics in the fitness calculation, in practice this is problematic. The metric values must be normalized to correspond with the fitness values (too large and the only thing you measure is the metric; too small and the metric has no effect) and then combined with one of the fitness processing steps (Aggregate it as another fitness value? Use it as a normalization factor?).
Adding such a facility to incorporate arbitrary metrics would have provided limited functionality at the cost of a much more complicated interface, so we decided against it. However, there is nothing to prevent users from incorporating such metrics into their own fitness calculations.
IHistory Interface | GeneticProgrammingEngine.ProblemSpace Namespace | History Term | EngineOptions Class | MaximizeFitness Property | Aggregator Property | Normalizer Property