Package libai.genetics
Interface Fitness
-
public interface FitnessClass to handle the fitness specification for the problem.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublefitness(Chromosome c)evaluate the fitness of the passed chromosome.booleanisBetter(double fitness, double best)is this fitness better than the best fitness known?doubletheWorst()the worst possible value OO or -OO
-
-
-
Method Detail
-
fitness
double fitness(Chromosome c)
evaluate the fitness of the passed chromosome.- Parameters:
c-c- Returns:
- fitness value for a given Chromosome
-
isBetter
boolean isBetter(double fitness, double best)is this fitness better than the best fitness known?- Parameters:
fitness-fitnessbest-best- Returns:
trueis this fitness better than the best fitness andfalseotherwise
-
theWorst
double theWorst()
the worst possible value OO or -OO- Returns:
- worst possible value OO or -OO
-
-