Simulated annealing algorithm.

Does anyone have any good and brief source code with documentation about the simulated annealing algorithm?
the ones in the internet are too general. I would prefer something with comments and examples.

I have another question about this alogrithm in the

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The idea of simulated annealing is to search for the minimum of an "energy" function,
by starting at a high "temperature" where transitions are likely even if the raise the energy,
and gradually cooling the temperature so that transitions that raise the energy by a lot become less and less likely.
This tends to search near where the better states have been found, while tending
to prevent the search from getting stuck in a local minimum that is at a lower energy state than its neighboring states but higher than the global minimum.
This is similar to what happens when you slowly cool a crystal to minimze defects that could get frozen in if you cooled it quickly.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.