Informed Search CSE 473 University of Washington.

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Heuristics CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Informed Search Methods How can we improve searching strategy by using intelligence? Map example: Heuristic: Expand those nodes closest in “as the crow.
Optimality of A*(standard proof) Suppose suboptimal goal G 2 in the queue. Let n be an unexpanded node on a shortest path to optimal goal G. f(G 2 ) =
CSCE 580 ANDREW SMITH JOHNNY FLOWERS IDA* and Memory-Bounded Search Algorithms.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Review: Search problem formulation
Informed (Heuristic) Search Evaluation Function returns a value estimating the desirability of expanding a frontier node Two Basic Approaches –Expand node.
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2008.
Artificial Intelligence
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2005.
Using Search in Problem Solving
Informed Search Methods How can we make use of other knowledge about the problem to improve searching strategy? Map example: Heuristic: Expand those nodes.
Review Best-first search uses an evaluation function f(n) to select the next node for expansion. Greedy best-first search uses f(n) = h(n). Greedy best.
CSC344: AI for Games Lecture 4: Informed search
Heuristics CSE 473 University of Washington. © Daniel S. Weld Topics Agency Problem Spaces SearchKnowledge Representation Planning PerceptionNLPMulti-agentRobotics.
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.
Informed Search Methods
Informed Search Idea: be smart about what paths to try.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Informed Search Uninformed searches easy but very inefficient in most cases of huge search tree Informed searches uses problem-specific information to.
Informed Search Methods How can we make use of other knowledge about the problem to improve searching strategy? Map example: Heuristic: Expand those nodes.
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.
Informed search algorithms
Informed (Heuristic) Search
More advanced aspects of search Extensions of A*.
Informed search algorithms
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
1 Shanghai Jiao Tong University Informed Search and Exploration.
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.
CSE 473: Artificial Intelligence Spring 2012
CSE 573: Artificial Intelligence Autumn 2012 Heuristic Search With slides from Dan Klein, Stuart Russell, Andrew Moore, Luke Zettlemoyer Dan Weld.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
CS 380: Artificial Intelligence Lecture #4 William Regli.
Informed searching. Informed search Blind search algorithms do not consider any information about the states and the goals Often there is extra knowledge.
Lecture 3: Uninformed Search
Problem Spaces & Search CSE 573. © Daniel S. Weld 2 Logistics Mailing list Reading Ch 4.2, Ch 6 Mini-Project I Partners Game Playing?
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
For Wednesday Read chapter 5, sections 1-4 Homework: –Chapter 3, exercise 23. Then do the exercise again, but use greedy heuristic search instead of A*
Artificial Intelligence for Games Informed Search (2) Patrick Olivier
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
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.
Informed Search CSE 473 University of Washington.
Problem Spaces & Search Dan Weld CSE 573. © Daniel S. Weld 2 Logistics Read rest of R&N chapter 4 Also read chapter 5 PS 1 will arrive by , so be.
Local Search. Systematic versus local search u Systematic search  Breadth-first, depth-first, IDDFS, A*, IDA*, etc  Keep one or more paths in memory.
Heuristics & Constraint Satisfaction CSE 573 University of Washington.
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
CSE 473: Artificial Intelligence Spring 2012 Search: Cost & Heuristics Luke Zettlemoyer Lecture adapted from Dan Klein’s slides Multiple slides from Stuart.
Heuristic Search  Best First Search –A* –IDA* –Beam Search  Generate and Test  Local Searches –Hill Climbing  Simple Hill Climbing  Steepest Ascend.
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.
Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Informed Search Methods
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Informed Search Methods
Logistics Problem Set 1 Mailing List Due 10/13 at start of class
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.
Artificial Intelligence Informed Search Algorithms
EA C461 – Artificial Intelligence
Heuristics Local Search
Problem Spaces & Search
Heuristics Local Search
CSE 473 University of Washington
More advanced aspects of search
Informed Search Idea: be smart about what paths to try.
Informed Search Idea: be smart about what paths to try.
Presentation transcript:

Informed Search CSE 473 University of Washington

© Daniel S. Weld 2 Last Time Agents Problem Spaces Blind Search DFS BFS Iterative Deepening Iterative Broadening

© Daniel S. Weld 3 Best-first Search Generalization of breadth first search Priority queue of nodes to be explored Cost function f(n) applied to each node Add initial state to priority queue While queue not empty Node = head(queue) If goal?(node) then return node Add children of node to queue

© Daniel S. Weld 4 Old Friends Breadth first = best first With f(n) = depth(n) Dijkstra’s Algorithm = best first With f(n) = g(n) Where g(n) = sum of edge costs from start to n Space bound (stores all generated nodes)

© Daniel S. Weld 5 A* Search Hart, Nilsson & Rafael 1968 Best first search with f(n) = g(n) + h(n) Where g(n) = sum of edge costs from start to n And h(n) = estimate of lowest cost path n-->goal If h(n) is admissible then search will find optimal Underestimates cost of any solution which can reached from node { Space bound since must maintain queue

© Daniel S. Weld 6 European Example start end

© Daniel S. Weld 7 A* Example

© Daniel S. Weld 8 A* Example

© Daniel S. Weld 9 A* Example

© Daniel S. Weld 10 A* Example

© Daniel S. Weld 11 A* Example

© Daniel S. Weld 12 A* Example

© Daniel S. Weld 13 Optimality of A*

© Daniel S. Weld 14 Optimality Continued

© Daniel S. Weld 15 A* Summary Pros Cons

© Daniel S. Weld 16 Iterative-Deepening A* Like iterative-deepening depth-first, but... Depth bound modified to be an f-limit Start with limit = h(start) Prune any node if f(node) > f-limit Next f-limit=min-cost of any node pruned a b c d e f FL=15 FL=21

© Daniel S. Weld 17 IDA* Analysis Complete & Optimal (ala A*) Space usage  depth of solution Each iteration is DFS - no priority queue! # nodes expanded relative to A* Depends on # unique values of heuristic function In 8 puzzle: few values  close to # A* expands In traveling salesman: each f value is unique  1+2+…+n = O(n 2 ) where n=nodes A* expands if n is too big for main memory, n 2 is too long to wait! Generates duplicate nodes in cyclic graphs

© Daniel S. Weld 18 SMA* Problem with IDA*: f-limit increases slowly Must do iterative search again and again Storing little state between each iteration Just one number: next highest contour level SMA* Uses all available memory to store state Keeps bounded-size priority queue When needs memory, drops node with highest f-cost In ancestor of forgotten nodes, retains cost of best path which has been dropped. This focuses regeneration. Duplicates minimal work Optimal in a number of nice ways

© Daniel S. Weld 19 Depth-First Branch & Bound Single DF search  uses linear space Keep track of best solution so far If f(n) = g(n)+h(n)  cost(best-soln) Then prune n Requires Finite search tree, or Good upper bound on solution cost Generates duplicate nodes in cyclic graphs Adapted from Richard Korf presentation

© Daniel S. Weld 20 No O(b^d) O(b + N) Beam Search Idea Best first but only keep N best items on priority queue Evaluation Complete? Time Complexity? Space Complexity?

© Daniel S. Weld 21 Hill Climbing Idea Always choose best child; no backtracking Beam search with |queue| = 1 Problems? Local maxima Plateaus Diagonal ridges “Gradient ascent”

© Daniel S. Weld 22 Randomizing Hill Climbing Randomly disobeying heuristic Random restarts [Add something on heavy tailed distribution]

© Daniel S. Weld 23 Simulated Annealing Objective: avoid local minima Technique: For the most part use hill climbing When no improvement possible Choose random neighbor Let  be the decrease in quality Move to neighbor with probability e -  -/T Reduce “temperature” (T) over time Pros & cons Optimal? temp If T decreased slowly enough, will reach optimal state Widely used See also WalkSAT

© Daniel S. Weld 24 Limited Discrepancy Search Discrepancy bound indicates how often to violate heuristic Iteratively increase... a b c d e f g h Assume that heuristic says go left

© Daniel S. Weld Genetic Algorithms Start with random population Representation serialized States are ranked with “fitness function” Produce new generation Select random pair(s): probability ~ fitness Randomly choose “crossover point” Offspring mix halves Randomly mutate bits Crossover Mutation 

© Daniel S. Weld 26 Properties Importance of careful reprsentation