Operator.Operations
Class ScaledRouletteWheel

java.lang.Object
  extended by Operator.Operations.SelectionOperation
      extended by Operator.Operations.RouletteWheel
          extended by 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


Field Summary
 
Fields inherited from class Operator.Operations.RouletteWheel
accProbs, minFit, rng, smallFit, sumFit
 
Fields inherited from class Operator.Operations.SelectionOperation
selectedPopulation, size
 
Constructor Summary
ScaledRouletteWheel()
          New instance
ScaledRouletteWheel(int size, RandomNumberGenerator rng)
          New instance
 
Method Summary
protected  void calculateAccumulatedFitnessProbabilities(java.util.List<Individual> operands)
          Min fitness is the best fitness.
static void main(java.lang.String[] args)
           
 
Methods inherited from class Operator.Operations.RouletteWheel
calculateFitnessSum, doOperation, doOperation, getRNG, rankPopulation, setProperties, setRNG, spinRoulette
 
Methods inherited from class Operator.Operations.SelectionOperation
getSelectedPopulation, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Util.Random.Stochastic
getRNG, setRNG
 

Constructor Detail

ScaledRouletteWheel

public ScaledRouletteWheel(int size,
                           RandomNumberGenerator rng)
New instance

Parameters:
size - size of selection
rng - random number generator

ScaledRouletteWheel

public ScaledRouletteWheel()
New instance

Method Detail

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)