es.udc.gii.common.eaf.algorithm.operator.selection
Class TournamentSelection

java.lang.Object
  extended by es.udc.gii.common.eaf.algorithm.operator.selection.SelectionOperator
      extended by es.udc.gii.common.eaf.algorithm.operator.selection.TournamentSelection
All Implemented Interfaces:
Operator, Configurable

public class TournamentSelection
extends SelectionOperator

This method of selection runs a tournament among a few individuals chosen at random from the population and selects the winner for the reproduction phase.

Selection pressure can be easily adjusted by changing the tournament size. If the tournament size is larger, weak individuals have a smaller change to be selected.

To configure this operator the xml code is:

<Operator>

<Class>es.udc.gii.common.eaf.algorithm.operator.selection.TournamentSelection</Class>

<PoolSize>2</PoolSize>

<Comparator>es.udc.gii.common.eaf.algorithm.fitness.comparator.LessFitnessComparator</Comparator>

</Operator>

Author:
pilar

Field Summary
private  int poolSize
           
 
Constructor Summary
TournamentSelection()
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
           
protected  Individual select(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals)
           
 
Methods inherited from class es.udc.gii.common.eaf.algorithm.operator.selection.SelectionOperator
operate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

poolSize

private int poolSize
Constructor Detail

TournamentSelection

public TournamentSelection()
Method Detail

select

protected Individual select(EvolutionaryAlgorithm algorithm,
                            java.util.List<Individual> individuals)
Specified by:
select in class SelectionOperator

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Specified by:
configure in interface Configurable
Overrides:
configure in class SelectionOperator