GeneralGeneration: Customizable single generation for an evolutionary algorithm.


  #Define an easy single-generation algorithm with predefined mutation and crossover
  my $m = new MutationOne; #Changes a single bit
  my $c = new Crossover; #Classical 2-point crossover
  my $replacementRate = 0.3; #Replacement rate
  my $selector = new RouletteWheel $popSize; #One of the possible selectors
  my $generation = new GeneralGeneration( $evalFunc, $selector, [$m, $c],
                                                                                  $replacementRate );

Base Class



Genetic algorithm that uses the other component. Must take as input the operators thar are going to be used, along with its priorities


Creates an algorithm, with the usual operators. Includes a default mutation and crossover, in case they are not passed as parameters


Applies the algorithm to the population, which should have been evaluated first; checks that it receives a ref-to-array as input, croaks if it does not. Returns a sorted, culled, evaluated population for next generation.


  This file is released under the GPL. See the LICENSE file included in this distribution,
  or go to
  CVS Info: $Date: 2001/12/17 12:59:24 $ 
  $Header: /cvsroot/opeal/opeal/,v 1.3 2001/12/17 12:59:24 jmerelo Exp $ 
  $Author: jmerelo $