遗传算法Genetic Algorithms学习笔记

Outline of Basic Genetic Algorithms

  1. [Start] : Genertate random population of n chromosomes(suitable solutions for the problem)
  2. [Fitness] : Evaluate the fitness f(x) of each chromosome x in the population
  3. [New population] : Create a new population by repeating following steps until the new population is complete
    • [Selection] Select two parent chrmosomes from a population accoring to their fitness (the better fitness ,the bigger chance to be selected)
    • [Crossover] With a crossover probability cross over the parents to form a new offspring(children). If no crossover was performed, offspring is an exact copy of parents.
    • [Mutation] With a mutation probability mutate new offspring a each locus(position in chromosome).
    • [Accepting] Place new offspring in a new popluation
  4. [Replace] Use new generated population for a further run of algorithm
  5. [Test] If the end postion is satisfied,stop,and return the best solution in currenct postion
  6. [Loop] Go to step2.

Psuedocode
START
Generate the initial population
Compute fitness
REPEAT
Selection
Crossover
Mutation
Compute fitness
UNTIL population has converged
STOP

Methodology I

  • In a genetic algorithm, a population of candidate solutions(called individuals,creatures,or phenotypes)to an optimization problem is evolved toward better solutions.
  • Each candidate solution has a set of properties(its chromosomes or genotype) which can be mutated and altered.
  • Traditionally, solutions are prepresented in binary as strings of 0’s and 1’s, but other encordings are also possible. e.g. 1011010010

Representation Example

  • 1011101010-- a possible 10-bits string “CHROMOSME” representing a possible solution to a problem
  • Bits or subsets of bits might represent choice of some feature,for example,let’s represent choice of a mobile phone:
bit positionmeaning
1-2Apple, Samasung,LG or ZTE
3-5Color(assume 8 colors)
6Wifi(YES or NO)
7Bluetooth(YES or NO)
8Touch Screen(YES or NO)
9Water Proof(YES or NO)
10Front Camera(YES or NO)

Methodology II

  • The evolution usually starts from a population of randomly generated individuals, and is an iterative process, with the population in each iteration called a generation.
  • In each generation, the fitness of every individual in the popualtion is evaluated; the fitness is usually the value of the objective function in the optimization problem being solved
  • The more fit individuals are stochastically selected from the current population, and each individulas’s genome is modified(recombined and possibly randomly mutated)to form a new generation.
  • The new generation of candidate solutions is then used in the next iteration of the algorithm
  • Commonly, the algorithm terminates when eigher a maximum number of generations has been produced, or a satisfactory fitness level has been reached for the population

Elitism:

  • Elitism is the concept that the strongest members of the population should be preserved from generation to generation. If an individual is one of the elite, it will not be mutated or crossover.
  • This is true,so called elitism is often used. This means, that at least one best solution is copied without changes to a new population, so the best solution found can survive to end of run.
  • If we make new population only by new offsprinng then this can cause loss of the best chromosome from the last population.

Genetic Operators

  • Selection
    • Chromosome(parents) are selected from the population to be parents to crossover
    • The problem is how to select the chromosomes: The best way should survive and create new offsprings
    • Traditionally, parents are chosen to mate with probability proportional to their fitness:
      Proportional selection
    • Traditionally, children replace their parents
    • There are many methods for selecting the best chromosomes, for example roulette wheel selection, tournament selection, rank selection and steady state selection
    • Overall principle: Survival of the fittest
  • Mutation
    • Operates on ONE “Parent” chromosome
    • Produces an “offspring” with changes
    • Classically, toggles one [or more] bit in a binary representation
    • So, for example: 1101000110
      could mutate to: 1111000110
    • Each bit has same probability of mutating
  • Crossover
    • Operates on TWO parent chromosomes
    • Produces one or two children or offspring
    • Classical crossover occurs at 1 or 2 points:

在这里插入图片描述
Microbial Genetic Algorithm

  1. The basic operation of the Microbial GA training is as follows:
    • Pick two choromosomes(solutions) at random
    • Compare Fitness to come up with a Winner and Loser
    • Go along the loser chromosome, at each locus and:
      • With some probability (randomness), perform cross over on the Loser…
      • With some probability (randomness), perform mutation on the Loser…
        在这里插入图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值