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.

Slides:



Advertisements
Similar presentations
CSM6120 Introduction to Intelligent Systems
Advertisements

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,
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Properties of breadth-first search 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 ) (keeps every node.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
G5BAIM Artificial Intelligence Methods Graham Kendall Blind Searches.
Blind Search1 Solving problems by searching Chapter 3.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Search Strategies Reading: Russell’s Chapter 3 1.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
1 Tree Searching Strategies Updated: 2010/12/27. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these.
Uniform Cost Search Introduction to AI. Uniform cost search A breadth-first search finds the shallowest goal state and will therefore be the cheapest.
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
Artificial Intelligence (CS 461D)
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.
Structures and Strategies for State Space Search
17-Jun-15 Searching in BeeperHunt (Mostly minor variations on old slides)
Using Search in Problem Solving
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Max Min Max Min Starting node and labels Figure 4.15 (pp. 148) MiniMax Search.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Problem Spaces and Search Fall 2008 Jingsong.
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
Artificial Intelligence Problem solving by searching CSC 361
Artificial Intelligence Methods Rao Vemuri Searching - 2.
1 Structures and Strategies for State Space Search 3 3.0Introduction 3.1Graph Theory 3.2Strategies for State Space Search 3.3Using the State Space to Represent.
For Friday Finish chapter 3 Homework: –Chapter 3, exercise 6 –May be done in groups. –Clarification on part d: an “action” must be running the program.
Artificial Intelligence Course outline Introduction Problem solving Generic algorithms Knowledge Representation and Reasoning Expert Systems Uncertainty.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Busby, Dodge, Fleming, and Negrusa. Backtracking Algorithm Is used to solve problems for which a sequence of objects is to be selected from a set such.
Tree Searching Breadth First Search Dept First 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.
A RTIFICIAL I NTELLIGENCE UNIT : 2 Search Techniques.
Artificial Intelligence
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
Search exploring the consequences of possible actions.
Lecture 3: Uninformed Search
Do you drive? Have you thought about how the route plan is created for you in the GPS system? How would you implement a cross-and-nought computer program?
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
G5BAIM Artificial Intelligence Methods Graham Kendall Searching.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches.
Basic Search Procedure 1. Start with the start node (root of the search tree) and place in on the queue 2. Remove the front node in the queue and If the.
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;
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Artificial Intelligence Search Problem. Search is a problem-solving technique to explores successive stages in problem- solving process.
1 Tree Searching Strategies 2010/12/03. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems.
Source: David Lee Matuszek
Brute Force and Exhaustive Search Brute Force and Exhaustive Search Traveling Salesman Problem Knapsack Problem Assignment Problem Selection Sort and Bubble.
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.
Iterative Deepening Search
G5AIAI – Introduction to AI
Breadth-First Searches
Iterative Deepening Search
Artificial Intelligence
Breadth-First Searches
Depth-First Searches Introduction to AI.
Artificial Intelligence Problem solving by searching CSC 361
Example of A* A (4,0) 4 OPEN: (A4) CLOSED: ().
G5BAIM Artificial Intelligence Methods
CPSC 322 Introduction to Artificial Intelligence
Problem Solving by Searching Search Methods :
Depth-First Searches.
Presentation transcript:

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 nodes (i.e. those at level 1) before we expand any nodes at level 2. Or to put it another way, all nodes at level d are expanded before any nodes at level d+1. Function BREADTH-FIRST-SEARCH(problem) returns a solution or failure Return GENERAL-SEARCH(problem,ENQUEUE-AT-END) To illustrate this search pattern we will be using an example node set containing 26 nodes (states). The initial state will be node A, and the goal state is 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 BFS of the example node set

A CDEFB GHIJKL QRSTU A BCD We begin with our initial state: the node labeled A. Press space to continue This node is then expanded to reveal further (unexpanded) nodes. Press space Node A is removed from the queue. Each revealed node is added to the END of the queue. Press space to continue the search. The search then moves to the first node in the queue. Press space to continue. Node B is expanded then removed from the queue. The revealed nodes are added to the END of the queue. Press space. Size of Queue: 0 Nodes expanded: 0Current Action:Current level: n/a Queue: EmptyQueue: ASize of Queue: 1 Nodes expanded: 1 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, F, G, HSize of Queue: 6 Nodes expanded: 2Current level: 1 We then backtrack to expand node C, and the process continues. Press space Current Action: BacktrackingCurrent level: 0Current level: 1 Queue: D, E, F, G, H, I, JSize of Queue: 7 Nodes expanded: 3Current Action: ExpandingCurrent Action: BacktrackingCurrent level: 0Current level: 1 Queue: E, F, G, H, I, J, K, LSize of Queue: 8 Nodes expanded: 4Current Action: ExpandingCurrent Action: BacktrackingCurrent level: 0Current level: 1Current Action: Expanding NM Queue: F, G, H, I, J, K, L, M, NSize of Queue: 9 Nodes expanded: 5 E Current Action: BacktrackingCurrent level: 0Current Action: ExpandingCurrent level: 1 OP Queue: G, H, I, J, K, L, M, N, O, PSize of Queue: 10 Nodes expanded: 6 F Current Action: BacktrackingCurrent level: 0Current level: 1Current level: 2Current Action: Expanding Queue: H, I, J, K, L, M, N, O, P, Q Nodes expanded: 7 G Current Action: BacktrackingCurrent level: 1Current Action: Expanding Queue: I, J, K, L, M, N, O, P, Q, R Nodes expanded: 8 H Current Action: BacktrackingCurrent level: 2Current level: 1Current level: 0Current level: 1Current level: 2Current Action: Expanding Queue: J, K, L, M, N, O, P, Q, R, S Nodes expanded: 9 I Current Action: BacktrackingCurrent level: 1Current level: 2Current Action: Expanding Queue: K, L, M, N, O, P, Q, R, S, T Nodes expanded: 10 J Current Action: BacktrackingCurrent level: 1Current level: 0Current level: 1Current level: 2Current Action: Expanding Queue: L, M, N, O, P, Q, R, S, T, U Nodes expanded: 11 K Current Action: BacktrackingCurrent level: 1 LLLL Node L is located and the search returns a solution. Press space to end. FINISHED SEARCH Queue: EmptySize of Queue: 0 Current level: 2 BREADTH-FIRST SEARCH PATTERN L Press space to continue the search