Lecture 8 Heuristic search Motivational video Assignment 2

Slides:



Advertisements
Similar presentations
BEST FIRST SEARCH - BeFS
Advertisements

Review: Search problem formulation
Informed Search Algorithms
An Introduction to Artificial Intelligence
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2004.
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
Review: Search problem formulation
A* Search Introduction to AI. What is an A* Search? A greedy search method minimizes the cost to the goal by using an heuristic function, h(n). It works.
Problem Solving and Search in AI Heuristic Search
CSC344: AI for Games Lecture 4: Informed search
Graphs II Robin Burke GAM 376. Admin Skip the Lua topic.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
Informed Search Methods. Informed Search  Uninformed searches  easy  but very inefficient in most cases of huge search tree  Informed searches  uses.
Informed Search Strategies Lecture # 8 & 9. Outline 2 Best-first search Greedy best-first search A * search Heuristics.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
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.
CSC3203: AI for Games Informed search (1) Patrick Olivier
Informed Search I (Beginning of AIMA Chapter 4.1)
Artificial Intelligence Problem solving by searching.
1 Kuliah 4 : Informed Search. 2 Outline Best-First Search Greedy Search A* Search.
Informed Search and Heuristics Chapter 3.5~7. Outline Best-first search Greedy best-first search A * search Heuristics.
Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most desirable unexpanded node Implementation:
Informed Search CSE 473 University of Washington.
Heuristic Search Foundations of Artificial Intelligence.
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.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Lecture 3: Uninformed Search
Review: Tree search Initialize the frontier using the starting state
Last time: Problem-Solving
Heuristic Functions.
Artificial Intelligence (CS 370D)
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Department of Computer Science
Heuristic Search Introduction to Artificial Intelligence
HW #1 Due 29/9/2008 Write Java Applet to solve Goats and Cabbage “Missionaries and cannibals” problem with the following search algorithms: Breadth first.
The A* Algorithm Héctor Muñoz-Avila.
Discussion on Greedy Search and A*
Discussion on Greedy Search and A*
CAP 5636 – Advanced Artificial Intelligence
Lecture 1B: Search.
CS 4100 Artificial Intelligence
EA C461 – Artificial Intelligence
Artificial Intelligence
COMP 8620 Advanced Topics in AI
Week 4 Jan 29th 2016.
Informed search algorithms
Informed search algorithms
Artificial Intelligence
BEST FIRST SEARCH -OR Graph -A* Search -Agenda Search CSE 402
CSE 473 University of Washington
Announcements This Friday Project 1 due Talk by Jeniya Tabassum
Lecture 9 Administration Heuristic search, continued
HW 1: Warmup Missionaries and Cannibals
Informed Search Idea: be smart about what paths to try.
The Rich/Knight Implementation
HW 1: Warmup Missionaries and Cannibals
Artificial Intelligence
Midterm Review.
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
Artificial Intelligence: Theory and Practice Ch. 3. Search
Informed Search Idea: be smart about what paths to try.
Informed Search.
The Rich/Knight Implementation
“If I Only had a Brain” Search
Presentation transcript:

Lecture 8 Heuristic search Motivational video Assignment 2 CS-424 Gregory Dudek

RN Ch. 4 DAA Ch. 4 Informed Search Search methods so far based on expanding nodes is search space based on distance from the start node. Obviously, we always know that! How about using the estimated distance h’(n) to the goal! What’s the problem? If we knew h(n) exactly, it wouldn’t even be “search”. We would just expand the d needed nodes that define the solution. CS-424 Gregory Dudek

Heuristic Search What is we just have a guess as to the distance to the goal: a heuristic. (like “Eureka!”) Best-First Search At any time, expand the most promising node. Recall our general search algorithm (from last lecture). We can re-order to list L to put the best node at the front of the list. Compare this to uniform-cost search which is, in some sense, the opposite! CS-424 Gregory Dudek

evaluation function e(n) Best-First Best-First is like DFS HOW much like DFS depends on the character of the heuristic evaluation function e(n) If it’s zero all the time, we get BFS Best-first is a greedy method. Greed methods maximize short-term advantage without worrying about long-term consequences. CS-424 Gregory Dudek

Example: route planning Consider planning a path along a road system. The straight-line distance from one place to another is a reasonable heuristic measure. Is it always right? Clearly not: some roads are very circuitous. CS-424 Gregory Dudek

Example: The Road to Bucharest CS-424 Gregory Dudek

Problem: Too Greedy From Arad to Sibiu to Fagaras --- but to Rimnicu would have been better. Need to consider: cost of getting from start node (Arad) to intermediate nodes! CS-424 Gregory Dudek

Intermediate nodes e(n) = g(n) + h’(n) Desirability of an intermediate node How much it costs to get there How much farther one has to go afterwards Leads to evaluation function of the form: e(n) = g(n) + h’(n) As before, h’(n) Use g(n) express the accumulated cost to get to this node. This expresses the estimated total cost of the best solution that passes through state n. CS-424 Gregory Dudek

Algorithm A Expand the frontier node n with the smallest value of e(n): the most promising candidate. unmark all vertices choose some starting vertex x mark x list L = x tree T = x while L nonempty choose vertex v with min e(v) from list visit v for each unmarked neighbor w mark w add it to end of list add edge (v,w) to T CS-424 Gregory Dudek

Details... Set L to be the initial node(s). Let n be the node on L that minimizes to e(n). If L is empty, fail. If n is a goal node, stop and return it (and the path from the initial node to n). Otherwise, remove n from L and add all of n's children to L (labeling each with its path from the initial node). CS-424 Gregory Dudek

Now expands Rimnicu (f = (140 + 80) + 193 = 413) over Finds Optimal Path Now expands Rimnicu (f = (140 + 80) + 193 = 413) over Faragas (f = (140 + 99) + 178 = 417). Q. What if h(Faragas) = 170 (also an underestimate)? CS-424 Gregory Dudek

Admissibility An admissible heuristic always finds the best (lowest-cost) solution first. Sometimes we refer to the algorithm being admissible -- a minor “abuse of notation”. Is BFS admissible? If h’(n) <= h(n) then the heuristic is admissible. It means it never overestimates the cost of a solution through n. CS-424 Gregory Dudek

A* The effect is that is it never overly optimistic (overly adventurous) about exploring paths in a DFS-like way. If we use this type of evaluation function with and admissible heuristic, we have algorithm A* A* search If for any triple of nodes, cost(a,b) + cost(b,c) >= cost(a,c) the heuristic is monotonic. CS-424 Gregory Dudek

Can often modify a heuristic to become monotonic if it isn’t already. Monotonicity Let's also also assume (true for most admissible heuristics) that e is monotonic, i.e., along any path from the root f never decreases. Can often modify a heuristic to become monotonic if it isn’t already. E.g. let n be parent of n’. Suppose that g(n) = 3 and h(n) = 4 , so f(n) = 7. and g(n’) = 4 and h(n’) = 2, so f(n’) = 6. But, because any path through n’ is also a path through n, we can set f(n’) = 7. CS-424 Gregory Dudek

A* is good If h’(n) = h(n) then we know “everything” and e(n) is exact. If e(n) was exact, we could expand only the nodes on the actual optimal path to the goal. Note that in practice, e(n) is always an underestimate. So, we always expand more nodes than needed to find the optimal path. Sometimes we expand extra nodes, but they are always nodes that are “too close” to the start. CS-424 Gregory Dudek

… really good A* finds the optimal path (first) A* is complete A* is optimally efficient for a given heuristic: if we ever skipped expanding a node, we might make a serious mistake. CS-424 Gregory Dudek

3 related searches (recap) Uniform cost: only look backwards no heuristics always finds the cheapest Best first uses heuristic very optimistic only looks forwards may not find optimal solution A* combines heuristic with history always find cheapest (but A [no *] might not) CS-424 Gregory Dudek

Video Nick Roy (former McGill grad student) describes tour-guide robot on the discovery channel. Note: such a mobile robot might well use A* search. Obstacles are a major source of the mismatch between h’ and h. Straight-line distance provides a natural estimate for h’ Learning about the environment is important. We’ll talk more about that soon…. CS-424 Gregory Dudek

Hill-climbing search Usually used when we do not have a specific goal state. Often used when we have a solution/path/setting and we want to improve it: an iterative improvement algorithm. Always move to a successor that that increases the desirability (can minimize or maximize cost). CS-424 Gregory Dudek