ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.

Slides:



Advertisements
Similar presentations
Solving problems by searching
Advertisements

Chapter 4: Informed Heuristic Search
Review: Search problem formulation
Informed search strategies
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
Solving Problem by Searching
Quiz 4-26-’07 Search.
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.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
CMSC 471 Spring 2014 Class #4 Thu 2/6/14 Uninformed Search Professor Marie desJardins,
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
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 Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Review: Search problem formulation
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Introduction to Artificial Intelligence Blind Search Ruth Bergman Fall 2002.
Uninformed Search (cont.)
Solving problems by searching
1 Lecture 3 Uninformed Search
Problem-solving agents
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.
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.
State-Space Searches.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Problem Solving and Search Andrea Danyluk September 11, 2013.
1 GRAPHS - ADVANCED APPLICATIONS Minimim Spanning Trees Shortest Path Transitive Closure.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
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.
P ROBLEM Write an algorithm that calculates the most efficient route between two points as quickly as possible.
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.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Search with Costs and Heuristic Search 1 CPSC 322 – Search 3 January 17, 2011 Textbook §3.5.3, Taught by: Mike Chiang.
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.
Lecture 3: Uninformed Search
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
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.
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
CPSC 322, Lecture 6Slide 1 Uniformed Search (cont.) Computer Science cpsc322, Lecture 6 (Textbook finish 3.5) Sept, 17, 2012.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
Fahiem Bacchus © 2005 University of Toronto 1 CSC384: Intro to Artificial Intelligence Search II ● Announcements.
Solving problems by searching A I C h a p t e r 3.
Artificial Intelligence Lecture No. 8 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
For Monday Read chapter 4 exercise 1 No homework.
Romania. Romania Problem Initial state: Arad Goal state: Bucharest Operators: From any node, you can visit any connected node. Operator cost, the.
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.
Solving problems by searching Chapter 3. Types of agents Reflex agent Consider how the world IS Choose action based on current percept Do not consider.
Lecture 3: Uninformed Search
Review: Tree search Initialize the frontier using the starting state
Solving problems by searching
ECE 448 Lecture 4: Search Intro
Artificial Intelligence Problem solving by searching CSC 361
State-Space Searches.
State-Space Searches.
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #2
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
State-Space Searches.
Presentation transcript:

ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999

ICS-171:Notes 4: 2 Summary Optimal search strategies – path costs examples –now we want to search for the minimum cost path to goal G –optimality –exhaustive search –uniform-cost search

ICS-171:Notes 4: 3 Searching for the Minimum Cost Path Previously we only cared about finding a path to any goal G Now we want the minimum cost path to a goal G –Cost of a path = sum of individual transitions along path –“best” = minimum cost path –Note: 2 different types of cost 1. cost of traversing the path to goal (“path-cost”/online cost) –cost from start S to node –cost from node to goal G 2.. the space and time complexity of the search algorithm (“search-cost”/offline cost) –Path-cost = sum of individual node-to-node costs individual costs assumed positive –otherwise an algorithm could “cycle” forever adding loops

ICS-171:Notes 4: 4 Examples of Path-Cost Navigation – path-cost = distance to node in miles OR the time to travel on foot or by car OR number of cities visited - ALL DIFFERENT minimum => minimum time, least fuel VLSI Design –path-cost = length of wires between chips minimum => least clock/signal delay 8-Puzzle –path-cost = number of pieces moved minimum => least time to solve the puzzle

ICS-171:Notes 4: 5 Example of Path Costs S G A B D E C F Optimal (minimum cost) path is S-A-D-E-F-G

ICS-171:Notes 4: 6 Completeness and Optimality A search procedure is complete if –it is guaranteed to find a goal state, if one exists e.g., DFS is not complete in general (if repeated states exist) but BFS is complete A search procedure is optimal if –it is guaranteed to find the minimum cost path, if multiple paths to a goal state exist e.g., DFS and BFS are not optimal Note that optimal => complete, but not vice-versa

ICS-171:Notes 4: 7 Search Method 6: Exhaustive Search Basic idea –find all possible paths to goal states –choose the best one (best = minimum path-cost) For example, –use BFS, modified so that it continues until all goal states are found but BFS scales as O(b d )! Conclusion –it is certainly complete and optimal –but exhaustive search is impractical except for very small problems

ICS-171:Notes 4: 8 The Shortest Path Principle We are searching for the minimum cost path to G Suppose the minimum (optimal) path to a goal state G has cost c Shortest Path Principle: –we can ignore any open nodes in the search tree which have path- costs greater than or equal to c why ? because we already have a solution with path-cost c, and expanding these nodes can only increase their costs further –but, we must still explore all other open nodes with path-cost <c why? they could produce a path to goal with path-cost < c We can do this simply by ordering nodes in Q according to path- cost to each node

ICS-171:Notes 4: 9 Search Method 7: Uniform Cost Search Initialize: Let Q = {S} While Q is not empty pull Q1, the first element in Q if Q1 is a goal report(success) and quit else child_nodes = expand(Q1) put remaining child_nodes in Q sort Q according to path-cost to each node end Continue Uniform Cost Search orders the nodes on the Q according to path cost from S always expands the node with minimum path cost from S

ICS-171:Notes 4: 10 Example of Uniform Cost in action S A D 2 5

ICS-171:Notes 4: 11 Example of Uniform Cost in action S A D B D C E E B F G D 10 F 1414 E B F G C 15

ICS-171:Notes 4: 12 Properties of Uniform Cost Search Complete? –yes Optimal? –assume that all costs are greater than 0 –when we go to expand a node, we test for goal state if it is a goal state then, it is selected (say with path cost c) if selected, is this path the lowest cost path to a goal? –all other currently open paths have higher cost (by definition) –since all costs >0, all of them must have path costs >c (to goal) – => the selected path is the optimal one –this is basically Dijkstra’s algorithm (ICS 161) applied to search trees Complexity? –worst O(b^d) in both space and time –in practice, run out of space usually before you run out of time

ICS-171:Notes 4: 13 Summary Path Cost –in practice we often want the best path to a goal state, e.g., the minimum cost path Optimality –a search algorithm which is guaranteed to find the best path to goal Uniform Cost Search –this is optimal –but it can have exponential complexity (especially memory) in practice Reading: Chapter 3, page 70 to 82 All of the search techniques so far are “blind” in that they do not look at how far away the goal may be: next we will look at informed or heuristic search, which directly tries to minimize the distance to the goal.