AI-Evolve-Befunge
view release on metacpan or search on metacpan
COPYRIGHT AND LICENSE
This module is copyright (c) 2007-2009 Mark Glines.
It is distributed under the terms of the Artistic License 2.0.
For more details, see the full text of the license in the file LICENSE.
Special note: from the perspective of this module, the generated Befunge
programs are simply data. They are products of the way in which you decided
to run this module, and random chance. So from a licensing perspective, they
are NOT considered to be a derived work of this perl module.
lib/AI/Evolve/Befunge/Population.pm view on Meta::CPAN
than 10, than the value (minus 10) number of critters are written out
to the migration network.
=cut
sub migrate_export {
my ($self) = @_;
$$self{migrate}->blocking(1);
# export some critters
for my $id (0..(rand(13)-10)) {
my $cid = ${$self->blueprints}[$id]{id};
$$self{migrate}->print(${$self->blueprints}[$id]->as_string);
debug("exporting critter $cid\n");
}
}
=head2 migrate_import
$population->migrate_import();
Look on the migration network for incoming critters, and import some
if we have room left. To prevent getting swamped, it will only allow
( run in 0.909 second using v1.01-cache-2.11-cpan-4505f990765 )