Professional Documents
Culture Documents
Solving Problems by Searching: 14 Jan 2004 CS 3243 - Blind Search 1
Solving Problems by Searching: 14 Jan 2004 CS 3243 - Blind Search 1
searching
Chapter 3
14 Jan 2004
Outline
Problem-solving agents
Problem types
Problem formulation
Example problems
Basic search algorithms
14 Jan 2004
Problem-solving agents
14 Jan 2004
Example: Romania
Formulate problem:
be in Bucharest
states: various cities
actions: drive between cities
Find solution:
14 Jan 2004
Example: Romania
14 Jan 2004
Problem types
14 Jan 2004
Single-state, start in
#5. Solution?
14 Jan 2004
Sensorless, start in
{1,2,3,4,5,6,7,8} e.g.,
Right goes to {2,4,6,8}
Solution?
14 Jan 2004
Sensorless, start in
{1,2,3,4,5,6,7,8} e.g.,
Right goes to {2,4,6,8}
Solution?
[Right,Suck,Left,Suck]
Contingency
Solution?
14 Jan 2004
Sensorless, start in
{1,2,3,4,5,6,7,8} e.g.,
Right goes to {2,4,6,8}
Solution?
[Right,Suck,Left,Suck]
Contingency
14 Jan 2004
10
Single-state problem
formulation
A problem is defined by four items:
1.
2.
3.
4.
14 Jan 2004
11
14 Jan 2004
12
states?
actions?
goal test?
path cost?
14 Jan 2004
13
14
states?
actions?
goal test?
path cost?
14 Jan 2004
15
14 Jan 2004
16
14 Jan 2004
17
Basic idea:
14 Jan 2004
18
14 Jan 2004
19
14 Jan 2004
20
14 Jan 2004
21
14 Jan 2004
22
14 Jan 2004
23
Search strategies
14 Jan 2004
24
Uninformed search
strategies
25
Breadth-first search
14 Jan 2004
26
Breadth-first search
14 Jan 2004
27
Breadth-first search
14 Jan 2004
28
Breadth-first search
14 Jan 2004
29
Properties of breadth-first
search
14 Jan 2004
30
Uniform-cost search
31
Depth-first search
14 Jan 2004
32
Depth-first search
14 Jan 2004
33
Depth-first search
14 Jan 2004
34
Depth-first search
14 Jan 2004
35
Depth-first search
14 Jan 2004
36
Depth-first search
14 Jan 2004
37
Depth-first search
14 Jan 2004
38
Depth-first search
14 Jan 2004
39
Depth-first search
14 Jan 2004
40
Depth-first search
14 Jan 2004
41
Depth-first search
14 Jan 2004
42
Depth-first search
14 Jan 2004
43
Properties of depth-first
search
44
Depth-limited search
= depth-first search with depth limit l,
i.e., nodes at depth l have no successors
Recursive implementation:
14 Jan 2004
45
14 Jan 2004
46
14 Jan 2004
47
14 Jan 2004
48
14 Jan 2004
49
14 Jan 2004
50
For b = 10, d = 5,
14 Jan 2004
51
Properties of iterative
deepening search
Complete? Yes
Time? (d+1)b0 + d b1 + (d-1)b2 + +
bd = O(bd)
Space? O(bd)
Optimal? Yes, if step cost = 1
14 Jan 2004
52
Summary of algorithms
14 Jan 2004
53
Repeated states
14 Jan 2004
54
Graph search
14 Jan 2004
55
Summary
14 Jan 2004
56