Uninformed search strategies

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

Search Search plays a key role in many parts of AI. These algorithms provide the conceptual backbone of almost every approach to the systematic exploration.
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Additional Topics ARTIFICIAL INTELLIGENCE
Review: Search problem formulation
Artificial Intelligence Solving problems by searching
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
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.
Uninformed (also called blind) search algorithms) This Lecture Chapter Next Lecture Chapter (Please read lecture topic material before.
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)
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
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.
1 Lecture 3: 18/4/1435 Uninformed search strategies Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Implementation and Evaluation of Search Methods. Use a stack data structure. 1. Push root node of tree on the stack. 2. Pop the top node off the stack.
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 for Games Uninformed search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
Artificial Intelligence (CS 461D)
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Tamara Berg CS Artificial Intelligence
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CS 380: Artificial Intelligence Lecture #3 William Regli.
Review: Search problem formulation
Artificial Intelligence Chapter 3: Solving Problems by Searching
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
1 Lecture 3 Uninformed Search
Lecture 3 Uninformed Search.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
How are things going? Core AI Problem Mobile robot path planning: identifying a trajectory that, when executed, will enable the robot to reach the goal.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Artificial Intelligence
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Search (cont) & CSP Intro Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore,
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
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;
1 search CS 331/531 Dr M M Awais REPRESENTATION METHODS Represent the information: Animals are generally divided into birds and mammals. Birds are further.
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Problem Solving as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.
Problem Solving by Searching
Implementation: General Tree Search
Solving problems by searching A I C h a p t e r 3.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Lecture 3 Problem Solving through search Uninformed Search
Lecture 3: Uninformed Search
Uninformed (also called blind) search algorithms)
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Uninformed Search Chapter 3.4.
Uninformed Search Strategies
Artificial Intelligence (CS 370D)
Solving problems by searching
CS 188: Artificial Intelligence Spring 2007
CS 188: Artificial Intelligence Fall 2008
Problem Solving and Searching
Artificial Intelligence
Searching for Solutions
Principles of Computing – UFCFA3-30-1
Search Strategies CMPT 420 / CMPG 720.
CS440/ECE 448 Lecture 4: Search Intro
Presentation transcript:

Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information available in the problem definition Breadth-first search Depth-first search Iterative deepening search Uniform-cost search

Example state space graph for a tiny search problem Breadth-first search Expand shallowest unexpanded node Implementation: frontier is a FIFO queue Example state space graph for a tiny search problem Example from P. Abbeel and D. Klein

Breadth-first search Expansion order: (S,d,e,p,b,c,e,h,r,q,a,a, h,r,p,q,f,p,q,f,q,c,G)

Depth-first search Expand deepest unexpanded node Implementation: frontier is a LIFO queue

Depth-first search Expansion order: (d,b,a,c,a,e,h,p,q,q, r,f,c,a,G)

http://xkcd.com/761/

Analysis of search strategies Strategies are evaluated along the following criteria: Completeness: does it always find a solution if one exists? Optimality: does it always find a least-cost solution? Time complexity: number of nodes generated Space complexity: maximum number of nodes in memory Time and space complexity are measured in terms of b: maximum branching factor of the search tree d: depth of the optimal solution m: maximum length of any path in the state space (may be infinite)

Properties of breadth-first search Complete? Yes (if branching factor b is finite) Optimal? Yes – if cost = 1 per step Time? Number of nodes in a b-ary tree of depth d: O(bd) (d is the depth of the optimal solution) Space? O(bd) Space is the bigger problem (more than time)

Properties of depth-first search Complete? Fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path  complete in finite spaces Optimal? No – returns the first solution it finds Time? Could be the time to reach a solution at maximum depth m: O(bm) Terrible if m is much larger than d But if there are lots of solutions, may be much faster than BFS Space? O(bm), i.e., linear space!

Iterative deepening search Use DFS as a subroutine Check the root Do a DFS searching for a path of length 1 If there is no path of length 1, do a DFS searching for a path of length 2 If there is no path of length 2, do a DFS searching for a path of length 3…

Iterative deepening search

Iterative deepening search

Iterative deepening search

Iterative deepening search

Properties of iterative deepening search Complete? Yes Optimal? Yes, if step cost = 1 Time? (d+1)b0 + d b1 + (d-1)b2 + … + bd = O(bd) Space? O(bd)

Search with varying step costs BFS finds the path with the fewest steps, but does not always find the cheapest path

Uniform-cost search For each frontier node, save the total cost of the path from the initial state to that node Expand the frontier node with the lowest path cost Implementation: frontier is a priority queue ordered by path cost Equivalent to breadth-first if step costs all equal Equivalent to Dijkstra’s algorithm in general

Uniform-cost search example

Uniform-cost search example Expansion order: (S,p,d,b,e,a,r,f,e,G)

Another example of uniform-cost search Source: Wikipedia

Properties of uniform-cost search Complete? Yes, if step cost is greater than some positive constant ε (we don’t want infinite sequences of steps that have a finite total cost) Optimal? Yes

Optimality of uniform-cost search Graph separation property: every path from the initial state to an unexplored state has to pass through a state on the frontier Proved inductively Optimality of UCS: proof by contradiction Suppose UCS terminates at goal state n with path cost g(n) = C but there exists another goal state n’ with g(n’) < C Then there must exist a node n” on the frontier that is on the optimal path to n’ But because g(n”) ≤ g(n’) < g(n), n” should have been expanded first!

Properties of uniform-cost search Complete? Yes, if step cost is greater than some positive constant ε (we don’t want infinite sequences of steps that have a finite total cost) Optimal? Yes – nodes expanded in increasing order of path cost Time? Number of nodes with path cost ≤ cost of optimal solution (C*), O(bC*/ ε) This can be greater than O(bd): the search can explore long paths consisting of small steps before exploring shorter paths consisting of larger steps Space? O(bC*/ ε)