org.artoflife.gp.selection
Class SimpleTournamentSelector

java.lang.Object
  |
  +--org.artoflife.gp.Selector
        |
        +--org.artoflife.gp.selection.SimpleTournamentSelector

public final class SimpleTournamentSelector
extends Selector

Selects on the basis of a simple tournament. The strategy is:

  1. randomly pick a number of Individuals
  2. of those, select the fittest Individual

Configure tournament size with configuration property [this.getClass().getName()].TournamentSize.

Author:
Steve Meyfroidt

Field Summary
protected  int tournamentSize
           
 
Fields inherited from class org.artoflife.gp.Selector
individuals
 
Constructor Summary
SimpleTournamentSelector()
           
 
Method Summary
 Individual selectOne(boolean chooseFittest)
          Override to select a single individual from the original pool according to some Fitness-based strategy, removing the selected Individual from the available pool.
 
Methods inherited from class org.artoflife.gp.Selector
initialise, select, selectFittest, selectFittest, selectWeakest, selectWeakest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tournamentSize

protected int tournamentSize
Constructor Detail

SimpleTournamentSelector

public SimpleTournamentSelector()
Method Detail

selectOne

public Individual selectOne(boolean chooseFittest)
Description copied from class: Selector
Override to select a single individual from the original pool according to some Fitness-based strategy, removing the selected Individual from the available pool.

Specified by:
selectOne in class Selector
Parameters:
chooseFittest - true to choose from the fittest Individuals or false to choose from the weakest
Returns:
Individual selected, never null

artoflife pre0.1.0-dev

Copyright © 2002 the Art Of Life team. All Rights Reserved.