• No results found

5.5 Analysis of the Multi-Objective Optimization Problem in the TAG System

6.1.1 Basic Concepts

Genetic algorithms, first introduced by Holland [47], are heuristic search algorithms mimicking natural evolutionary processes. They belong to the broader class of Evolutionary Algorithms (EA). A GA uses concepts from natural evolution, such as reproduction and mutation, to converge a set of candidate solutions (referred to as individuals) in a search space towards an optimum. When a GA is applied to a specific problem, this problem first has to be encoded, then so-called genetic operators can be applied to the encoded representation. In order to understand the functioning of a GA in general and the one proposed in this chapter in particular, it is important to define the concepts and building blocks of a GA. The following terms are all referring to concepts from natural evolution and can be interpreted in analogy to evolution.

Gene. Refers to a part of a chromosome, i.e., a partial solution encoding.

Chromosome. Collection of genes encoding a candidate solution to a given problem. Individual. Actual potential solution to a problem, represented as a chromosome.

Population. Set of n individuals at a given point in time, where the input parameter n defines the population size.

Generation. Iteration of a GA. The maximal number of generations is an input to the algorithm and can be used as a termination condition.

Fitness. Refers to the quality of a solution or chromosome, computed based on the fitness function that has to be defined for each problem.

Genotype. Representation of a solution or chromosome. Binary and real-value representations are common.

Phenotype. The actual manifestation of the individual, resulting from the expression of the geno- type.

The steps of an evolutionary algorithm are listed in Algorithm 3 and are described in the follow- ing.

Initialization. Refers to the creation of the initial population P (0). It can either be created

randomly, or by using existing knowledge. The size of the population, i.e., the number of individuals per generation, is an input parameter that has to be defined.

Evaluation. During evaluation, a fitness value is assigned to each individual in a generation. This step is independent of the algorithm and is externally defined, as it fully depends on the specific problem to be solved. The evaluation is applied on the phenotype.

Crossover. The crossover operator takes n individuals as input (called the parents – commonly n = 2) and generates one or two new individuals, called children or offspring. The idea behind

6.1. BACKGROUND ON GENETIC ALGORITHMS 105 the crossover operator is to mimic the sexual reproduction process by combining genes from two parents to form new individuals. The goal is to combine good partial solutions to eventually form even better solutions. The crossover operation and its frequency have to be carefully chosen and tailored to the given problem. There exist different crossover techniques, such as one-point crossover (a random crossover point is chosen and all genes right of that point are exchanged between the parents), two-points crossover (two cross-over points are randomly chosen and the middle parts are exchanged) and uniform crossover (each gene is exchanged or not with equal probability).

Mutation. As opposed to crossover, mutation is an asexual genetic operator. It is an operation on a single individual, generally a bit flip (on binary chromosomes) occurring at a certain, defined probability. The purpose of the mutation operator is to ensure that new genetic material enters the population, thus avoiding the solution to early converge towards a local optimum.

Selection. Selection of individuals occurs at two stages in a GA: when individuals are selected as parents to produce offspring (cf. mating pool in Algorithm 3), and when individuals are selected to form the next generation. The latter is also referred to as reproduction. There exist several basic types of reproduction. In generational reproduction, all individuals are replaced in the transition from generation t to generation t + 1. In steady-state reproduction, only one or two individuals (usually the worst, i.e., the ones having the lowest fitness values) are replaced from one generation to the next. The intermediate solution is referred to as generational reproduction with elitism and allows a certain number of top individuals (with the highest fitness, i.e., the “elite”) to survive to the next generation. The overall goal of selection is to target the search to the most promising areas of the search space.

To summarize, the overall goal of a GA is to generate a population of individuals representing optimized solutions to a given problem, by evolving a random initial population by mixing genetic information (crossover), introducing new genes (mutation) and selecting individuals with higher fitness (selection) to survive across generations. This cycle is represented in Figure 6.1 and the

process is detailed in Figure 6.2 with a simple example. Six bit-encoded chromosomes form a

population, the fitness function is defined as the sum of the occurrences of 1. The figure depicts one iteration of the algorithm, where the two individuals with the highest fitness values are selected for mating. A one-point crossover at a position defined randomly is then applied to them, resulting in two children. This is followed by a mutation (bit-flip), again at a random position. The purpose of this example is only to illustrate the concepts defined above. Real-world examples are of course more complex and a single iteration does not necessarily lead to an improved solution.

Since their introduction, GAs have been successfully applied to numerous optimization scenarios. They are used for addressing single- and multi-objective combinatorial optimization, fuzzy optimiza- tion, scheduling, network design and many more [42]. For numerous examples of concrete problem descriptions and the application of GAs to them, the reader is referred to [97].

The implementation of the genetic operators for QoS-aware service selection problems is moti- vated in Section 6.3 and described in Section 6.4.

Evaluation &

Selection

Crossover

Mutation

Concentrate on fitter solutions in the search space

Add new solutions to the search space

Figure 6.1: Genetic Algorithm: Cycle of Operations