jaga.evolve
Class FitnessProportionateSelector
java.lang.Object
|
+--jaga.evolve.FitnessProportionateSelector
- All Implemented Interfaces:
- Selector, java.io.Serializable
- public class FitnessProportionateSelector
- extends java.lang.Object
- implements Selector
A Roulette Wheel selector.
- See Also:
- Serialized Form
Method Summary |
void |
refresh()
can be used to refresh the internal state in the case for example
that the population changed. |
Genotype |
select(Population pop)
picks a genotype from the population through some selection process |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FitnessProportionateSelector
public FitnessProportionateSelector()
- Creates new FitnessProportionateSelector
select
public Genotype select(Population pop)
- picks a genotype from the population through some selection process
- Specified by:
select
in interface Selector
refresh
public void refresh()
- can be used to refresh the internal state in the case for example
that the population changed. This allows a selector to be optimized
for a certain population by keeping state of it from one call to another
In this case the refresh method re-calculates the cumulative fitnesses
- Specified by:
refresh
in interface Selector
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object