Orbital library

orbital.algorithm.evolutionary
Class SteadyStateGeneticAlgorithm

java.lang.Object
  extended by orbital.algorithm.evolutionary.GeneticAlgorithm
      extended by orbital.algorithm.evolutionary.SteadyStateGeneticAlgorithm
All Implemented Interfaces:
java.io.Serializable, AlgorithmicTemplate, ProbabilisticAlgorithm

public class SteadyStateGeneticAlgorithm
extends GeneticAlgorithm

A steady state genetic algorithm with overlapping populations. Reproduces a given percentage of the population and replaces (if better).

Note: to make sure this algorithm is compatible with ParallelEvaluationPopulation each new genome that arises is evaluated prior to updating the populaiton.

Author:
André Platzer
See Also:
Serialized Form
Structure:
delegate population:Population, delegate selection:Function

Nested Class Summary
 
Nested classes/interfaces inherited from class orbital.algorithm.evolutionary.GeneticAlgorithm
GeneticAlgorithm.Configuration
 
Constructor Summary
protected SteadyStateGeneticAlgorithm()
           
  SteadyStateGeneticAlgorithm(int replacements)
          Construct a new GeneticAlgorithm.
 
Method Summary
 void evolve()
          evolves to the next generation for this population.
 int getNumberOfReplacements()
          Get the number of replacements to do at each generation (≤ population.size()).
 double getPopulationGrowth()
          Get the population growth factor.
 void setNumberOfReplacements(int replacements)
           
 
Methods inherited from class orbital.algorithm.evolutionary.GeneticAlgorithm
clone, complexity, equals, getEvaluation, getPopulation, getRandom, getSelection, hashCode, isCorrect, setEvaluation, setPopulation, setRandom, setSelection, solve, spaceComplexity, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SteadyStateGeneticAlgorithm

public SteadyStateGeneticAlgorithm(int replacements)
Construct a new GeneticAlgorithm.

Parameters:
replacements - the number of replacements to do at each generation (≤ population.size()). We will perform as many reproductions such that at least replacement replacements have occured.

SteadyStateGeneticAlgorithm

protected SteadyStateGeneticAlgorithm()
Method Detail

getNumberOfReplacements

public int getNumberOfReplacements()
Get the number of replacements to do at each generation (≤ population.size()). We will perform as many reproductions such that at least replacement replacements have occured.


setNumberOfReplacements

public void setNumberOfReplacements(int replacements)

getPopulationGrowth

public double getPopulationGrowth()
Description copied from class: GeneticAlgorithm
Get the population growth factor.

Specified by:
getPopulationGrowth in class GeneticAlgorithm
Returns:
the factor by which the population size increases with each generation (or decreases if < 1).

evolve

public void evolve()
Description copied from class: GeneticAlgorithm
evolves to the next generation for this population. Parents are selected and will recombine and mutate to produce children genomes who will replace some genomes in this population. This operation is sometimes called breeding.

Specified by:
evolve in class GeneticAlgorithm
See Also:
GeneticAlgorithm.selection, Genome.recombine(Gene[],int,double), PopulationImpl.getMaximumRecombination(), PopulationImpl.getMaximumMutation()

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.