Simulated annealing demo in JS