liveBook · Manning

Mutation rate

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

A mutation rate is the probability or proportion governing how often candidate representations undergo mutation during evolutionary reproduction.

A mutation rate controls how often offspring receive randomized changes to their genetic material during evolutionary reproduction. In a genetic algorithm, each gene may be tested independently after crossover. Lower rates preserve specialization and stability; higher rates increase variation but can prevent individuals from reaching optimum performance. section 2.6 section 2.5.9

Listing 2.18 EDL_2_5_Genetic_Algorithms.ipynb: Mutation
def mutation(individual, mutation_rate):
  for i in range(len(individual)):         #1
    
    if random.random() < mutation_rate:    #2
      individual[i] = 1 - individual[i]    #2
  return individual
 
mutation(pop[parent[0]], .5)

A simple mutation function loops over an individual, compares a random value with mutation_rate, and flips each selected binary gene. section 2.5.7

Use mutation rate as an experimental control:

  • Set it between 0 and 1; a demonstration may use 0.5, although typical rates are described as below 5%. section 2.4.2 section 2.5.7
  • Increase it to introduce more population variety, or decrease it to encourage specialization and potentially more stable evolution. section 2.5.9
  • Rerun the evolutionary notebook after changing the value and inspect whether the population converges faster, improves, or fails to stabilize. section 2.4.2 section 6.2.1

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Explains the parameter conceptually, implements per-gene binary mutation, and examines effects through notebook experiments.
Examples
Uses bit-flipping code, a 50% demonstration, and parameter-change experiments across genetic and neuroevolutionary notebooks.
What it assumes
Assumes genetic-algorithm concepts including offspring, genes, crossover, populations, generations, and fitness evaluation.
What you can do after
Apply it via a genetic algorithm by changing the rate, rerunning evolution, and evaluating variation, convergence, and performance.
How it connects
Connects mutation rate to crossover, selection, genetic algorithms, learning rate, and neuroevolution.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.