org.vizzini.ai.geneticalgorithm
Class FitnessProportionalSelector

java.lang.Object
  extended by org.vizzini.ai.geneticalgorithm.AbstractSelector
      extended by org.vizzini.ai.geneticalgorithm.FitnessProportionalSelector
All Implemented Interfaces:
ISelector

public class FitnessProportionalSelector
extends AbstractSelector

Provides a chromosome selector which randomly selects from the population proportionally based upon fitness of the chromosomes.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
FitnessProportionalSelector()
           
 
Method Summary
 void init(IPopulation population)
          Initialize this selector from the given population.
 IChromosome selectNext()
          Select the next chromosome from the population.
 
Methods inherited from class org.vizzini.ai.geneticalgorithm.AbstractSelector
checkState, getLastIndex, getPopulation, setLastIndex, setPopulation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitnessProportionalSelector

public FitnessProportionalSelector()
Method Detail

init

public void init(IPopulation population)
Initialize this selector from the given population. It is assumed that member chromosomes of the population have their fitness values assigned, and that higher fitness is better.

Specified by:
init in interface ISelector
Overrides:
init in class AbstractSelector
Since:
v0.3

selectNext

public IChromosome selectNext()
Select the next chromosome from the population.

Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02