GA Genetic Algorithm Genetic Algorithm

21 slides
0.09 MB
927 views

Similar Presentations

Presentation Transcript

1

GA Genetic Algorithm

2

Genetic AlgorithmIntroduction Algorithm GA Operations Chromosome representation Fitness function Demonstration of LibGA

3

Introduction基因演算法最早由Holland (1975)所提出,它是一種隨機全域搜尋之求解技術,可以仿照自然界生物適者生存之智慧型演化法則,逐步的將解答空間收斂在很小的範圍內,然後從中選取滿意解。 求解方式乃將可行解以字元串形式表示基因串列,然後將之置入交配池,作為後續之基因演化之交配或突變之群體。求解過程屬一重複性的程序,朝向事先規範的方向(適應函數)重複執行,直到收斂解或設定條件出現為止。

4

Genetic algorithm and applicationHolland initially introduced the genetic algorithm (GA), which is a global search technique (Holland, 1975). GA has received much attention and was applied successfully in many research fields over the last decade. GA explores the solution space using concepts taken from natural genetics and evolution theory. The search algorithm analyses and extracts superior evolving information from the search space, and guides the search in a pre-specified direction.

5

GA AlgorithmStep 1. Generate a random initial population of chromosomes of size P. Step 2. Encode all chromosomes and evaluate the objective function of their corresponding candidate solutions. Step 3. Determine the fitness values of the chromosomes using the predetermined objective function. Step 4. If the elitism policy is employed, insert the best chromosomes into the new generation pool.

6

GA AlgorithmStep 5. Choose a pair of parent chromosomes from the current population without replacement. Apply the crossover and mutation operators to yield a pair of new chromosomes. Step 6. Insert the new chromosomes into the new population. If the new population is smaller than P, return to Step 5. Step 7. If the pre-specified stopping criterion has been met, go Step 8; otherwise, return to Step 2. Step 8. Select and decode the overall best chromosome to be the final solution.

7

GA OperationsThe basic operations of GA Reproduction Selection Crossover Mutation

8

ReproductionIf the elitism policy is employed, insert the best chromosomes into the new generation pool. The chromosomes with higher fitness are more likely to become parents of new chromosomes. The reproduction gap defined in the GA configuration file determines the proportion of elite chromosomes. The best chromosomes in the last generation are copied directly into the next generation.

9

SelectionThe selection policy employed commonly is a combination of the rotating roulette wheel strategy and the elite strategy. The elite strategy can force the best surviving chromosomes, based on the fitness values of the current generation, into the next generation.

10

Crossover LibGA provides ten crossover methods, only “ORDER1”, “ORDER2”, “PMX” and “CYCLE,” which are suited to permutation processing, are employed here. The procedures of each method are briefly described below. The crossover operation is processed whether or not it is determined by a value generated randomly. If the value exceeds the crossover rate that was established in the configuration file of GA parameters, then the clone operation, rather than the crossover operation, is performed.

11

Order1Initially, select two random crossover points. Then, the offspring inherits the elements between the two crossover points from the selected parent, in the order and position in which the parent appeared. The remaining elements are inherited from the other parent in the order in which they appeared in that parent, beginning with the first position, followed by the second crossover point, and skipping over all elements that are already present in the offspring.

12

Order2Select four random crossover points as key positions to determine the order in which these genes appear in one parent and are subsequently imposed on the other parent to produce two offspring.

13

PMX Randomly select two crossover points. Then, the offspring inherits the elements between the two starting positions in one of the parents. Each element between the two crossover points of the other parent is mapped to the position of this element in the first parent. Then, the remaining elements are inherited from the other parent.

14

CYCLERandomly select a crossover point as a cycle starting point. The offspring inherits the element at the starting point of the selected parent. The element that is located in the corresponding position in the other parent cannot then be placed in this position, and thus it takes a position in the selected parent from which the offspring then inherits it . This procedure is repeated until the initial item in the unselected parent is encountered, completing the cycle. The offspring inherits from the unselected parent any elements that are not yet present.

15

MutationThe swap method is normally used as the mutation operation. The swap procedure randomly selects two points to determine the two changing points of the selected parent. The mutation operation is processed whether or not it is determined by a value generated randomly. If the value exceeds the mutation rate established in the configuration file of GA parameters, no mutation is performed and the selected parent is passed directly into the new generation.

16

The demonstration of crossover operation

17

The demonstration of mutation operation

18

Chromosome representationIntegers are employed to represent the operation of assigning task to workstation in successive number of 1, 2, …, N, respectively. A candidate solution can be encoded as a string by a permutation of {1, 2, …, N} to form a chromosome.

19

Chromosome representationEncoding Example: ‘2-1-4-3-5-6-8-7-9’ is one possible chromosome in the example of 3 tasks ×3 machines shown as follows:

20

Chromosome representationDecoding Example: String of ‘1-4-5-2-9-6-8-7-3’ can be decoded as: Task a is assigned to Workstation W1 (String 1), Task b to Workstation W2 (String 5), and Task c to Workstation W3 (String 9). Strings 4 (Task a), 2 (Task b), 6 (Task c), 8 (Task b), 7 (Task a), and 3 (Task c) are dummies.

21

Fitness function A weighting function (Eq. 9) is derived from the five system objective functions to evaluate the fitness values (FV) of a given chromosome. In Eq. (9), wi represents the weighting values of objectives. A smaller FV means that the chromosome is more likely to survive to the next generation.

Browse More Presentations

Last Updated: 8th March 2018

Recommended PPTs