Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

Review: Search problem formulation
Problem Solving: Informed Search Algorithms Edmondo Trentin, DIISM.
Solving Problem by Searching
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.
Artificial Intelligence Spring 2009
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.
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 for Games Depth limited search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CS 380: Artificial Intelligence Lecture #3 William Regli.
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
CSC344: AI for Games Lecture 4: Informed search
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
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.
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
CHAPTER 4: INFORMED SEARCH & EXPLORATION Prepared by: Ece UYKUR.
1 Shanghai Jiao Tong University Informed Search and Exploration.
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.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
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.
CSC3203: AI for Games Informed search (1) Patrick Olivier
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 Kuliah 4 : Informed Search. 2 Outline Best-First Search Greedy Search A* Search.
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.
Informed Search and Heuristics Chapter 3.5~7. Outline Best-first search Greedy best-first search A * search Heuristics.
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.
Feng Zhiyong Tianjin University Fall  Best-first search  Greedy best-first search  A * search  Heuristics  Local search algorithms  Hill-climbing.
Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most desirable unexpanded node Implementation:
Implementation: General Tree Search
Solving problems by searching A I C h a p t e r 3.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Romania. Romania Problem Initial state: Arad Goal state: Bucharest Operators: From any node, you can visit any connected node. Operator cost, the.
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.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Uninformed Search Chapter 3.4.
Uninformed Search Strategies
Discussion on Greedy Search and A*
Discussion on Greedy Search and A*
CS 4100 Artificial Intelligence
Artificial Intelligence
Artificial Intelligence
Solving Problems by Searching
Informed Search.
Presentation transcript:

Search Strategies CPS4801

Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening search

3 Breadth-first search Expand shallowest unexpanded node Implementation: o Frontier is a FIFO queue, i.e., new successors go at end

4 Breadth-first search Expand shallowest unexpanded node Implementation: o Frontier is a FIFO queue, i.e., new successors go at end

5 Breadth-first search Expand shallowest unexpanded node Implementation: o Frontier is a FIFO queue, i.e., new successors go at end

6 Breadth-first search Expand shallowest unexpanded node Implementation: o Frontier is a FIFO queue, i.e., new successors go at end

7 Properties of breadth-first search Complete? Yes (if b is finite) Time? 1+b+b 2 +b 3 +… +b d = O(b d ) Space? O(b d ) (O(b d-1 ) nodes in the explored set and O(b d ) nodes in the frontier) Optimal? Yes (if cost = 1 per step)

Properties of breadth-first search O(b d ) is scary. Assuming b=10 Space is the bigger problem (more than time) DepthNodesTimeMemory 10 3 hours10 terabytes days1 petabyte years99 petabytes years10 exabytes

9 Uniform-cost search Expand least-cost unexpanded node (Cheapest search) Implementation: o Frontier = queue ordered by path cost

10 Example: Romania

Properties of uniform-cost search Equivalent to breadth-first if step costs all equal Complete? Yes, if step cost ≥ ε Time? # of nodes with g ≤ cost of optimal solution, O(b ceiling(C*/ ε) ) where C * is the cost of the optimal solution Space? # of nodes with g ≤ cost of optimal solution, O(b ceiling(C*/ ε) ) Optimal? Yes – nodes expanded in increasing order of g(n)

12 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

13 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

14 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

15 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

16 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

17 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

18 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

19 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

20 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

21 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

22 Depth-first search Expand deepest unexpanded node Implementation: o fringe = LIFO queue, i.e., put successors at front

23 Depth-first search Expand deepest unexpanded node Implementation: o Frontier = LIFO queue, i.e., put successors at front

24 Properties of depth-first search Complete? No: fails in infinite-depth spaces, spaces with loops o Modify to avoid repeated states along path  complete in finite spaces Time? O(b m ): terrible if m is much larger than d o but if solutions are dense, may be much faster than breadth-first Space? O(bm), i.e., linear space! Optimal? No

Depth-limited search depth-first search with depth limit l, i.e., nodes at depth l have no successors 20 cities in map of Romania l =19 Any city can be reached from any other city in at most 9 steps. Diameter gives a better depth limit.

Iterative deepening search Gradually increases the limit – 0, 1, 2, … Combines the benefits of depth-first and breadth-first search.

27 Iterative deepening search l =0

28 Iterative deepening search l =1

29 Iterative deepening search l =2

30 Iterative deepening search l =3

31 Properties of iterative deepening search Complete? Yes Time? d b 1 + (d-1)b 2 + … + (1)b d = O(b d ) Space? O(bd) Optimal? Yes

32 Summary of algorithms

Informed Search Strategies uses problem-specific knowledge beyond the definition of the problem itself

Best-first search Idea: use an evaluation function f(n) for each node o estimate of "desirability"  Expand most desirable unexpanded node Implementation: Order the nodes in frontier in decreasing order of desirability Special cases: o greedy best-first search o A * search

Romania with step costs in km

Greedy best-first search Evaluation function f(n) = h(n) (heuristic) = estimate of cost from n to goal e.g., h SLD (n) = straight-line distance from n to Bucharest Greedy best-first search expands the node that appears to be closest to goal

Greedy best-first search example

Properties of greedy best- first search Complete? No – can get stuck in loops, e.g., Iasi  Neamt  Iasi  Neamt  Time? O(b m ) Space? O(b m ) -- keeps all nodes in memory Optimal? No

A * search Idea: avoid expanding paths that are already expensive Evaluation function f(n) = g(n) + h(n) g(n) = cost so far to reach n h(n) = estimated cost from n to goal f(n) = estimated total cost of path through n to goal

Romania with step costs in km

A * search example

Admissible heuristics A heuristic h(n) is admissible if for every node n, h(n) ≤ h * (n), where h * (n) is the true cost to reach the goal state from n. An admissible heuristic never overestimates the cost to reach the goal, i.e., it is optimistic Example: h SLD (n) (never overestimates the actual road distance)