net.openai.ai.ga.selection.common
Class SubsetSelectorAdaptor

java.lang.Object
  |
  +--net.openai.ai.ga.selection.common.SubsetSelectorAdaptor
All Implemented Interfaces:
SelectionAlgorithm

public class SubsetSelectorAdaptor
extends java.lang.Object
implements SelectionAlgorithm

SelectionAlgorithm is a method by which Cell members are chosen from a Population for a given purpose (i.e. mutation).

Since:
JDK1.3
Version:
%I%, %G%
Author:
Jared Grubb

Constructor Summary
SubsetSelectorAdaptor()
           
 
Method Summary
 Population selectFromPopulation(Population pop)
          Creates a Population according to a given algorithm or rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubsetSelectorAdaptor

public SubsetSelectorAdaptor()
Method Detail

selectFromPopulation

public Population selectFromPopulation(Population pop)
Creates a Population according to a given algorithm or rule. The initial Population is passed and a selection from it is chosen and returned.

The Population passed into the algorithm should not be be changed by the algorithm, as it receives the original, not a clone of the original. If a clone is desired, it should be handled inside the algorithm.

The returned Population should not be considered crucial to any internal functions of this implementation of the SelectionAlgorithm, since the genetic algorithm may make changes directly onto this structure and may make the structure available for others to make changes to. If the structure is needed internally and such behavior could be detrimental to this implementation's function, then it is recommended that a shallow clone be returned via a return new Population(returnPopulation) rather than a plain return returnPopulation. This allows for this additional overhead to be avoided in cases where it not needed.

Specified by:
selectFromPopulation in interface SelectionAlgorithm
Parameters:
pop - the Population to choose from
Returns:
a selected Population


Copyright - 2001 OpenAI Labs. All Rights Reserved.