# Is nested mutation effective?

While running my genetic algorithms I notice that they get stuck in local optima quite a bit. Genomes are often no more than 3 mutations away from getting a really big boost in fitness. However, when they only mutate once - they lose fitness. That's why they get stuck a lot. So I was thinking on implementing something like this during the mutation phase (pseudocode):

while(random() < mutationRate):
mutate();


if(random() < mutationRate):
mutate();


So basically, if the mutation rate is 0.3 for example, there is a 0.3 * 0.3 = 0.09 chance of a genome getting two mutations at the same time. However, there is a very small chance that a genome might mutate an insane amunt.

But first of all, is this a thing? Are there any papers on/using this?

Secondly, is the described while loop better than for example

if(random() < mutationRate):
mutate();
mutate();
mu...


for an x amount of times. So basically saying, if a genome mutates, mutate it x times.