x

We encourage you to explore an actual implementation of simulated annealing. This visualization allows you to change the starting temperature of the algorithm, its cooling rate, and how fast it runs. After you click start, press ‘space’ to run through the algorithm slowly, step by step, to get a feel for its decision strategy. If you want to watch the whole thing play out until the temperature has cooled, click “Auto Step.” You can also pause and reset at any time.



Start
Instructions
Temperature
Cooling Rate
Speed: 5 ms per decision

while temperature > 1 {

Choose a new random neighbor

Is neighbor's height > current solution's?

(______ > ______) == ______

True? Move to neighbor & decrease temperature

False? Calculate acceptance probability:

100*e^((new height - old height)/temp)

Probability = 100*e^((______ - ______) / ______)

Probability = ______

Is acceptance probability > Random[0,100]?

(______ > ______) == ______

True? Move to neighbor

False? Do nothing

Decrease temperature

}


Auto Step
Pause
Reset