Operator.Operations
Class ScaledRouletteWheel
java.lang.Object
Operator.Operations.SelectionOperation
Operator.Operations.RouletteWheel
Operator.Operations.ScaledRouletteWheel
- All Implemented Interfaces:
- Operation, ParameterI, Stochastic
public class ScaledRouletteWheel
- extends RouletteWheel
- implements Stochastic
Scaled Roulette wheel selection based on weighted selection,
The likelyhood of an individual getting picked is:
total sum of the fitness - fitness of the individual
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScaledRouletteWheel
public ScaledRouletteWheel(int size,
RandomNumberGenerator rng)
- New instance
- Parameters:
size
- size of selectionrng
- random number generator
ScaledRouletteWheel
public ScaledRouletteWheel()
- New instance
calculateAccumulatedFitnessProbabilities
protected void calculateAccumulatedFitnessProbabilities(java.util.List<Individual> operands)
- Min fitness is the best fitness.
Subtracts the fitness from the fitness sum and divides by the fitness sum
Store the accumulated probabilities in the accProbs array
- Specified by:
calculateAccumulatedFitnessProbabilities
in class RouletteWheel
- Parameters:
operands
- Individuals to take into account
main
public static void main(java.lang.String[] args)