T
- The type of evolved entity that we are selecting.public interface SelectionStrategy<T extends AbstractMutant>
Strategy interface for "natural" selection.
Idea originally taken from watchmaker
Modifier and Type | Method and Description |
---|---|
java.util.List<T> |
select(Population<T> population,
int selectionSize)
Select the specified number of candidates from the population.
|
java.util.List<T> select(Population<T> population, int selectionSize)
Select the specified number of candidates from the population. Implementations may assume that the population is sorted in descending order according to fitness (so the fittest individual is the first item in the list).
It is an error to call this method with an empty or null population.
population
- The Population
from which to select.selectionSize
- The number of individual selections to make.