遗传算法和进化策略有什么区别?
我读过几本书的介绍性部分以及关于这两个主题的几篇论文,在我看来,这两种方法几乎完全相同。也就是说,我还没有时间真正深入研究这些主题,所以我可能是错的。
遗传算法和进化策略有什么区别?它们有何不同,相似之处又在哪里?
I've read a couple of introductory sections of books as well as a few papers on both topics, and it looks to me that these two methods are pretty much exactly the same. That said, I haven't had the time to actually deeply research the topics yet, so I might be wrong.
What are the distinctions between genetic algorithms and evolution strategies? What makes them different, and where are they similar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在进化策略中,个体被编码为实数向量。在繁殖时,随机选择父母,选择最适合的后代并将其插入下一代。 ES个体具有自我适应能力。步长或“突变强度”被编码在个体中,因此通过选择好的个体,好的参数可以传递给下一代。
在遗传算法中,个体被编码为整数。选择是通过选择与其适合度成比例的父母来完成的。因此,在第一次选择完成之前必须对个人进行评估。遗传运算符在位级别上工作(例如,将位串切割成多个片段并将它们与另一个父级的片段交换或交换单个位)。
这就是理论。在实践中,有时很难区分两种进化算法,您需要创建混合算法(例如,对遗传算子的参数进行编码的整数(位串)个体)。
In evolution strategies, the individuals are coded as vectors of real numbers. On reproduction, parents are selected randomly and the fittest offsprings are selected and inserted in the next generation. ES individuals are self-adapting. The step size or "mutation strength" is encoded in the individual, so good parameters get to the next generation by selecting good individuals.
In genetic algorithms, the individuals are coded as integers. The selection is done by selecting parents proportional to their fitness. So individuals must be evaluated before the first selection is done. Genetic operators work on the bit-level (e.g. cutting a bit string into multiple pieces and interchange them with the pieces of the other parent or switching single bits).
That's the theory. In practice, it is sometimes hard to distinguish between both evolutionary algorithms, and you need to create hybrid algorithms (e.g. integer (bit-string) individuals that encodes the parameters of the genetic operators).
在研究进化策略(ES)时偶然发现了这个线程。
正如 Paul 之前注意到的,这里的编码并不是真正的区别,因为这是特定算法的实现细节,尽管它在 ES 中似乎更常见。
为了回答这个问题,我们首先需要退后一步,看看 ES 算法的内部结构。
在ES中有一个进化参数的概念:内生参数和外生参数。内生参数与个体相关联,因此与个体一起进化,外生参数从“外部”提供(例如,由开发人员设置常量,或者可以存在根据迭代号设置其值的函数/策略)。
因此,个体k由两部分组成:
这两个向量正在被选择、突变、重组在一起< /强>。
GA 和 ES 之间的主要区别在于,经典 GA 中算法参数的类型没有区别。事实上,所有参数都是从“外部”设置的,因此在 ES 术语中都是外生的。
还有其他一些细微的差异,例如,在 ES 中,选择策略通常是一种且相同的,而在 GA 中,有多种可以互换的不同方法。
您可以在这里找到更详细的解释(请参阅第 3 章):进化策略。全面介绍
Just stumbled on this thread when researching Evolution Strategies (ES).
As Paul noticed before, the encoding is not really the difference here, as this is an implementation detail of specific algorithms, although it seems more common in ES.
To answer the question, we first need to do a small step back and look at internals of an ES algorithm.
In ES there is a concept of endogenous and exogenous parameters of the evolution. Endogenous parameters are associated with individuals and therefore are evolved together with them, exogenous are provided from "outside" (e.g. set constant by the developer, or there can be a function/policy which sets their value depending on the iteration no).
The individual k consists therefore of two parts:
Those two vectors are being selected, mutated, recombined together.
The main difference between GA and ES is that in classic GA there is no distinction between types of algorithm parameters. In fact all the parameters are set from "outside", so in ES terms are exogenous.
There are also other minor differences, e.g. in ES the selection policy is usually one and the same and in GA there are multiple different approaches which can be interchanged.
You can find a more detailed explanation here (see Chapter 3): Evolution strategies. A comprehensive introduction
在大多数较新的遗传算法教科书中,引入实值编码作为整数编码的替代,即个体可以被编码为实数向量。这被称为连续参数GA(参见例如Haupt & Haupt,“实用遗传算法”,J.Wiley&Sons,1998)。所以这实际上与 ES 实数编码相同。
关于亲本选择,针对 GA 发布了许多不同的策略。我并不了解所有这些,但我假设在所有这些中进行选择(不仅最好的已用于某些应用程序)。
In most newer textbooks on GA, real-valued coding is introduced as an alternative to the integer one, i.e. individuals can be coded as vectors of real numbers. This is called continuous parameter GA (see e.g. Haupt & Haupt, "Practical Genetic Algorithms", J.Wiley&Sons, 1998). So this is practically identical to ES real number coding.
With respect to parent selection, there are many different strategies published for GA's. I don't know them all, but I assume selection among all (not only the best has been used for some applications).
主要区别似乎是遗传算法使用整数序列表示解决方案,而进化策略使用实数序列 - 参考:http://en.wikipedia.org/wiki/Evolutionary_algorithm#
The main difference seems to be that a genetic algorithm represents a solution using a sequence of integers, whereas an evolution strategy uses a sequence of real numbers -- reference: http://en.wikipedia.org/wiki/Evolutionary_algorithm#
正如维基百科来源 (http://en.wikipedia.org/wiki/Genetic_algorithm) 和 @Vaughn Cato 所说,两种技术的差异取决于实现。 EA使用
实数和 GA 使用整数。
然而,在实践中,我认为您可以在问题的表述和程序中使用整数或实数。这取决于你。例如,对于蛋白质折叠,您可以说一组二面角形成一个向量。这是一个实数向量,但是条目
用整数标记,所以我认为你可以制定你的问题并编写基于程序的程序
关于整数算术。这只是一个想法。
As the wikipedia source (http://en.wikipedia.org/wiki/Genetic_algorithm) and @Vaughn Cato said the difference in both techniques relies on the implementation. EA use
real numbers and GA use integers.
However, in practice I think you could use integers or real numbers in the formulation of your problem and in your program. It depends on you. For instance, for protein folding you can say the set of dihedral angles form a vector. This is a vector of real numbers, but the entries
are labeled by integers so I think you can formulate your problem and write you program based
on an integer arithmetic. It is just an idea.