Energy difference
A proposed move is immediately accepted if it lowers the objective; otherwise it faces a probabilistic test.
Escaping local optima through controlled randomness
Simulated annealing adapts the Metropolis idea for optimization. Early randomness permits uphill moves; cooling gradually focuses the search near low-energy solutions.
The essential idea: temperature balances global exploration early with local refinement late.
A proposed move is immediately accepted if it lowers the objective; otherwise it faces a probabilistic test.
High temperature makes uphill moves plausible. As temperature approaches zero, the search becomes increasingly selective.
Start from x = 4 on a multimodal objective. Compare greedy hill climbing with simulated annealing under different cooling schedules.
Controlled stochasticity can escape local optima and balance exploration with exploitation in a non-convex landscape.