本文介绍了交叉概率对遗传算法/遗传编程有什么影响?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以举一个交叉概率的例子吗?我想知道确定交叉概率的好处,以及它对遗传算法或遗传编程的影响.

Can any one give an example of crossover probability? I would like to know what is the benefits of determining crossover probability, and also what effect it has in genetic algorithms or genetic programming.

推荐答案

根据定义,交叉概率没有好处.它只是一个参数,允许您调整遗传算法的行为.降低交叉概率将使更多的人继续保持不变.解决某些问题时,这可能会产生积极影响,也可能没有积极影响.我在 HeuristicLab 中创建了一个小型实验,并将遗传算法应用于TSP.在TSPLIB(bays29)的一个小实例上,针对每种概率,将遗传算法重复10次.正如您在下图中所看到的,很难识别出一种模式.我还上传了算法实验,您可以在HeuristicLab中自行打开并尝试使用这些文件.该实验包括每次运行的质量图表和进一步分析,因此您可以根据需要检查收敛行为.

Crossover probability doesn't have a benefit by definition. It is merely a parameter that allows you to adjust the behavior of a genetic algorithm. Lowering the crossover probability will let more individuals continue in the next generation unchanged. This may or may not have a positive effect when solving certain problems. I created a small experiment in HeuristicLab with a genetic algorithm applied to the TSP. The genetic algorithm was repeated 10 times for each probability on a small instance of the TSPLIB (bays29). As you can see in the image below, it is rather difficult to recognize a pattern. I also uploaded the algorithm and experiment, you can open and experiment with these files for yourself in HeuristicLab. The experiment includes a quality chart for each run and further analysis so you can check convergence behavior if you like.

选择的策略也很可能太简单,因此未能显示效果.在实验中,还通过适应度比例选择来选择未经历交叉的父母.因此,高素质的个人将很快控制人口.另一种策略是通过适应性比例选择仅选择交叉的父母,其余的父母则是随机的.结果可以在此处看到(算法实验);

It is also likely that the chosen strategy is too simple and thus failed to show an effect. In the experiment the parents that were not subject to crossover were also selected by fitness proportional selection. So a high quality individual would dominate the population very fast. A different strategy could be to select only the crossed parents by fitness-proportional selection and the remaining parents randomly. Results can be seen here (algorithm and experiment);

您可以进行自己的修改并尝试结果.

You can make your own modifications and experiment with the results.

可以在此处找到相关的答案:什么是交叉概率&遗传算法或遗传规划中的变异概率?

A related answer can be found here: What is Crossover Probability & Mutation Probability in Genetic Algorithm or Genetic Programming?

这篇关于交叉概率对遗传算法/遗传编程有什么影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-18 07:21