模拟退火算法中这一步的作用是什么?

发布于 2024-09-04 21:29:04 字数 968 浏览 10 评论 0原文

维基百科 和这个site 描述了模拟退火算法中的类似步骤,我在这里挑选了它:

维基百科:

  if P(e, enew, temp(k/kmax)) > random() then   // Should we move to it?
    s ← snew; e ← enew                          // Yes, change state.

Yuval Baror,关于 八皇后拼图

If moving the queen to the new column will reduce the number of attacked 
queens on the board, the move is taken. Otherwise, the move is taken only 
with a certain probability, which decreases over time. 
Hence early on the algorithm will tend to take moves even if they 
don't improve the situation. Later on, the algorithm will only make moves 
which improve the situation on the board.

我的问题是:这个随机移动会实现什么目的?

Both Wikipedia and this site describe a similar step in the Simulated Annealing algorithm, which I've picked out here:

Wikipedia:

  if P(e, enew, temp(k/kmax)) > random() then   // Should we move to it?
    s ← snew; e ← enew                          // Yes, change state.

Yuval Baror, regarding the Eight Queens puzzle:

If moving the queen to the new column will reduce the number of attacked 
queens on the board, the move is taken. Otherwise, the move is taken only 
with a certain probability, which decreases over time. 
Hence early on the algorithm will tend to take moves even if they 
don't improve the situation. Later on, the algorithm will only make moves 
which improve the situation on the board.

My question is: what does this random move achieve?

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

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

发布评论

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

评论(2

陪我终i 2024-09-11 21:29:05

目的是避免解决局部最佳解决方案,而是尝试找到全局最佳解决方案请参见此处:http ://en.wikipedia.org/wiki/Local_minimum

您允许随机量的移动,这可能最初会使您的位置变得更糟,希望找到一个比您仅通过找到的解决方案更好的整体解决方案 采取措施提高您的地位。

名称中的“退火”部分是指允许移动到更差位置的量随着时间的推移而减少。

The purpose is to avoid settling at a localised best solution and instead try and find the global best solution See here: http://en.wikipedia.org/wiki/Local_minimum

You allow a random amount of movement that may initially make your position worse in the hope of finding a better overall solution than the one you would find by only taking steps that improve you position.

The "annealing" part of the name is that the amount of movement allowed to worse positions is decreased over time.

梦里兽 2024-09-11 21:29:05

只采取改善情况的解决方案被称为“贪婪”,意味着您找到了局部最优。

To only take the solutions that improve the situation is termed 'greedy', and means you find the local optima.

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