Algorithm-Evolve
view release on metacpan or search on metacpan
examples/ArrayEvolver.pm view on Meta::CPAN
Returns or sets the value of the critter's array gene. Returns an array
reference.
=back
=head1 SEE ALSO
L<Algorithm::Evolve|Algorithm::Evolve>,
L<Algorithm::Evolve::Util|Algorithm::Evolve::Util>, the rest of the
F<examples/> directory.
=head1 AUTHOR
Algorithm::Evolve is written by Mike Rosulek E<lt>mike@mikero.comE<gt>. Feel
free to contact me with comments, questions, patches, or whatever.
=head1 COPYRIGHT
Copyright (c) 2003 Mike Rosulek. All rights reserved. This module is free
software; you can redistribute it and/or modify it under the same terms as Perl
examples/StringEvolver.pm view on Meta::CPAN
=item C<< $obj->gene([ $new_gene ]) >>
Returns or sets the value of the critter's string gene.
=back
=head1 SEE ALSO
L<Algorithm::Evolve|Algorithm::Evolve>,
L<Algorithm::Evolve::Util|Algorithm::Evolve::Util>, the rest of the
F<examples/> directory.
=head1 AUTHOR
Algorithm::Evolve is written by Mike Rosulek E<lt>mike@mikero.comE<gt>. Feel
free to contact me with comments, questions, patches, or whatever.
=head1 COPYRIGHT
Copyright (c) 2003 Mike Rosulek. All rights reserved. This module is free
software; you can redistribute it and/or modify it under the same terms as Perl
lib/Algorithm/Evolve.pm view on Meta::CPAN
In Algorithm::Evolve, the first group of options is implemented by the user
for maximum flexibility. These functions are abstracted to class of evolvable
objects (a B<critter class> in this document). The module itself handles the
representation-independent parts of the algorithm using simple configuration
switches and methods.
=head1 USAGE
If you're of the ilk that prefers to learn things hands-on, you should
probably stop here and look at the contents of the F<examples/> directory
first.
=head2 Designing a class of critter objects (interface specification)
Algorithm::Evolve maintains a population of critter objects to be evolved. You
may evolve any type of objects you want, provided the class supplies the
following methods:
=over
lib/Algorithm/Evolve.pm view on Meta::CPAN
This method is used for L</Co_Evolution|co-evolution> with the gladitorial
selection method. It should return a number less than zero if $critter1 is
"better," 0 if the two are equal, or a number greater than zero if $critter2
is "better."
=back
You may also want to use the C<DESTROY> method as a hook for detecting when
critters are removed from the population.
See the F<examples/> directory for example critter classes. Also, take a look
at L<Algorithm::Evolve::Util> which provides some useful utilities for
implementing a critter class.
=head2 Algorithm::Evolve population interface
=over
lib/Algorithm/Evolve.pm view on Meta::CPAN
...
);
See the source of this module to see how the various selection/replacement
methods are implemented.
The mechanism for adding additional selection/replacement methods may change
in future versions.
=head1 SEE ALSO
L<Algorithm::Evolve::Util|Algorithm::Evolve::Util>, the F<examples/>
directory.
=head1 AUTHOR
Algorithm::Evolve is written by Mike Rosulek E<lt>mike@mikero.comE<gt>. Feel
free to contact me with comments, questions, patches, or whatever.
=head1 COPYRIGHT
Copyright (c) 2003 Mike Rosulek. All rights reserved. This module is free
lib/Algorithm/Evolve/Util.pm view on Meta::CPAN
Returns a random gene of the given size over the given alphabet, defaulting to
{0,1}.
=back
=head1 SEE ALSO
L<Algorithm::Evolve|Algorithm::Evolve>
F<StringEvolver.pm> in the F<examples/> directory uses the utilities in
Algorithm::Evolve::Util to implement a completely generic simple string
evolver critter class in very few lines of code.
=head1 AUTHOR
Algorithm::Evolve is written by Mike Rosulek E<lt>mike@mikero.comE<gt>. Feel
free to contact me with comments, questions, patches, or whatever.
=head1 COPYRIGHT
( run in 2.158 seconds using v1.01-cache-2.11-cpan-df04353d9ac )