1. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
Problem Solving by Searching
Search Methods :
Local Search for
Optimization Problems
2. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
2
Traveling Salesman Person
Find the shortest Tour traversing all cities once.
3. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
Local Search Algorithms
2. Informed Search Strategies (Heuristic Search):
A search strategy which searches the most promising branches of the
state-space first can: (1) find a solution more quickly, (2) find solutions
even when there is limited time available, (3) often find a better
solution, since more profitable parts of the state-space can be examined,
while ignoring the unprofitable parts.
A search strategy which is better than another at identifying the most
promising branches of a search-space is said to be more informed.
I. Hill climbing, Simulated Annealing, Tabu search.
II. Best first search.
III. Greedy search.
IV. A* search.
4. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
Local Search Algorithms
Hill Climbing,
Simulated Annealing,
Tabu Search
5. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
5
Hill Climbing
• Hill climbing search algorithm
(also known as greedy local
search) uses a loop that
continually moves in the direction
of increasing values (that is
uphill).
• It terminates when it reaches a
peak where no neighbor has a
higher value.
• "Like climbing Everest in thick fog with amnesia"
6. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
Hill Climbing Search
7. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
7
Hill Climbing
states
evaluation
8. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
8
Hill Climbing in Action …
Cost
States
9. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
9
Hill Climbing
Current
Solution
10. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
10
Hill Climbing
Current
Solution
11. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
11
Hill Climbing
Current
Solution
12. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
12
Hill Climbing
Current
Solution
13. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
13
Hill Climbing
Best
Local Minimum
Global Minimum
14. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
14
Issues
The Goal is to find GLOBAL optimum.
1. How to avoid LOCAL optima?
2. When to stop?
3. Climb downhill? When?
15. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
15
Simulated Annealing
Key Idea: escape local maxima by allowing some "bad"
moves but gradually decrease their frequency
Take some uphill steps to escape the local minimum
Instead of picking the best move, it picks a random move
If the move improves the situation, it is executed.
Otherwise, move with some probability less than 1.
Physical analogy with the annealing process:
Allowing liquid to gradually cool until it freezes
The heuristic value is the energy, E
Temperature parameter, T, controls speed of convergence.
16. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
16
Simulated Annealing
Basic inspiration: What is annealing?
In metallurgy, annealing is the physical process used to
temperature or harden metals or glass by heating them to a
high temperature and then gradually cooling them, thus
allowing the material to coalesce into a low energy
crystalline state.
Heating then slowly cooling a substance to obtain a strong
crystalline structure.
Key idea: Simulated Annealing combines Hill Climbing with
a random walk in some way that yields both efficiency and
completeness.
17. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
17
Simulated Annealing in Action …
Cost
States
Best
18. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
18
Simulated Annealing
Cost
States
Best
19. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
19
Simulated Annealing
Cost
States
Best
20. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
20
Simulated Annealing
Cost
States
Best
21. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
21
Simulated Annealing
Cost
States
Best
22. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
22
Simulated Annealing
Cost
States
Best
23. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
23
Simulated Annealing
Cost
States
Best
24. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
24
Simulated Annealing
Cost
States
Best
25. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
25
Simulated Annealing
Cost
States
Best
26. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
26
Simulated Annealing
Cost
States
Best
27. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
27
Simulated Annealing
Cost
States
Best
28. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
28
Simulated Annealing
Cost
States
Best
29. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
29
Simulated Annealing
Cost
States
Best
30. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
30
Simulated Annealing
Cost
States
Best
31. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
31
Simulated Annealing
Cost
States
Best
32. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
32
Simulated Annealing
Cost
States
Best
33. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
33
Simulated Annealing
Cost
States
Best
34. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
34
Simulated Annealing
Cost
States
Best
35. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
35
Simulated Annealing
Cost
States
Best
36. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
36
Simulated Annealing
Cost
States
Best
37. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
37
Simulated Annealing
Cost
States
Best
38. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
38
Simulated Annealing
Cost
States
Best
39. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
39
Simulated Annealing
Cost
States
Best
40. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
40
Tabu Search Algorithm
Start with an initial feasible solution
Initialize Tabu list
Generate a subset of neighborhood and find the best
solution from the generated ones
If move is not in Tabu list then accept
Repeat from 3 until terminating condition
41. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
41
Tabu Search: TS in Action …
Cost
States
42. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
42
Tabu Search: TS
Best
43. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
43
Tabu Search: TS
Best
44. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
44
Tabu Search: TS
Best
45. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
45
Tabu Search: TS
Best
46. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
46
Tabu Search: TS
Best
47. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
47
Tabu Search: TS
Best
48. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
48
Tabu Search: TS
Best
49. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
49
Tabu Search: TS
Best
50. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
50
Tabu Search: TS
Best
51. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
51
Tabu Search: TS
Best
52. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
52
Tabu Search: TS
Best
53. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
53
Tabu Search: TS
Best
54. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
54
Tabu Search: TS
Best
55. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
55
Tabu Search: TS
Best
56. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
56
Tabu Search: TS
Best
57. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
57
Tabu Search: TS
Best
58. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
58
Tabu Search: TS
Best
59. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
59
Tabu Search: TS
Best
60. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
60
Tabu Search: TS
Best
61. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
61
Tabu Search: TS
Best
62. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
62
Tabu Search: TS
Best
63. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
63
Tabu Search: TS
Best
64. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
64
Summary
Local search methods keep small number of nodes
in memory. They are suitable for problems where
the solution is the goal state itself and not the path.
Hill climbing and simulated annealing are examples
of local search algorithms.
65. Renas R. Rekany Artificial Intelligence Nawroz University
Keep Reading as long as you breathComSci: Renas R. Rekany Oct2016
65
References
Russell, S. J., Norvig, P., Canny, J. F., Malik, J. M., &
Edwards, D. D. (2003). Artificial intelligence: a modern
approach (Vol. 2). Upper Saddle River: Prentice hall.