GA Operators – Mutation
1. What is Mutation?
Mutation is a Genetic Algorithm operator that makes a small random change in a chromosome.
Its main purpose is to:
- Introduce new genetic information
- Maintain diversity in the population
- Prevent premature convergence
- Help GA escape from local optima
Mutation = Small random change in a solution.
2. Simple Example
In binary encoding, mutation usually means changing 0 to 1 or 1 to 0.
Before Mutation: 101101
↑
After Mutation: 101001
Only one gene has changed.
3. Types of Mutation
A. Bit Flip Mutation
Used mainly with binary encoding.
Before: 101101
After: 100101
↑
A bit changes:
0 → 1
1 → 0
B. Swap Mutation
Used mainly with permutation encoding.
Two positions are selected and swapped.
Before: [1, 2, 3, 4, 5]
After: [1, 4, 3, 2, 5]
↑ ↑
swapped
Application: Travelling Salesman Problem and scheduling.
C. Inversion Mutation
A section of the chromosome is selected and reversed.
Before: [1, 2, 3, 4, 5, 6]
After: [1, 5, 4, 3, 2, 6]
The selected section [2,3,4,5] becomes [5,4,3,2].
D. Scramble Mutation
A selected section is randomly rearranged.
Before: [1, 2, 3, 4, 5, 6]
Selected: [2, 3, 4, 5]
After: [1, 4, 2, 5, 3, 6]
The elements remain the same, but their order changes.
E. Real-Valued Mutation
Used for real-number chromosomes.
A small random value is added or subtracted.
Before: 5.40
After: 5.47
This is useful in numerical optimization.
4. Mutation Probability
Mutation is generally applied with a low probability.
For example:\[ P_m = 0.01 \]
means approximately 1% mutation probability.
The exact value depends on the problem and GA design.
5. Why is Mutation Important?
Without mutation, the population may become too similar.
For example:
Population
101101
101101
101001
101101
101001
The GA may lose diversity and get stuck.
Mutation introduces new possibilities:
101101 → 111101
Therefore, mutation helps the algorithm explore new areas of the search space.
6. Crossover vs Mutation
| Crossover | Mutation |
|---|---|
| Combines parent chromosomes | Changes genes |
| Usually uses two parents | Usually acts on one chromosome |
| Creates new combinations | Creates small variations |
| Higher probability | Usually lower probability |
| Main recombination operator | Diversity operator |
Exam Definition
Mutation is a Genetic Algorithm operator that randomly changes one or more genes of a chromosome with a small probability. It maintains population diversity and helps prevent the algorithm from getting trapped in local optima.
Memory Line
Mutation = Small Random Change → Diversity → Better Exploration
