Local Search Optimization: Hill Climbing & Simulated Annealing
“State space landscapes, plateaus, ridges, Simulated Annealing Metropolis acceptance probability, and Genetic Algorithms.”
1.State Space Landscapes & The Hill Climbing Dilemma
§ 2.1.When the path to the goal is irrelevant and only the final configuration matters (e.g., 8-Queens puzzle, VLSI circuit layout, traveling salesperson problem), Local Search Algorithms evaluate configurations without retaining search paths, operating in O(1) constant memory.
Landscape Topography & Failure Modes of Pure Hill Climbing:
1. Local Maxima: A peak that is higher than all neighboring states but lower than the global maximum. Greedy hill climbing halts permanently.
2. Plateaus: Flat regions where all neighboring states possess the identical objective value (flat local maxima or shoulders). Hill climbing wanders aimlessly in a random walk.
3. Ridges: Sloped areas where navigation requires simultaneous changes in multiple variables. Single-variable steepest-ascent oscillates back and forth, making negligible progress.
2.Simulated Annealing & The Metropolis Criterion
§ 2.2.Inspired by the physical annealing process in metallurgy (where liquid metal is cooled slowly to form a crystal with minimal defect energy), Simulated Annealing escapes local optima by intentionally accepting worsening moves with a controlled probability.
The Metropolis Algorithm:
At each time step t, the algorithm selects a random neighbor s' of current state s.
Let \Delta E = f(s') - f(s) be the change in the objective function.
• If \Delta E > 0 (the neighbor is superior): The transition is accepted unconditionally (s ≤ftarrow s').
• If \Delta E ≤ 0 (the neighbor is inferior): The transition is accepted with probability:
$P = e^{\frac{\Delta E}{T}}$
Where T = T(t) is the temperature parameter dictated by an annealing cooling schedule.
Behavioral Dynamics Across the Cooling Schedule:
• When T \to \infty (early iterations): \frac{\Delta E}{T} \to 0 \implies e^0 = 1. The algorithm accepts almost all downhill moves, freely exploring the entire state landscape like a random walk.
• When T \to 0 (late iterations): \frac{\Delta E}{T} \to -\infty \implies e^{-\infty} = 0. The probability of accepting downhill moves approaches zero, smoothly degenerating into pure greedy hill climbing to settle into the local basin.
3. GATE Worked Numerical: Simulated Annealing Acceptance Probability
Ensure Delta E is computed as (New Value - Current Value). For a worsening move, Delta E must be negative!
Problem (Original Practice Problem · Modeled on GATE DA Pattern):
A maximization problem is being solved using Simulated Annealing. Current state s has objective value f(s) = 85. A randomly generated neighbor s' has objective value f(s') = 75.
Calculate the probability of accepting this move when:
(a) Temperature T = 20
(b) Temperature T = 5
Step 1: Compute Delta E:
Delta E = f(s') - f(s) = 75 - 85 = -10.
Since Delta E < 0, the move is a worsening move, so it is accepted with probability P = exp(Delta E / T).
Step 2: Calculate for T = 20:
P = exp(-10 / 20) = exp(-0.5) ≈ 0.6065 (60.65% chance of acceptance).
Step 3: Calculate for T = 5:
P = exp(-10 / 5) = exp(-2.0) ≈ 0.1353 (13.53% chance of acceptance).
Conclusion: As temperature cools from T = 20 to T = 5, the probability of accepting this 10-unit worsening move drops dramatically from 60.65% to 13.53%.
Primary Academic References & Exam Sources
Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.