Manual Reference Pages - ALGORITHM::EVOLUTIONARY::OP::MUTATION (3)
Algorithm::Evolutionary::Op::Mutation - BitFlip mutation, changes several bits in a bitstring, depending on the probability
<op name=Mutation type=unary rate=2>
<param name=probability value=0.5 />
my $ref = XMLin($xmlStr);
my $op = Algorithm::Evolutionary::Op::->fromXML( $ref );
print $op->asXML(), "\n*Arity ->", $op->arity(), "\n";
#Create from scratch
my $op = new Algorithm::Evolutionary::Op::Mutation (0.5 );
my $priority = 1;
my $mutation = new Algorithm::Evolutionary::Op::Mutation 1/$length, $priority;
Mutation operator for a GA
new( [$mutation_rate] [, CW$operator_probability] )
Creates a new mutation operator with a bitflip application rate, which
defaults to 0.5, and an operator application rate (general for all
ops), which defaults to 1. Application rate will be converted in
runtime to application probability, which will eventually depend on
the rates of all the other operators. For instance, if this operators
rate is one and theres another with rate=4, probability will be 20%
for this one and 80% for the other; 1 in 5 new individuals will be
generated using this and the rest using the other one.
create( [$operator_probability] )
Creates a new mutation operator with an application rate. Rate
defaults to 0.5 (which is rather high, you should not rely on it).
Called create to distinguish from the classwide ctor, new. It just
makes simpler to create a Mutation Operator
apply( CW$chromosome )
Applies mutation operator to a Chromosome, a bitstring, really. Can be
applied only to victims with the _str instance variable;
it checks before application that the operand is of type
It returns the victim.
This file is released under the GPL. See the LICENSE file included in this distribution,
or go to http://www.fsf.org/licenses/gpl.txt
CVS Info: $Date: 2009/09/13 12:49:04 $
$Header: /media/Backup/Repos/opeal/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/Mutation.pm,v 3.1 2009/09/13 12:49:04 jmerelo Exp $
$Author: jmerelo $
$Revision: 3.1 $
|perl v5.20.3 ||ALGORITHM::EVOLUTIONARY::OP::MUTATION (3) ||2014-10-25 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.