Actually, it is often the case that p=1. Usually people want to always add
a little noise to each element in a vector, and setting p=1 does that. If
don't always want to add noise to each element, however, you could set p<1.
With bit strings you wouldn't want to mutate every bit (that would be way
too noisy), but with real-valued vectors it's pretty common to add a little
noise every time.


On Sun, Feb 10, 2013 at 4:54 PM, LordCobar <notifications@github.com> wrote:

> In
> EssentialsOfMetaheuristics/src/singleStateMethods/GaussianConvolution.groovy:
>
> > @@ -0,0 +1,30 @@
> > +package singleStateMethods
> > +
> > +import problems.OnesMax
> > +import groovy.transform.ToString
> > +import java.util.Random
> > +
> > +class GaussianConvolution {
> > +
> > +    Integer p = 1
>
> In the book this part of the algorithm says p<- probability of adding
> noise to an element in the vector. Then right next to that it says "Often p
> = 1" regardless of the fact that in the algorithm pseudocode one line reads
> "if p >= random number chosen uniformly from 0.0 to 1.0 then". So the p
> will always be greater or equal to the random number making the probability
> of of receiving noise effectively 100%. Correct me if I'm wrong, but it
> seems like the book makes a bad recommendation when it says "Often p = 1".
> If so it might be worth it to notify the author.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/NicMcPhee/essentials-of-metaheuristics-groovy/pull/20/files#r2956344>..
>
>