Chapter 3.5 and 3.6 Heuristic Search Continued. Review:Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Lights Out Issues Questions? Comment from me.
Informed search algorithms
Review: Search problem formulation
Informed Search Algorithms
Notes Dijstra’s Algorithm Corrected syllabus.
Informed search strategies
Informed search algorithms
An Introduction to Artificial Intelligence
Problem Solving: Informed Search Algorithms Edmondo Trentin, DIISM.
Informed search algorithms
Solving Problem by Searching
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
Problem Solving by Searching
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
Informed search algorithms
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
Problem Solving and Search in AI Heuristic Search
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:
Rutgers CS440, Fall 2003 Heuristic search Reading: AIMA 2 nd ed., Ch
Informed search algorithms
INTRODUÇÃO AOS SISTEMAS INTELIGENTES Prof. Dr. Celso A.A. Kaestner PPGEE-CP / UTFPR Agosto de 2011.
Informed search algorithms
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics Memory Bounded A* Search.
Informed search algorithms
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics Memory Bounded A* Search.
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.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 3 Informed Search and Exploration Instructor: Alireza Tavakkoli September 10, 2009 University.
CS 380: Artificial Intelligence Lecture #4 William Regli.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
Informed searching. Informed search Blind search algorithms do not consider any information about the states and the goals Often there is extra knowledge.
Informed Search Strategies Lecture # 8 & 9. Outline 2 Best-first search Greedy best-first search A * search Heuristics.
Chapter 4 Informed/Heuristic Search
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.
Princess Nora University Artificial Intelligence Chapter (4) Informed search algorithms 1.
CSC3203: AI for Games Informed search (1) Patrick Olivier
1 Kuliah 4 : Informed Search. 2 Outline Best-First Search Greedy Search A* Search.
Informed Search Reading: Chapter 4.5 HW #1 out today, due Sept 26th.
Informed Search and Heuristics Chapter 3.5~7. Outline Best-first search Greedy best-first search A * search Heuristics.
4/11/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005.
A General Introduction to Artificial Intelligence.
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:
Informed Search II CIS 391 Fall CIS Intro to AI 2 Outline PART I  Informed = use problem-specific knowledge  Best-first search and its variants.
Informed Search CSE 473 University of Washington.
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.
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.
Review: Tree search Initialize the frontier using the starting state
Last time: Problem-Solving
Heuristic Search Introduction to Artificial Intelligence
Discussion on Greedy Search and A*
Discussion on Greedy Search and A*
CS 4100 Artificial Intelligence
Artificial Intelligence Informed Search Algorithms
Informed search algorithms
Informed search algorithms
Artificial Intelligence
Artificial Intelligence
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
Solving Problems by Searching
Informed Search.
Presentation transcript:

Chapter 3.5 and 3.6 Heuristic Search Continued

Review:Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions

Review:Heuristic Search Greedy search –Evaluation function h(n) (heuristic) = estimate of cost from n to closest goal –Example: h SLD (n) = straight-line distance from n to Bucharest –Greedy search expands the node that appears to be closest to goal

Review:Heuristic Search Properties of greedy search –Complete?? No – can get stuck in loops, e.g., Complete in finite space with repeated-state checking –Time?? O(b m ), but a good heuristic can give dramatic improvement –Space?? O(b m ) – keeps all nodes in memory –Optimal?? No

Review:Heuristic Search A* search –Premise - Avoid expanding paths that are already expansive –Evaluation function f(n) = g(n) + h(n) g(n) = cost so far to reach n h(n) = estimated cost to goal from n f(n) = estimated total cost of path through n to goal

Review:Heuristic Search A* search –A* search uses an admissible heuristic i.e., h(n)  h*(n) where h*(n) is the true cost from n. (also require h(n)  0, so h(G) = 0 for any goal G.) example, h SLD (n) never overestimates the actual road distance.

Heuristic Search A* search example

Heuristic Search A* search example

Heuristic Search A* search example

Heuristic Search A* search example

Heuristic Search A* search example

Heuristic Search Properties of A* –Complete?? Yes, unless there are infinitely many nodes with f  f(G) –Time?? Exponential in [relative error in h x length of solution.] –Space?? Keeps all nodes in memory –Optimal?? Yes – cannot expand f i+1 until f i is finished A* expands all nodes with f(n) C*

Heuristic Search A* algorithm –Optimality of A* (standard proof) –Suppose some suboptimal goal G 2 has been generated and is in the queue. Let n be an unexpanded node on a shortest path to an optimal goal G 1.

Heuristic Search A* algorithm –f(G 2 ) = g(G 2 )since h(G 2 ) = 0 > g(G 1 )since G 2 is suboptimal  f(n)since h is admissible –since f(G 2 ) > f(n), A* will never select G 2 for expansion

Heuristic Functions Admissible heuristic example: for the 8-puzzle h 1 (n) = number of misplaced tiles h 2 (n) = total Manhattan distance i.e. no of squares from desired location of each tile h 1 (S) = ?? h 2 (S) = ??

Heuristic Functions Admissible heuristic example: for the 8-puzzle h 1 (n) = number of misplaced tiles h 2 (n) = total Manhattan distance i.e. no of squares from desired location of each tile h 1 (S) = ?? 6 h 2 (S) = ?? = 14

Heuristic Functions Dominance –if h 1 (n)  h 2 (n) for all n (both admissible) then h 2 dominates h 1 and is better for search Typical search costs: d = 14 IDS = 3,473,941 nodes A*(h 1 ) = 539 nodes A*(h 2 ) = 113 nodes d = 24 IDS  54,000,000,000 nodes A*(h 1 ) = 39,135 nodes A*(h 2 ) = 1,641 nodes

Heuristic Functions Admissible heuristic example: for the 8-puzzle h 1 (n) = number of misplaced tiles h 2 (n) = total Manhattan distance i.e. no of squares from desired location of each tile h 1 (S) = ?? 6 h 2 (S) = ?? = 14 But how do you come up with a heuristic?

Heuristic Functions Relaxed problems Admissible heuristics can be derived from the exact solution cost of a relaxed version of the problem If the rules of the 8-puzzle are relaxed so that a tile can move anywhere, then h 1 (n) gives the shortest solution If the rules are relaxed so that a tile can move to any adjacent square, then h 2 (n) gives the shortest solution Key point: the optimal solution cost of a relaxed problem is no greater than the optimal solution cost of the real problem

Heuristic Functions Relaxed problems –Well-known example: traveling salesperson problem (TSP) – find the shortest tour visiting all cities exactly once –Minimum spanning tree can be computed in O(n 2 ) and is a lower bound on the shortest (open) tour

Heuristic Functions Iterative improvement algorithms –Iterative optimization problems, path is irrelevant; the goal state itself is the solution –Then state space = set of “complete” configurations; find optimal configuration e.g. TSP or, find configuration satisfying constraints, e.g. timetable –In such cases, can use iterative improvement algorithms; keep a single “current” state, try to improve it –Constant space, suitable for online as well as offline search

Heuristic Functions Example: Traveling Salesperson Problem Start with any complete tour, perform pairwise exchanges

Heuristic Functions Example: n-queens Put n queens on an n x n board with no queens on the same row, column, or diagonal Move a queen to reduce number of conflicts

24 Bidirectional Search

Questions before the exam? Main focus on uninformed and informed search from Ch. 3. Might also include PEAS and Environment concepts from Ch. 2