public interface FitnessFunction
Organism
in a
Population
of Organisms
Modifier and Type | Method and Description |
---|---|
double[] |
fitness(Organism org,
Population pop,
GeneticAlgorithm genAlg)
Calculates the fitness of
org . |
double[] fitness(Organism org, Population pop, GeneticAlgorithm genAlg)
org
. This can be done
independently of the Population pop (by ignoring the argument in your
implementation) or dependent on the other members of the
Population pop
. Every implementation of this function
should assign the fitness value computed in this function to the given
organism. This is important so that the organism knows its current fitness.
Note that for simple problems this fitness array will contain only one
single value. However, to enable multi-objective fitness functions this has
to be an array.org
- The Organism
to scorepop
- The Population
to considergenAlg
- the parentGeneticAlgorithm
Copyright © 2014 BioJava. All rights reserved.