Magi

Contact info
Word
Research
   Publications
Studies
Free Software
Hobbies
Articles
Photography
About me
   Curriculum Vitae

©Marko Grönroos, 1998

USENET News comp.ai.genetic

Säie: Mutation of probabilities?

Edellinen säie: Lit. References for neural L-systems?
Seuraava säie: NN evolving techniques
[Muut säikeet] [Muut uutisryhmät]
From: magi AT iki PISTE fi (Marko Grönroos)
Newsgroups: comp.ai.genetic
Subject: Re: Mutation of probabilities?
Date: 06 Nov 1998 15:44:15 +0200

lgeijten AT cs PISTE uu PISTE nl (Lydia Geijtenbeek) writes:
> I was wondering how to mutate probabilities (eg numbers
> between 0 and 1) in such a way that a higher mutation
> rate will result in a larger variation from the original
> value.

Here is a gaussian random function:

double gaussrnd (double stdv) {
            double r = rand()/(RAND_MAX+1.0)-0.5;
            return stdv * log ((r+0.5)/(0.5-r));
}

Some mutation functions for floating-point genes (such as those in
Evolution Strategies by Thomas Bäck), written in C++:

Mutation mutator:

// Floating-point mutator for mutating mutation rates
class MutationMutator : public FloatMutator {
            double mPhi;
      public:
                                                            MutationMutator (double phi=0.22) : mPhi(phi){}
            virtual double mutate (double p, double min, double max, double variance) const {
                        double pp = 1/(1+(1-p)/p*exp(-gaussrnd(mPhi)));
                        if (pp<min)
                                    pp=min;
                        return pp;
            }
};

Parameter p is the old value of the floating-point gene, min and max
are its limits, and variance is, well, variance. (Yes, some of the
parameters for the virtual function are not used here, but they might
be used by some mutation operators).

A mutator from Thomas Bäck's ES-stuff:

class MutationSimpleMutator : public FloatMutator {
            double mTau;
      public:
                                                            MutationSimpleMutator (int n=100) : mTau(1/sqrt(double(n))){}

            virtual double mutate (double p, double min, double max, double variance) const {
                        double pp = p*exp(mTau*gaussrnd(1));
                        if (pp<min)
                                    pp=min;
                        return pp;
            }
};

n is the genomic length.

The above mutation techniques are from the simulator used in:
            http://www.utu.fi/~magi/opinnot/gradu/
(you can find the sources there).

Eek, I always mix up variance and standard deviation and never
remember which is which so the namings above can refer to either.

----
-- Marko Grönroos, magi AT iki PISTE fi (http://www.iki.fi/~magi/)
-- Evolutionary algorithm researchers do it with the fittest individuals --
----

Edellinen säie: Lit. References for neural L-systems?
Seuraava säie: NN evolving techniques
[Muut säikeet] [Muut uutisryhmät]