如何在遗传算法中执行基于等级的选择? [英] How to perform rank based selection in a genetic algorithm?

查看:112
本文介绍了如何在遗传算法中执行基于等级的选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实施一个小的遗传算法框架-主要供私人使用,除非我设法做出合理的选择,然后将其发布为开源.现在,我专注于选择技术.到目前为止,我已经实现了轮盘赌轮选择,随机通用抽样和锦标赛选择.我列表上的下一个是基于排名的选择.与已经实施的其他技术相比,我在查找有关信息方面遇到了一些困难,但这是我到目前为止的理解.

I am implementing a small genetic algorithm framework - primarily for private use, unless I manage to make something reasonable at which time I will post it as open source. Right now I am focusing on selection techniques. So far I have implemented roulette wheel selection, stochastic universal sampling and tournament selection. Next on my list is rank based selection. I had a little more difficulty finding information about that than the other techniques that I've already implemented, but here is my understanding so far.

  1. 当您有一些想要成为下一轮的合理父母的人口时,您首先要对它进行划分. 每个个体的适应度,以总体适应度为准.

  1. When you have your population from which you want to get reasonable parents for the next round, you first go through it and divide the fitness of each individual by the total fitness in the population.

然后,您使用其他选择技术(例如轮盘赌)来真正确定选择谁进行育种.

Then you use some other selection technique (such as roulette wheel) to actually determine whom to select for breeding.

这是正确的吗?,如果我是这样,我是否认为排名调整是一种预处理步骤,然后必须进行实际选择程序才能挑选出候选人?如果我误解了任何一个,请纠正我.非常感谢您提出其他建议.

Is this correct? If so, am I right in thinking that the rank adjustment is a sort of preprocessing step which then has to be followed by an actual selection procedure that picks out the candidates? Please correct me if I have misunderstood any of this. I am grateful for any additional pointers.

推荐答案

您所描述的是轮盘赌选择,而不是等级选择.要进行排名选择,而不是通过其适应性得分对每个候选者加权,而是通过其排名"(即最佳,第二,第三等)对其进行加权.

What you've described there is roulette wheel selection, not rank selection. To do rank selection, rather than weighting each candidate by its fitness score, you weight it by its "rank" (that is, best, second best, third best, etc.).

例如,您可以给第一个加权权重为1/2,第二个加权权重为1/3,第三个加权权重为1/4,依此类推.或者最差的权重为1,第二个最差的权重为权重2,等等

For instance, you might give the first one a weighting of 1/2, the second a weighting of 1/3, the third a weighting of 1/4, etc. Or the worst gets weighting 1, the second worst gets weighting 2, etc.

重要的一点是,不考虑绝对或相对健身得分,仅考虑排名.因此,最好的选择比次优的选择更高,但是无论是最优的得分是次优的十倍还是得分略高,二者的选择概率相同.

The important point is that absolute or relative fitness scores are not considered, only the rankings. So the best is more likely to be chosen than the second best, but the two have the same probabilities of being chosen whether the best had ten times the score of the second best, or only had a slightly greater score.

这篇关于如何在遗传算法中执行基于等级的选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆