1 / 111

Intelligent Computing — Chapter 3 — Evolutionary Computation

Intelligent Computing — Chapter 3 — Evolutionary Computation. 进化计算. 进化计算是通过模拟自然界中生物进化机制进行搜索的一类算法。. 进化计算的主流. The best known algorithms in this class include: Genetic Algorithms ( GA ) , developed by Dr. Holland.

hallam
Download Presentation

Intelligent Computing — Chapter 3 — Evolutionary Computation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Intelligent Computing— Chapter 3 —Evolutionary Computation

  2. 进化计算 进化计算是通过模拟自然界中生物进化机制进行搜索的一类算法。

  3. 进化计算的主流 • The best known algorithms in this class include: • Genetic Algorithms (GA), developed by Dr. Holland. Holland, J.: Adaptation in Natural and Artificial Systems, University of Michigan Press, Ann Arbor, MI, 1975; MIT Press, Cambridge, MA, 1992. Goldberg, D.: Genetic Algorithms in Search, Optimization and Machine Learning, Addison-Wesley, Reading, MA, 1989. • Evolution Strategies (ES), developed by Dr. Rechenberg and Dr. Schwefel. Rechenberg, I.: Evolution strategie: Optimierung technischer Systeme nach Prinzipien der biologischen Evolution, Frommann-Holzboog, 1973. Schwefel, H.: Evolution and Optimum Seeking, John Wiley & Sons, 1995. • Evolutionary Programming (EP), developed by Dr. Fogel. Fogel, L. A. Owens & M. Walsh: Artificial Intelligence through Simulated Evolution, John Wiley & Sons, 1966. • Genetic Programming (GP), developed by Dr. Koza. Koza, J. R.: Genetic Programming, MIT Press, 1992. Koza, J. R.: Genetic Programming II, MIT Press, 1994.

  4. 发展历史 进化算法与其他科学技术一样,都经历一段成长过程,逐渐发展壮大。此过程可大致分为三个时期:萌芽期、成长期和发展期。 (1) 萌芽期 (50年代后期至70年代初期) • 50年代后期,一些生物学家着手采用电子计算机模拟生物的遗传系统,尽管这些工作纯粹是研究生物现象,但其中已使用现代遗传算法的一些标识方式。 • 1965年,德国的L.Rechenberg等人正式提出进化策略的方法,当时的进化策略只有一个个体,而且进化操作也只有变异一种。

  5. 发展历史 • 1965年,美国的L.j.Fogel正式提出进化规划,在计算中采用多个个体组成的群体,而且只运用变异操作。 • 60年代期间,美国J.H.Holland在研究自适应系统时,提出系统本身与外部环境相互协调的遗传算法。1968年,J.H.Holland教授又提出模式理论,它成为遗传算法的主要理论基础。 • 1967年,Bagley发表了关于遗传算法应用的论文,在其论文中首次使用“遗传算法( Genetic Algorithm)”一词。

  6. 发展历史 (2) 成长期(70年代中期至80年代末期) •1975年,J.H.Holland教授的专著《自然界和人工系统的适应性(Adaptation in Natural and Artificial System)》正式出版,全面地介绍了遗传算法,人们常常把这一事件视作遗传算法问世的标志, Holland也被视作遗传算法的创始人。 • 1975年,De.Jong在其博士论文中结合模式定理进行了大量的纯数值函数优化计算实验,树立了遗传算法的工作框架,得到了一些重要且具有指导意义的结论。

  7. 发展历史 • 1985年,作为Holland的学生,D.E.Goldberg博士出版专著《遗传算法——搜索、优化及机器学习(Genetic Algorithms——in Search,Optimization and Machine Learning)》,全面、系统地介绍遗传算法,使这一技术得到普及与推广。该书被人们视为遗传算法的教科书。 • 1985年,在美国举行第一届遗传算法国际学术会议(International Conference on Genetic Algorithms,简称ICGA),与会者交流运用遗传算法的经验。随后, 1987,1989,1991,1993,l995及l997年,每2年左右都举行一次这种会议。

  8. 发展历史 • 1987年,美国D.Lawrence总结人们长期从事遗传算法的经验,公开出版《遗传算法和模拟退火(Genetic Algorithm and Simulated Annealing)》一书,以论文集形式用大量实例介绍遗传算法。

  9. 发展历史 (3)发展期(90年代以后) 90年代,遗传算法不断地向广度和深度发展。 • 1991年,D.Lawrence出版《遗传算法手册(Handbook of Genetic Algorithms )一书,详尽地介绍遗传算法的工作细节。

  10. 发展历史 • 1992年,Koza出版专著《遗传规划——应用自然选择法则的计算机程序设计(Genetic Programming:on the Programming of Computer by Means of Natural Selection)》,该书全面介绍了遗传规划的原理及应用实例,标明遗传规划己成为进化算法的一个重要分支。Koza本人也被视作遗传规划的奠基人。

  11. 发展历史 • 1994年,Koza又出版第二部专著《遗传规划Ⅱ:可再用程序的自动发现(Genetic Programming Ⅱ:Automatic Discovery of Reusable Programs)》,提出自动定义函数的新概念,在遗传规划中引入子程序的新技术。 •同年,K.E.Kinnear主编《遗传规划进展(Advances in Genetic Programming)》,汇集许多研究工作者有关应用遗传规划的经验和技术。

  12. 发展历史 • 1996年 Z.Michalewicz的专著Genetic Algorithms + Data Structures = Evolution Programs深入讨论了遗传算法的各种专门问题。 •同年,T.Back的专著Evolutionary Algorithms in Theory and Practice: Evolution Strategies, Evolutionary Programming, Genetic Algorithms深入阐明进化算法的许多理论问题。

  13. 发展历史 • 90年代期间,有关遗传算法的国际会议也比较活跃,见下表

  14. 发展历史 •我国开展遗传算法研究,主要在90年代。当时,成为继专家系统、人工神经网络之后有关人工智能方面的第三个热点课题。

  15. 遗传算法的应用 • 遗传算法提供了一种求解复杂系统优化间题的通用框架,它不依赖于问题的具体领域,对问题的种类有很强的鲁棒性,所以广泛应用于很多学科。下面是遗传算法的一些主要应用领域: • (1) 函数优化 • 函数优化是遗传算法的经典应用领域,也是对遗传算法进行性能评价的常用算例。 • 对于一些非线性、多模型、多目标的函数优化问题,用其他优化方法较难求解,用遗传算法可以方便地得到较好的结果。

  16. 遗传算法的应用 • (2) 组合优化 • 随着问题规模的增大,组合优化问题的搜索空间也急剧扩大,有时在目前的计算机上用枚举法很难或甚至不可能求出其精确最优解。对这类复杂问题,人们己意识到应把主要精力放在寻求其满意解上,而遗传算法是寻求这种满意解的最佳工具之一。实践证明,遗传算法对于组合优化中的NP完全问题非常有效。 • 例如,遗传算法已经在求解旅行商问题、背包问题、装箱问题、图形划分问题等方面得到成功的应用。

  17. 遗传算法的应用 • (3) 生产调度问题 • 生产调度问题在很多情况下所建立起来的数学模型难以精确求解,即使经过一些简化之后可以进行求解,也会因简化得太多而使得求解结果与实际相差甚远。而目前在现实生产中也主要是靠一些经验来进行调度。 • 现在遗传算法已成为解决复杂调度问题的有效工具,在单件生产车间调度、流水线生产车间调度、生产规划、任务分配等方面遗传算法都得到了有效的应用。

  18. 遗传算法的应用 • (4) 自动控制 • 在自动控制领域中很多与优化相关的问题需要求解,遗传算法已在其中得到了初步的应用,并显示出了良好的效果。 • 例如用遗传算法进行航空控制系统的优化、使用遗传算法设计空间交会控制器、基于遗传算法的模糊控制器的优化设计、基于遗传算法的参数辨识、基于遗传算法的模糊控制规则的学习、利用遗传算法进行人工神经网络的结构优化设计和权值学习等,都显示出了遗传算法在这些领域中应用的可能性。

  19. 遗传算法的应用 (5) 机器人学 机器人是一类复杂的难以精确建模的人工系统,而遗传算法的起源就来自于对人工自适应系统的研究,所以机器人学理所当然地成为遗传算法的一个重要应用领域。 例如,遗传算法已经在移动机器人路径规划、关节机器人运动轨迹规划、机器人逆运动学求解、细胞机器人的结构优化和行为协调等方面得到研究和应用。

  20. 遗传算法的应用 • (6) 图像处理 • 图像处理是计算机视觉中的一个重要研究领域。在图像处理过程中,如扫描、特征提取、图像分割等不可避免地会存在一些误差,这些误差会影响图像处理的效果。如何使这些误差最小是使计算机视觉达到实用化的重要要求。 • 遗传算法在这些图像处理中的优化计算方面找到了用武之地,日前已在模式识别、图像恢复、图像边缘特征提取等方面得到了应用。

  21. 遗传算法的应用 • (7) 人工生命 • 人工生命是用计算机、机械等人工媒体模拟或构造出的具有自然生物系统特有行为的人造系统。自组织能力和自学习能力是人工生命的两大主要特征。人工生命与遗传算法有着密切的关系,基于遗传算法的进化模型是研究人工生命现象的重要基础理论。 • 虽然人工生命的研究尚处于启蒙阶段.但遗传算法已在其进化模型、学习模型、行为模型、自组织模型等方面显示出了初步的应用能力,并且必将得到更为深入的应用和发展。人工生命与遗传算法相辅相成,遗传算法为人工生命的研究提供了一个有效的工具,人工生命的研究也必将促进遗传算法的进一步发展。

  22. 遗传算法的应用 • (8) 遗传编程 • Koza发展了遗传编程的概念,他使用了以LISP语言所表示的编码方法,基于对一种树型结构所进行的遗传操作来自动生成计算机程序。虽然遗传编程的理论尚未成熟,应用也有一些限制,但它已成功地应用于人工智能、机器学习等领域。

  23. 遗传算法的应用 • (9) 机器学习 • 学习能力是高级自适应系统所应具备的能力之一。基于遗传算法的机器学习,特别是分类器系统,在很多领域中都得到了应用。例如,遗传算法被用于学习模糊控制规则,利用遗传算法来学习隶属度函数,从而更好地改进了模糊系统的性能;基于遗传算法的机器学习可用来调整人工神经网络的连接权,也可用于人工神经网络的网络结构优化设计;分类器系统也在学习式多机器人路径规划系统中得到了成功的应用。

  24. 遗传算法的特点 • 通用 • 鲁棒 • 次优解、满意解

  25. 遗传算法的生物学基础 • 生物在自然界中的生存繁衍,显示出了其对自然环境的自适应能力。受其启发,人们致力于对生物各种生存特性的机理研究和行为模拟,为人工自适应系统的设计和开发提供了广阔的前景。遗传算法(Genetic Algorithms,简称GAs)就是这种生物行为的计算机模拟中令人瞩目的重要成果。基于对生物遗传和进化过程的计算机模拟,遗传算法使得各种人工系统具有优良的自适应能力和优化能力。 • 遗传算法所借鉴的生物学基础就是生物的遗传和进化。

  26. 遗传算法的生物学基础 • 遗传(Heredity) • 世间的生物从其父代继承特性或性状,这种生命现象就称为遗传(Heredity),由于遗传的作用,使得人们可以种瓜得瓜、种豆得豆,也使得鸟仍然是在天空中飞翔,鱼仍然是在水中遨游。

  27. 遗传算法的生物学基础 •构成生物的基本结构和功能的单位是细胞(Ce11)。 •细胞中含有的一种微小的丝状化合物称为染色体Chromosome),生物的所有遗传信息都包含在这个复杂而又微小的染色体中。 •基因 经过生物学家遗传性状的染色体主要是由一种的研究,控制并决定生物叫做脱氧核糖核酸(deoxyribonucleic acid 简称DNA)的物质所构成。 DNA在染色体中有规则地排列着,它是个大分子的有机聚合物,其基本结构单位是核苷酸,许多核苷酸通过磷酸二酯键相结合形成一个长长的链状结构,两个链状结构再通过碱基间的氢键有规律地扭合在一起,相互卷曲起来形成一种双螺旋结构。基因就是DNA长链结构中占有一定位置的基本遗传单位。

  28. 遗传算法的生物学基础 • 遗传信息是由基因(Gene)组成的,生物的各种性状由其相应的基因所控制。 • 基因是遗传的基本单位。细胞通过分裂具有自我复制的能力,在细胞分裂的过程中,其遗传基因也同时被复制到下一代,从而其性状也被下一代所继承。

  29. 遗传算法的生物学基础 • 遗传基因在染色体中所占据的位置称为基因座(Locus); • 同一基因座可能有的全部基因称为等位基因(Allele); • 某种生物所特有的基因及其构成形式称为该生物的基因型(Genotype); • 而该生物在环境中呈现出的相应的性状称为该生物的表现型(Phenotype); • 一个细胞核中所有染色体所携带的遗传信息的全体称为一个基因组(Genome)。

  30. 遗传算法的生物学基础 • 生物的遗传方式 • 复制: 生物的主耍遗传方式是复制。遗传过程中,父代的遗传物质DNA被复制到子代。即细胞在分裂时,遗传物质DNA通过复制(Reproduction)而转移到新生的细胞中,新细胞就继承了旧细胞的基因。 • 交叉: 有性生殖生物在繁殖下一代时,两个同源染色体之间通过交叉(Crossover)而重组,亦即在两个染色体的某一相同位置处DNA被切断,其前后两串分别交叉组合而形成两个新的染色体。 • 变异:在进行细胞复制时,虽然概率很小,仅仅有可能产生某些复制差错,从而使DNA发生某种变异(Mutation),产生出新的染色体。这些新的染色体表现出新的性状。 如此这般,遗传基因或染色体在遗传的过程中由于各种各样的原因而发生变化。

  31. 遗传算法的生物学基础 • 进化 • 地球上的生物,都是经过长期进化而形成的。根据达尔文的自然选择学说,地球上的生物具有很强的繁殖能力。在繁殖过程中,大多数生物通过遗传,使物种保持相似的后代;部分生物由于变异,后代具有明显差别,甚至形成新物种。正是由于生物的不断繁殖后代,生物数目大量增加,而自然界中生物赖以生存的资源却是有限的。因此,为了生存,生物就需要竞争。生物在生存竞争中,根据对环境的适应能力,适者生存,不适者消亡。自然界中的生物,就是根据这种优胜劣汰的原则,不断地进行进化。 • 生物的进化是以集团的形式共同进行的,这样的一个团体称为群体(Population), 或称为种群。 • 组成群体的单个生物称为个体(Individual), • 每一个个体对其生存环境都有不同的适应能力,这种适应能力称为个体的适应度(Fitness)。

  32. 遗传算法基本原理 • 模拟自然界优胜劣汰的进化现象,把搜索空间映射为遗传空间,把可能的解编码成一个向量——染色体,向量的每个元素称为基因。 • 通过不断计算各染色体的适应值,选择最好的染色体,获得最优解。

  33. 遗传算法与自然进化的比较 自然界 遗传算法 染色体 字符串 基因 字符,特征 等位基因(allele) 特征值 染色体位置(locus) 字符串位置 基因型(genotype) 结构 表型(phenotype) 参数集,译码结构

  34. 遗传算法基本原理 • 遗传算法的基本运算 • ⑴ 选择运算(selection) • ⑵ 交叉操作(crossover) • ⑶ 变异(mutation)

  35. 选择运算 • 从旧的种群中选择适应度高的染色体,放入匹配集(缓冲区),为以后染色体交叉、变异,产生新的染色体作准备。

  36. 交叉运算 复制不能创新,交换解决染色体的创新 方法:随机选择二个染色体(双亲染色体),随机指定一点或多点, 进行交换,可得二个新的染色体(子辈染色体). 新的子辈染色体: A’ 11010001 B’ 01011110

  37. 变异运算 • 变异 • 模拟生物在自然界环境变化,引起基因的突变.在染色体二进制编码中,1变成0;或0变成1.突变产生染色体的多样性,避免进化中早期成熟,陷入局部极值点,突变的概率很低.

  38. General Structure of Genetic Algorithms • In general, a GA has five basic components, as summarized by Michalewicz. Michalewicz,Z.: Genetic Algorithm + Data Structures = Evolution Programs. 3rd ed., New York: Springer-Verlag, 1996. • A genetic representation of potential solutions to the problem. • A way to create a population (an initial set of potential solutions). • An evaluation function rating solutions in terms of their fitness. • Genetic operators that alter the genetic composition of offspring (selection, crossover,mutation, etc.). • Parameter values that genetic algorithm uses (population size, probabilities of applying genetic operators, etc.).

  39. General Structure of Genetic Algorithms • Genetic Representation andInitialization: • The genetic algorithm maintains a populationP(t)of chromosomesor individuals vk(t), k=1, 2, …, popSize for generation t. • Each chromosome represents a potentialsolution to the problem at hand. • Evaluation: • Each chromosome is evaluated to give somemeasure of its fitnesseval(vk). • Genetic Operators: • Some chromosomes undergo stochastic transformations by means ofgenetic operators to form new chromosomes, i.e.,offspring. • There are two kinds of transformation: • Crossover, which creates new chromosomes by combining parts from two chromosomes. • Mutation, which createsnew chromosomes by making changes in a singlechromosome. • New chromosomes, calledoffspringC(t), are then evaluated. • Selection: • A new population is formed by selectingthemore fit chromosomesfrom the parent population and the offspringpopulation. • Best solution: • After several generations, the algorithmconverges to the best chromosome, which hopefully representsan optimal or suboptimal solution to the problem.

  40. General Structure of Genetic Algorithms Gen, M. & R. Cheng: Genetic Algorithms and Engineering Design, John Wiley, New York, 1997. crossover encoding CC(t) Initial solutions t 0P(t) offspring start chromosome mutation CM(t) offspring selection N new population termination condition? decoding P(t) + C(t) solutions candidates Y roulette wheel stop fitness computation best solution evaluation

  41. Procedure of Simple GA procedure: Simple GA input: GA parameters output: best solution begin t 0; // t: generation number initialize P(t) by encoding routine; // P(t): population of chromosomes fitness eval(P) by decoding routine; while (not termination condition) do crossoverP(t) to yield C(t); // C(t): offspring mutationP(t) to yield C(t); fitness eval(C) by decoding routine; selectP(t+1) from P(t)and C(t); t  t+1; end output best solution; end

  42. Major Advantages • Generally, algorithm for solving optimization problems is a sequence of computational steps which asymptotically converge to optimal solution. • Most of classical optimization methods generate a deterministic sequence of computation based on the gradient or higher order derivatives of objective function. • The methods are applied to a single point in the search space. • The point is then improved along the deepest descending direction gradually through iterations. • This point-to-point approach takes the danger of falling in local optima. • Conventional Method (point-to-point approach) Conventional Method start initial single point improvement (problem-specific) termination condition? No Yes stop

  43. Major Advantages • Genetic Algorithm (population-to-population approach) • Genetic algorithms performs a multiple directional search by maintaining a population of potential solutions. • The population-to-population approach is hopeful tomake the search escape from local optima. • Population undergoes a simulated evolution:at each generation the relatively good solutions are reproduced, while the relatively bad solutions die. • Genetic algorithms use probabilistic transition rules to select someone to be reproduced and someone to die so as to guide their search toward regions of the search space with likely improvement. Genetic Algorithm start Initial population initial point initial point ... initial point improvement (problem-independent) termination condition? No Yes stop

  44. Major Advantages f(x) global optimum local optimum local optimum local optimum Fitness x1 x3 x4 x2 x5 0 x Search space • Random Search + Directed Search max f (x) s. t. 0  x  ub

  45. Major Advantages • Example of Genetic Algorithm for Unconstrained Numerical Optimization (Michalewicz, 1996)

  46. Major Advantages • Genetic algorithms have received considerable attention regarding their potential as a novel optimization technique. There are three major advantages when applying genetic algorithms to optimization problems. • Genetic algorithms do not have much mathematical requirements about the optimization problems. • Due to their evolutionary nature, genetic algorithms will search for solutions without regard to the specific inner workings of the problem. • Genetic algorithms can handle any kind of objective functions and any kind of constraints, i.e., linear or nonlinear, defined on discrete, continuous or mixed search spaces. • The ergodicity of evolution operators makes genetic algorithms very effective at performing global search (in probability). • The traditional approaches perform local search by a convergent stepwise procedure, which compares the values of nearby points and moves to the relative optimal points. • Global optima can be found only if the problem possesses certain convexity properties that essentially guarantee that any local optima is a global optima. • Genetic algorithms provide us a great flexibility to hybridize with domaindependent heuristics to make an efficient implementation for a specific problem.

  47. Example with Simple Genetic Algorithms • We explain in detail about how a genetic algorithm actually works with a simple examples. • We follow the approach of implementation of genetic algorithms given by Michalewicz. • Michalewicz,Z.: Genetic Algorithm + Data Structures = Evolution Programs. 3rd ed., Springer-Verlag:New York, 1996. • The numerical example of unconstrained optimization problem is given as follows: max f (x1, x2) = 21.5 + x1·sin(4px1) + x2·sin(20px2) s. t. -3.0 £ x1 £ 12.1 4.1 £ x2 £ 5.8

  48. Example with Simple Genetic Algorithms max f (x1, x2) = 21.5 + x1·sin(4px1) + x2·sin(20px2) s. t. -3.0 £ x1 £ 12.1 4.1 £ x2 £ 5.8 by Mathematica 4.1 f = 21.5 + x1 Sin [ 4 Pi x1 ] + x2 Sin [ 20 Pi x2 ]; Plot3D[f, {x1, -3, 12.1}, {x2, 4.1, 5.8}, PlotPoints ->19, AxesLabel -> {x1, x2, “f(x1, x2)”}];

  49. Representation • Binary String Representation • The domain of xjis [aj, bj] and the required precision is four places after the decimal point. • The precision requirement implies that the range of domain of each variable should be divided into at least (bj - aj )104size ranges. • The required bits (denoted with mj) for a variable is calculated as follows: • The mappingfrom a binary string to a real number for variable xj is completed as follows:

More Related