Algorithm::Evolutionary::Op:FullAlgorithm - evolutionary algorithm, single generation, with variable operators.
my $easyEA = Algorithm::Evolutionary::Op::Base->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"; } }
Algorithm::Evolutionary::Op::Base
Easy full algoritm, includes a ``generation'', 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: 2002/06/20 16:57:26 $ $Header: /cvsroot/opeal/opeal/Algorithm/Evolutionary/Op/FullAlgorithm.pm,v 1.1 2002/06/20 16:57:26 jmerelo Exp $ $Author: jmerelo $