Genetic and Evolutionary Algorithms
回顾1.1
- Randomised algorithms
- Optimisation and local search algorithms
- Stochastic Local Search Algorithms
1 How evolution works in nature?
- evolution: heritable characteristics + change in it
- change: mutations, crossover
- driving force: natural selection, survival of the fittest
2 Evolutionary Algorithms
Description
- a subset of meta heuristic algorithm, inspired by biological evolution
- EA includes Genetic Algorithms, Evolutionary Programming, Evolution Strategies, Differential Evolution
- It’s essentially a kind of stochastic local search optimisation algorithm
- distinct characteristic of EAs:
- population based: it would generate, matin and optimism a population of candidate solutions
Building blocks of EAs
- each solution is called an individual
- fitness (objective) function to evaluate solutions
- variation operators: mutation and crossover
- selection and reproduction: process of survival of the fittest
Balance of exploration and exploitation
- process of finding the best
- process of not converge so fast, something about the search space
persudo code
3 Genetic Algorithm
Different EAs for optimisation
- Genetic algorithm
- Representation: strings of numbers, traditionally binary
- Variation operators: crossover (recombination), mutation
- Evolution strategy
- Representation: vectors of real numbers
- Variation operators: mutation (self-adaptive mutation)
Genetic Algorrithm
- Genotype = encoded solution
- chromosoe = binary string
- gene = bit
- allele = 0/1
- each individual is given by a chromosome (assumption).
- 如果我们encode our problem with 1 and 0, 可以以一位为单位、或者多位。
- Phenotype = decoded solution
Representation
- Definition: representation is a way to represent (encode) solutions
- 重点
- solutions x is called phenotypes
- fitness (objective) function f(x)
- the representations of solutions is called genotypes
- Selection时需要用到fitness value
- choices
- Binary representation
- encoding function: mapping phenotypes (solutions) to bit strings
- decoding function: mapping genotypes (bit strings) to phenotypes
- Real number representation
- Random key representation
- Permutation representation (suitable for TSP)
- Binary representation
- Phenotype and Genotype
- phenotype space can be anything
- Genotype contains bit strings of length L
Decoding
- encode real number in to computer
把上下界限这一段分为n份,s_i定义在哪半边(left or right) - then decode
固定一个长度为12的string,表示三个数,每个数用4个位置表示。
比如第一个,S_1=1101,按照计算方法K_1=1+5+8=13,x_1=-5+13*(10/15)=3.667
Operators
- Mutation
- flip each bit with a probability p_m (mutation rate)
- range: [1/L,1/2]
- Crossover
- Randomly select two parents with probability p_c for crossover
- range: [0, 1]
- Type
- 1-point crossover
- n-point crossover
- uniform crossover