Iterative Deepening Search

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.
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.
Lecture 3 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
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.
Iterative Deepening Search Introduction to AI. Iterative deepening search The problem with depth-limited search is deciding on a suitable depth parameter.
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.
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.
G5AIAI Introduction to AI Graham Kendall Heuristic Searches.
Source: David Lee Matuszek
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
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
Last time: Problem-Solving
Problem Solving by Searching
Uninformed Search Strategies
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
Russell and Norvig: Chapter 3, Sections 3.4 – 3.6
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.
Principles of Computing – UFCFA3-30-1
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.
State-Space Searches.
State-Space Searches.
The Rich/Knight Implementation
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
State-Space Searches.
Problem Solving by Searching Search Methods :
The Rich/Knight Implementation
Basic Search Methods How to solve the control problem in production-rule systems? Basic techniques to find paths through state- nets. For the moment: -
Depth-First Searches.
Presentation transcript:

Iterative Deepening Search G5AIAI – 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.

Press space to see a IDS of the example node set Initial state A A B C D E F Goal state G H I J K L L M N O P Q R S T U V W X Y Z Press space to see a IDS of the example node set

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

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

A A B B C C D D E F G G H H I I J J K K L L L L L L 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. Again, we expand node A to reveal the level one nodes. Press space. We again begin with our initial state: the node labeled A. Note that the 2nd iteration carries on from the 1st, and therefore the ‘nodes expanded’ value is already set to 7 (1+6). Press space to continue the search Node A is removed from the queue and each revealed node is added to the front of the queue. Press space. 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 A A B B C C D D E F G G H H I I J J K K L L L L L L Node L is located on the second level and the search returns a solution on its second iteration. Press space to end. Press space to continue the search Press space to continue the search Press space to continue the search Press space to continue the search Press space to continue the search Press space to continue the search Size of Queue: 5 Size of Queue: 0 Size of Queue: 4 Size of Queue: 3 Size of Queue: 5 Size of Queue: 6 Size of Queue: 0 Size of Queue: 4 Size of Queue: 5 Size of Queue: 4 Size of Queue: 3 Size of Queue: 1 Queue: Empty Queue: L, E, F Queue: K, L, E, F Queue: J, D, E, F Queue: D, E, F Queue: I, J, D, E, F Queue: A Queue: G, H, C, D, E, F Queue: C, D, E, F Queue: H, C, D, E, F Queue: Empty Queue: B, C, D, E, F Nodes expanded: 7 Nodes expanded: 16 Nodes expanded: 14 Nodes expanded: 9 Nodes expanded: 15 Nodes expanded: 12 Nodes expanded: 11 Nodes expanded: 13 Nodes expanded: 10 Nodes expanded: 8 SEARCH FINISHED Current Action: Expanding Current Action: Expanding Current Action: Backtracking Current Action: Current Action: Expanding Current Action: Backtracking Current Action: Expanding Current Action: Backtracking Current Action: Expanding Current Action: Backtracking Current Action: Backtracking Current Action: Expanding Current level: 0 Current level: 2 Current level: 0 Current level: 1 Current level: 1 Current level: n/a Current level: 2 Current level: 1 Current level: 1 Current level: 1 Current level: 0 Current level: 2 Current level: 2 Current level: 2 Current level: 1 Current level: 1 Current level: 2 Current level: 1 ITERATIVE DEEPENING SEARCH PATTERN (2nd ITERATION)