Cours 3
Cours 3
Problèmes
Prof. Nadjet KAMEL
Les métaheuristiques à solution unique
◦ Elles débutent la recherche avec une seule solution initiale.
Begin
Start with an initial solution s
Evaluate s : f(s)
While solution not found do
s’ from neigborhood of s
Evaluate s’: f(s’)
If f(s’) is better than f(s) then
Replace s by s’
Endif
Endwhile
Return s
End
Hill Climbing
◦ Local optima
◦ Flat
◦ Ridge
Hill Climbing
1 2 4 1 4 7
Fitness = number of
F(s)=5 5 7 2 5 8
element in the wrong cases
3 6 8 3 6
Minimization problem
Goal
F(s)=4 local optima F(s)=5
1 2 4 1 2 4 1 2 4 1 4
F(s)=6
F(s)=4 5 7 5 7 5 6 7 5 2 7 F(s)=5
3 6 8 3 6 8 3 8 3 6 8
2 4 1 2 4
F(s)=5
F(s)=5 1 5 7 3 5 7
3 6 8 6 8
How to escape from local optima ?
Single solution
◦ Simulated Annealing
◦ Tabu Search
◦…
Population-based
◦ Genetic Algorithms
◦ Swarm Particule Optimisation
◦…
Intensification & Diversification
Intensification
◦ Favor search toward optimum(but maybe local...)
Diversification
◦ Try to look at other part of search space (but maybe
useless)
Too much intensification local optimum
Too much diversification random search
Behaves like Greedy and always accepts improving moves
If a neighbor solution j is worse than the current solution i, j will be
accepted depending on the ‘temperature’ parameter T and the
amount of deterioration f(i)-f(j)
Early on, when the ‘temperature’ is heigh, accepting a non-improving
move is more likely than later on
Poorer solutions are accepted based on the probability
exp()
The system ‘temperature’ is controlled in accordance with cooling
schedule
Simulated Annealing
Based on statistical mechanics
◦ Analogy with the simulation of the annealing of solid
◦ If this variation is negative (the new solution improves the objective function, and
reduces the energy of the system), it is accepted.
◦ If the solution found is less good than the previous one then it will be accepted
with a probability P calculated according to the following Boltzmann distribution:
Simulated Annealing
The choice of temperature is essential to guarantee the balance between the
intensification and diversification of solutions in the research space.
The choice of the initial temperature depends on the quality of the starting solution.
If this solution is chosen randomly, a relatively high temperature must be taken.
The following rule is often used:
Where [0,1]
The temperature can be raised when the search seems blocked in a region of the
search space. We consider a large increase in temperature as a process of
diversification while a decrease in temperature corresponds to a process of
intensification.
Tabu Search
Tabu search (TS) is a local search method combined with a set of techniques to
avoid being trapped in a local minimum or repeating a cycle