eaLib API Docs
Last Modified : January 7 2002

mss.ea.eval
Class LinearRankingScaling

java.lang.Object
  |
  +--mss.ea.core.GeneticOperator
        |
        +--mss.ea.eval.FitnessScaling
              |
              +--mss.ea.eval.LinearRankingScaling
All Implemented Interfaces:
SingleStreamProcessor, StreamProcessor

public class LinearRankingScaling
extends FitnessScaling

Linear fitness scaling based on rank of individual. The scaling is calculated based on the formula fitness(pos) = 2-sp + 2*(sp-1) * ((pos-1) / (n-1)). In this formula sp stands for selection pressure, pos for the rank of the individual and n for the size of the population. As constraint obtains rank( best individual ) = n and rank( worst individual ) = 1. The operator works with all scores, independent of their return type.

Since:
0.1
Version:
0.1 (03-06-2001)
Author:
Andreas Rummler

Field Summary
protected  AbstractPopulation pop
           
protected  float sp
          Selection pressure.
 
Fields inherited from class mss.ea.core.GeneticOperator
description, ID, name
 
Constructor Summary
LinearRankingScaling(AbstractPopulation pop, float sp)
          Constructor.
 
Method Summary
 Fitness evaluate(Individual ind)
          Evaluation.
 
Methods inherited from class mss.ea.eval.FitnessScaling
process
 
Methods inherited from class mss.ea.core.GeneticOperator
getDescription, getID, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mss.ea.core.StreamProcessor
getName
 

Field Detail

sp

protected float sp
Selection pressure.

pop

protected AbstractPopulation pop
Constructor Detail

LinearRankingScaling

public LinearRankingScaling(AbstractPopulation pop,
                            float sp)
Constructor.
Parameters:
pop - population to use for scaling
sp - selection pressure
Method Detail

evaluate

public Fitness evaluate(Individual ind)
                 throws FitnessScalingException
Evaluation.
Overrides:
evaluate in class FitnessScaling
Parameters:
ind - individual to calculate the fitness for
Returns:
calculated fitness
Throws:
FitnessScalingException - thrown in case of incompatible score

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS