Iterative Deepening Search Introduction to AI. Iterative deepening search The problem with depth-limited search is deciding on a suitable depth parameter.

Slides:



Advertisements
Similar presentations
Traveling Salesperson Problem
Advertisements

Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
G5AIAI Introduction to AI
Tree Searching. Tree searches A tree search starts at the root and explores nodes from there, looking for a goal node (a node that satisfies certain conditions,
G5BAIM Artificial Intelligence Methods Graham Kendall Blind Searches.
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
Uniform Cost Search Introduction to AI. Uniform cost search A breadth-first search finds the shallowest goal state and will therefore be the cheapest.
Artificial Intelligence (CS 461D)
September 26, 2012Introduction to Artificial Intelligence Lecture 7: Search in State Spaces I 1 After our “Haskell in a Nutshell” excursion, let us move.
SEARCH TECHNIQUES.
Lecture 3 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Artificial Intelligence for Games Depth limited search Patrick Olivier
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Breadth-First Searches Introduction to AI. Breadth-First Search Using a breadth-first strategy we expand the root level first and then we expand all those.
17-Jun-15 Searching in BeeperHunt (Mostly minor variations on old slides)
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Using Search in Problem Solving
Search  Exhaustive/Blind Search Methods Depth First Search Breadth First Search  Heuristic Methods Hill Climbing Beam Search Best First Search…
/t/ / I d/ /d/ Try Again Go on /t/ / I d/ /d/
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l inference l all learning.
Artificial Intelligence Search Problem. Search is a problem-solving technique to explores successive stages in problem-solving process.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 02 : Search.
Lecture 3: Uninformed Search
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Unit 7 Number Systems and Bases Presentation 1Binary and Base 10 Presentation 2Adding Binary Numbers Presentation 3Subtracting Binary Numbers Presentation.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches - Introduction.
Artificial Intelligence Search Problem. Search is a problem-solving technique to explores successive stages in problem- solving process.
Source: David Lee Matuszek
Blind Search Russell and Norvig: Chapter 3, Sections 3.4 – 3.6 CS121 – Winter 2003.
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
SEARCH TECHNIQUES. SEARCH TECHNIQUES Search techniques BlindHeuristic Depth first Search ( DFS ) Breadth first Search ( BFS ) Hill climbing Search A*
Depth-First Searches G5AIAI – Introduction to AI.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Lecture 3: Uninformed Search
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Iterative Deepening Search
Problem Solving by Searching
G5AIAI – Introduction to AI
Artificial Intelligence (CS 370D)
Breadth-First Searches
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Prof. Dechter ICS 270A Winter 2003
Lesson Objectives Aims
What to do when you don’t know anything know nothing
Iterative Deepening Search
Artificial Intelligence
Breadth-First Searches
Depth-First Searches Introduction to AI.
Tree Searching.
Artificial Intelligence Problem solving by searching CSC 361
Example of A* A (4,0) 4 OPEN: (A4) CLOSED: ().
Search Exercise Search Tree? Solution (Breadth First Search)?
A General Backtracking Algorithm
Artificial Intelligence
(1) Breadth-First Search  S Queue S
Tree Searching.
Tree Searching.
Tree Searching.
The Rich/Knight Implementation
Problem Solving by Searching Search Methods :
The Rich/Knight Implementation
Depth-First Searches.
Presentation transcript:

Iterative Deepening Search Introduction to AI

Iterative deepening search The problem with depth-limited search is deciding on a suitable depth parameter. To avoid this problem there is another search called iterative deepening search (IDS). This search method tries all possible depth limits; first 0, then 1, then 2 etc., until a solution is found. IDS may seem wasteful as it is expanding nodes multiple times. But the overhead is small in comparison to the growth of an exponential search tree For large search spaces where is the depth of the solution is not known IDS is normally the preferred search method. The following slide illustrates an iterative deepening search of 26 nodes (states) with an initial state of node A and a goal state of node L. Press space to see the example node set.

A CDEFB GHIJKLMNOP QRSTUVWXYZ The example node set Initial state Goal state A L Press space to see a IDS of the example node set

AA We begin with our initial state: the node labeled A. This node is added to the queue. Press space to continue Size of Queue: 0 Nodes expanded: 0Current Action: ExpandingCurrent level: n/a Queue: EmptyQueue: ASize of Queue: 1 Current level: 0Nodes expanded: 1 Queue: EmptySize of Queue: 0 Press space to begin the search As this is the 0 th iteration of the search, we cannot search past any level greater than zero. This iteration now ends, and we begin the 1 st iteration. ITERATIVE DEEPENING SEARCH PATTERN (0 th ITERATION) Node A is then expanded and removed from the queue. Press space.

A CDEFB A BCD We again begin with our initial state: the node labeled A. Note that the 1 st iteration carries on from the 0 th, and therefore the ‘nodes expanded’ value is already set to 1. Press space to continue Node A is expanded, then removed from the queue, and the revealed nodes are added to the front. Press space. The search now moves to level one of the node set. Press space to continue Node B is expanded and removed from the queue. Press space. Size of Queue: 0 Nodes expanded: 1Current Action:Current level: n/a Queue: EmptyQueue: ASize of Queue: 1 Nodes expanded: 2 Queue: B, C, D, E, F Press space to begin the search Size of Queue: 5 Current level: 0Current Action: Expanding Queue: C, D, E, FSize of Queue: 4 Nodes expanded: 3Current level: 1Current Action: BacktrackingCurrent level: 0Current level: 1 Queue: D, E, FSize of Queue: 3 Nodes expanded: 4Current Action: ExpandingCurrent Action: BacktrackingCurrent level: 0Current level: 1 Queue: E, FSize of Queue: 2 Nodes expanded: 5Current Action: ExpandingCurrent Action: BacktrackingCurrent level: 0Current level: 1Current Action: Expanding Queue: F E Current Action: BacktrackingCurrent level: 0Current Action: ExpandingCurrent level: 1 Queue: Empty F Current level: 0Current level: 1 Press space to continue the search ITERATIVE DEEPENING SEARCH PATTERN (1 st ITERATION) Size of Queue: 1Size of Queue: 0 As this is the 1 st iteration of the search, we cannot search past any level greater than level one. This iteration now ends, and we begin a 2 nd iteration. Nodes expanded: 6Nodes expanded: 7 We now back track to expand node C, and the process continues. Press space.

A CDEFB GHIJKL A B G We again begin with our initial state: the node labeled A. Note that the 2 nd iteration carries on from the 1 st, and therefore the ‘nodes expanded’ value is already set to 7 (1+6). Press space to continue the search Again, we expand node A to reveal the level one nodes. Press space. Node A is removed from the queue and each revealed node is added to the front of the queue. Press space. The search then moves to level one of the node set. Press space to continue Node B is expanded and the revealed nodes added to the front of the queue. Press space to continue. Size of Queue: 0 Nodes expanded: 7Current Action:Current level: n/a Queue: EmptyQueue: ASize of Queue: 1 Current level: 0Nodes expanded: 8 Queue: B, C, D, E, F Current level: 1 Queue: G, H, C, D, E, F Nodes expanded: 9Current level: 2 ITERATIVE DEEPENING SEARCH PATTERN (2 nd ITERATION) Size of Queue: 5 Current Action: Expanding We now move to level two of the node set. Press space to continue. After expanding node G we backtrack to expand node H. The process then continues until goal state. Press space Queue: H, C, D, E, F Nodes expanded: 10Current Action: BacktrackingCurrent Action: Expanding Queue: C, D, E, FSize of Queue: 6 Nodes expanded: 11 H Press space to continue the search Size of Queue: 5Size of Queue: 4 Current Action: BacktrackingCurrent Action: Expanding Queue: I, J, D, E, FSize of Queue: 5 Nodes expanded: 12 Press space to continue the search C Current level: 1Current level: 2Current level: 1Current level: 0Current level: 1Current level: 2 Queue: J, D, E, FSize of Queue: 4 Nodes expanded: 13 I Press space to continue the search Current Action: BacktrackingCurrent level: 1Current level: 2 Queue: D, E, F Current Action: Expanding Size of Queue: 3 Nodes expanded: 14 J Press space to continue the search Current Action: BacktrackingCurrent level: 1Current level: 0Current level: 1Current Action: Expanding Queue: K, L, E, FSize of Queue: 4 Nodes expanded: 15 D Press space to continue the search Current level: 2 Queue: L, E, FSize of Queue: 3 Nodes expanded: 16 K Press space to continue the search Current Action: ExpandingCurrent level: 1Current level: 2 LLLLL Current Action: Backtracking Queue: EmptySize of Queue: 0 Node L is located on the second level and the search returns a solution on its second iteration. Press space to end. SEARCH FINISHED