A bar of steel pulled from a furnace is not immediately useful. A blacksmith heats it to a glowing orange, hammers it into shape, and lets it cool slowly. Cool too fast and the metal locks into a brittle crystal. Cool slowly, and the atoms have time to find a low-energy arrangement — strong, ordered, useful.
Simulated annealing borrows this physical process to solve mathematical problems. In 1983, physicists Scott Kirkpatrick, C. D. Gelatt Jr. and Mario Vecchi published a landmark paper in Science showing that optimization problems — finding the shortest route, the lightest circuit layout, the best schedule — can be attacked by mimicking the cooling of molten metal.
The core idea is disarmingly simple. Suppose you are trying to minimize some cost — say, the length of a route through a set of cities. A naive strategy is hill climbing: always take a step that makes things better. The problem is that hill climbing gets stuck. It finds a local minimum — a solution better than all its neighbors — and stops, even though a much better global minimum might lie just over the next hill.
Simulated annealing adds a thermometer. At high temperature, the algorithm is adventurous: it will accept a worse move with high probability, shaking itself free of local traps. As the temperature falls, it becomes more conservative, eventually settling only into genuine improvements. If the cooling is slow enough, the result is a near-optimal solution.
There is no polynomial-time guarantee. Simulated annealing is a metaheuristic — a strategy for attacking NP-hard problems like the Traveling Salesman Problem when exact methods are hopeless. It trades provable optimality for practical speed, and for many real-world problems it delivers excellent solutions in reasonable time.
Comments
Loading comments...