CSE 473 Chapter 3 Problem Solving Using Search

3y ago
30 Views
2 Downloads
2.74 MB
30 Pages
Last View : 4m ago
Last Download : 3m ago
Upload by : Bennett Almond
Transcription

CSE 473Chapter 3Problem Solving using Search“First, they do an on-line search” CSE AI FacultyExample: The 8-puzzleStartGoal1 2 3481 2 34 5 67 87 6 521

Example: Route Planning3Example: N Queens4 Queens problem(Place queens such that no queen attacks any other)42

Example: N Queens4 Queens5State-Space Search ProblemsGeneral problem:Find a path from a start state to a goal state given: A goal test: Tests if a given state is a goal state A successor function (transition model): Given a state,generates its successor statesVariants: 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, N queens, Rubik’s cube63

Example: Simplified Pac-ManInput: State space Successor function“N”, 1.0“E”, 1.0 Start state Goal testSearch Trees“N”, 1.0“E”, 1.0A search tree: Root Start state Children successor states Edges actions and costs Path from Start to a node is a “plan” to get to that state For most problems, we can never actually build thewhole tree (why?)4

State Space Graph versus Search TreesState Space Graph(graph of states with arrows pointing to successors)GacbedSfhprqState Space Graph versus Search TreesGacbedSfhprqSedSearch Treeebcaa hp qqphrrp qffqc GacqGa5

Search Tree for 8-Puzzle11126

Searching with Search TreesSearch: Expand out possible nodes Maintain a fringe of as yet unexpanded nodes Try to expand as few tree nodes as possible147

15Handling Repeated StatesFailure to detect repeated states (e.g., in 8 puzzle) can causeinfinite loops in searchSTARTaGOALexpandexpandbGraph Search algorithm: Augment Tree-Search to storeexpanded nodes in a set called explored set (or closed set)and only add new nodes not in the explored set to the fringe168

17189

192010

212211

232412

b b2 b3 bd O(bd ) i.e. exp in d25b b2 b3 bd O(bd ) i.e. exp in dO (b d )2613

b b2 b3 bd O(bd ) i.e. exp in dO ( bd )Yes if all step costs are equal. Not optimal in general.Space and time are big problems for BFS.Example: b 10, 1000,000 nodes/sec, 1000 Bytes/noded 2 110 nodes, 0.11 millisecs, 107KBd 4 11,110 nodes, 11 millisecs, 10.6 MBd 8 108 nodes, 2 minutes, 103 GBd 16 1016 nodes, 350 years, 10 EB (1 billion GB)27What if the step costs are notequal?Can we modify BFS to handle any stepcost function?2814

g (n ) (Use priority queue)O(b C*O(b C )/ 1* )/ 1293015

313216

333417

353618

373819

394020

414221

(using “explored” set)43(using “explored” set)4422

(using “explored” set)45(using “explored” set)Space cost is a big advantage of DFS over BFS.Example: b 10, 1000 Bytes/noded 16 156 KB instead of 10 EB (1 billion GB)4623

(can handle infinite state spaces)47 DFS with increasing depth limit Finds the best depth limit Combines the benefits of DFS and BFS4824

495025

515226

535427

555628

Yes if all step costs are equal. Not optimal in general.Increasing path-cost limits instead of depth limitsThis is called Iterative lengthening search (exercise 3.17)57Forwards vs. BackwardsProblem: Find the shortest route5829

Bidirectional SearchMotivation: bd/2 bd/2 bd(E.g., 108 108 2 108 1016)Can use breadth-first search or uniform-cost searchHard for implicit goals e.g., goal “checkmate” in chess59Can we do better?All these methods are slow (because they are “blind”)Solution use problem-specific knowledge toguide search (“heuristic function”) “informed search” (next lecture)To Do Start Project #1 Read Chapter 36030

Problem Solving using Search . c e h a f r State Space Graph (graph of states with arrows pointing to successors) S a b e d p a c h e p f r q q c a q p h f r q q c G a S G d b p q c e h a f r Search Tree State Space Graph versus Search Trees G . 6 11 Search Tree for 8-Puzzle 12 . 7

Related Documents:

92 vipul sharma it 93 rishabh jain cse 94 manik arora cse 95 nishant bhardwaj cse . 96 rajit shrivastava it 97 shivansh gaur cse 98 harsh singh cse 99 shreyanshi raj cse 100 rahul bedi cse 101 pallavi anand cse 102 divya cse 103 nihal raj it 104 kanak

cse-148 kuriakose jijo george n t george cse-149 kusum joshi ramesh chandra joshi cse-150 m mithun bose n k mohandasan cse-151 madhuri yadav rajbir yadav cse-152 malini shukla r s sharma cse-153 manisha khattar sunil kumar khattar cse-154 m

Part One: Heir of Ash Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 Chapter 18 Chapter 19 Chapter 20 Chapter 21 Chapter 22 Chapter 23 Chapter 24 Chapter 25 Chapter 26 Chapter 27 Chapter 28 Chapter 29 Chapter 30 .

TO KILL A MOCKINGBIRD. Contents Dedication Epigraph Part One Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Part Two Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 Chapter 18. Chapter 19 Chapter 20 Chapter 21 Chapter 22 Chapter 23 Chapter 24 Chapter 25 Chapter 26

DEDICATION PART ONE Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 PART TWO Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 Chapter 18 Chapter 19 Chapter 20 Chapter 21 Chapter 22 Chapter 23 .

1 CSE 474 Introduction 1 CSE 474 – Introduction to Embedded Systems n Instructor: q Bruce Hemingway n CSE 464, Office Hours: 11:00-12:00 p.m., Tuesday, Thursday n or whenever the door is open n bruceh@cs.washington.edu q Teaching Assistants: q Cody Ohlsen, Kendall Lowrey and Ying-Chao (Tony) Tung CSE 474 Introduction 2

CSE 440: Introduction to HCI CSE 441: Advanced HCI CSE 510: Advanced Topics in HCI CSEP 510: Human-Computer Interaction CSE 332: Data Structures. Who We Are You Computing. Who We Are Eunice Jun Prefer: Eunice / She / Her Background: BS,Cognitive Studies & Computer Science Vanderbilt, 2016

About the husband’s secret. Dedication Epigraph Pandora Monday Chapter One Chapter Two Chapter Three Chapter Four Chapter Five Tuesday Chapter Six Chapter Seven. Chapter Eight Chapter Nine Chapter Ten Chapter Eleven Chapter Twelve Chapter Thirteen Chapter Fourteen Chapter Fifteen Chapter Sixteen Chapter Seventeen Chapter Eighteen