Simulated Evolution

To simulate the process of natural selection in a computer, we need to define a representation of an individual.

At each point during the search process we maintain a "generation" of "individuals." Each individual is a data structure representing the "genetic structure" of a possible solution or hypothesis. Like a chromosome, the genetic structure of an individual is described using a fixed, finite alphabet. In GAs, the alphabet {0, 1} is usually used. This string is interpreted as a solution to the problem we are trying to solve.

For example, say we want to find the optimal quantity of the three major ingredients in a recipe (say, sugar, wine, and sesame oil). We can use the alphabet {1, 2, 3 ..., 9} denoting the number of ounces of each ingredient. Some possible solutions are 1-1-1, 2-1-4, and 3-3-1. These could all be individuals in the same population, together with other possible solutions.


As another example, the traveling salesperson problem is the problem of finding the optimal path to traverse, say, 10 cities. The salesperson may start in any city. A solution is a permutation of the 10 cities: 1-4-2-3-6-7-9-8-5-10.

Individuals in the population can be represented in many different ways, e.g. arrays trees or lists.