Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)

org.uncommons.watchmaker.framework.selection
Class SigmaScaling

java.lang.Object
  extended by org.uncommons.watchmaker.framework.selection.SigmaScaling
All Implemented Interfaces:
SelectionStrategy<Object>

public class SigmaScaling
extends Object
implements SelectionStrategy<Object>

An alternative to straightforward fitness-proportionate selection such as that offered by RouletteWheelSelection and StochasticUniversalSampling. Uses the mean population fitness and fitness standard deviation to adjust individual fitness scores. Early on in an evolutionary algorithm this helps to avoid premature convergence caused by the dominance of one or two relatively fit candidates in a population of mostly unfit individuals. It also helps to amplify minor fitness differences in a more mature population where the rate of improvement has slowed.

Author:
Daniel Dyer

Constructor Summary
SigmaScaling()
          Creates a default sigma-scaled selection strategy.
SigmaScaling(SelectionStrategy<Object> delegate)
          Creates a sigma-scaled selection strategy that delegates to the specified selection strategy after adjusting individual fitness scores using sigma-scaling.
 
Method Summary
<S> List<S>
select(List<EvaluatedCandidate<S>> population, boolean naturalFitnessScores, int selectionSize, Random rng)
          Select the specified number of candidates from the population.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SigmaScaling

public SigmaScaling()
Creates a default sigma-scaled selection strategy.


SigmaScaling

public SigmaScaling(SelectionStrategy<Object> delegate)
Creates a sigma-scaled selection strategy that delegates to the specified selection strategy after adjusting individual fitness scores using sigma-scaling.

Parameters:
delegate - The proportionate selector that will be delegated to after fitness scores have been adjusted using sigma-scaling.
Method Detail

select

public <S> 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.

Specified by:
select in interface SelectionStrategy<Object>
Type Parameters:
S - The type of evolved entity that we are selecting, a sub-type of T.
Parameters:
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.
Returns:
A list containing the selected candidates. Some individual canidates may potentially have been selected multiple times.

toString

public String toString()

Overrides:
toString in class Object

Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)