On the practical usage of genetic algorithms in ecology and evolution


Correspondence author. E-mail: s.hamblin@unsw.edu.au


  1. Genetic algorithms are a heuristic global optimisation technique mimicking the action of natural selection to solve hard optimisation problems, which has enjoyed growing usage in evolution and ecology. However, there is little standardisation in how genetic algorithms are implemented in these fields and even less practical advice for those hoping to implement genetic algorithms for their own models. This article aims to demystify genetic algorithms and provide assistance to researchers; basic programming knowledge is important for working with genetic algorithms, but none is required to read this article.
  2. I review the basics of genetic algorithm methodology and provide suggestions on problems that may or may not benefit from genetic algorithm methods. The genetic operators (selection, replacement, mutation, crossover) and their rate parameters (mutation rate, etc.) are a source of potential confusion and to ease their selection, I present recommendations informed by historical usage and best practices, concluding with potential pitfalls.
  3. Good reasons for employing genetic algorithms include: solving optimisation problems beyond the reach of analytical techniques, relaxing model assumptions, evolving behaviour in individual-based models, and simulating co-evolutionary processes. However, genetic algorithms are not always the correct technique to use. Simpler methods may sometimes outperform genetic algorithms, and certain problem features may cause trouble.
  4. Genetic algorithms strike a balance between exploration of the search space and exploitation of good solutions, driven by the choice of genetic operators and rate parameters. I outline a basic set of parameter values and operator choices for genetic algorithm models as a starting point and provide advice on how to modify them to explore the exploitation/exploration trade-off. Finally, I provide general advice on analysis and reporting of these models.
  5. There are a number of potential issues that can surprise unwary users, such as rate parameter values that lead to pathological outcomes; I suggest ways to detect and correct these problems. Also, contrary to popular usage, genetic algorithms can find solutions to game theory problems but cannot guarantee their stability. Finally, while genetic algorithms offer great power and flexibility by drawing inspiration from evolutionary processes, they are (usually) not a faithful model of genetics or evolution.