CSE 40171: Artificial Intelligence. Informed Search: A* Search

Similar documents
Artificial Intelligence Informed Search

CSCI 446: Artificial Intelligence

CS 343: Artificial Intelligence

Today. Informed Search. Graph Search. Heuristics Greedy Search A* Search

CS 188: Artificial Intelligence

CS 343H: Artificial Intelligence

521495A: Artificial Intelligence

Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics,

Informed Search A* Algorithm

Announcements. CS 188: Artificial Intelligence

CS 5522: Artificial Intelligence II

CSE 40171: Artificial Intelligence. Uninformed Search: Search Spaces

CS:4420 Artificial Intelligence

Outline for today s lecture. Informed Search I. One issue: How to search backwards? Very briefly: Bidirectional search. Outline for today s lecture

Part I. Instructor: Dr. Wei Ding. Uninformed Search Strategies can find solutions to problems by. Informed Search Strategies

Chapter 3: Informed Search and Exploration. Dr. Daisy Tang

Informed Search Lecture 5

Outline. Best-first search

CS 771 Artificial Intelligence. Informed Search

CE 473: Artificial Intelligence. Autumn 2011

Outline. Best-first search

Heuristic Search. Rob Platt Northeastern University. Some images and slides are used from: AIMA

Introduction to Artificial Intelligence. Informed Search

Artificial Intelligence: Search Part 2: Heuristic search

Artificial Intelligence

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search

CS 331: Artificial Intelligence Informed Search. Informed Search

Route planning / Search Movement Group behavior Decision making

CS 331: Artificial Intelligence Informed Search. Informed Search

CS 188: Artificial Intelligence. Recap Search I

COMP9414/ 9814/ 3411: Artificial Intelligence. 5. Informed Search. Russell & Norvig, Chapter 3. UNSW c Alan Blair,

Informed search algorithms

Informed search. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2016

Artificial Intelligence. Informed search methods

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n

Heuristic Search. Robert Platt Northeastern University. Some images and slides are used from: 1. CS188 UC Berkeley 2. RN, AIMA

Informed search strategies (Section ) Source: Fotolia

Informed search algorithms

Solving problems by searching

Foundations of Artificial Intelligence

Informed/Heuristic Search

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 3: Search 2.

COSC343: Artificial Intelligence

CS 188: Artificial Intelligence Fall Search Gone Wrong?

Informed search methods

Artificial Intelligence

Lecture 4: Informed/Heuristic Search

ARTIFICIAL INTELLIGENCE. Informed search

TDDC17. Intuitions behind heuristic search. Best-First Search. Recall Uniform-Cost Search. f(n) =... + h(n) g(n) = cost of path from root node to n

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Wissensverarbeitung. - Search - Alexander Felfernig und Gerald Steinbauer Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria

CAP 4630 Artificial Intelligence

Informed search algorithms. Chapter 4, Sections 1 2 1

Overview. Path Cost Function. Real Life Problems. COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

CS414-Artificial Intelligence

Informed Search and Exploration

S A E RC R H C I H NG N G IN N S T S A T T A E E G R G A R PH P S

Planning, Execution & Learning 1. Heuristic Search Planning

Artificial Intelligence

Informed Search and Exploration

Artificial Intelligence

Informed Search and Exploration for Agents

Solving Problems using Search

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 19 January, 2018

Lecture Plan. Best-first search Greedy search A* search Designing heuristics. Hill-climbing. 1 Informed search strategies. Informed strategies

CS 4700: Foundations of Artificial Intelligence

Ar#ficial)Intelligence!!

Foundations of AI. 4. Informed Search Methods. Heuristics, Local Search Methods, Genetic Algorithms. Wolfram Burgard & Bernhard Nebel

Introduction to Artificial Intelligence (G51IAI)

Artificial Intelligence

Informed (heuristic) search (cont). Constraint-satisfaction search.

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1

Informed Search. CS 486/686 University of Waterloo May 10. cs486/686 Lecture Slides 2005 (c) K. Larson and P. Poupart

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department

TDT4136 Logic and Reasoning Systems

Search EECS 395/495 Intro to Artificial Intelligence

Search EECS 348 Intro to Artificial Intelligence

Problem solving and search

Lecture 2: Fun with Search. Rachel Greenstadt CS 510, October 5, 2017

CSC 2114: Artificial Intelligence Search

Expert Systems (Graz) Heuristic Search (Klagenfurt) - Search -

CS 380: Artificial Intelligence Lecture #4

Announcements. Project 0: Python Tutorial Due last night

Informed Search and Exploration

Informed Search Algorithms. Chapter 4

Problem Solving and Search

Robot Programming with Lisp

CSC384: Intro to Artificial Intelligence Search III

Automated Planning & Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence

Foundations of AI. 4. Informed Search Methods. Heuristics, Local Search Methods, Genetic Algorithms

Informed Search (Ch )

ARTIFICIAL INTELLIGENCE (CSC9YE ) LECTURES 2 AND 3: PROBLEM SOLVING

A.I.: Informed Search Algorithms. Chapter III: Part Deux

Informed search. Lirong Xia

Informed Search. Notes about the assignment. Outline. Tree search: Reminder. Heuristics. Best-first search. Russell and Norvig chap.

Lecture 4: Search 3. Victor R. Lesser. CMPSCI 683 Fall 2010

Artificial Intelligence CS 6364

Transcription:

CSE 40171: Artificial Intelligence Informed Search: A* Search 1

Homework #1 has been released. It is due at 11:59PM on 9/10. 2

Quick Recap: Search

Quick Recap: Search Search problem: States (configurations of the world) Actions and costs Successor function (world dynamics) Start state and goal test Search tree: Vertices: represent plans for reaching states Plans have costs (sum of action costs) Search algorithm: Systematically builds a search tree Chooses an ordering of the fringe (unexplored nodes) Optimal: finds least-cost plans

Quick Recap: Search Breadth-First Search Depth-First Search Image credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

What was wrong with uninformed search? Did not make use of problem-specific knowledge beyond the definition of the problem itself Was not efficient

Image credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188 Informed Search

New Aspects of Informed Search The general approach we will consider is best-first search Instance of TREE-SEARCH or GRAPH-SEARCH A vertex is selected for expansion based on an evaluation function, f (v) vertex v with the lowest evaluation is expanded first Most best-first search algorithms include as a component of a heuristic function, h(v) h(v) = estimated cost of the cheapest path from the site at vertex v to a goal state

Search Heuristics A heuristic in this context is: A function that estimates how close a state is to a goal Designed for a particular search problem Examples: Manhattan distance, Euclidean distance for path planning 10 5 11.2 Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Image Credit: Russel and Norvig h(v)

Greedy Best-First Search Image credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Greedy Best-First Search Strategy: expand the vertex that is closest to the goal Assumption: this is likely to lead to a solution quickly Heuristic Function: f (v) = h(v) b Image credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Example with the following heuristic h(v) Image Credit: Russel and Norvig

Practical Problems with Greedy Best-First Search A common case: best first takes you straight to the wrong goal b The worst case: like a badly guided depth-first search Sllide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Analysis of Greedy Best-First Search Assume a uniform tree where every state has b successors Completeness: incomplete in a finite state space (just like depth-first search) Optimality: the algorithm is not optimal In our example, we found the path Arad Sibiu Fagaras Bucharest. But this is 32KM longer than the path going from Arad Sibiu Rimnicu Vilcea Pitesti Bucharest. Time complexity: O(b m ), where m is the maximum depth of the search space Space complexity: O(b m )

Image credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188 A* Search

A* Search A* search is the most widely known form of best-first search g(v): the cost to reach the vertex h(v): the cost to get from the vertex to the goal Vertices are evaluated via: f (v) = g(v) + h(v) i.e., f (v) = estimated cost of the cheapest solution through v

Example with the following heuristic g(v): path costs in graph h(v) Image Credit: Russel and Norvig

Visual Example of A* Search https://bgrins.github.io/javascript-astar/demo/

Conditions for Optimality in TREE-SEARCH: Admissibility Inadmissible (pessimistic) heuristics break optimality by trapping good plans on the fringe Admissible (optimistic) heuristics slow down bad plans but never outweigh true costs Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Conditions for Optimality in TREE-SEARCH: Admissibility A heuristic h is admissible (optimistic) if: 0 h(v) h * (v) where h * (v) is the true cost to a nearest goal Example: 15 Coming up with admissible heuristics is most of what is involved in using A* in practice. Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Conditions for Optimality in GRAPH-SEARCH: Consistency h(v) is consistent if: For every vertex v and every successor v' of v generated by any action a, the estimated cost of reaching the goal from v is not greater than the step cost of getting v' plus the estimated cost of reaching the goal from v' h(v) c(v, a, v') + h(v') Form of the triangle inequality

Optimality of A* TREE-SEARCH Assume: A is an optimal goal vertex B is a suboptimal goal vertex h is admissible Claim: A will exit the fringe before B Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Optimality of A* TREE-SEARCH Proof: Assume B is on the fringe Some ancestor n of A is on the fringe, too (possibly A!) Claim: n will be expanded before B 1. f (n) is less or equal to f (A) f (n) = g(n) + h(n) f (n) g(a) g(a) = f (A) Definition of f-cost Admissibility of h h = 0 at a goal Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Optimality of A* TREE-SEARCH Proof: Assume B is on the fringe Some ancestor n of A is on the fringe, too (possibly A!) Claim: n will be expanded before B 1. f (n) is less or equal to f (A) 2. f (A) is less than f (B) g(a) < g(b) f (A) < f (B) B is suboptimal h = 0 at a goal Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Optimality of A* TREE-SEARCH Proof: Assume B is on the fringe Some ancestor n of A is on the fringe, too (possibly A!) Claim: n will be expanded before B 1. f (n) is less or equal to f (A) 2. f (A) is less than f (B) 3. n expands before B f (n) f (A) < f (B) Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Optimality of A* TREE-SEARCH All ancestors of A expand before B A expands before B A* search is optimal Slide credit: Dan Klein and Pieter Abbeel, UC Berkeley CS 188

Complexity and Completeness of A* Depth of tree: d Assume a uniform tree where every state has b successors Completeness: A* search is complete Time complexity: O( E ) = O(b d ) Space complexity: O( V ) = O(b d )

Applications of A* Search Originally developed as a path planner for Shakey the Robot at Stanford (1968) SRI Shakey with callouts BY-SA 3.0 SRI International

Applications of A* Search games-like-age-of-empires-798x350 BY 2.0 Siddhartha Thota Commonly used in games where terrain is mapped to a grid