Uninformed search methods II.

Similar documents
Uninformed search methods II.

Uninformed search methods

Uninformed search methods

Artificial Intelligence. Uninformed Search Strategies

Uninformed Search (Ch )

Problem Solving Agents

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

CSE 3401: Intro to AI & LP Uninformed Search II

Uninformed Search (Ch )

Problem Solving as Search - I

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

Uninformed Search Strategies

Solving Problems by Searching chap3 1. Problem-Solving Agents

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

CSE 3402: Intro to Artificial Intelligence Uninformed Search II

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

SEARCH TREE. Generating the children of a node

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

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

COMP9414: Artificial Intelligence Uninformed Search

Representation. Representation. Representation. Representation. 8 puzzle.

Better Search Improved Uninformed Search CIS 32

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

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

Uninformed search strategies

CS 4649/7649 Robot Intelligence: Planning

CSC384: Introduction to Artificial Intelligence. Search

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

6.034 Artificial Intelligence

Depth-bounded Discrepancy Search

Transposition Table, History Heuristic, and other Search Enhancements

/435 Artificial Intelligence Fall 2015

CS 4649/7649 Robot Intelligence: Planning

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

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

G53CLP Constraint Logic Programming

COLREGS Based Collision Avoidance of Unmanned Surface Vehicles

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

Introduction to Algorithms

Optimization and Search. Jim Tørresen Optimization and Search

Incremental ARA*: An Anytime Incremental Search Algorithm For Moving Target Search. University of Southern California Singapore Management University

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

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

Planning and Acting in Partially Observable Stochastic Domains

CS 4649/7649 Robot Intelligence: Planning

CS 4649/7649 Robot Intelligence: Planning

Advanced Search Hill climbing

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

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

Application of Bayesian Networks to Shopping Assistance

CS 4649/7649 Robot Intelligence: Planning

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

CMPUT680 - Winter 2001

The Evolution of Transport Planning

Pedestrian Dynamics: Models of Pedestrian Behaviour

Algorithms and Data Structures

y ) s x x )(y i (x i r = 1 n 1 s y Statistics Lecture 7 Exploring Data , y 2 ,y n (x 1 ),,(x n ),(x 2 ,y 1 How two variables vary together

Provably Secure Camouflaging Strategy for IC Protection

Torpedoes on Target: EAs on Track

If you need to reinstall FastBreak Pro you will need to do a complete reinstallation and then install the update.

Maximum CPU utilization is obtained by multiprogramming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait

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

Running the Table: An AI for Computer Billiards

UNIT V 1. What are the traffic management measures? [N/D-13] 2. What is Transportation System Management (TSM)? [N/D-14]

Analysis of Professional Cycling Results as a Predictor for Future Success

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

Has no formal authority but Coaches the Development Team in self-organization and crossfunctionality

Heap Sort. Lecture 35. Robb T. Koether. Hampden-Sydney College. Mon, Apr 25, 2016

How to achieve fluid traffic

CS 351 Design of Large Programs Zombie House

Proceedings of Meetings on Acoustics

Roundabouts along Rural Arterials in South Africa

Characterizers for control loops

Efficient Minimization of Routing Cost in Delay Tolerant Networks

CRaMS. Controlled Resolution and Manipulation System. (a combination of mental image, module, sight, and memory) By JERRY STORY

Decision Trees. an Introduction

DESIGN AND ANALYSIS OF ALGORITHMS (DAA 2017)

Ch 12 Homework. Name: Homework problems are from the Serway & Vuille 10 th edition. Follow the instructions and show your work clearly. 1.

Tokyo: Simulating Hyperpath-Based Vehicle Navigations and its Impact on Travel Time Reliability

ISyE 3103 Introduction to Supply Chain Modeling: Logistics Summer 2012 Homework 8 Issued: July 11, 2012 Due: July 18, 2012

knn & Naïve Bayes Hongning Wang

Building an NFL performance metric

The Rule of Right-Angles: Exploring the term Angle before Depth

Queue analysis for the toll station of the Öresund fixed link. Pontus Matstoms *

Neural Networks II. Chen Gao. Virginia Tech Spring 2019 ECE-5424G / CS-5824

Author s Name Name of the Paper Session. Positioning Committee. Marine Technology Society. DYNAMIC POSITIONING CONFERENCE September 18-19, 2001

Bicycle and Pedestrian Planning in a Historically Car-Centric Culture: A Focus on Connectivity, Safety, & Accessibility

Determining Occurrence in FMEA Using Hazard Function

Incompressible Potential Flow. Panel Methods (3)

You should know how to find the gradient of a straight line from a diagram or graph. This next section is just for revision.

Decompression Method For Massive Compressed Files In Mobile Rich Media Applications

PREDICTING the outcomes of sporting events

Reliability. Introduction, 163 Quantifying Reliability, 163. Finding the Probability of Functioning When Activated, 163

Waves. harmonic wave wave equation one dimensional wave equation principle of wave fronts plane waves law of reflection

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

Bulgarian Olympiad in Informatics: Excellence over a Long Period of Time

Applying Bi-objective Shortest Path Methods to Model Cycle Route-choice

Optimal Weather Routing Using Ensemble Weather Forecasts

Ram Jagannathan, Joe Bared, Warren Hughes August 15th, 2006

Note: You will receive no credit for late submissions. To learn more, read your instructor's Grading Policy. A Law for Scuba Divers

Transcription:

CS 2710 Foundations of AI Lecture 4 Uninformed search methods II. Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Announcements Homework assignment 1 is out Due on Tuesday, September 12, 2017 before the lecture Report and programming part: Programming part involves Puzzle 8 problem. Assignment (programs and reports) must be done individually not collaboratively!!! Course web page: http://www.cs.pitt.edu/~milos/courses/cs2710/ Homework submission: Electronic via CourseWeb Separate submission of the report and programs 1

Uninformed methods Uninformed search methods use only information available in the problem definition readth-first search (FS) Depth-first search (DFS) Iterative deepening (IDA) i-directional search For the minimum cost path problem: Uniform cost search Properties of breadth-first search Completeness: Yes. The solution is reached if it exists. Optimality: Yes, for the shortest path. Time complexity: O( b d ) exponential in the depth of the solution d Memory (space) complexity: O( b d ) nodes are kept in the memory 2

Properties of depth-first search Completeness: No. If infinite loops can occur. Solution 1: set the maximum depth limit m Solution 2: prevent occurrence of cycles Optimality: No. Solution found first may not be the shortest possible. Time complexity: O( b m ) exponential in the maximum depth of the search tree m Memory (space) complexity: O(bm) linear in the maximum depth of the search tree m Elimination of state repeats While searching the state space for the solution we can encounter the same state many times. Question: Is it necessary to keep and expand all copies of states in the search tree? Two possible cases: (A) Cyclic state repeats Search tree () Non-cyclic state repeats A A 3

Elimination of cycles A A Case A: Corresponds to the path with a cycle A branch of the tree representing a path with a cycle cannot be the part of the shortest solution and can be safely eliminated. Elimination of non-cyclic state repeats Root of the search tree node-1 node-2 A state is reached by a longer than optimal path than it cannot be the part of the shortest solution and can be safely eliminated. 4

Elimination of state repeats with FS Search tree A A readth FS is well behaved with regard to all state repeats: we can safely eliminate the node that is associated with the state that has been expanded before Elimination of state repeats with DFS Root of the search tree node-1 node-2 Caveat: The order of node expansion does not imply correct elimination strategy Solution: we need to remember the length of the path in order to safely eliminate any of the nodes 5

Limited-depth depth first search Put the limit (l) on the depth of the depth-first exploration The limit is set externally and may not cover the solution Limit l=2 l Not explored Time complexity: Memory complexity: O( b l ) O(bl) l - is a given limit Iterative deepening algorithm (IDA) ased on the idea of the limited-depth search, but It resolves the difficulty of knowing the depth limit ahead of time. Idea: try all depth limits in an increasing order. That is, search first with the depth limit l=0, then l=1, l=2, and so on until the solution is reached Iterative deepening combines advantages of the depth-first and breadth-first search with only moderate computational overhead 6

Iterative deepening algorithm (IDA) Progressively increases the limit of the limited-depth depthfirst search Limit 0 Limit 1 Limit 2 Iterative deepening Cutoff depth = 0 Fagaras Rimnicu Lugoj Vilcea 7

Iterative deepening Cutoff depth = 0 Fagaras Rimnicu Lugoj Vilcea Iterative deepening Cutoff depth = 1 Fagaras Rimnicu Lugoj Vilcea 8

Iterative deepening Cutoff depth = 1 Fagaras Rimnicu Lugoj Vilcea Iterative deepening Cutoff depth = 1 Fagaras Rimnicu Lugoj Vilcea 9

Iterative deepening Cutoff depth = 1 Fagaras Rimnicu Lugoj Vilcea Iterative deepening Cutoff depth = 1 Fagaras Rimnicu Lugoj Vilcea 10

Iterative deepening Cutoff depth = 2 Fagaras Rimnicu Lugoj Vilcea Iterative deepening Cutoff depth = 2 Fagaras Rimnicu Lugoj Vilcea 11

Iterative deepening Cutoff depth = 2 Fagaras Rimnicu Lugoj Vilcea Iterative deepening Cutoff depth = 2 Fagaras Rimnicu Lugoj Vilcea 12

Iterative deepening Cutoff depth = 2 Fagaras Rimnicu Lugoj Vilcea Iterative deepening Cutoff depth = 2 Fagaras Rimnicu Lugoj Vilcea 13

Completeness:? Properties of IDA Optimality:? Time complexity:? Memory (space) complexity:? Properties of IDA Completeness: Yes. The solution is reached if it exists. (the same as FS when limit is always increased by 1) Optimality: Time complexity:? Memory (space) complexity:? 14

Properties of IDA Completeness: Yes. The solution is reached if it exists. (the same as FS when limit is always increased by 1) Optimality: Yes, for the shortest path. (the same as FS) Time complexity:? Memory (space) complexity:? IDA time complexity Level 0 Level 1 Level 2 Level d d O (1) O (b) O ( b 2 ) O( b d ) O( b d ) 15

Properties of IDA Completeness: Yes. The solution is reached if it exists. (the same as FS) Optimality: Yes, for the shortest path. (the same as FS) Time complexity: 2 d O(1) O( b ) O( b ) O( b ) O( b exponential in the depth of the solution d worse than FS, but asymptotically the same Memory (space) complexity:? 1 d ) IDA memory complexity Level 0 Level 1 Level 2 Level d d O (1) O (b) O ( 2b) O(db) O(db) 16

Properties of IDA Completeness: Yes. The solution is reached if it exists. (the same as FS) Optimality: Yes, for the shortest path. (the same as FS) Time complexity: 2 d O(1) O( b ) O( b ) O( b ) O( b exponential in the depth of the solution d worse than FS, but asymptotically the same Memory (space) complexity: O(db) 1 d much better than FS ) i-directional search In some search problems we want to find the path from the initial state to the unique goal state (e.g. traveler problem) i-directional search idea: Initial state Goal state Search both from the initial state and the goal state; Use inverse operators for the goal-initiated search. 17

i-directional search Why bidirectional search? What is the benefit? Assume FS.? Initial state Goal state i-directional search Why bidirectional search? What is the benefit? Assume FS. Cuts the depth of the search space by half Initial state Goal state d/2 d/2 O(b d/2 ) Time and memory complexity 18

i-directional search Why bidirectional search? Assume FS. It cuts the depth of the search tree by half. Caveat: Merge the solutions. Initial state Goal state Equal? How? i-directional search Why bidirectional search? Assume FS. It cuts the depth of the search tree by half. Caveat: Merge the solutions. Initial state Goal state Equal? How? The hash structure remembers the side of the tree the state was expanded first time. If the same state is reached from other side we have a solution. 19

Minimum cost path search Traveler example with distances [km] Optimal path: the shortest distance path between the initial and destination city Searching for the minimum cost path General minimum cost path-search problem: adds weights or costs to operators (links) Search strategy: Intelligent expansion of the search tree should be driven by the cost of the current (partially) built path Implementation: Path cost function for node n : g(n) length of the path represented by the search tree branch starting at the root of the tree (initial state) to n Search strategy: Expand the leaf node with the minimum g(n) first Can be implemented by a priority queue 20

Searching for the minimum cost path The basic algorithm for finding the minimum cost path: Dijkstra s shortest path In AI, the strategy goes under the name Uniform cost search Note: When operator costs are all equal to 1 the uniform cost search is equivalent to the breadth first search FS Uniform cost search Expand the node with the minimum path cost first Implementation: a priority queue 0 queue g(n) 0 21

Uniform cost search queue g(n) 75 118 140 75 140 0 118 75 140 118 Uniform cost search g(n) 75 140 0 118 queue 118 140 146 150 75 140 118 75 71 150 146 22

Uniform cost search g(n) 0 queue 140 146 150 Lugoj 129 236 75 140 118 75 75 71 140 118 118 111 Lugoj 150 146 236 229 Properties of the uniform cost search Completeness: assume that operator costs are non-negative? Optimality:? Time complexity:? Memory (space) complexity:? 23

Properties of the uniform cost search Completeness: Yes, assuming that operator costs are nonnegative (the cost of path never decreases) g( n) g(successor( n)) Optimality: Yes. Returns the least-cost path. Time complexity: number of nodes with the cost g(n) smaller than the optimal cost Memory (space) complexity: number of nodes with the cost g(n) smaller than the optimal cost Elimination of state repeats Idea: A node is redundant and can be eliminated if there is another node with exactly the same state and a shorter path from the initial state Root of the search tree g(node-1) =120 g(node-2) =95 node-2 node-1 24

Elimination of state repeats Idea: A node is redundant and can be eliminated if there is another node with exactly the same state and a shorter path from the initial state Root of the search tree g(node-1) =120 g(node-2) =95 node-2 node-1 Elimination of state repeats Idea: A node is redundant and can be eliminated if there is another node with exactly the same state and a shorter path from the initial state g(node-1) =120 g(node-2) =95 node-2 Root of the search tree Assuming positive costs: If the state has already been expanded, is there a shorter path to that node? node-1 25

Elimination of state repeats Idea: A node is redundant and can be eliminated if there is another node with exactly the same state and a shorter path from the initial state g(node-1) =120 g(node-2) =95 node-2 Assuming positive costs: If the state has already been expanded, is there a shorter path to that node? No! Implementation: Marking with the hash table Root of the search tree node-1 26