0

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

维基百科:

  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.

我的问题是:这个随机动作能达到什么目的?

4

2 回答 2

2

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

您允许随机移动,最初可能会使您的位置变得更糟,以期找到比仅采取措施改善您的位置时找到的更好的整体解决方案。

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

于 2010-06-09T13:26:01.933 回答
0

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

于 2010-06-09T13:36:39.347 回答