|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.artoflife.gp.Selector
Used to select Individuals from a Population
on the basis of Individuals' Fitnesses. A Selector is
initialised with a source Collection of Individuals from
which to select, and can then select any number
of Individuals at a time from that original population
(by executing individual selections a number of times).
| Field Summary | |
protected java.util.List |
individuals
A list of source individuals to select from. |
| Constructor Summary | |
Selector()
|
|
| Method Summary | |
void |
initialise(java.util.Collection individuals)
Initialise with the individuals to be selected from. |
protected java.util.Collection |
select(int numberToSelect,
boolean chooseFittest)
Select a number of Individuals
from the pool according to some Fitness-based strategy,
removing the selected individuals from the pool. |
Individual |
selectFittest()
Select a single Individual from the fittest in the pool. |
java.util.Collection |
selectFittest(int numberToSelect)
Select a number of Individuals from the fittest in the pool. |
protected abstract Individual |
selectOne(boolean chooseFittest)
Override to select a single individual from the original pool according to some Fitness-based strategy, removing the selected Individual from the available pool. |
Individual |
selectWeakest()
Select a single Individual from the weakest in the pool. |
java.util.Collection |
selectWeakest(int numberToSelect)
Select a number of Individuals from the weakest in the pool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.List individuals
initialise(java.util.Collection).
| Constructor Detail |
public Selector()
| Method Detail |
public void initialise(java.util.Collection individuals)
protected abstract Individual selectOne(boolean chooseFittest)
chooseFittest - true to choose from the fittest Individuals
or false to choose from the weakest
protected java.util.Collection select(int numberToSelect,
boolean chooseFittest)
Individuals
from the pool according to some Fitness-based strategy,
removing the selected individuals from the pool.
numberToSelect - number of Individuals to selectchooseFittest - true to choose from the fittest Individuals
or false to choose from the weakest
public java.util.Collection selectFittest(int numberToSelect)
Individuals from the fittest in the pool.
public java.util.Collection selectWeakest(int numberToSelect)
Individuals from the weakest in the pool.
public Individual selectFittest()
Individual from the fittest in the pool.
public Individual selectWeakest()
Individual from the weakest in the pool.
|
artoflife pre0.1.0-dev | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||