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><p>
      <Class>es.udc.gii.common.eaf.algorithm.operator.selection.TournamentSelection</Class>
      <PoolSize>value</PoolSize>
 </Operator>
 
 
Where the tag Class is mandatory and the tag PoolSize is the number of individuals that are choosen to compete. If this tag does not appear in the configuration, the parameter poolSize is set to its default value.

Default values:

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)

Field Summary
private  int poolSize
           
 
Constructor Summary
TournamentSelection()
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
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)
Description copied from interface: Configurable
Configures the specific element that implements this method.

Specified by:
configure in interface Configurable
Overrides:
configure in class SelectionOperator
Parameters:
conf - a Configuration object.
See Also:
Configuration