Download presentation

Presentation is loading. Please wait.

Published byDeclan Neville Modified about 1 year ago

1
EIE426-AICV 1 Evolutionary Computation (EC) eie426-ec ppt

2
EIE426-AICV 2 Contents Basic Concepts of EC Genetic Algorithms An Example Chromosome Representation Stopping Criteria Initial Population Selection Mechanisms Crossover and Mutation Fitness Functions Another Example Application: Routing Optimization Advantages and Disadvantages of EC

3
EIE426-AICV 3 Evolution and Search Evolution - search through the enormous genetic parameter space for the best genetic make-up. Borrow ideas from nature to help us solve problems that have equally large search spaces or similarly changing environment.

4
EIE426-AICV 4 Natural Evolution and Evolutionary Computation Natural Evolution Individual Fitness Environment Evolutionary Computing Candidate Solution Quality Problem

5
EIE426-AICV 5 Different ECs Several classes of EC algorithms have been developed: - Genetic algorithms (GA’s): model genetic evolution - Genetic programming: based on GA’s, but individuals are programs (represented as trees) - Evolutionary programming: from the simulation of adaptive behavior in evolution (phenotype evolution) - Evolution strategies: model the strategic parameters that control variation in evolution, i.e., the evolution of evolution - Culture evolution: models the evolution of culture of a population and how the culture influences the evolution of individuals. - Co-evolution: individuals evolve through cooperation, or in competition with one other.

6
EIE426-AICV 6 Basic Concepts Chromosome: individual Population: many individuals Gene: each characteristics of chromosome (one parameter) Allele: the value of a gene Crossover: generate offspring by combining parts of the parents. Mutation: introduce new genetic material into an existing individual. Fitness: the survival strength of an individual Culling (removing) and elitism (copying)

7
EIE426-AICV 7 Evolutionary Computation Recombination (Crossover) Mutation Population OffspringParents Selection Replacement The evolutionary cycle

8
EIE426-AICV 8 Genetic Algorithms The GA was the first EC paradigm developed and applied (Holland 1975). The features of the original GA’s: (1) A bit string representation (2) Proportional selection (3) Cross-over as the primary method to produce new individuals. Several changes have been made: (1) Different representation schemes (2) Different selection methods (3) Different GA operators (cross-over, mutation and elitism)

9
EIE426-AICV 9 Random Search The GA is a search procedure. Random search is possibly the simplest search procedure. Its training time may be very long before an acceptable solution is obtained. Procedure: (1) Start from an initial search point or a set of initial points. (2) Random perturbations to the points (3) Repeat until an acceptable solution is reached or a maximum number of iterations is exceeded.

10
EIE426-AICV 10 General Genetic Algorithm (1) Let g = 0. (2) Initialize the initial generation C g. (3) While no stopping criterion is satisfied (a) Evaluate the fitness of each individual in C g. (b) g g+1. (c) Select parents from C g-1. (d) Recombine selected parents through cross-over to form offspring O g (with a probability p c ). (e) Mutate offspring in O g (with a probability p m ). (f) Select the new generation C g from (the previous generation C g-1, e.g., the best individuals are copied) and the offspring O g. g: generation Note: The things in () might or might not be carried out.

11
EIE426-AICV 11 An Example

12
EIE426-AICV 12

13
EIE426-AICV 13 Use a genetic algorithm to solve the problem: Coding (chromosome representation of a solution) Generation of initial population (solutions) Fitness calculation Genetic operation

14
EIE426-AICV 14 Coding (chromosome representation): Use a binary string to represent x. If the solution is to be precise to 10 -6, then the interval (2-(-1)) = 3 should be divided into 3× At least 22 bits should be used because

15
EIE426-AICV 15 Decoding

16
EIE426-AICV 16

17
EIE426-AICV 17 Generation of initial population A set of N 22-bit binary strings can be randomly generated as the initial population.

18
EIE426-AICV 18 Fitness calculation Since f(x) > 0 in the interval, we can directly use f(x) as a fitness function: f(s) = f(x) e.g., s 1 =, f(s 1 )= s 2 =, f(s 2 )= s 3 =, f(s 3 )=

19
EIE426-AICV 19 Genetic operation (1) Selection: based on the fitness of individuals e.g., roulette wheel selection (fitness proportionate selection) (2) Crossover (with a probability p c ) e.g., s 2 =, f(s 2 )= s 3 =, f(s 3 )= After the crossover operation: s’ 2 =, f(s’ 2 )= s’ 3 =, f(s’ 3 )=

20
EIE426-AICV 20 (3) Mutation (with a probability p m ) e.g., s 3 = f(s 3 )= After the mutation operation: s’ 3 = f(s’ 3 )= or s 3 = s” 3 = f(s” 3 )=

21
EIE426-AICV 21 Simulation results: N = 50, p c = 0.25, p m = 0.01, at 89 generations, the best individual was obtained: s max = x max = f(x max ) =

22
EIE426-AICV 22 The best individual at each iteration (up to 150 generations) GenerationThe chromosome of the best individual xfitness

23
EIE426-AICV 23 Summary on Basic Concepts Evolution is an optimization process, where the aim is to improve the ability of individuals to survive. An evolutionary algorithm (EA) is a stochastic search for an optimal solution to a given problem. Evolution - search through the enormous genetic parameter space for the best genetic make-up. Borrow ideas from nature to help us solve problems that have an equally large search spaces or similarly changing environment.

24
EIE426-AICV 24 Genotype: describes the genetic composition of an individual Phenotype: the expressed behavioral traits of an individual in a specific environment. Selection: use the fitness evaluations to decide which are the best parents to reproduce. Crossover: generate offspring by combining parts of the parents Mutation: introduce new genetic material into an existing individual. Coding: phenotype genotype Decoding: genotype phenotype

25
EIE426-AICV 25 Simple Genetic Algorithm (SGA) RepresentationBinary strings Recombination (crossover) N-point (commonly used 1-point and 2- point) or uniform; p c typically in range (0.6, 0.9) MutationBitwise bit-flipping with fixed probability p m (typically between 1/pop_size and 1/ chromosome_length) Parent selectionFitness-Proportionate Survivor selectionAll children replace parents SpecialityEmphasis on crossover

26
EIE426-AICV 26 Genotype space = {0,1} I I-bit binary strings Phenotype space Coding (encoding or (representation) Decoding (inverse representation) Chromosome Representation

27
EIE426-AICV 27 Binary-valued variables: no extra coding required Nominal-valued variables D-bit with 2 D discrete nominal values e.g., four colors: red (00), blue (01), green (10), yellow (11) Continuous-valued variables

28
EIE426-AICV 28 Other Representations Gray coding of integers (still binary chromosomes) Gray coding is a mapping that means that small changes in the genotype cause small changes in the phenotype (unlike binary coding, e.g., 0111(7) and 1000 (8)). It is generally accepted that it is better to encode numerical variables directly as Integers Floating point variables

29
EIE426-AICV 29 Stopping Criteria The maximum number of generation is exceeded An acceptable best fit individual has evolved The average and/or maximum fitness value do not change significantly over the past g generations.

30
EIE426-AICV 30 Initial Population The standard way of generating the initial population is to choose gene values randomly from the allowed set of values. The goal of random selection is to ensure that the initial population is a uniform representation of the entire search space. A large population covers a larger area of the search space, and may require less generations to converge. In the case of a small population, the EA can be forced to explore a large search space by increasing the rate of mutation.

31
EIE426-AICV 31 Selection Mechanisms Selection operators (1) Random selection (2) Proportional selection: roulette wheel selection (3) Tournament selection (4) Rank-based selection

32
EIE426-AICV 32 Random Selection Individuals are selected randomly with no reference to fitness at all. All the individuals, good or bad, have an equal chance of being selected.

33
EIE426-AICV 33 Proportional Selection: Roulette Wheel Selection IndividualChromosomeFitness f i Selection probability, P i Accumulated probability

34
EIE426-AICV 34 Roulette Wheel Selection It can be visualized as the spinning of the wheel and testing which slide ends up at the top. Fitness values are usually normalized to [0,1].

35
EIE426-AICV 35 Assume that the following random number sequence is generated: Compared the random number sequence with the accumulated probabilities, we select the individuals: 1, 8, 9, 6, 7, 5, 8, 4, 6, 10. Individuals 2 and 3 were removed and replaced with individuals 8 and 6. The individuals with high fitness tends to survive but those with low fitness may be removed.

36
EIE426-AICV 36 The pseudocode:

37
EIE426-AICV 37 Tournament Selection A group of k individuals is randomly selected. The individual with the best fitness is selected from the group. The advantage: the worse individuals of the population will not be selected and the best individuals will not dominate in the reproduction process. For crossover, two tournaments are held to select each of two parents. It is possible that (1) A parent can be selected to reproduce more than once; and (2) One individual can combine with itself to reproduce offspring.

38
EIE426-AICV 38 Rank-Based Selection The rank ordering of the fitness values is used to determine the probability of selection and not the fitness values itself. Non-deterministic linear sampling Individuals are sorted in decreasing fitness value. (1) Let n = random(random(N)) where N is the total number of individuals and random(N) return a number between 1 and N. (2) Return n as the selected individual

39
EIE426-AICV 39 Elitism Elitism involves the selection of a set of individuals from the current generation to survive to the next generation. The number of individuals to survive to the next generation, without being mutated, is referred to as the generation gap. Generation gap = k k best individuals or k individuals selected using any selection operator

40
EIE426-AICV 40 Crossover

41
EIE426-AICV 41 Uniform Crossover A mask (vector) of length I (I-bit binary string) is created at random for each pair of individuals selected for reproduction. A bit with value of 1 indicates that the corresponding allele (bit) has to be swapped.

42
EIE426-AICV Parent1 Parent 2 Mask Offspring 1 Offspring 2

43
EIE426-AICV 43 One-point Crossover

44
EIE426-AICV Parent1 Parent 2 Mask Offspring 1 Offspring 2

45
EIE426-AICV 45 Two-point Crossover

46
EIE426-AICV Parent1 Parent 2 Mask Offspring 1 Offspring 2

47
EIE426-AICV 47 Arithmetic Crossover Arithmetic crossover can be used in the case of continuous-valued genes.

48
EIE426-AICV 48 Mutation Alter each gene independently with a probability p m (the mutation rate) Real-valued representations, mutation occurs by adding a random value (usually sampled from a Gaussian distribution ) to allele. The variance is usually a function of the fitness of the individual. Individuals with a good fitness value will be mutated less, while a bad fitness value will lead to large mutations.

49
EIE426-AICV 49 Mutation (fox)

50
EIE426-AICV 50 The Evolution Mechanism Increasing diversity by using genetic operators mutation crossover Decreasing diversity by selection of parents things to kill

51
EIE426-AICV 51 Fitness Functions Common fitness functions: Use the objective function f(x) directly (1) For a maximization problem, Fit(f(x)) = f(x) e.g., (2) For a minimization problem, Fit(f(x)) = -f(x) e.g., solution for x 2 + x = 2, to minimize f(x) = x 2 + x - 2

52
EIE426-AICV 52 Clipping

53
EIE426-AICV 53 Mapping

54
EIE426-AICV 54 Linear transformation of fitness functions

55
EIE426-AICV 55 Fig. ft1 Fig. ft2

56
EIE426-AICV 56 Genetic algorithms: case study To find the maximum of the “peak” function of two variables x and y: -3 ≤ x, y ≤ 3

57
EIE426-AICV 57 Chromosome representation

58
EIE426-AICV 58 Initial population

59
EIE426-AICV 59 The first generation

60
EIE426-AICV 60 Local maximum

61
EIE426-AICV 61 Global maximum

62
EIE557-CI&IA 62 Robotics Control Design Scheduling/Routing/Resource Allocation Machine Learning Pattern Recognition Market forecasting Data Mining Game Playing - Robocode - Backgammon - Chess Evolutionary Computation: Applications

63
Robocode EIE426-AICV 63 An Open Source educational game started by Mathew Nelson (originally provided by IBM). Currently contributions are being made by various people; officially Flemming N. Larsen is working on Robocode to keep it current and fix the bugs. The game is designed to help people learn to program in Java and enjoy the experience. Genetic Programming (GP) Robocode

64
EIE557-CI&IA 64 Application: Routing Optimization The problem: Given a network of M switches, an origin and a destination switch, the objective is to find the best route to connect a call between the origin and destination switches (Sevenster and Engelbrecht 1996). PSTN: Public Switch Telephone Network

65
EIE557-CI&IA 65 Chromosome representation: - variable length - each gene representing one switch - integer values for switch numbers - the first gene and last gene representing the origin and last switches, respectively Examples: ( ) ( ) = ( ) Duplicate switches are ignored

66
EIE557-CI&IA 66 Initialization of population: - randomly generated with the restriction that the first gene represents the origin switch and the last gene the destination switch

67
EIE557-CI&IA 67 Fitness function: a multi-criteria objective function was applied.

68
EIE557-CI&IA 68 Selection: any selection operator Crossover: any crossover operator Mutation: replacing selected genes with a uniformly random selected switch in the range [1, M].

69
EIE557-CI&IA 69 Real World EC Tends include: More complex representations and operators Use of problem specific knowledge for seeding the initial population and creating heuristic operators Hybridisation with other methods

70
EIE557-CI&IA 70 Advantages of EC Handles huge search spaces Balances exploration and exploitation Easy to try - not knowledge intensive Easy to combine with other methods Provides many alternative solutions Can continually evolve solutions to fit with a continually changing problem

71
EIE557-CI&IA 71 Disadvantages of EC No guarantee for optimal solution within finite time Weak theoretical basis May need extensive parameter tuning Often computationally expensive, i.e., slow

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google