在稳态遗传算法中应用变异

发布于 2024-10-23 14:19:17 字数 273 浏览 3 评论 0原文

我正在实现稳态遗传算法来执行符号回归。

我的问题是关于变异和交叉算子之间的关系。

在应用突变和锦标赛选择之前,我总是会参考突变概率(Pm),根据父母的错误来选择父母。

  • 第一个问题:

突变只能应用于交叉(或其他遗传操作者)后获得的孩子 或者可以直接应用于 1 个父代以生成一个新个体?

  • 第二个问题:

交叉操作后获得的孩子必须总是尝试突变(当然是用Pm)?

预先感谢大家。

I’m implementing a steady-state genetic algorithm to perform symbolic regression.

My questions are about the relation between mutation and crossover operators.

I always consult a mutation probability (Pm) before applying mutation and a tournament selection to choose parents based in their error.

  • First question:

Mutation must be applied ONLY to children obtained after crossover (or another genetic operator)
or can be applied directly to a 1 parent to generate a new individual ?

  • Second question:

Children obtained after a crossover operation must always try a mutation (of course with Pm)?

Thank you all in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

遥远的绿洲 2024-10-30 14:19:17

通常交配过程包括交叉和突变,因此要回答您的问题,执行此操作的标准方法是采用父母,应用交叉,然后才对最终结果进行突变(在将其称为孩子之前)。

这样做的原因是,如果你对父母应用突变,基本上会发生“太多突变”(假设突变率相同,那么东西被打乱的机会就会加倍)。

即使我从未见过这样做,你当然可以这样做,但你必须“重新调整”突变,这样它就不会破坏进化过程(太多突变 - >随机游走)。

我曾经用作参考的所有标准进化率都是针对孩子给出的,所以这是这样做的另一个原因。

Usually the mating process includes cross-over and mutation, so to answer your question a standard way of doing this is to take the parents, apply cross-over and only then mutate the final result (before calling it a child).

The reason for this is that if you apply mutation to the parents there's basically 'too much mutation' going on (assuming the mutation rate is the same, you're doubling the chance of stuff getting scrambled).

Even if I have never seen it done like that, of course you could do it but you would have to 'rescale' mutation so that it's not disruptive for the evolution process (too much mutation --> random walk).

All the standard evolution rates I've ever used as a reference are given on the child, so that's another reason to go with that.

〃安静 2024-10-30 14:19:17

在每种情况下,您都可以执行任一操作。不同的交叉和变异方案可能适用于不同的问题;尝试各种方法来解决您的问题,看看它们的表现如何。 (但是当然,如​​果您(1)说突变仅适用于交叉后的子代,并且(2)说交叉后的子代不发生突变,那么结果就是您没有突变:-),因此该组合是可能不是一个好人。)

In each case, you can do either. Different crossover and mutation schemes may work well for different problems; try a variety of things for your problem and see how they perform. (But of course if you (1) say that mutation is only applied to children after crossover and (2) say that children after crossover don't mutate, then the result is that you have no mutation :-), so that combination is probably not a good one.)

等数载,海棠开 2024-10-30 14:19:17

正如其他答案中提到的,这两种方法都是可用的,而且我已经看到这两种方法都在实践中得到了实施。这是一种设计选择。但是,话虽如此,我想说服您一次最好只进行一项基因手术。

在大多数情况下,高度“局部性”的特性对于遗传算子来说是可取的。局部性是指操作员对个体的影响的局部程度 - 是否从根本上改变它,或者是否仅进行小的调整,将个体推到搜索空间中的相邻位置。局部性较低的算子会在搜索空间中产生大量不相关的跳跃,这使得它很难逐步取得进展,而是依赖于幸运的打击。如果您要在一个步骤中应用交叉和变异,那么这些更改将被有效组合,从而创建比单独应用它们时局部性更低的操作。

有时您可能会选择这样做,但通常只有在适应环境如此崎岖以至于进化算法可能是错误的方法的情况下。

As has been mentioned in other answers, either approach is usable and I have seen both implemented in practice. It is a design choice. But, having said that, I'd like to persuade you that it is preferable to only perform one genetic operation at a time.

The property of high 'locality' is desirable for genetic operators the majority of the time. Locality refers to how localised an operator's effect on an individual is - does it radically change it, or does it only make a small adjustment, nudging the individual to an adjacent location in the search space. An operator which has low locality creates large unrelated jumps in the search space, which makes it difficult to make gradual progress, instead relying upon lucky strikes. If you are to apply crossover and mutation in one step, then the changes are effectively combined, creating an operation of lower locality than if they were applied individually.

There are times when you might want this by choice, but normally only in circumstances that the fitness landscape is so rugged that evolutionary algorithms are probably the wrong approach.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文