An implementation of the Simulated Annealing algorithm.