org.jgap
Interface INaturalSelector

All Known Implementing Classes:
NaturalSelector

public interface INaturalSelector

Natural selectors are responsible for actually selecting a specified number of Chromosome specimens from a population, using the fitness values as a guide. Usually fitness is treated as a statistic probability of survival, not as the sole determining factor. Therefore, Chromosomes with higher fitness values are more likely to survive than those with lesser fitness values, but it's not guaranteed.

Since:
2.0 (previously named "NaturalSelector")
Author:
Neil Rotstan, Klaus Meffert

Field Summary
static java.lang.String CVS_REVISION
          String containing the CVS revision.
 
Method Summary
 void empty()
          Empty out the working pool of Chromosomes.
 boolean returnsUniqueChromosomes()
           
 void select(int a_howManyToSelect, Population a_from_population, Population a_to_population)
          Select a given number of Chromosomes from the pool that will move on to the next generation population.
 

Field Detail

CVS_REVISION

public static final java.lang.String CVS_REVISION
String containing the CVS revision. Read out via reflection!

See Also:
Constant Field Values
Method Detail

select

public void select(int a_howManyToSelect,
                   Population a_from_population,
                   Population a_to_population)
Select a given number of Chromosomes from the pool that will move on to the next generation population. This selection should be guided by the fitness values, but fitness should be treated as a statistical probability of survival, not as the sole determining factor. In other words, Chromosomes with higher fitness values should be more likely to be selected than those with lower fitness values, but it should not be guaranteed.

Parameters:
a_howManyToSelect - The number of Chromosomes to select.
a_from_population - the population the Chromosomes will be selected from.
a_to_population - the population the Chromosomes will be added to.
Since:
2.0 (since 1.0 with different return type)

empty

public void empty()
Empty out the working pool of Chromosomes. This will be invoked after each evolution cycle so that the natural selector can be reused for the next one.

Since:
1.0

returnsUniqueChromosomes

public boolean returnsUniqueChromosomes()
Returns:
true: The implementation of the NaturalSelector only returns unique Chromosome's (example: BestChromosomesSelector). false: Also doublette could be returned (example: WeightedRouletteSelector)
Since:
2.0