AI-ANN
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
ANN_specification view on Meta::CPAN
ANN::Neuron
implements an individual neuron from the neural network
from ann, $self->{'network'}->[$n]->{'object'} = new ANN::Neuron( $thisid, {$inputid => $weight, ...}, {$neuronid => $weight})
from ann, $self->{'network'}->[$n]->{'object'}->ready( [$input0, $input1, ...], {$neuronid => $neuronvalue, ...} ) returns 1 if all inputs are available, 0 otherwise
from ann, $self->{'network'}->[$n]->{'object'}->execute( [$input0, $input1, ...], {$neuronid => $neuronvalue, ...} ) returns the output value of the neuron
in addition, get_inputs and get_neurons are available. There return the respective original hashrefs.
ANN::Evolver
evolves the ann
from caller, $handofgod = new ANN::Evolver({$mutationchance, $mutationamount, $addlinkchance, $killlinkchance, $subcrossoverchance}) add should be zero if you want to preserve feed-forwardness
from caller, $handofgod->crossover($network1, $network2) returns $network3, which inherits 50% of each parent's traits. Each neuron has $subcrossoverchance to inherit 50% of its traits from each parent.
from caller, $handofgod->mutate($network3) introduces some random mutations into neuron weights. Has a $mutationchance to change each weight by up to $mutationamount, a $addlinkchance to change an input from zero to up to $mutationamount, and a $kil...
ANN::SimWorld
uses an ANN object to attempt to survive in a virtual world, which must be defined by the caller
from caller, $world = new ANN::SimWorld( //stuff here )
from caller, $world->($network) returns a fitness variable
Evolver now allows you to pass a coderef for mutation_amount. It
will be evaluated with no arguments. If you pass a number instead,
it will be coerced into a uniform random value up to +/- your value.
Change a few things from hashrefs to arrayrefs internally. Fully
back-compatibile, but I hope this will speed up a few things.
Fix dependencies.
0.006 2011-06-01 16:08:04 UTC
Remove dependency on perl 5.14, because apparently no one has that
installed yet. Get with the times, people! (Debian is still on 5.10)
Add mutate_gaussian to the methods available in the evolver, and
allow the population of the eta_ values in AI::ANN.
Add a sternly worded comment to the evolver warning against the use
of crossover.
0.005 2011-05-31 20:18:02 UTC
Convert to use Moose. I'm told that this is better. There are a few
neat things (not having to write accessors, and apparently
inheritance just works, I'll find out about that soon enough...)
but overall I really don't see the point. Default values, type
constraints, I had all that anyway. Meh.
Add some words about what the point of this module is.
0.004 2011-05-31 02:35:26 UTC
Minor calling changes that I need to commit so I can test them with
another module.
lib/AI/ANN/Evolver.pm view on Meta::CPAN
spontaneously develop a connection. This should be extremely small, as
it is not an overall chance, put a chance for each connection that does
not yet exist. If you wish to ensure that your neural net does not become
recursive, this must be zero.
kill_link_chance is the chance that, during a mutate() call, each pair of
connected neurons with a weight less than mutation_amount or each
neuron => input pair with a weight less than mutation_amount will be
disconnected. If add_link_chance is zero, this should also be zero, or
your network will just fizzle out.
sub_crossover_chance is the chance that, during a crossover() call, each
neuron will, rather than being inherited fully from each parent, have
each element within it be inherited individually.
min_value is the smallest acceptable weight. It must be less than or equal to
zero. If a value would be decremented below min_value, it will instead
become an epsilon above min_value. This is so that we don't accidentally
set a weight to zero, thereby killing the link.
max_value is the largest acceptable weight. It must be greater than zero.
gaussian_tau and gaussian_tau_prime are the terms to the gaussian mutation
method. They are coderefs which accept one parameter, n, the number of
non-zero-weight inputs to the given neuron.
view all matches for this distributionview release on metacpan - search on metacpan
( run in 4.006 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-72ae3ad1e6da )