Presentation is loading. Please wait.

Presentation is loading. Please wait.

Simulated Annealing. Difficulty in Searching Global Optima starting point descend direction local minima global minima barrier to local search.

Similar presentations


Presentation on theme: "Simulated Annealing. Difficulty in Searching Global Optima starting point descend direction local minima global minima barrier to local search."— Presentation transcript:

1 Simulated Annealing

2 Difficulty in Searching Global Optima starting point descend direction local minima global minima barrier to local search

3 Simulated Annealing Origin: The annealing process of heated solids. Intuition: By allowing occasional ascent in the search process, we might be able to escape the trap of local minima.

4 Consequences of the Occasional Ascents Help escaping the local optima. desired effect Might pass global optima after reaching it adverse effect

5 Simulated Annealing Inspired from ancient process of forging iron Annealing refers to the fast heating of a metal and then cooling it slowly The method was first proposed by Metropolis (1953) Kirkpatrick et al. (1982) later improved the SA method and applied it to optimization problems

6 Heat the solid state metal to a high temperature. Cool it down very slowly according to a specific schedule. If the heating temperature is sufficiently high to ensure random state and the cooling process is slow enough to ensure thermal equilibrium, then the atoms will place themselves in a pattern that corresponds to the global energy minimum of a perfect crystal. Simulated Annealing

7 SA differs from hill climbing in such a way that a move is selected at random and then it is decided whether to accept it. In SA, better moves are always accepted. Worse moves are accepted probabilistically.

8 Simulated Annealing The probability of accepting a worse state is a function of both the temperature of the system and the change in the cost function As the temperature decreases, the probability of accepting worse moves decreases If T=0, no worse moves are accepted (i.e. hill climbing)

9 Control of Annealing Process Acceptance of a search step (Metropolis Criterion): Assume the performance change in the search direction is. Accept a ascending step only if it pass a random test, Always accept a descending step, i.e.

10 At each temperature, search is allowed to proceed for a certain number of steps, L(k). Control of Annealing Process Cooling Schedule: T, the annealing temperature, is the parameter that control the frequency of acceptance of ascending steps. We gradually reduce temperature T(k). The choice of parameters is called the cooling schedule.

11 SA Glossary Solution: An answer to a problem without respect to its apparent “value” Neighbor: A solution which is “next” to a given solution in the solution space (or neighborhood) Fitness: The “value” of a solution Temperature: The current average rate at which less fit solutions are accepted Annealing Schedule: The function which lowers (or raises) the temperature the algorithm uses during its search

12 SA (Pseudo Code) Algorithm SIMULATED-ANNEALING Begin temp = INIT-TEMP; place = INIT-PLACEMENT; while (temp > FINAL-TEMP) do while (inner_loop_criterion = FALSE) do new_place = PERTURB(place); ΔC = COST(new_place) - COST(place); if (ΔC < 0) then place = new_place; else if (RANDOM(0,1) < e -(ΔC/temp) ) then place = new_place; temp = SCHEDULE(temp); End.

13 What Annealing Schedule? This is a complicated question! There are linear schedules, geometric schedules, oscillating schedules, schedules based on the rate of improvement Some SA algorithms use a GA to design their annealing schedule! A very basic, yet effective, annealing schedule is one that is geometric, but stepped T = T * 0.9996 However, this is only done every M iterations, which is either determined by the rate of improvement or by a hard figure (say every 1000 iterations) Quantitative analysis is the only way to determine the most effective schedule

14 Cooling Schedule Speed at which temperature is reduced has an effect Too fast and the optima are not found Too slow and time is wasted

15 1) A beginning temperature. 2) An ending temperature. 3) An assumption of the number of iterations per temperature. 4) A cooling rate. SA Parameters

16 Starting Temperature Must be hot enough to allow moves to almost every neighborhood state Must not be so hot that we conduct a random search for a long period of time Problem is finding a suitable starting temperature

17 Implementation of Simulated Annealing  Select a local search scheme  Determine the cooling schedule For example: Set L = n, the number of variables in the problem. Set T(0) such that exp(-/T(0))  1. Set T(k+1) = T(k), where  is a constant smaller but close to 1.


Download ppt "Simulated Annealing. Difficulty in Searching Global Optima starting point descend direction local minima global minima barrier to local search."

Similar presentations


Ads by Google