Reference articles on history, science, culture and more
Encyclopedia

Evolutionary algorithm

Subset of evolutionary computation

Image credit is listed at the end of this article.

Evolutionary algorithms (EA) reproduce essential elements of biological evolution in a computer algorithm in order to solve "difficult" problems, at least approximately, for which no exact or satisfactory solution methods are known. They are metaheuristics and population-based bio-inspired algorithms and evolutionary computation, which itself are part of the field of computational intelligence. The mechanisms of biological evolution that an EA mainly imitates are reproduction, mutation, recombination and selection. Candidate solutions to the optimization problem play the role of individuals in a population, and the fitness function determines the quality of the solutions (see also loss function). Evolution of the population then takes place after the repeated application of the above operators.

Evolutionary algorithms often perform well approximating solutions to all types of problems because they ideally do not make any assumption about the underlying fitness landscape. Techniques from evolutionary algorithms applied to the modeling of biological evolution are generally limited to explorations of microevolution (microevolutionary processes) and planning models based upon cellular processes. In most real applications of EAs, computational complexity is a prohibiting factor. In fact, this computational complexity is due to fitness function evaluation. Fitness approximation is one of the solutions to overcome this difficulty. However, seemingly simple EA can solve often complex problems; therefore, there may be no direct link between algorithm complexity and problem complexity.

01Generic definition

The following is an example of a generic evolutionary algorithm:

  1. Randomly generate the initial population of individuals, the first generation.
  2. Evaluate the fitness of each individual in the population.
  3. Check, if the goal is reached and the algorithm can be terminated.
  4. Select individuals as parents, preferably of higher fitness.
  5. Produce offspring with optional crossover (mimicking reproduction).
  6. Apply mutation operations on the offspring.
  7. Select individuals preferably of lower fitness for replacement with new individuals (mimicking natural selection).
  8. Return to 2

02Types

Similar techniques differ in genetic representation and other implementation details, and the nature of the particular applied problem.

  • Genetic algorithm, This is the most popular type of EA. One seeks the solution of a problem in the form of strings of numbers (traditionally binary, although the best representations are usually those that reflect something about the problem being solved), by applying operators such as recombination and mutation (sometimes one, sometimes both). This type of EA is often used in optimization problems.
  • Genetic programming, Here the solutions are in the form of computer programs, and their fitness is determined by their ability to solve a computational problem. There are many variants of Genetic Programming:
  • Evolutionary programming, Similar to evolution strategy, but with a deterministic selection of all parents.
  • Evolution strategy (ES), A family of evolutionary algorithms developed in the 1960s and 1970s by Ingo Rechenberg, Hans-Paul Schwefel and their co-workers, initially for numerical and engineering optimization. Classical evolution strategies operate primarily on real-valued search vectors and use mutation, recombination and deterministic selection. A distinguishing feature is the self-adaptation of the mutation distribution: strategy parameters controlling mutation, such as mutation step sizes and, in more general variants, correlations or other parameters describing the distribution, are adapted during the evolutionary search together with the candidate solutions. Classical forms include the (1+1)-ES and the population-based (\mu ,\lambda )- and (\mu +\lambda )-ES. Later developments include derandomized adaptation mechanisms such as covariance-matrix adaptation and related contemporary evolution strategies. Emmerich et al. provide an overview of classical and contemporary evolution strategies and extensions to multimodal, multi-criterion and mixed-integer optimization.
  • Differential evolution, Based on vector differences and is therefore primarily suited for numerical optimization problems.
  • Evolutionary multi-objective optimization, Applies evolutionary algorithms to multi-objective optimization problems, typically maintaining a population that approximates multiple trade-off solutions on the Pareto front.
  • Coevolutionary algorithm, Similar to genetic algorithms and evolution strategies, but the created solutions are compared on the basis of their outcomes from interactions with other solutions. Solutions can either compete or cooperate during the search process. Coevolutionary algorithms are often used in scenarios where the fitness landscape is dynamic, complex, or involves competitive interactions.
  • Neuroevolution, Similar to genetic programming but the genomes represent artificial neural networks by describing structure and connection weights. The genome encoding can be direct or indirect.
  • Learning classifier system, Here the solution is a set of classifiers (rules or conditions). A Michigan-LCS evolves at the level of individual classifiers whereas a Pittsburgh-LCS uses populations of classifier-sets. Initially, classifiers were only binary, but now include real, neural net, or S-expression types. Fitness is typically determined with either a strength or accuracy based reinforcement learning or supervised learning approach.
  • Quality-Diversity algorithms, QD algorithms simultaneously aim for high-quality and diverse solutions. Unlike traditional optimization algorithms that solely focus on finding the best solution to a problem, QD algorithms explore a wide variety of solutions across a problem space and keep those that are not just high performing, but also diverse and unique.

03Theoretical background

The following theoretical principles apply to all or almost all EAs.

No free lunch theorem

The no free lunch theorem of optimization states that all optimization strategies are equally effective when the set of all optimization problems is considered. Under the same condition, no evolutionary algorithm is fundamentally better than another. This can only be the case if the set of all problems is restricted. This is exactly what is inevitably done in practice. Therefore, to improve an EA, it must exploit problem knowledge in some form (e.g. by choosing a certain mutation strength or a problem-adapted coding). Thus, if two EAs are compared, this constraint is implied. In addition, an EA can use problem specific knowledge by, for example, not randomly generating the entire start population, but creating some individuals through heuristics or other procedures. Another possibility to tailor an EA to a given problem domain is to involve suitable heuristics, local search procedures or other problem-related procedures in the process of generating the offspring. This form of extension of an EA is also known as a memetic algorithm. Both extensions play a major role in practical applications, as they can speed up the search process and make it more robust.

Curse of dimensionality in black-box optimization

A related limitation arises in black-box optimization when only weak regularity assumptions are made about the objective function. For classes of d-dimensional Hölder-continuous functions, worst-case information-based complexity results imply that the error obtainable from n function evaluations decreases only at a rate governed by the dimension. In particular, for Lipschitz-continuous black-box functions the worst-case error is of order n^{-1/d}, so that guaranteeing an error below \varepsilon can require a number of function evaluations of order \varepsilon ^{-d}. This exponential dependence on the dimension is an instance of the curse of dimensionality.

Like the no free lunch theorem, this result limits what can be guaranteed without additional problem structure, although the two results have different mathematical foundations. In the Lipschitz case, adaptivity or randomization does not in general remove the unfavorable worst-case dependence on dimension. Novak and Ritter also investigated global optimization based on hyperbolic cross points as a structured sampling approach.

Convergence

For EAs in which, in addition to the offspring, at least the best individual of the parent generation is used to form the subsequent generation (so-called elitist EAs), there is a general proof of convergence under the condition that an optimum exists. Without loss of generality, a maximum search is assumed for the proof:

From the property of elitist offspring acceptance and the existence of the optimum it follows that per generation k an improvement of the fitness F of the respective best individual x' will occur with a probability P>0. Thus:

F(x'_{1})\leq F(x'_{2})\leq F(x'_{3})\leq \cdots \leq F(x'_{k})\leq \cdots

I.e., the fitness values represent a monotonically non-decreasing sequence, which is bounded due to the existence of the optimum. From this follows the convergence of the sequence against the optimum.

Since the proof makes no statement about the speed of convergence, it is of little help in practical applications of EAs. But it does justify the recommendation to use elitist EAs. However, when using the usual panmictic population model, elitist EAs tend to converge prematurely more than non-elitist ones. In a panmictic population model, mate selection (see step 4 of the generic definition) is such that every individual in the entire population is eligible as a mate. In non-panmictic populations, selection is suitably restricted, so that the dispersal speed of better individuals is reduced compared to panmictic ones. Thus, the general risk of premature convergence of elitist EAs can be significantly reduced by suitable population models that restrict mate selection.

Virtual alphabets

With the theory of virtual alphabets, David E. Goldberg showed in 1990 that by using a representation with real numbers, an EA that uses classical recombination operators (e.g. uniform or n-point crossover) cannot reach certain areas of the search space, in contrast to a coding with binary numbers. This results in the recommendation for EAs with real representation to use arithmetic operators for recombination (e.g. arithmetic mean or intermediate recombination). With suitable operators, real-valued representations are more effective than binary ones, contrary to earlier opinion.

04Comparison to other concepts

Biological processes

A possible limitation of many evolutionary algorithms is their lack of a clear genotype-phenotype distinction. In nature, the fertilized egg cell undergoes a complex process known as embryogenesis to become a mature phenotype. This indirect encoding is believed to make the genetic search more robust (i.e. reduce the probability of fatal mutations), and also may improve the evolvability of the organism. Such indirect (also known as generative or developmental) encodings also enable evolution to exploit the regularity in the environment. Recent work in the field of artificial embryogeny, or artificial developmental systems, seeks to address these concerns. And gene expression programming successfully explores a genotype-phenotype system, where the genotype consists of linear multigenic chromosomes of fixed length and the phenotype consists of multiple expression trees or computer programs of different sizes and shapes.

Monte-Carlo methods

EAs and Monte-Carlo methods have in common that their individual search steps are determined by chance. The main difference, however, is that EAs, like many other metaheuristics, learn from past search steps and incorporate this experience into the execution of the next search steps in a method-specific form. With EAs, this is done firstly through the fitness-based selection operators for partner choice and the formation of the next generation. And secondly, in the type of search steps: In EA, they start from a current solution and change it or they mix the information of two solutions. In contrast, when dicing out new solutions in Monte-Carlo methods, there is usually no connection to existing solutions.

If, on the other hand, the search space of a task is such that there is nothing to learn, Monte-Carlo methods are an appropriate tool, as they do not contain any algorithmic overhead that attempts to draw suitable conclusions from the previous search. An example of such tasks is the proverbial search for a needle in a haystack, e.g. in the form of a flat (hyper)plane with a single narrow peak.

05Applications

Evolutionary algorithms are also widely used for problems with several conflicting objectives; this area is known as evolutionary multi-objective optimization (EMO).

The areas in which evolutionary algorithms are practically used are almost unlimited and range from industry, engineering, complex scheduling, agriculture, robot movement planning and finance to research and art. The application of an evolutionary algorithm requires some rethinking from the inexperienced user, as the approach to a task using an EA is different from conventional exact methods and this is usually not part of the curriculum of engineers or other disciplines. For example, the fitness calculation must not only formulate the goal but also support the evolutionary search process towards it, e.g. by rewarding improvements that do not yet lead to a better evaluation of the original quality criteria. For example, if peak utilisation of resources such as personnel deployment or energy consumption is to be avoided in a scheduling task, it is not sufficient to assess the maximum utilisation. Rather, the number and duration of exceedances of a still acceptable level should also be recorded in order to reward reductions below the actual maximum peak value. There are therefore some publications that are aimed at the beginner and want to help avoiding beginner's mistakes as well as leading an application project to success. This includes clarifying the fundamental question of when an EA should be used to solve a problem and when it is better not to.

07Examples

In 2020, Google stated that their AutoML-Zero can successfully rediscover classic algorithms such as the concept of neural networks.

The computer simulations Tierra and Avida attempt to model macroevolutionary dynamics.

Watch videos about Evolutionary algorithmExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article Evolutionary algorithm, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Images, from Wikimedia Commons:

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.