简体   繁体   English

在遗传算法中,如果没有约束,如何初始化种群以及如何确定染色体长度?

[英]in genetic algorithm, how to initialize population and how to determine the length of chromosomes if there is no constraints?

For example, how to minimize x^2 when x ranges from -inf to inf? 例如,当x的范围从-inf到inf时,如何最小化x ^ 2? How to pick initial length of chromosomes? 如何挑选染色体的初始长度? How to determine initial population? 如何确定初始人口? Can I do in a guided way instead of initializing randomly? 我可以以引导方式进行操作,而不是随机初始化吗?

Genetic algorithms normally have a fixed length in the chromosome representation, if the length will vary we are talking more about Genetic Programming. 遗传算法通常在染色体表示中具有固定的长度,如果长度会变化,我们将更多地讨论遗传编程。

Anyway. 无论如何。 I don't know if there is a rule on the initial length, but you should think of a size that allows the individuals to offer good initial results, but is not very large. 我不知道初始长度是否有规则,但是您应该考虑允许个体提供良好初始结果的大小,但是它不是很大。 You need to remember that GA/GP tend to present Bloat . 您需要记住,GA / GP倾向于呈现Bloat

Initial population should be the largest you can use and still be able to finish your executions in a reasonable amount of time given your computational power available. 初始填充应该是您可以使用的最大填充,并且在可用计算能力的前提下,仍然可以在合理的时间内完成执行。 In my experience more is always better. 以我的经验,总是越多越好。

About the initialization, there are certainly several seeding techniques, this paper enumerates some of them, you should be able to find more information about each of them: Nearest Neighbor (NN), Gene Bank (GB), Selective Initialization (SI), Sorted population (SP). 关于初始化,肯定有几种播种技术, 本文列举了其中的一些技术,您应该能够找到有关每种技术的更多信息:最近邻居(NN),基因库(GB),选择性初始化(SI),排序人口(SP)。

For all the questions above, the best way is to experiment a lot and figure out what works best for your problem, your implementation. 对于上述所有问题,最好的方法是进行大量试验,找出最适合您的问题和实施的方法。 For instance: in a system I have the best solution usually sits around 70 nodes; 例如:在一个系统中,我拥有最好的解决方案通常位于70个节点左右; after a lot of experimentation I found a sweet spot of initial individuals of 45 nodes, which worked better than initializing at 30 or 60. 经过大量的实验,我发现45个结点的初始个体的最佳点,比起30或60个结点更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM