Sie sind auf Seite 1von 9

Evolutionary Computing

Techniques
Marx. R
Associate professor
Department of Computer Science and
Engineering

SIMULATED ANNEALING

2013 Even

Simulated Annealing
Patterned after the physical process of annealing
Metals are melted and gradually cooled to solidity
Goal is to produce minimal energy state

Variation of Hill Climbing


Some downhill moves may be made in the beginning

Perform enough exploration initially so that the


final solution is relatively insensitive to the start
state
Lower the chances of getting caught in a ridge,
plateau or a local maxima

Objective function
Usually minimizing (Valley descending)
Evolutionary Computing Techniques

Simulated Annealing

2013 Even

Valley descending (Minimization)


Objective function (energy level) should be
minimized

In physics, higher energy substances move to


lower energy states naturally
However, possible to move to an higher energy
state with a probability p = e E/kT where,
p: probability
E: Change in energy level
T: Temperature
k: Boltzmanns constant
Evolutionary Computing Techniques

Simulated Annealing

2013 Even

p = e E/kT = 1 / (e E/kT)
Smaller change in energy from initial high energy ->
higher probability
Larger change in energy -> lower probability
Probability of a move to higher energy is reduced as
temperature decreases

Hence probability of moves to higher energy are


higher at the beginning of the process
Less likely, when temperature is lower
Downhill moves are allowed anytime
Large uphill moves may occur early in process,
but only relatively small uphill moves occur as
process progresses
Process tries to converge to a local minimum
Evolutionary Computing Techniques

Simulated Annealing

2013 Even

The rate at which system is cooled is called


annealing schedule
Optimal annealing schedule should be realized
empirically
If cooling occurs rapidly, stable regions of high
energy (local maxima) will be formed/found
If schedule is too slow, time is wasted
At high temperatures (where motion in any
direction is available), not much progress is made
At low temperatures, time may be wasted after
solution is found.
Evolutionary Computing Techniques

2013 Even

Simulated Annealing Algorithm


Energy is the objective function (should be
minimized)
k is a constant, hence combined with T
p = e E/T

We need to choose various values for T (high to


low) to have an annealing schedule
Differences from simple hill climbing:
Annealing schedule is maintained (Initial Temperature,
Final temperature, temperature reduction each time)
Moves to worse states may be accepted
Good idea to maintain the best state found so far in
addition to current state (in case earlier moves were
bad)
Evolutionary Computing Techniques

2013 Even

Simulated Annealing Algorithm


Evaluate initial state
If goal state return and quit
Otherwise, continue with initial state as current state

Initialize BEST-SO-FAR to the current state


Initialize T (according to annealing schedule)
Loop until a solution is found (or) no operator can be applied to the
current state
Select an operator that has not been applied to current state
Apply it to produce new state
Evaluate the new state. Compute E = value of current value of new
state
If the new state is goal state, return and quit
If new state is better than current state, make it current state. Set BEST-S0-FAR
to this state.
If it is not better than current state, make it the current state with a probability
p

Revise T as necessary based on the annealing schedule

Return BEST-SO-FAR as the answer.


Evolutionary Computing Techniques

SA Parameter Selection

2013 Even

Select Annealing schedule (3 components)

Initial temperature value


Criteria that will be used to decide when temperature of the
system is reduced
Amount by which the temperature is reduced each time it is
changed
Optional fourth component: When to quit.

SA used when number of state moves from a given state is


very large
Empirical numbers for components need to be derived
based on
Quality of the solution
Rate at which the process converges

When T->0, probability of accepting worse state (higher


energy) ->0 meaning SA is becoming hill climbing
Probability of accepting a move is the ratio E/T
Hence T needs to be scaled up (ex: so that for an average E,
the ratio is around
0.5)
Evolutionary Computing Techniques

Das könnte Ihnen auch gefallen