1
Informed Search (2)
Introduction to Artificial Intelligence H di M di
1
Hadi Moradi
Last time: search strategies
I f d U
h i i id h h
I nformed: Use heuristics to guide the search
Best first: Greedy search:
2
A* search:
Informed Search (2) Introduction to Artificial Intelligence H di M - - PDF document
Informed Search (2) Introduction to Artificial Intelligence H di M Hadi Moradi di 1 Last time: search strategies I I nformed: Use heuristics to guide the search f d U h i i id h h Best first: Greedy search: A* search: 2
1
Best first: Greedy search:
2
A* search:
Job scheduling
3
m jobs 1 machine m jobs n machines (job-shop scheduling) Example: 5 Job problem N job problem:
Iterative improvement Hill climbing Simulated annealing
4
In many optimization problems,
path is irrelevant; the goal state itself is the solution.
In such cases, can use iterative improvement
Simplified world: 2 locations, each may or not contain dirt, h t t i i t each may or not contain vacuuming agent. Goal of agent: clean up the dirt. If path does not matter, do not need to keep track of it.
6
7
Iteratively maximize/minmize “value” of current
8
Note: minimizing a value function v(n) is
9
Problem: depending on initial state, may get
Any suggestion?
10
Basin of 11
B C A
Attraction for C
D E
Question: How do you avoid this local
starting point descend barrier to local search
12
descend direction local minima global minima
Help escaping the local optima.
13
Might pass global optima after reaching it
A
Attraction for C
B C D E
14
From current state pick a random successor From current state, pick a random successor
15
.
16
17
MDSA: Molecular Dynamics Simulated Annealing
Geman & Geman (1984): if T is lowered
18
Caveat:
19
Caveat:
Idea: Escape local extrema by allowing “bad moves,”
20
Boltzmann distribution: accept “bad move” with ΔE< 0 (goal
If T is large:
21
If T is near 0:
22
Monte Carlo Number Parent solution = new solution
23
Keep track of k states
24
For instance f(x1,y1,x2,y2,x3,y3) to be
25
Visit all the cities (do not skip any city) Visit all the cities (do not skip any city) Do not visit a city twice Shortest path Convert it to:
Moving the elements of a fixed sized list
Li t th th th t h ld b t k (li t f iti i
26
List = the path that should be taken (list of cities in
http://www.hermetic.ch/misc/ts3/ts3demo.htm
Best-first search: Best first search: Greedy search:
27
A* search = best-first with measure = A search
28
Time complexity of heuristic algorithms Time complexity of heuristic algorithms
Good heuristics can sometimes be
29
Iterative improvement algorithms keep Iterative improvement algorithms keep
Can get stuck in local extrema;
30