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.

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

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
Uninformed search strategies
Lecture 3: Uninformed Search
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.
1 Chapter 3 Solving Problems by Searching. 2 Outline Problem-solving agentsProblem-solving agents Problem typesProblem types Problem formulationProblem.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
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.
1 Lecture 3: 18/4/1435 Uninformed search strategies Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
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.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Artificial Intelligence (CS 461D)
Uninformed (also called blind) search algorithms This Lecture Read Chapter Next Lecture Read Chapter (Please read lecture topic material.
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.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CHAPTER 3 CMPT Blind Search 1 Search and Sequential Action.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
CS 380: Artificial Intelligence Lecture #3 William Regli.
Review: Search problem formulation
Searching the search space graph
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.
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.
Lecture 3: Uninformed 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;
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
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.
Pengantar Kecerdasan Buatan
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.
Uninformed Search Methods
Problem Solving by Searching
Uninformed (also called blind) search algorithms This Lecture Read Chapter Next Lecture Read Chapter (Please read lecture topic material.
Implementation: General Tree Search
Solving problems by searching A I C h a p t e r 3.
Search Part I Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States Partial Information Summary.
WEEK 5 LECTURE -A- 23/02/2012 lec 5a CSC 102 by Asma Tabouk Introduction 1 CSC AI Basic Search Strategies.
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)
Uninformed Search Chapter 3.4.
Uninformed Search Strategies
Solving problems by searching
Artificial Intelligence
Principles of Computing – UFCFA3-30-1
Search Strategies CMPT 420 / CMPG 720.
Presentation transcript:

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 other. Your search is blind. You don’t know if your current exploration is likely to be fruitful. Various blind strategies: Breadth-first search Uniform-cost search Depth-first search

3 Breadth-first search Expand shallowest unexpanded node Fringe: nodes waiting in a queue to be explored Implementation: fringe is a first-in-first-out (FIFO) queue, i.e., new successors go at end of the queue. Is A a goal state?

4 Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end Expand: fringe = [B,C] Is B a goal state?

5 Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end Expand: fringe=[C,D,E] Is C a goal state?

6 Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end Expand: fringe=[D,E,F,G] Is D a goal state?

7 Example BFS

8 Properties of breadth-first search Complete? Yes it always reaches goal (if b is finite) Time? 1+b+b 2 +b 3 +… +b d + (b d+1 -b)) = O(b d+1 ) (this is the number of nodes we generate) Space? O(b d+1 ) (keeps every node in memory, either in fringe or on a path to fringe). Optimal? Yes (if we guarantee that deeper solutions are less optimal, e.g. step-cost=1). Space is the bigger problem (more than time)

9 Uniform-cost search Breadth-first is only optimal if step costs is increasing with depth (e.g. constant). Can we guarantee optimality for any step cost? Uniform-cost Search: Expand node with smallest path cost g(n). Proof Completeness: Given that every step will cost more than 0, and assuming a finite branching factor, there is a finite number of expansions required before the total path cost is equal to the path cost of the goal state. Hence, we will reach it. Proof of optimality given completeness: Assume UCS is not optimal. Then there must be an (optimal) goal state with path cost smaller than the found (suboptimal) goal state (invoking completeness). However, this is impossible because UCS would have expanded that node first by definition. Contradiction.

10 Uniform-cost search Implementation: fringe = queue ordered by path cost Equivalent to breadth-first if all step costs all equal. Complete? Yes, if step cost ≥ ε (otherwise it can get stuck in infinite loops) Time? # of nodes with path cost ≤ cost of optimal solution. Space? # of nodes with path cost ≤ cost of optimal solution. Optimal? Yes, for any step cost ≥ ε

11 S B AD E C F G The graph above shows the step-costs for different paths going from the start (S) to the goal (G). Use uniform cost search to find the optimal path to the goal. Try it yourself

12 Depth-first search Expand deepest unexpanded node Implementation: fringe = Last In First Out (LIPO) queue, i.e., put successors at front Is A a goal state?

13 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[B,C] Is B a goal state?

14 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[D,E,C] Is D = goal state?

15 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[H,I,E,C] Is H = goal state?

16 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[I,E,C] Is I = goal state?

17 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[E,C] Is E = goal state?

18 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[J,K,C] Is J = goal state?

19 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[K,C] Is K = goal state?

20 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[C] Is C = goal state?

21 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[F,G] Is F = goal state?

22 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[L,M,G] Is L = goal state?

23 Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front queue=[M,G] Is M = goal state?

24 Properties of depth-first search Complete? No: fails in infinite-depth spaces Can modify to avoid repeated states along path Time? O(b m ) with m=maximum depth terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first Space? O(bm), i.e., linear space! (we only need to remember a single path + expanded unexplored nodes) Optimal? No (It may find a non-optimal goal first) A BC

25 2. Consider the graph below: a) [2pt]Draw the first 3 levels of the full search tree with root node given by A. b) [2pt]Give an order in which we visit nodes if we search the tree breadth first. c) [2pt]Express time and space complexity for general breadth-first search in terms of the branching factor, b, and the depth of the goal state, d. d) [2pt]If the step-cost for a search problem is not constant, is breadth first search always optimal? (Explain). A D B F C E Exercise