SA ExplorerSE 600 · Part 2 · Lecture 11 · Simulated Annealing — the acceptance rule and cooling at work

Mode
Problem

About this mode

Flow of SA

The orange box is the step that just happened; the pale orange boxes are the path that led to it. The small numbers count how often each box has been visited.

Cost landscape

Move mix
T––
cooling level0
proposals0
current f(x)–
best–
worse moves accepted0
current solution x proposed neighbour x′ best so far where x has been recently

Click anywhere on the curve to choose the starting solution. A neighbour is x moved left or right by 1 to 10 steps.

Press Step to begin.

Acceptance meter — should we accept x′?

Left: the chance of accepting a worse move, P = e−δ/T, for every size of worsening δ. The dashed curve is at the start (T0), the solid one at the current T. Right: the random number r is drawn on the 0–1 bar. Below P (green) → accept; above P (red) → reject.

Thermometer — the cooling schedule

T is multiplied by α after every iters_per_T moves, until it falls below T_min. What "hot" means depends on δ (see “How hot is hot?”). The bands use a typical worsening δ: HOT = it is accepted more than half the time, WARM = sometimes, COLD = less than 2 times in 100.

Cost over the run

current f(x) — may go up best so far — never goes up a worse move accepted

Step log — one row per proposal (as in “A worked trace”)

#Tf(x)movef(x′)δPrresultnew f(x)

Shows the latest 150 proposals. '–' in P and r: the move was not worse, so no random draw was needed.

Compare cooling rates

Same problem, seed, T0, T_min and iters_per_T — only α changes.

Fast cooling (α = 0.90) is a quench: few temperature levels, so the search freezes in the first valley it falls into. Slow cooling spends many more evaluations and usually ends lower. Press the button to see it.