Knowledge Base

What is a Genetic Algorithm?

In order to understand how a Genetic Algorithm works, one must first understand how a generic Evolutionary Algorithm works.

In order to understand how a Genetic Algorithm works, one must first understand how a generic Evolutionary Algorithm works. Evolutionary Computation (EC) is a wide-ranging field of computing techniques based on the evolutionary principle of natural selection, wherein candidate solutions are continually improved within their environment based on the theory of survival of the fittest, taking strong cues from biological terminology. With evolutionary algorithms, a problem is addressed using populations of individuals, each representing a potential solution to the problem. These populations are then slowly evolved over a number of generations by interbreeding and varying the components of individual solutions to produce new child solutions that form the basis of each subsequent generation. An objective function (known as the fitness function) determines the ability of each individual to solve the problem at hand, and assigns it a value by which it can be judged against its peers (usually known as a fitness) to determine the best solutions in the population. The fittest solutions in a population then have a higher probability of passing on information to subsequent generations. After a certain number of generations, or after some stopping criterion is met, the evolutionary process is terminated and the best overall individual is presented as the evolved solution. Different methods of representing or encoding a solution (representation), creating the initial population (initialization), choosing individuals for reproduction (selection), exchanging information between individuals (crossover), varying individuals (mutation), evaluating individuals' fitness (evaluation), and choosing individuals for the next generation (replacement) are employed by these algorithms. The canonical overall evolutionary algorithm process cycle is illustrated in Fig. 1. Figure 1: The evolutionary cycle of a typical evolutionary algorithm. Each block represents an operation on a population of candidate solutions.