FitnessResult class abstract

This is an encoding of a phenotype's fitness. In simple cases, you can just use SingleObjectiveResult, which is just a single double, essentially.

But many scenarios require multi-dimensional fitness results. For example, a car can have various degrees of being comfortable, safe and fast. When comparing two cars, you don't want to just average the three traits into one. This is the idea behind Pareto fronts and Multi-objective optimization.

Implemented types
Implementers

Constructors

FitnessResult()

Properties

hashCode int
The hash code for this object.
no setterinherited
paretoRank int
Pareto rank of the fitness result. This is computed and assigned in GeneticAlgorithm._assignParetoRanks.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(FitnessResult other) int
Fitness results compare according to their paretoRank first and then according to the result of evaluate.
override
dominates(covariant FitnessResult other) bool
A result dominates other results if it's better in every aspect.
evaluate() double
Evaluates to a single numeric value. This goes against the multi-dimensionality of this class, but it's sometimes useful. For example, fitness sharing needs it, and it's easier for printing to the user.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited