|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Fitness functions are used to determine how optimal a particular solution is relative to other solutions. This interface should be implemented by all concrete fitness functions. The fitness function is given a Chromosome to evaluate and should return its fitness value. The higher the value, the more fit the Chromosome. The actual range of fitness values isn't important (other than the fact that the values must be of type int): it's the relative difference as a percentage that matters. So in other words, two Chromosomes with respective fitness values of 1 and 100 have the same relative fitness to each other as two Chromosomes with respective fitness values of 10 and 1000 (in each case, the first is 1% as fit as the second).
Note: Two Chromosomes of the same size and with equivalent sets of genes should always be assigned the same fitness value by any implementation of this method.
| Method Summary | |
int |
evaluate(org.jgap.Chromosome subject)
Determine the fitness of the given Chromosome instance. |
| Method Detail |
public int evaluate(org.jgap.Chromosome subject)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||