|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.openai.ai.ga.selection.common.SelectSingleGreatestFitness
SelectGreatestFitness
is a SelectionAlgorithm
that will return a portion of the passed Population
that
have the greatest fitness. It will choose either a fixed number or a
percentage.
Constructor Summary | |
SelectSingleGreatestFitness()
Creates a new SelectSingleGreatestFitness object for
choosing a single Cell out of the specified
Population who has the greatest fitness. |
Method Summary | |
Population |
selectFromPopulation(Population pop)
Chooses the Cell in the specified Population
with the greatest fitness. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SelectSingleGreatestFitness()
SelectSingleGreatestFitness
object for
choosing a single Cell
out of the specified
Population
who has the greatest fitness.
Method Detail |
public Population selectFromPopulation(Population pop)
Cell
in the specified Population
with the greatest fitness.
The returned population is guaranteed to return the cell of the
specified population such that there are no other members in that
population who are greater than that returned. This means that cells
who tie the highest are ignored. For example, if
the fitness of a population was {1,1,2,3,3,3,4,5,5} then only one cell
of fitness 5 will be returned.
selectFromPopulation
in interface SelectionAlgorithm
pop
- the Population
to choose from
Population
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |