Algorithm-Evolutionary
view release on metacpan or search on metacpan
scripts/canonical-genetic-algorithm.pl view on Meta::CPAN
#!/usr/bin/perl
=head1 NAME
canonical-genetic-algorithm.pl - Canonical Genetic Algorithm on a simple fitness function
=head1 SYNOPSIS
prompt% ./canonical-genetic-algorithm.pl <bits> <block size> <population> <number of generations> <selection rate>
=head1 DESCRIPTION
A canonical GA uses mutation, crossover, binary representation, and
roulette wheel selection. Here mainly for reference, and so that
you can peruse to start your own programs.
In this case, we are optimizing the Royal Road function,
L<http://web.cecs.pdx.edu/~mm/handbook-of-ec-rr.pdf>. By default,
scripts/rectangle-coverage.pl view on Meta::CPAN
#!/usr/bin/env perl
=head1 NAME
rectangle-coverage.pl - Find the dot maximally covered by (random) rectangles
=head1 SYNOPSIS
You might have to do
prompt% cpanm --installdeps .
first, since that module is not installed by default with L<Algorithm::Evolutionary>. Use C<sudo> if appropriate.
prompt% ./rectangle-coverage.pl <number-of-rectangles> <arena-side> <bits-per-coordinate> <population> <number of generations> <selection rate>
Or
prompt% ./rectangle-coverage.pl
And change variable values from the user interface
=head1 DESCRIPTION
A demo that combines the L<Algorithm::Evolutionary::Op::Easy> module
with L<Tk> to create a visual demo of the evolutionary
algorithm. It generates randomly a number of rectangles, and shows
how the population evolves to find the solution. The best point is
shown in darkening yellow color, the rest of the population in
scripts/tide_bitstring.pl view on Meta::CPAN
#!/usr/bin/perl
=head1 NAME
tide_bitstring.pl - Implementation of the Tide optimization using A::E
=head1 SYNOPSIS
prompt% ./tide_bitstring.pl <population> <number of generations>
or
prompt% perl tide_bitstring.pl <population> <number of generations>
# Shows the values of the two floating-point components of the
# chromosome and finally the best value and fitness reached, which
# should be as close to 1 as possible.
=head1 DESCRIPTION
A simple example of how to run an Evolutionary algorithm based on
Algorithm::Evolutionary. Tries to find the max of the bidimensional
scripts/tide_float.pl view on Meta::CPAN
#!/usr/bin/perl
=head1 NAME
tide_float.pl - Optimization of the tide function using A::E
=head1 SYNOPSIS
prompt% ./tide_float.pl <population> <number of generations>
or
prompt% perl tide_float.pl <population> <number of generations>
will show the values of the two floating-point components of the
chromosome and finally the best value and fitness reached, which
should be as close to 1 as possible.
=head1 DESCRIPTION
A simple example of how to run an Evolutionary algorithm based on
Algorithm::Evolutionary. Tries to find the max of the bidimensional
( run in 1.281 second using v1.01-cache-2.11-cpan-6aa56a78535 )