cse 473 chapter 3 problem solving using search · 2006. 10. 4. · 3 5 example: n queens 4 queens 6...
TRANSCRIPT
![Page 1: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/1.jpg)
1
Chapter 3
Problem Solving using Search
Chapter 3
Problem Solving using Search
CSE 473
© CSE AI Faculty
“First, they do an on-line search”
2
Example: The 8-puzzleExample: The 8-puzzle
1 2 3
67 5
8 4
1 2 3
87
54 6
![Page 2: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/2.jpg)
2
3
Example: Route PlanningExample: Route Planning
start
end
4
Example: N QueensExample: N Queens
4 Queens
![Page 3: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/3.jpg)
3
5
Example: N QueensExample: N Queens
4 Queens
6
State-Space Search ProblemsState-Space Search Problems
General problem:
Given a start state, find a path to a goal state
• Can test if a state is a goal
• Given a state, can generate its successor states
Variants:
• Find any path vs. a least-cost path
• Goal is completely specified, task is just to find the path
– Route planning
• Path doesn’t matter, only finding the goal state
– 8 puzzle
![Page 4: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/4.jpg)
4
7
Tree Representation of 8-Puzzle Problem SpaceTree Representation of 8-Puzzle Problem Space
8
![Page 5: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/5.jpg)
5
9
10
![Page 6: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/6.jpg)
6
11
12
![Page 7: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/7.jpg)
7
13
14
![Page 8: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/8.jpg)
8
15
16
![Page 9: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/9.jpg)
9
17
18
![Page 10: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/10.jpg)
10
19
20
![Page 11: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/11.jpg)
11
21
22
Space is the big problem for BFS.
Example: b = 10, 10,000 nodes/sec, 1KB/node
d = 2 ŁŁŁŁ 1100 nodes, 0.11 secs, 1MB
d = 4 ŁŁŁŁ 111,100 nodes, 11 secs, 106 MB
d = 8 ŁŁŁŁ 109 nodes, 31 hours, 1 TB
![Page 12: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/12.jpg)
12
23
24
![Page 13: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/13.jpg)
13
25
26
![Page 14: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/14.jpg)
14
27
28
![Page 15: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/15.jpg)
15
29
30
![Page 16: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/16.jpg)
16
31
32
![Page 17: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/17.jpg)
17
33
34
![Page 18: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/18.jpg)
18
35
36
![Page 19: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/19.jpg)
19
37
38
![Page 20: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/20.jpg)
20
39
40
![Page 21: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/21.jpg)
21
41
42
![Page 22: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/22.jpg)
22
43
44
![Page 23: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/23.jpg)
23
45
46
![Page 24: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/24.jpg)
24
47
48
![Page 25: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/25.jpg)
25
49
50
![Page 26: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/26.jpg)
26
51
Increasing path-cost limits instead of depth limits
This is called Iterative lengthening search (exercise 3.11)
52
![Page 27: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/27.jpg)
27
53
Forwards vs. BackwardsForwards vs. Backwardsstart
end
Problem: Find the shortest route
54
Bidirectional SearchBidirectional Search
Motivation: bd/2 + bd/2 << bd
Can use breadth-first search or uniform-cost search
Hard for implicit goals e.g., goal = “checkmate” in chess
![Page 28: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/28.jpg)
28
55
Repeated StatesRepeated States
Failure to detect repeated states can turn a linear problem into an exponential one! (e.g., repeated states in 8 puzzle)
Graph search algorithm: Store expanded nodes in a set called closed and only add new nodes to the fringe
56
Graph SearchGraph Search
![Page 29: CSE 473 Chapter 3 Problem Solving using Search · 2006. 10. 4. · 3 5 Example: N Queens 4 Queens 6 State-Space Search Problems General problem: Given a start state, find a path to](https://reader035.vdocuments.us/reader035/viewer/2022063011/5fc5725013affc4df9108490/html5/thumbnails/29.jpg)
29
57
Can we do better?Can we do better?
All these methods are slow (blind)
Solution àààà use problem-specific knowledge to guide search (“heuristic function”)
àààà “informed search” (next lecture)