模拟退火算法中这一步的作用是什么?
维基百科 和这个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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目的是避免解决局部最佳解决方案,而是尝试找到全局最佳解决方案请参见此处: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.
只采取改善情况的解决方案被称为“贪婪”,意味着您找到了局部最优。
To only take the solutions that improve the situation is termed 'greedy', and means you find the local optima.