Based on Lee Jacobson's article at http://www.theprojectspot.com/tutorial-post/simulated-annealing-algorithm-for-beginners/6