EasyAlgorithm - evolutionary algorithm, single generation, with variable operators.
my $easyEA = OpBase->fromXML( $ref->{initial}{section}{pop}{op} ); # Parsed XML fragment, see samples
for ( my $i = 0; $i < $ref->{initial}{section}{pop}{op}{param}{maxgen}{value}; $i++ ) { print "<", "="x 20, "Generation $i", "="x 20, ">\n"; $easyEA->apply(\@pop ); for ( @pop ) { print $_->asString, "\n"; } }
Easy full algoritm, includes an ``algorithm'', that is, a step, and a termination condition
Takes an already created algorithm and a terminator.
Applies the algorithm to the population; 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 http://www.fsf.org/licenses/gpl.txt
CVS Info: $Date: 2001/11/30 17:05:16 $ $Header: /cvsroot/opeal/opeal/EZFullAlgo.pm,v 1.4 2001/11/30 17:05:16 jmerelo Exp $ $Author: jmerelo $