Real World Search Problems. CS 331: Artificial Intelligence Uninformed Search. Simpler Search Problems. Example: Oregon. Search Problem Formulation

Similar documents
Uninformed Search Strategies

Solving Problems by Searching chap3 1. Problem-Solving Agents

Problem Solving as Search - I

Uninformed search strategies

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department

Uninformed Search (Ch )

Search I. Tuomas Sandholm Carnegie Mellon University Computer Science Department. [Read Russell & Norvig Chapter 3]

Uninformed Search (Ch )

Representation. Representation. Representation. Representation. 8 puzzle.

Better Search Improved Uninformed Search CIS 32

Uninformed search methods

Problem Solving Agents

Uninformed search methods II.

Artificial Intelligence. Uninformed Search Strategies

COMP9414: Artificial Intelligence Uninformed Search

CSE 3401: Intro to AI & LP Uninformed Search II

Uninformed search methods II.

Uninformed search methods

CENG 466 Artificial Intelligence. Lecture 4 Solving Problems by Searching (II)

CSE 3402: Intro to Artificial Intelligence Uninformed Search II

CS 4649/7649 Robot Intelligence: Planning

Introduction. AI and Searching. Simple Example. Simple Example. Now a Bit Harder. From Hammersmith to King s Cross

COMP219: Artificial Intelligence. Lecture 8: Combining Search Strategies and Speeding Up

Overview. Depth Limited Search. Depth Limited Search. COMP219: Artificial Intelligence. Lecture 8: Combining Search Strategies and Speeding Up

CSC384: Introduction to Artificial Intelligence. Search

SEARCH TREE. Generating the children of a node

SEARCH SEARCH TREE. Node: State in state tree. Root node: Top of state tree

Advanced Search Hill climbing

CS472 Foundations of Artificial Intelligence. Final Exam December 19, :30pm

/435 Artificial Intelligence Fall 2015

Aryeh Rappaport Avinoam Meir. Schedule automation

The system design must obey these constraints. The system is to have the minimum cost (capital plus operating) while meeting the constraints.

G53CLP Constraint Logic Programming

Depth-bounded Discrepancy Search

Balanced Binary Trees

Spider Search: An Efficient and Non-Frontier-Based Real-Time Search Algorithm

CS Lecture 5. Vidroha debroy. Material adapted courtesy of Prof. Xiangnan Kong and Prof. Carolina Ruiz at Worcester Polytechnic Institute

Algorithms and Data Structures

Decision Trees. Nicholas Ruozzi University of Texas at Dallas. Based on the slides of Vibhav Gogate and David Sontag

SIDDHARTH INSTITUTE OF ENGINEERING & TECHNOLOGY :: PUTTUR (AUTONOMOUS) Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

Provably Secure Camouflaging Strategy for IC Protection

Transposition Table, History Heuristic, and other Search Enhancements

Below are the graphing equivalents of the above constraints.

Application of Bayesian Networks to Shopping Assistance

Introduction to Algorithms

CSC242: Intro to AI. Lecture 21

CS 4649/7649 Robot Intelligence: Planning

A IMPROVED VOGEL S APPROXIMATIO METHOD FOR THE TRA SPORTATIO PROBLEM. Serdar Korukoğlu 1 and Serkan Ballı 2.

Intelligent Decision Making Framework for Ship Collision Avoidance based on COLREGs

Urban OR: Quiz 2 Solutions (2003) ( 1 ρ 1 )( 1 ρ 1 ρ 2 ) ( 1 12 )( ) σ S ] 24 [ 2 = 60, 2 2 ] ( 2 ) 3

6.034 Artificial Intelligence

CT PET-2018 Part - B Phd COMPUTER APPLICATION Sample Question Paper

CMPUT680 - Winter 2001

LOCOMOTION CONTROL CYCLES ADAPTED FOR DISABILITIES IN HEXAPOD ROBOTS

Planning and Acting in Partially Observable Stochastic Domains

LECTURE 5 PRECEDENCE DIAGRAMING METHOD: LINK RELATIONSHIP

4. Please Do Break the Crystal

beestanbul RoboCup 3D Simulation League Team Description Paper 2012

m v = 1.04 x 10-4 m 2 /kn, C v = 1.29 x 10-2 cm 2 /min

Supplementary Figures

Satoshi Yoshida and Takuya Kida Graduate School of Information Science and Technology, Hokkaido University

= ( 3) = positive negative zero positive negative zero

The Use of Genetic Algorithm for Traffic Light and Pedestrian Crossing Control

COMP 406 Lecture 05. Artificial. Fiona Yan Liu Department of Computing The Hong Kong Polytechnic University

Pedestrian Dynamics: Models of Pedestrian Behaviour

Decision Trees. an Introduction

Chapter 4 (sort of): How Universal Are Turing Machines? CS105: Great Insights in Computer Science

EE 364B: Wind Farm Layout Optimization via Sequential Convex Programming

Artificial Intelligence for the EChO Mission Scheduler

An approach for optimising railway traffic flow on high speed lines with differing signalling systems

Design-for-Testability for Path Delay Faults in Large Combinational Circuits Using Test-Points

A HYBRID METHOD FOR CALIBRATION OF UNKNOWN PARTIALLY/FULLY CLOSED VALVES IN WATER DISTRIBUTION SYSTEMS ABSTRACT

The Incremental Evolution of Gaits for Hexapod Robots

Ocean Fishing Fleet Scheduling Path Optimization Model Research. Based On Improved Ant Colony Algorithm

A SEMI-PRESSURE-DRIVEN APPROACH TO RELIABILITY ASSESSMENT OF WATER DISTRIBUTION NETWORKS

Naïve Bayes. Robot Image Credit: Viktoriya Sukhanova 123RF.com

Poseidon Team Description Paper RoboCup 2016, Leipzig, Germany

Application of Dijkstra s Algorithm in the Evacuation System Utilizing Exit Signs

In my left hand I hold 15 Argentine pesos. In my right, I hold 100 Chilean

Robust Task Execution: Procedural and Model-based. Outline. Desiderata: Robust Task-level Execution

CS 4649/7649 Robot Intelligence: Planning

The Evolution of Transport Planning

CSM Pre-Test. 3) Who is responsible for achieving a Sprint Goal? A) ScrumMaster B) Product Owner C) Project Manager D) Scrum Development Team

Dynamic Programming: The Matrix Chain Algorithm

Practical Approach to Evacuation Planning Via Network Flow and Deep Learning

consist of friends, is open to all ages, and considers fair play of paramount importance. The matches are played without referees, since, according to

Efficient Minimization of Routing Cost in Delay Tolerant Networks

Welcome to. Computer Science! Dr. Mircea Agapie Office: SCIENCE 213-C

Three New Methods to Find Initial Basic Feasible. Solution of Transportation Problems

Extensive Games with Perfect Information

SIMULATION OF ENTRAPMENTS IN LCM PROCESSES

Lecture 10. Support Vector Machines (cont.)

CMSC131. Introduction to Computational Thinking. (with links to some external Scratch exercises) How do you accomplish a task?

Cyrus Soccer 2D Simulation

Naïve Bayes. Robot Image Credit: Viktoriya Sukhanova 123RF.com

2018 Junior Girls Division Tournament Structure

Seismic Survey Designs for Converted Waves

Global Information System of Fencing Competitions (Standard SEMI 1.0) Introduction

Online Companion to Using Simulation to Help Manage the Pace of Play in Golf

Neural Nets Using Backpropagation. Chris Marriott Ryan Shirley CJ Baker Thomas Tannahill

Transcription:

Real World Search Problems S 331: rtificial Intelligence Uninformed Search 1 2 Simpler Search Problems ssumptions bout Our Environment Fully Observable Deterministic Sequential Static Discrete Single-agent 3 4 Search Problem Formulation search problem has 5 components: 1. set of states S 2. non-empty set of initial states I S 3. non-empty set of goal states G S 4. successor function succ(s) which takes a state s as input and returns as output the set of states you can reach from state s in one step. 5. cost function cost(s,s ) which returns the nonnegative one-step cost of travelling from state s to s. The cost function is only defined if s is a successor state of s. Initial State oos ay Goal State McMinnville orvallis Junction ity Example: Oregon Portland Salem lbany Eugene Medford Lebanon S = {oos ay,, orvallis, Junction ity, Eugene, Medford, lbany, Lebanon, Salem, Portland, McMinnville} I = {orvallis} G={Medford} Succ(orvallis)={lbany,, McMinnville, Junction ity} ost(s,s ) = 1 for all transitions 5 6 1

Results of a Search Problem Solution Path from initial state to goal state Junction orvallis Eugene Medford ity Solution quality Path cost (3 in this case) Optimal solution Lowest path cost among all solutions (In this case, we found the optimal solution) orvallis Search Tree Start with Initial State 7 8 Search Tree Search Tree orvallis Is initial state the goal? Yes, return solution orvallis pply Successor() function McMinnville lbany Junction ity No, apply Successor() function McMinnville lbany Junction ity Queue These nodes have not been expanded yet. all them the fringe. We ll put them in a queue. McMinnville lbany Junction ity 9 10 Search Tree Search Tree orvallis Queue orvallis Queue McMinnville lbany Junction ity lbany Junction ity Portland McMinnville lbany Junction ity lbany Junction ity Portland Portland Portland Now remove a node from the queue. If it s a goal state, return the solution. Otherwise, call Successor() on it, and put the results in the queue. Repeat. 11 Things to note: Order in which you expand nodes (in this example, we took the first node in the queue) void repeated states 2

Tree-Search Pseudocode Tree-Search Pseudocode Note: Goal test happens after we grab a node off the queue. 13 14 Tree-Search Pseudocode Why are these parent node backpointers are important? Uninformed Search No info about states other than generating successors and recognizing goal states Later on we ll talk about informed search can tell if a non-goal state is more promising than another 15 16 Evaluating Uninformed Search ompleteness Is the algorithm guaranteed to find a solution when there is one? Optimality Does it find the optimal solution? Time complexity How long does it take to find a solution? Space complexity How much memory is needed to perform the search omplexity 1. ranching factor (b) maximum number of successors of any node 2. Depth (d) of the shallowest goal node 3. Maximum length (m) of any path in the search space Time omplexity: number of nodes generated during search Space omplexity: maximum number of nodes stored in memory 17 18 3

Uninformed Search lgorithms readth-first search Uniform-cost search Depth-first search Depth-limited search Iterative Deepening Depth-first Search idirectional search readth-first Search Expand all nodes at a given depth before any nodes at the next level are expanded Implement with a FIFO queue 19 20 readth First Search Example readth First Search Example D E F G D E F G D E F G D E F G Not yet reached losed (expanded) nodes Not yet reached losed (expanded) nodes Open nodes (on the fringe) urrent node to be expanded Open nodes (on the fringe) urrent node to be expanded 21 22 Evaluating FS Evaluating FS omplete? Time omplexity Space omplexity omplete? Time omplexity Space omplexity 23 24 4

Evaluating FS Evaluating FS omplete? omplete? Yes if step costs are identical Yes if step costs are identical Time omplexity Space omplexity Time omplexity Space omplexity b+b 2 +b 3 + +b d +(b d+1 -b)= O(b d+1 ) 25 26 Evaluating FS Uniform-cost Search omplete? Yes if step costs are identical Time omplexity b+b 2 +b 3 + +b d +(b d+1 -b)= O(b d+1 ) Space omplexity O(b d+1 ) Exponential time and space complexity make FS impractical for all but the smallest problems 27 What if step costs are not equal? Recall that FS expands the shallowest node Now we expand the node with the lowest path cost Uses priority queues Note: Gets stuck if there is a zero-cost action leading back to the same state. For completeness and optimality, we require the cost of every step to be 28 Evaluating Uniform-cost Search Evaluating Uniform-cost Search omplete? Time omplexity omplete? Time omplexity and step costs for small positive Space omplexity Space omplexity 29 30 5

Evaluating Uniform-cost Search Evaluating Uniform-cost Search omplete? and step costs for small positive omplete? and step costs for small positive Yes Yes Time omplexity Time omplexity O(b 1+floor(*/ ) ) where * is the cost of the optimal solution Space omplexity Space omplexity 31 32 Evaluating Uniform-cost Search Depth-first Search omplete? Time omplexity Space omplexity and step costs for small positive Yes O(b 1+floor(*/ ) ) where * is the cost of the optimal solution O(b 1+floor(*/ ) ) where * is the cost of the optimal solution Expands the deepest node in the current fringe of the search tree Implemented with a LIFO queue 33 34 Depth-first Search Example Depth-first Search Example Not yet reached On fringe but unexpanded Expanded nodes on current path Expanded nodes with no descendants in the fringe (can be removed from memory) M urrent node to be expanded Goal state Not yet reached On fringe but unexpanded Expanded nodes on current path Expanded nodes with no descendants in the fringe (can be removed from memory) urrent node to be expanded M Goal state 6

Evaluating Depth-first Search Evaluating Depth-first Search omplete? Time omplexity Space omplexity omplete? Time omplexity Space omplexity Yes on graphs. No if there is an inly long path with no solutions. 37 38 Evaluating Depth-first Search Evaluating Depth-first Search omplete? Yes on graphs. No if there is an inly long path with no solutions. omplete? Yes on graphs. No if there is an inly long path with no solutions. Time omplexity Space omplexity No (ould expand a much longer path than the optimal one first) No (ould expand a much longer path than the optimal one first) Time omplexity O(b m ) Space omplexity 39 40 omplete? Evaluating Depth-first Search Yes on graphs. No if there is an inly long path with no solutions. No (ould expand a much longer path than the optimal one first) Time omplexity O(b m ) Space omplexity O(bm) Depth-limited Search Solves in path problem by using predetermined depth limit l Nodes at depth l are treated as if they have no successors an use knowledge of the problem to determine l (but in general you don t know this in advance) 41 42 7

Evaluating Depth-limited Search Evaluating Depth-limited Search omplete? Time omplexity Space omplexity omplete? Time omplexity Space omplexity No (If shallowest goal node beyond depth limit) 43 44 Evaluating Depth-limited Search Evaluating Depth-limited Search omplete? Time omplexity Space omplexity No (If shallowest goal node beyond depth limit) No (If depth limit > depth of shallowest goal node and we expand a much longer path than the optimal one first) omplete? No (If shallowest goal node beyond depth limit) No (If depth limit > depth of shallowest goal node and we expand a much longer path than the optimal one first) Time omplexity O(b l ) Space omplexity 45 46 Evaluating Depth-limited Search omplete? No (If shallowest goal node beyond depth limit) No (If depth limit > depth of shallowest goal node and we expand a much longer path than the optimal one first) Time omplexity O(b l ) Iterative Deepening Depth-first Search Do DFS with depth limit 0, 1, 2, until a goal is found ombines benefits of both DFS and FS Space omplexity O(bl) 47 48 8

Iterative Deepening Depth-first Search Example Limit = 3 IDDFS Example Limit = 0 Limit = 1 Limit = 2 49 50 IDDFS Example Limit = 3 (ontinued) omplete? Evaluating Iterative Deepening Depth-first Search Time omplexity Space omplexity 51 52 Evaluating Iterative Deepening Depth-first Search Evaluating Iterative Deepening Depth-first Search omplete? omplete? Yes if the path cost is a nondecreasing function of the depth of the node Time omplexity Time omplexity Space omplexity Space omplexity 53 54 9

Evaluating Iterative Deepening Depth-first Search omplete? Yes if the path cost is a nondecreasing function of the depth of the node Time omplexity O(b d ) Evaluating Iterative Deepening Depth-first Search omplete? Yes if the path cost is a nondecreasing function of the depth of the node Time omplexity O(b d ) Space omplexity Space omplexity O(bd) 55 56 Isn t Iterative Deepening Wasteful? ctually, no! Most of the nodes are at the bottom level, doesn t matter that upper levels are generated multiple times. To see this, add up the 4th column below: Depth # of nodes # of times generated 1 b d (d)b 2 b 2 d-1 (d-1)b 2 : : : : d b d 1 (1)b d Total # of nodes generated at depth d 57 Is Iterative Deepening Wasteful? Total # of nodes generated by iterative deepening: (d)b + (d-1)b 2 + + (1)b d = O(b d+1 ) Total # of nodes generated by FS: b + b 2 + + b d + b d+1 - b = O(b d+1 ) In general, iterative deepening is the preferred uninformed search method when there is a large search space and the depth of the solution is not known 58 idirectional Search Run one search forward from the initial state Run another search backward from the goal Stop when the two searches meet in the middle idirectional Search Needs an efficiently computable Predecessor() function What if there are several goal states? reate a new dummy goal state whose predecessors are the actual goal states Difficult when the goal is an abstract description like no queen attacks another queen 59 60 10

Evaluating idirectional Search Evaluating idirectional Search omplete? Time omplexity Space omplexity omplete? Time omplexity Space omplexity and both directions use FS 61 62 Evaluating idirectional Search Evaluating idirectional Search omplete? and both directions use FS omplete? and both directions use FS Time omplexity Space omplexity Yes if the step costs are all identical and both directions use FS Yes if the step costs are all identical and both directions use FS Time omplexity O(b d/2 ) Space omplexity 63 64 Evaluating idirectional Search omplete? and both directions use FS Yes if the step costs are all identical and both directions use FS Time omplexity O(b d/2 ) Space omplexity O(b d/2 ) (t least one search tree must be kept in memory for the membership check) 65 voiding Repeated States Tradeoff between space and time! Need a closed list which stores every expanded node (memory requirements could make search infeasible) If the current node matches a node on the closed list, discard it (ie. discard the newly discovered path) We ll refer to this algorithm as GRPH-SERH Is this optimal? Only for uniform-cost search or breadth-first search with constant step costs. 66 11

GRPH-SERH Things You Should Know How to formalize a search problem How FS, US, DFS, DLS, IDS and idirectional search work Whether the above searches are complete and optimal plus their time and space complexity The pros and cons of the above searches 67 68 12