1.2 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)
  • 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 在这里插入图片描述
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值