net.openai.ai.ga.selection
Interface ArraySelectionAlgorithm

All Known Implementing Classes:
ArraySelectTournament, ArraySelectUnion

public interface ArraySelectionAlgorithm

ArraySelectionAlgorithm is a method by which Population members are created and chosen from a Population. This algorithm is used for the selection of parents for recombination (reproduction).

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

Method Summary
 PopulationArray selectFromPopulation(Population pop)
          Creates a PopulationArray according to a given algorithm or rule.
 

Method Detail

selectFromPopulation

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

This function is passed a shallow clone of the original population, therefore allowing additions and deletions to the passed population without worry about how it affects the original. Any changes meant for the original Population should be handled through the recombination and survival implementations of this algorithm.

The returned PopulationArray should not be considered crucial to any internal functions of this implementation of the ArraySelectionAlgorithm, 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 PopulationArray(returnPopulationArray) rather than a plain return returnPopulationArray. This allows for this additional overhead to be avoided in cases where it not needed.

Parameters:
pop - the Population to choose from
Returns:
a PopulationArray derived from the passed Population


Copyright - 2001 OpenAI Labs. All Rights Reserved.