• 沒有找到結果。

Chapter 2 Backgrounds

2.2 The Genetic Algorithm

Genetic Algorithms belong to a certain group of heuristic problem solving techniques based on the principles of natural evolution. To this group of Evolutionary Algorithms belong also Evolutionary Programming, Evolution Strategies, and Genetic Programming. They share a common conceptual base of simulating the evolution of individual structures via processes of selection, mutation, and reproduction. The processes depend on the perceived performance of the individual structures as defined by an environment [6, 7].

More precisely, Evolutionary Algorithms maintain a population of structures, that evolve according to rules of selection and other operators, that are referred to as search operators, (or genetic operators), such as recombination and mutation. Each individual in the population receives a measure of it’s fitness in the environment.

Reproduction focuses attention on high fitness individuals, thus exploiting the available fitness information. Recombination and mutation perturb those individuals, providing general heuristics for exploration. Although simplistic from a biologist’s viewpoint, these algorithms are sufficiently complex to provide robust and powerful adaptive search mechanisms [6, 7].

Genetic Algorithms were devised by John Holland. The Genetic Algorithm is a model of machine learning which derives its behavior from a metaphor of some of the mechanisms of evolution in nature. This is done by the creation of a population of individuals of individuals represented by chromosomes, in essence a set of character strings that are analogous to the base-4 chromosomes that we see in our own DNA.

The individuals in the population then go through a process of simulated evolution.

Implementations typically use fixed-length character strings to represent their genetic information, together with a population of individuals which undergo crossover and

mutation in order to find interesting regions of the search space [6, 7].

Standard Formulation

Genetic Algorithms are working on a population of individuals that undergo an evolution. This evolution is caused by manipulating the chromosomes of the individuals of the current generation by mutation and crossover. The Genetic Algorithm selects those offspring individuals for the next generation that perform best in a defined environment (that possess the highest fitness). That means that only the fittest survive and the average fitness of the population will increase. For that reason the population adapts itself optimally to the environment after a certain number of generations.

If the fitness of the individuals is chosen according to the objective function f and the genes of the chromosomes are seen as the genome representation of optimization variables x1, x2, …xm then a Genetic Algorithm can be used to solve the multidimensional optimization problem [6]:

f (x1, x2, …xm) => optimum

Figure 2-3 shows the general scheme of Genetic Algorithm. At the beginning a population of nP individuals is created and initialized. The initialized is usually done by filling the chromosomes of the individuals with random values. The initial generation will then be evaluated. The fitness of the particular individuals is calculated and the population is ordered with respect to fitness. To evaluate the fitness of the individuals the phenotypic representation of the individual must be derived from the genotypic one. That means in context of the considered optimization problem the optimization variable x1, x2 …xm must be calculated from the chromosomes which are typically fixed-length bit string.

Figure 2-3 General scheme of a Genetic Algorithm

At the beginning of each cycle the current generation (parent generation) will reproduce itself. This is performed in two steps [6]:

First, the nE best of the current generation will be copied into the next generation.

This is also known as elitist approach because it can lead to the formation of elite in the population. Elitist individuals can survive a long time in the population.

Second, two of individuals in the parent generation exchange parts of their chromosomes to create two children. This process is called crossover and occurs with

nP

nE nP

nE + nP

nP

Initialize

Best parents Select parents Apply crossover

Apply mutation

Evaluate fitness Delete last

Stop?

Finish

of parents will produce nP children. After reproduction the new population has size nE

+ nP. To select pairs of parents the following selection techniques are considered:

„ Random parent selection (RS): The parent is chosen randomly from the parent generation. All individuals have the same chance to become a parent.

„ Tournament parent selection (TS): Two individuals are chosen randomly.

As parent is used that individual with the higher fitness. This guarantees that fitter individuals become more often parents than others.

„ Roulette wheel parent selection (RWS): The parent is chosen randomly, but its chance to be chosen as parent is proportional to its fitness. This is done as follows: Calculate the total fitness as sum of the fitness values of all the population members. Generate n, a random number between 0 and total fitness. Select the first population member whose fitness, added to the fitness of the preceding population members, is greater than or equal to n.

Note, that the fitness values must be nonnegative numbers. This selection technique also guarantees that fitter individuals become more often parents than others.

After the parent selection the actual crossover can take place. During the crossover the parents exchange parts of their chromosomes. This is done in order to be able to combine good chromosome parts in the offspring, to create better chromosomes from good ones. There exit different ways of how parents can exchange chromosome parts. Which crossover operator performs best depends on the problem at hand. The following three variants can be applied to a variety of problems [6,7]:

„ Single point crossover (SPX): A random position is chosen in the chromosome. The chromosome parts after this position are exchanged.

„ Dual point crossover (DPX): Two random positions are chosen in the

exchanged.

„ Uniform crossover (UX): For each bit position there is a random decision which parents contributes its bit value to which child. The exchange of chromosome parts is controlled by a random template.

After reproduction mutation are applied to the population. This is done by flipping bits in the chromosomes of the individuals. The bit flipping occurs with a certain probability pM. A typical value for pM is 0.01. The purpose of the application of mutations is to introduce a certain amount of diversity into the population.

Then, the individual’s fitness is calculated according to the objective function f.

The population is ordered with respect to fitness and the last nE individuals are deleted from the population. This is the second point in the algorithm where a selection according to fitness takes place. If as parent selection technique random selection is used then it is necessary to set the number of elitist individuals nE greater than 0.

Otherwise no directed development over the generations can occur. On the other hand, if random parent selection is not used, then nE can be set to 0 and the time consuming ordering of the population can be avoided.

Until now, a new generation of nP individuals was generated and process of reproduction, mutation, and selection can start again. If all parameter values of the algorithm are set reasonably and crossover operator, mutation operator and representation are chosen appropriately then the Genetic Algorithm will converge after a certain number of generations to the solution of the considered optimization problem.

2.3 Previous Researches Related to Address Offset

相關文件