Other Methods to Combat Convergence
Genetic Algorithms in Elixir — by Sean Moriarity (61 / 101)
👈 Implementing Common Mutation Strategies | TOC | What You Learned 👉
Mutation is the most common method for preventing premature convergence in the real world. This is largely because it’s so effective.
While mutation is the most common method of preventing premature convergence, other methods exist. In Chapter 5, Selecting the Best, you saw how important it was to select sufficiently different chromosomes for crossover. A proper selection strategy can go a long way in preventing premature convergence.
Choosing an effective crossover strategy is another means of preventing premature convergence. For example, if you use uniform crossover instead of single-point crossover, your algorithms are less susceptible to premature convergence.
Yet another means is by replacing similar individuals with new children — this is something you’ll explore further in Chapter 8, Replacing and Transitioning.
A ton of research is dedicated to methods of preventing genetic algorithms from converging. You might find it interesting to research and implement some theoretical strategies on your own.
In practice, you’ll likely never need more than a good mutation strategy to keep your algorithms from converging too soon.
👈 Implementing Common Mutation Strategies | TOC | What You Learned 👉
Genetic Algorithms in Elixir by Sean Moriarity can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

