1
$\begingroup$

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();

instead of the normal:

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.

$\endgroup$
2
$\begingroup$

Variable step sizes for mutation are a thing, and your idea of using a loop is pretty elegant, though it does restrict you to exponential falloff.

Another approach is to tie the mutation size and/or rate to some notion of progress. Start with one operator. If you see too few accepted mutations for a while, increase the step size of the operator. There are lots of ways to do this sort of thing, and the general approach is often very useful. Exactly how you do it for best results probably depends on the specific algorithms and problems.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.