AI-Termites
view release on metacpan or search on metacpan
lib/AI/Termites.pm view on Meta::CPAN
=head1 SYNOPSIS
use AI::Termites;
my $termites = AI::Termites::VicinusOcurro->new(dim => 2,
n_wood => 1000,
n_termites => 100);
$termites->iterate for 0..10000;
=head1 DESCRIPTION
This module simulates a termites world based on the ideas described on
the book "Adventures in Modeling" by Vanessa Stevens Colella, Eric
Klopfer and Mitchel Resnick
(L<http://education.mit.edu/starlogo/adventures/>).
In this version, termites can move in a n-dimensional boxed space, and
are not limited to integer coordinates.
Also, the way they decide when to pick or leave wood are customizable,
allowing to investigate how changing the rules affects the emergent
behaviors.
The module implements several termite subspecies (subclasses):
=over 4
=item LoginquitasPostulo
This termites subspecie measures the distance to the nearest piece of
wood.
=item NemusNidor
This termite smells the wood.
=item PeractioBaro
This termite is pretty simple and all that can see is if there is or
not some piece of wood in the vecinity.
=item VicinusOcurro
This termite counts the pieces of wood that there are on its vecinity.
=back
If you want to use this module, you are expected to look at its source
code!!!
=head1 SEE ALSO
The sample program includes in the distribution as
C<samples/termites.pl> can run the simulation and generate nice PNGs.
An online Artificial Termites simulation can be found here:
L<http://www.permutationcity.co.uk/alife/termites.html>.
The origin of this module lies on the following PerlMonks post:
L<http://perlmonks.org/?node_id=908684>.
=head1 AUTHOR
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2011 by Salvador FandiE<ntilde>o,
E<lt>sfandino@yahoo.comE<gt>
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.12.3 or,
at your option, any later version of Perl 5 you may have available.
=cut
( run in 0.572 second using v1.01-cache-2.11-cpan-5a3173703d6 )