Added a buffer to hold the best solution for simulated annealing.