Introduction to Artificial Intelligence. Problem Solving and Search

Similar documents
Introduction to Artificial Intelligence. Problem Solving and Search

Introduction to Artificial Intelligence. Learning from Oberservations

Introduction to Artificial Intelligence. Learning from Oberservations

22/9/2013. Acknowledgement. Outline of the Lecture. What is an Agent? EH2750 Computer Applications in Power Systems, Advanced Course. output.

Introduction to Artificial Intelligence. Planning

Lecture 3: Nondeterministic Computation

Post-Routing Layer Assignment for Double Patterning

Achieving Faster Time to Tapeout with In-Design, Signoff-Quality Metal Fill

A Parametric Autoregressive Model for the Extraction of Electric Network Frequency Fluctuations in Audio Forensic Authentication

Optimization of Multi-Channel BCH Error Decoding for Common Cases. Russell Dill Master's Thesis Defense April 20, 2015

Transportation Process For BaBar

data and is used in digital networks and storage devices. CRC s are easy to implement in binary

ORF 307: Lecture 14. Linear Programming: Chapter 14: Network Flows: Algorithms

A Discrete Time Markov Chain Model for High Throughput Bidirectional Fano Decoders

ORTHOGONAL frequency division multiplexing

Minimax Disappointment Video Broadcasting

Hardware Implementation of Viterbi Decoder for Wireless Applications

AUDIO compression has been fundamental to the success

Instruction Level Parallelism Part III

Math 8 Assignment Log. Finish Discussion on Course Outline. Activity Section 2.1 Congruent Figures Due Date: In-Class: Directions for Section 2.

Asynchronous IC Interconnect Network Design and Implementation Using a Standard ASIC Flow

Cryptography CS 555. Topic 5: Pseudorandomness and Stream Ciphers. CS555 Spring 2012/Topic 5 1

Cost-Aware Live Migration of Services in the Cloud

Challenges for OLED Deposition by Vacuum Thermal Evaporation. D. W. Gotthold, M. O Steen, W. Luhman, S. Priddy, C. Counts, C.

Open loop tracking of radio occultation signals in the lower troposphere

A Parametric Autoregressive Model for the Extraction of Electric Network Frequency Fluctuations in Audio Forensic Authentication

Yale University Department of Computer Science

140 IEEE TRANSACTIONS ON VERY LARGE SCALE INTEGRATION (VLSI) SYSTEMS, VOL. 12, NO. 2, FEBRUARY 2004

Hybrid Discrete-Continuous Computer Architectures for Post-Moore s-law Era

Investigation on Technical Feasibility of Stronger RS FEC for 400GbE

Processes for the Intersection

Removal of Decaying DC Component in Current Signal Using a ovel Estimation Algorithm

Informatique Fondamentale IMA S8

ORF 307 Network Flows: Algorithms

Tape. Tape head. Control Unit. Executes a finite set of instructions

The CHIME Pathfinder and Correlator. Matt Dobbs for the CHIME Collaboration

Decision-Maker Preference Modeling in Interactive Multiobjective Optimization

0 The work does not reach a standard described by the descriptors below.

Compressed-Sensing-Enabled Video Streaming for Wireless Multimedia Sensor Networks Abstract:

CHAPTER 7 CONCLUSION AND SUGGESTION

EVALUATION KIT AVAILABLE 12.5Gbps Settable Receive Equalizer +2.5V +3.3V V CC1 V CC. 30in OF FR-4 STRIPLINE OR MICROSTRIP TRANSMISSION LINE SDI+ SDI-

Instruction Level Parallelism Part III

SIMULATION MODELING FOR QUALITY AND PRODUCTIVITY IN STEEL CORD MANUFACTURING

An Experimental Comparison of Fast Algorithms for Drawing General Large Graphs

Xpress-Tuner User guide

Linköping University Post Print. Quasi-Static Voltage Scaling for Energy Minimization with Time Constraints

Musical and automatized

Chapter 5 Synchronous Sequential Logic

GENCOA Key Company Facts. GENCOA is a private limited company (Ltd) Founded 1995 by Dr Dermot Monaghan. Located in Liverpool, UK

OPERATIONS SEQUENCING IN A CABLE ASSEMBLY SHOP

/$ IEEE

A High- Speed LFSR Design by the Application of Sample Period Reduction Technique for BCH Encoder

SRV02-Series. Ball & Beam. User Manual

Outline. 1 Reiteration. 2 Dynamic scheduling - Tomasulo. 3 Superscalar, VLIW. 4 Speculation. 5 ILP limitations. 6 What we have done so far.

Brian Holden Kandou Bus, S.A. IEEE GE Study Group September 2, 2013 York, United Kingdom

Advanced Pipelining and Instruction-Level Paralelism (2)

TEST PATTERNS COMPRESSION TECHNIQUES BASED ON SAT SOLVING FOR SCAN-BASED DIGITAL CIRCUITS

Type-2 Fuzzy Logic Sensor Fusion for Fire Detection Robots

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

Filterbank Reconstruction of Bandlimited Signals from Nonuniform and Generalized Samples

Latch-Based Performance Optimization for FPGAs. Xiao Teng

Advanced Digital Logic Design EECS 303

ni.com Digital Signal Processing for Every Application

cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain

High Performance Microprocessor Design and Automation: Overview, Challenges and Opportunities IBM Corporation

Interactive Methods in Multiobjective Optimization 1: An Overview

Heuristic Search & Local Search

NV Series PA Modification for Improved Performance in FM+HD and HD Modes

FX Basics. Time Effects STOMPBOX DESIGN WORKSHOP. Esteban Maestre. CCRMA Stanford University July 2011

DELTA MODULATION AND DPCM CODING OF COLOR SIGNALS

Appendix Y: Queuing Models and Applications

Fourier Transforms 1D

Optimizing BNC PCB Footprint Designs for Digital Video Equipment

Performance comparison study for Rx vs Tx based equalization for C2M links

Digital Signal Processing Detailed Course Outline

POST-PROCESSING FIDDLE : A REAL-TIME MULTI-PITCH TRACKING TECHNIQUE USING HARMONIC PARTIAL SUBTRACTION FOR USE WITHIN LIVE PERFORMANCE SYSTEMS

Business Intelligence & Process Modelling

Instance and System: a Figure and its 2 18 Variations

A Model of Musical Motifs

A Model of Musical Motifs

On-Supporting Energy Balanced K-Barrier Coverage In Wireless Sensor Networks

Route optimization using Hungarian method combined with Dijkstra's in home health care services

DIMACS Implementation Challenges 1 Network Flows and Matching, Clique, Coloring, and Satisability, Parallel Computing on Trees and

Powerful Software Tools and Methods to Accelerate Test Program Development A Test Systems Strategies, Inc. (TSSI) White Paper.

Applications of ENF Criterion in Forensic Audio, Video, Computer and Telecommunication Analysis

Algorithmic Music Composition

Introduction to Probability Exercises

High-Power Amplifier (HPA) Configuration Selection

Auto classification and simulation of mask defects using SEM and CAD images

Increasing Capacity of Cellular WiMAX Networks by Interference Coordination

HYBRID CONCATENATED CONVOLUTIONAL CODES FOR DEEP SPACE MISSION

Design for Testability

EITF35: Introduction to Structured VLSI Design

Speech and Speaker Recognition for the Command of an Industrial Robot

Comparative Study of JPEG2000 and H.264/AVC FRExt I Frame Coding on High-Definition Video Sequences

A Fast Constant Coefficient Multiplier for the XC6200

Timing with Virtual Signal Synchronization for Circuit Performance and Netlist Security

Adaptive decoding of convolutional codes

Solution of Linear Systems

Cascadable 4-Bit Comparator

Transcription:

Introduction to Artificial Intelligence Problem Solving and Search Bernhard Beckert UNIVESITÄT KOBLENZ-LANDAU Wintersemester 2003/2004 B. Beckert: Einführung in die KI / KI für IM p.1

Outline Problem solving Problem types Problem formulation Example problems Basic search algorithms B. Beckert: Einführung in die KI / KI für IM p.2

Problem solving Offline problem solving Acting only with complete knowledge of problem and solution Online problem solving Acting without complete knowledge Here Here we are concerned with offline problem solving only B. Beckert: Einführung in die KI / KI für IM p.3

Example: Travelling in omania Scenario On holiday in omania; currently in Arad Flight leaves tomorrow from Bucharest B. Beckert: Einführung in die KI / KI für IM p.4

Example: Travelling in omania Scenario On holiday in omania; currently in Arad Flight leaves tomorrow from Bucharest Goal Be in Bucharest B. Beckert: Einführung in die KI / KI für IM p.4

Example: Travelling in omania Scenario On holiday in omania; currently in Arad Flight leaves tomorrow from Bucharest Goal Be in Bucharest Formulate problem States: various cities Actions: drive between cities B. Beckert: Einführung in die KI / KI für IM p.4

Example: Travelling in omania Scenario On holiday in omania; currently in Arad Flight leaves tomorrow from Bucharest Goal Be in Bucharest Formulate problem States: various cities Actions: drive between cities Solution Appropriate sequence of cities e.g.: Arad, Sibiu, Fagaras, Bucharest B. Beckert: Einführung in die KI / KI für IM p.4

Example: Travelling in omania Oradea Neamt Zerind Arad Iasi Sibiu Fagaras Vaslui Timisoara imnicu Vilcea Lugoj Pitesti Mehadia Urziceni Hirsova Dobreta Craiova Bucharest Giurgiu Eforie B. Beckert: Einführung in die KI / KI für IM p.5

Problem types Single-state problem observable (at least the initial state) deterministic static discrete Multiple-state problem partially observable (initial state not observable) deterministic static discrete Contingency problem partially observable (initial state not observable) non-deterministic B. Beckert: Einführung in die KI / KI für IM p.6

Example: vacuum-cleaner world Single-state Start in: 5 Solution: 1 2 3 4 5 6 7 8 B. Beckert: Einführung in die KI / KI für IM p.7

Example: vacuum-cleaner world Single-state Start in: 5 Solution: [right, suck] 1 2 3 4 5 6 7 8 B. Beckert: Einführung in die KI / KI für IM p.7

Example: vacuum-cleaner world Single-state Start in: 5 Solution: [right, suck] 1 2 3 4 Multiple-state Start in: {1,2,3,4,5,6,7,8} 5 6 7 8 Solution: B. Beckert: Einführung in die KI / KI für IM p.7

Example: vacuum-cleaner world Single-state Start in: 5 Solution: [right, suck] 1 2 3 4 Multiple-state Start in: {1,2,3,4,5,6,7,8} 5 6 7 8 Solution: [right, suck, left, suck] right {2,4,6,8} suck {4,8} left {3,7} suck {7} B. Beckert: Einführung in die KI / KI für IM p.7

Example: vacuum-cleaner world 1 2 Contingency Murphy s Law: suck can dirty a clean carpet Local sensing: dirty/not dirty at location only Start in: {1,3} 3 4 5 6 7 8 Solution: B. Beckert: Einführung in die KI / KI für IM p.8

Example: vacuum-cleaner world 1 2 Contingency Murphy s Law: suck can dirty a clean carpet Local sensing: dirty/not dirty at location only Start in: {1,3} 3 4 5 6 7 8 Solution: [suck, right, suck] suck {5,7} right {6,8} suck {6,8} Improvement: [suck, right, if dirt then suck] (decide whether in 6 or 8 using local sensing) B. Beckert: Einführung in die KI / KI für IM p.8

Single-state problem formulation Defined by the following four items 1. Initial state Example: Arad 2. Successor function S Example: S(Arad) = { gozerind, Zerind, gosibiu, Sibiu,... } 3. Goal test Example: x = Bucharest (explicit test) nodirt(x) (implicit test) 4. Path cost (optional) Example: sum of distances, number of operators executed, etc. B. Beckert: Einführung in die KI / KI für IM p.9

Single-state problem formulation Solution A sequence of operators leading from the initial state to a goal state B. Beckert: Einführung in die KI / KI für IM p.10

Selecting a state space Abstraction eal world is absurdly complex State space must be abstracted for problem solving (Abstract) state Set of real states (Abstract) operator Complex combination of real actions Example: Arad Zerind represents complex set of possible routes (Abstract) solution Set of real paths that are solutions in the real world B. Beckert: Einführung in die KI / KI für IM p.11

Example: The 8-puzzle 7 2 4 51 2 3 5 6 4 5 6 8 3 1 7 8 Start State Goal State States Actions Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.12

Example: The 8-puzzle 7 2 4 51 2 3 5 6 4 5 6 8 3 1 7 8 Start State Goal State States integer locations of tiles Actions Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.12

Example: The 8-puzzle 7 2 4 51 2 3 5 6 4 5 6 8 3 1 7 8 Start State Goal State States Actions integer locations of tiles left, right, up, down Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.12

Example: The 8-puzzle 7 2 4 51 2 3 5 6 4 5 6 8 3 1 7 8 Start State Goal State States Actions Goal test integer locations of tiles left, right, up, down = goal state? Path cost B. Beckert: Einführung in die KI / KI für IM p.12

Example: The 8-puzzle 7 2 4 51 2 3 5 6 4 5 6 8 3 1 7 8 Start State Goal State States Actions Goal test Path cost integer locations of tiles left, right, up, down = goal state? 1 per move B. Beckert: Einführung in die KI / KI für IM p.12

Example: Vacuum-cleaner L L S S L L L L S S S S L L S S States Actions Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.13

Example: Vacuum-cleaner L L S S L L L L S S S S L L S S States integer dirt and robot locations Actions Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.13

Example: Vacuum-cleaner L L S S L L L L S S S S L L S S States Actions integer dirt and robot locations left, right, suck, noop Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.13

Example: Vacuum-cleaner L L S S L L L L S S S S L L S S States Actions Goal test integer dirt and robot locations left, right, suck, noop not dirty? Path cost B. Beckert: Einführung in die KI / KI für IM p.13

Example: Vacuum-cleaner L L S S L L L L S S S S L L S S States Actions Goal test integer dirt and robot locations left, right, suck, noop not dirty? Path cost 1 per operation (0 for noop) B. Beckert: Einführung in die KI / KI für IM p.13

Example: obotic assembly P States Actions Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.14

Example: obotic assembly P States real-valued coordinates of robot joint angles and parts of the object to be assembled Actions Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.14

Example: obotic assembly P States real-valued coordinates of robot joint angles and parts of the object to be assembled Actions continuous motions of robot joints Goal test Path cost B. Beckert: Einführung in die KI / KI für IM p.14

Example: obotic assembly P States real-valued coordinates of robot joint angles and parts of the object to be assembled Actions Goal test continuous motions of robot joints assembly complete? Path cost B. Beckert: Einführung in die KI / KI für IM p.14

Example: obotic assembly P States real-valued coordinates of robot joint angles and parts of the object to be assembled Actions Goal test Path cost continuous motions of robot joints assembly complete? time to execute B. Beckert: Einführung in die KI / KI für IM p.14

Tree search algorithms Offline Simulated exploration of state space in a search tree by generating successors of already-explored states function TEE-SEACH( problem, strategy) returns a solution or failure initialize the search tree using the initial state of problem loop do if there are no candidates for expansion then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solution else expand the node and add the resulting nodes to the search tree end B. Beckert: Einführung in die KI / KI für IM p.15

Tree search: Example Arad Sibiu Timisoara Zerind Arad Fagaras Oradea imnicu Vilcea Arad Lugoj Arad Oradea B. Beckert: Einführung in die KI / KI für IM p.16

Tree search: Example Arad Sibiu Timisoara Zerind Arad Fagaras Oradea Arad Lugoj Arad imnicu Vilcea Oradea B. Beckert: Einführung in die KI / KI für IM p.16

Tree search: Example Arad Sibiu Timisoara Zerind Arad Fagaras Oradea imnicu Vilcea Arad Lugoj Arad Oradea B. Beckert: Einführung in die KI / KI für IM p.16

Implementation: States vs. nodes State A (representation of) a physical configuration Node A data structure constituting part of a search tree (includes parent, children, depth, path cost, etc.) parent State 5 4 Node depth = 6 g = 6 6 1 8 7 3 2 state children B. Beckert: Einführung in die KI / KI für IM p.17

Implementation of search algorithms function TEE-SEACH( problem, fringe) returns a solution or failure fringe INSET(MAKE-NODE(INITIAL-STATE[problem]),fringe) loop do if fringe is empty then return failure node EMOVE-FIST(fringe) if GOAL-TEST[problem] applied to STATE(node) succeeds then return node else fringe INSET-ALL(EXPAND(node, problem), fringe) end fringe State Expand queue of nodes not yet considered gives the state that is represented by node creates new nodes by applying possible actions to node B. Beckert: Einführung in die KI / KI für IM p.18

Search strategies Strategy Defines the order of node expansion Important properties of strategies completeness time complexity space complexity optimality does it always find a solution if one exists? number of nodes generated/expanded maximum number of nodes in memory does it always find a least-cost solution? Time and space complexity measured in terms of b d maximum branching factor of the search tree depth of a solution with minimal distance to root m maximum depth of the state space (may be ) B. Beckert: Einführung in die KI / KI für IM p.19

Uninformed search strategies Uninformed search Use only the information available in the problem definition Frequently used strategies Breadth-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening search B. Beckert: Einführung in die KI / KI für IM p.20

Breadth-first search Idea Expand shallowest unexpanded node Implementation fringe is a FIFO queue, i.e. successors go in at the end of the queue A B C D E F G B. Beckert: Einführung in die KI / KI für IM p.21

Breadth-first search Idea Expand shallowest unexpanded node Implementation fringe is a FIFO queue, i.e. successors go in at the end of the queue A B C D E F G B. Beckert: Einführung in die KI / KI für IM p.21

Breadth-first search Idea Expand shallowest unexpanded node Implementation fringe is a FIFO queue, i.e. successors go in at the end of the queue A B C D E F G B. Beckert: Einführung in die KI / KI für IM p.21

Breadth-first search Idea Expand shallowest unexpanded node Implementation fringe is a FIFO queue, i.e. successors go in at the end of the queue A B C D E F G B. Beckert: Einführung in die KI / KI für IM p.21

Breadth-first search: Example omania Arad B. Beckert: Einführung in die KI / KI für IM p.22

Breadth-first search: Example omania Arad Zerind Sibiu Timisoara B. Beckert: Einführung in die KI / KI für IM p.22

Breadth-first search: Example omania Arad Zerind Sibiu Timisoara Arad Oradea B. Beckert: Einführung in die KI / KI für IM p.22

Breadth-first search: Example omania Arad Zerind Sibiu Timisoara Arad Oradea Arad Oradea imnicu Fagaras Vilcea Arad Lugoj B. Beckert: Einführung in die KI / KI für IM p.22

Breadth-first search: Properties Complete Time Space Optimal B. Beckert: Einführung in die KI / KI für IM p.23

Breadth-first search: Properties Complete Yes (if b is finite) Time Space Optimal B. Beckert: Einführung in die KI / KI für IM p.23

Breadth-first search: Properties Complete Yes (if b is finite) Time 1 + b + b 2 + b 3 +... + b d + b(b d 1) O(b d+1 ) i.e. exponential in d Space Optimal B. Beckert: Einführung in die KI / KI für IM p.23

Breadth-first search: Properties Complete Yes (if b is finite) Time 1 + b + b 2 + b 3 +... + b d + b(b d 1) O(b d+1 ) Space O(b d+1 ) i.e. exponential in d keeps every node in memory Optimal B. Beckert: Einführung in die KI / KI für IM p.23

Breadth-first search: Properties Complete Yes (if b is finite) Time 1 + b + b 2 + b 3 +... + b d + b(b d 1) O(b d+1 ) Space O(b d+1 ) i.e. exponential in d keeps every node in memory Optimal Yes (if cost = 1 per step), not optimal in general B. Beckert: Einführung in die KI / KI für IM p.23

Breadth-first search: Properties Complete Yes (if b is finite) Time 1 + b + b 2 + b 3 +... + b d + b(b d 1) O(b d+1 ) Space O(b d+1 ) i.e. exponential in d keeps every node in memory Optimal Yes (if cost = 1 per step), not optimal in general Disadvantage Space is the big problem (can easily generate nodes at 5MB/sec so 24hrs = 430GB) B. Beckert: Einführung in die KI / KI für IM p.23

omania with step costs in km Oradea 71 Neamt Zerind 75 151 Arad 140 118 Timisoara 111 Lugoj 70 Mehadia 75 120 Dobreta Sibiu 99 Fagaras 80 imnicu Vilcea 97 Pitesti 211 146 101 85 138 Bucharest 90 Craiova Giurgiu 87 Iasi 92 142 98 Urziceni Vaslui Hirsova 86 Eforie Straight line distance to Bucharest Arad 366 Bucharest 0 Craiova 160 Dobreta 242 Eforie 161 Fagaras 178 Giurgiu 77 Hirsova 151 Iasi 226 Lugoj 244 Mehadia 241 Neamt 234 Oradea 380 Pitesti 98 imnicu Vilcea 193 Sibiu 253 Timisoara 329 Urziceni 80 Vaslui 199 Zerind 374 B. Beckert: Einführung in die KI / KI für IM p.24

Uniform-cost search Idea Expand least-cost unexpanded node (costs added up over paths from root to leafs) Implementation fringe is queue ordered by increasing path cost Note Equivalent to depth-first search if all step costs are equal B. Beckert: Einführung in die KI / KI für IM p.25

Uniform-cost search Arad B. Beckert: Einführung in die KI / KI für IM p.26

Uniform-cost search Arad 75 140 118 Zerind Sibiu Timisoara B. Beckert: Einführung in die KI / KI für IM p.26

Uniform-cost search Arad 75 140 118 Zerind Sibiu Timisoara 75 71 Arad Oradea B. Beckert: Einführung in die KI / KI für IM p.26

Uniform-cost search Arad 75 140 118 Zerind Sibiu Timisoara 75 71 118 111 Arad Oradea Arad Lugoj B. Beckert: Einführung in die KI / KI für IM p.26

Uniform-cost search: Properties Complete Time Space Optimal B. Beckert: Einführung in die KI / KI für IM p.27

Uniform-cost search: Properties Complete Yes (if step costs positive) Time Space Optimal B. Beckert: Einführung in die KI / KI für IM p.27

Uniform-cost search: Properties Complete Yes (if step costs positive) Time # of nodes with past-cost less than that of optimal solution Space Optimal B. Beckert: Einführung in die KI / KI für IM p.27

Uniform-cost search: Properties Complete Yes (if step costs positive) Time Space # of nodes with past-cost less than that of optimal solution # of nodes with past-cost less than that of optimal solution Optimal B. Beckert: Einführung in die KI / KI für IM p.27

Uniform-cost search: Properties Complete Yes (if step costs positive) Time Space Optimal # of nodes with past-cost less than that of optimal solution # of nodes with past-cost less than that of optimal solution Yes B. Beckert: Einführung in die KI / KI für IM p.27

Depth-first search Idea Expand deepest unexpanded node Implementation fringe is a LIFO queue (a stack), i.e. successors go in at front of queue Note Depth-first search can perform infinite cyclic excursions Need a finite, non-cyclic search space (or repeated-state checking) B. Beckert: Einführung in die KI / KI für IM p.28

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search A B C D E F G H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.29

Depth-first search: Example omania Arad B. Beckert: Einführung in die KI / KI für IM p.30

Depth-first search: Example omania Arad Zerind Sibiu Timisoara B. Beckert: Einführung in die KI / KI für IM p.30

Depth-first search: Example omania Arad Zerind Sibiu Timisoara Arad Oradea B. Beckert: Einführung in die KI / KI für IM p.30

Depth-first search: Example omania Arad Zerind Sibiu Timisoara Arad Oradea Zerind Sibiu Timisoara B. Beckert: Einführung in die KI / KI für IM p.30

Depth-first search: Properties Complete Time Space Optimal B. Beckert: Einführung in die KI / KI für IM p.31

Depth-first search: Properties Complete Yes: if state space finite No: if state contains infinite paths or loops Time Space Optimal B. Beckert: Einführung in die KI / KI für IM p.31

Depth-first search: Properties Complete Yes: if state space finite No: if state contains infinite paths or loops Time O(b m ) Space Optimal B. Beckert: Einführung in die KI / KI für IM p.31

Depth-first search: Properties Complete Yes: if state space finite No: if state contains infinite paths or loops Time O(b m ) Space O(bm) (i.e. linear space) Optimal B. Beckert: Einführung in die KI / KI für IM p.31

Depth-first search: Properties Complete Yes: if state space finite No: if state contains infinite paths or loops Time O(b m ) Space O(bm) (i.e. linear space) Optimal No B. Beckert: Einführung in die KI / KI für IM p.31

Depth-first search: Properties Complete Yes: if state space finite No: if state contains infinite paths or loops Time O(b m ) Space O(bm) (i.e. linear space) Optimal No Disadvantage Time terrible if m much larger than d Advantage Time may be much less than breadth-first search if solutions are dense B. Beckert: Einführung in die KI / KI für IM p.31

Iterative deepening search Depth-limited search Depth-first search with depth limit B. Beckert: Einführung in die KI / KI für IM p.32

Iterative deepening search Depth-limited search Depth-first search with depth limit Iterative deepening search Depth-limit search with ever increasing limits function ITEATIVE-DEEPENING-SEACH( problem) returns a solution or failure inputs: problem /* a problem */ for depth 0 to do result DEPTH-LIMITED-SEACH( problem, depth) if result cutoff then return result end B. Beckert: Einführung in die KI / KI für IM p.32

Iterative deepening search with depth limit 0 Limit = 0 A A B. Beckert: Einführung in die KI / KI für IM p.33

Iterative deepening search with depth limit 1 Limit = 1 A A A A B C B C B C B C B. Beckert: Einführung in die KI / KI für IM p.34

Iterative deepening search with depth limit 2 Limit = 2 A A A A B C B C B C B C D E F G D E F G D E F G D E F G A A A A B C B C B C B C D E F G D E F G D E F G D E F G B. Beckert: Einführung in die KI / KI für IM p.35

Iterative deepening search with depth limit 3 Limit = 3 A A A A B C B C B C B C D E F G D E F G D E F G D E F G H I J K L M N O H I J K L M N O H I J K L M N O H I J K L M N O A A A A B C B C B C B C D E F G D E F G D E F G D E F G H I J K L M N O H I J K L M N O H I J K L M N O H I J K L M N O A A A A B C B C B C B C D E F G D E F G D E F G D E F G H I J K L M N O H I J K L M N O H I J K L M N O H I J K L M N O B. Beckert: Einführung in die KI / KI für IM p.36

Iterative deepening search: Example omania with l = 0 Arad B. Beckert: Einführung in die KI / KI für IM p.37

Iterative deepening search: Example omania with l = 1 Arad B. Beckert: Einführung in die KI / KI für IM p.38

Iterative deepening search: Example omania with l = 1 Arad Zerind Sibiu Timisoara B. Beckert: Einführung in die KI / KI für IM p.38

Iterative deepening search: Example omania with l = 2 Arad B. Beckert: Einführung in die KI / KI für IM p.39

Iterative deepening search: Example omania with l = 2 Arad Zerind Sibiu Timisoara B. Beckert: Einführung in die KI / KI für IM p.39

Iterative deepening search: Example omania with l = 2 Arad Zerind Sibiu Timisoara Arad Oradea B. Beckert: Einführung in die KI / KI für IM p.39

Iterative deepening search: Example omania with l = 2 Arad Zerind Sibiu Timisoara Arad Oradea Arad Oradea Fagaras imnicu Vilcea B. Beckert: Einführung in die KI / KI für IM p.39

Iterative deepening search: Example omania with l = 2 Arad Zerind Sibiu Timisoara Arad Oradea Arad Oradea Fagaras imnicu Vilcea Arad Lugoj B. Beckert: Einführung in die KI / KI für IM p.39

Iterative deepening search: Properties Complete Time Space Optimal B. Beckert: Einführung in die KI / KI für IM p.40

Iterative deepening search: Properties Complete Yes Time Space Optimal B. Beckert: Einführung in die KI / KI für IM p.40

Iterative deepening search: Properties Complete Yes Time (d + 1)b 0 + db 1 + (d 1)b 2 +... + b d O(b d+1 ) Space Optimal B. Beckert: Einführung in die KI / KI für IM p.40

Iterative deepening search: Properties Complete Yes Time (d + 1)b 0 + db 1 + (d 1)b 2 +... + b d O(b d+1 ) Space O(bd) Optimal B. Beckert: Einführung in die KI / KI für IM p.40

Iterative deepening search: Properties Complete Yes Time (d + 1)b 0 + db 1 + (d 1)b 2 +... + b d O(b d+1 ) Space O(bd) Optimal Yes (if step cost = 1) B. Beckert: Einführung in die KI / KI für IM p.40

Iterative deepening search: Properties Complete Yes Time (d + 1)b 0 + db 1 + (d 1)b 2 +... + b d O(b d+1 ) Space O(bd) Optimal Yes (if step cost = 1) (Depth-First) Iterative-Deepening Search often used in practice for search spaces of large, infinite, or unknown depth. B. Beckert: Einführung in die KI / KI für IM p.40

Comparison Criterion Breadthfirst Uniformcost Depthfirst Iterative deepening Complete? Yes Yes No Yes Time b d+1 b d b m b d Space b d+1 b d bm bd Optimal? Yes Yes No Yes B. Beckert: Einführung in die KI / KI für IM p.41

Comparison Breadth-first search Iterative deepening search B. Beckert: Einführung in die KI / KI für IM p.42

Summary Problem formulation usually requires abstracting away real-world details to define a state space that can feasibly be explored Variety of uninformed search strategies Iterative deepening search uses only linear space and not much more time than other uninformed algorithms B. Beckert: Einführung in die KI / KI für IM p.43