AI-Genetic

 view release on metacpan or  search on metacpan

Genetic/OpMutation.pm  view on Meta::CPAN

This package implements a few mutation mechanisms that can be used in user-defined
strategies. The methods in this class are to be called as static class methods,
rather than instance methods, which means you must call them as such:

  AI::Genetic::OpCrossover::MethodName(arguments)

=head1 CLASS METHODS

There is really one kind of mutation operator implemented in this class, but it
implemented for the three default individuals types. Each gene of an individual
is looked at separately to decide whether it will be mutated or not. Mutation is
decided based upon the mutation rate (or probability). If a mutation is to happen,
then the value of the gene is switched to some other possible value.

For the case of I<bitvectors>, an ON gene switches to an OFF gene.

For the case of I<listvectors>, a gene's value is replaced by another one from
the possible list of values.

For the case of I<rangevectors>, a gene's value is replaced by another one from
the possible range of integers.



( run in 0.570 second using v1.01-cache-2.11-cpan-4505f990765 )