|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.uncommons.watchmaker.framework.interactive.InteractiveSelection<T>
T
- The type of evolved entity that can be selected by this class.public class InteractiveSelection<T>
Special selection strategy used for interactive evolutionary algorithms.
Constructor Summary | |
---|---|
InteractiveSelection(Console<R> console,
Renderer<T,R> renderer,
int groupSize,
int maxSelectionsPerGeneration)
|
|
InteractiveSelection(Console<T> console,
int groupSize,
int maxSelectionsPerGeneration)
|
Method Summary | ||
---|---|---|
|
select(List<EvaluatedCandidate<S>> population,
boolean naturalFitnessScores,
int selectionSize,
Random rng)
Select the specified number of candidates from the population. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InteractiveSelection(Console<R> console, Renderer<T,R> renderer, int groupSize, int maxSelectionsPerGeneration)
R
- The type of object that can be displayed by the specified
console. The specified renderer must be able to map evolved entities
into objects of this type.console
- The user interface (graphical, textual or other) used
to present a selection choice to the user.renderer
- A renderer used to map the evolved entities to objects
that can be processed by the supplied console.groupSize
- The number of candidates to present to the user at
once (the user selects one from this number).maxSelectionsPerGeneration
- The maximum number of selections that
the user will be asked to make for each generation of the evolutionary
algorithm. If this number is lower than the required selection size,
the user's selections will be repeated to make up the shortfall. The
purpose of this setting is two-fold. Firstly it minimises user fatigue.
Secondly, it can be used to increase selection pressure. In the extreme
case, a setting of 1 will ensure that members of the subsequent generation
are all descended from a single parent.public InteractiveSelection(Console<T> console, int groupSize, int maxSelectionsPerGeneration)
console
- The user interface (graphical, textual or other) used
to present a selection choice to the user.groupSize
- The number of candidates to present to the user at
once (the user selects one from this number).maxSelectionsPerGeneration
- The maximum number of selections that
the user will be asked to make for each generation of the evolutionary
algorithm. If this number is lower than the required selection size,
the user's selections will be repeated to make up the shortfall. The
purpose of this setting is two-fold. Firstly it minimises user fatigue.
Secondly, it can be used to increase selection pressure. In the extreme
case, a setting of 1 will ensure that members of the subsequent generation
are all descended from a single parent.Method Detail |
---|
public <S extends T> List<S> select(List<EvaluatedCandidate<S>> population, boolean naturalFitnessScores, int selectionSize, Random rng)
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.
select
in interface SelectionStrategy<T>
S
- The type of evolved entity that we are selecting, a sub-type of T.population
- The population from which to select.naturalFitnessScores
- Whether higher fitness values represent fitter
individuals or not.selectionSize
- The number of individual selections to make (not necessarily
the number of distinct candidates to select, since the same individual may
potentially be selected more than once).rng
- Source of randomness for stochastic selection strategies.
|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |