
aima.core.search.local.FitnessFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aima-core Show documentation
Show all versions of aima-core Show documentation
AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.
package aima.core.search.local;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 127.
*
* Each state is rated by the objective function, or (in Genetic Algorithm
* terminology) the fitness function. A fitness function should return higher
* values for better states.
*
* @author Ciaran O'Reilly
*
* @param
* the type of the alphabet used in the representation of the
* individuals in the population (this is to provide flexibility in
* terms of how a problem can be encoded).
*/
public interface FitnessFunction {
/**
*
* @param individual
* the individual whose fitness is to be accessed.
* @return the individual's fitness value (the higher the better).
*/
double getValue(Individual individual);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy