开发者

N queens problem using Simulated Annealing

I am trying to come up with the algorithm for my n queens using Simulated Annealing. There is the general algorithm online, but when i look at it, I couldn't understand how it work. My nodes only have the开发者_高级运维 value about number of hit that is on the board. How can I use the Simulated annealing algorithm for this. What is the "temperature", "schedule"?

Please help me understand this. Thanks


Temperature is a number which represents how likely you are going to accept a move that doesn't improve the solution. You start with a high temperature (= very likely to accept non-improving moves) and slowly evolve to a low tempature (= very unlikely to accept non-improving moves).

It took me several attempts to get Simulated Annealing right. Actually I felt like this when I finally got it to work:

Tabu search is craftsmanship: every changes makes it better. Simulated annealing is an art: one change makes or breaks it.

You can find my implementation here (part of OptaPlanner, java, open source).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜