- 2075 Baisakh · 6+2 marks
Hill climbing; simulated annealing
Short answer
Hill climbing is a local greedy search that stops at any peak without backtracking; its problems are local maxima, plateaus, and ridges, handled by random restarts, sideways moves or big jumps, and multi-direction moves. Simulated annealing occasionally accepts worse moves with probability e^(deltaE/T), letting it escape local maxima and approach the global optimum as temperature falls.
Discuss the hill climbing search algorithm along with the problems associated with it and discuss their solutions. Why is simulated annealing important?
Hill climbing is a local search that repeatedly moves from the current state to the neighbouring state with the highest value of the evaluation function, and stops when no neighbour is better. It keeps only the current state (O(1) memory), has no backtracking and no look-ahead, like climbing a hill in fog.
current = initial state
loop:
best = highest-valued neighbour of current
if value(best) <= value(current): return current
current = best
Variants: simple (first better neighbour), steepest-ascent (best neighbour), stochastic and first-choice hill climbing.
Problems and solutions
| Problem | Meaning | Solution |
|---|---|---|
| Local maximum | A peak better than its neighbours but not the best overall; search stops | Random-restart hill climbing, backtracking, simulated annealing |
| Plateau | A flat area; all neighbours have equal value, so no direction is better | Take a big random jump, or allow a limited number of sideways moves |
| Ridge | A narrow high path; every single move goes downhill though the ridge rises | Apply several moves at once or move in more directions (e.g. diagonally) |
The algorithm is not complete and not optimal, but it is fast and uses almost no memory.
Importance of simulated annealing
Simulated annealing is hill climbing that sometimes accepts a worse move. A random neighbour is chosen; if it is better it is accepted; if worse (change ΔE < 0), it is accepted with probability e^(ΔE/T), where T is a "temperature" that is slowly lowered (cooling schedule). At high T the search wanders and escapes local maxima; as T falls it behaves like hill climbing and settles on a good solution. With a slow enough cooling it finds the global optimum with probability approaching 1, so it solves the main weakness of hill climbing.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Hill climbing and its problems · Artificial Intelligence, chapter 3
- Design and construction problems of hill roads · Transportation Engineering I, chapter 5 · asked 11×
- Binary search with algorithm and example · Data Structure and Algorithm, chapter 8 · asked 4×
- Geotechnical problems and their solutions · Soil Mechanics, chapter 1 · asked 2×