产生不规则结果的遗传算法,发现多变量功能的最大值

发布于 2025-01-27 16:18:32 字数 690 浏览 3 评论 0原文

我正在尝试实现一种遗传算法,以找到此功能的最大值,

 f(x,y,z) = x^2 + y^3 + z^4 + xyz on [0,10] [0,20] [0,30] for x,y,z respectively

我的目标函数与上面的函数相同。人口的每个x,y,z均由一个随机初始化的二进制字符串表示。

我已经实施了这样的实施:

  1. 轮盘赌轮的选择
  2. 单点跨界(无交叉率)
  3. 突变:如果选择了染色体(x,y,z)进行突变,则i将随机位的随机位,一个随机的y和随机位z。

我注意到给出较大的Z指数,它是第一个收敛的变量。随着世代的流逝,其余的人都难以融合。这是可以接受的行为吗?

output

I'm trying to implement a genetic algorithm in order to find the maxima of this function

 f(x,y,z) = x^2 + y^3 + z^4 + xyz on [0,10] [0,20] [0,30] for x,y,z respectively

my objective function is the same as the function above. Each x,y,z of the population is represented by a binary string which is initialized randomly.

I've implemented it like this:

  1. Roulette wheel selection
  2. Single point crossover (no crossover rate)
  3. Mutation: If the chromosome (x,y,z) is selected for mutation I flip a random bit of x, a random bit of y and a random bit of z.

I've noticed that giving the bigger z exponent, it is the first variable to converge. The rest of them have trouble converging as generations go by. Is this an acceptable behavior?

enter image description here

output

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文