CSE (c) S. Tanimoto, 2004 Search Algorithms

Slides:



Advertisements
Similar presentations
BEST FIRST SEARCH - BeFS
Advertisements

Artificial Intelligence: Knowledge Representation
Chapter 4: Informed Heuristic Search
Problem solving with graph search
The A* Algorithm Héctor Muñoz-Avila. The Search Problem Starting from a node n find the shortest path to a goal node g ?
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
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.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Informed Search CSE 473 University of Washington.
Using Search in Problem Solving
CSE (c) S. Tanimoto, 2008 State-Space Search 1 State-Space Search Motivation: Understanding “dynamics” in AI Statics versus Dynamics of AI Statics:
CSE (c) S. Tanimoto, 2007 Search 1: State Spaces 1 State-Space Search Outline: Demonstration with T* State spaces, operators, moves A Puzzle: The.
Heuristic Search Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
Informed Search Idea: be smart about what paths to try.
Heuristic Search In addition to depth-first search, breadth-first search, bound depth-first search, and iterative deepening, we can also use informed or.
Informed (Heuristic) Search
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Informed Search CSE 473 University of Washington.
Heuristic Functions. A Heuristic is a function that, when applied to a state, returns a number that is an estimate of the merit of the state, with respect.
Chap 4: Searching Techniques Artificial Intelligence Dr.Hassan Al-Tarawneh.
Review: Tree search Initialize the frontier using the starting state
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
A vertex u is reachable from vertex v iff there is a path from v to u.
Heuristic Functions.
Department of Computer Science
CSE 473 Artificial Intelligence Oren Etzioni
CSE (c) S. Tanimoto, 2002 Search Algorithms
Problem Solving by Searching
Artificial Intelligence Problem solving by searching CSC 361
Chap 4: Searching Techniques Artificial Intelligence Dr.Hassan Al-Tarawneh.
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Algorithms for Exploration
Prof. Dechter ICS 270A Winter 2003
The A* Algorithm Héctor Muñoz-Avila.
Problem Solving and Searching
EA C461 – Artificial Intelligence
Searching for Solutions
Heuristic Search Thank you Michael L. Littman, Princeton University for sharing these slides.
Informed search algorithms
Problem Solving and Searching
CSE (c) S. Tanimoto, 2001 Search-Introduction
Artificial Intelligence
Problem Spaces & Search
Heuristics Local Search
Iterative Deepening CPSC 322 – Search 6 Textbook § 3.7.3
CSE 473 University of Washington
Introducing Underestimates
Chap 4: Searching Techniques
CSE (c) S. Tanimoto, 2002 State-Space Search
HW 1: Warmup Missionaries and Cannibals
More advanced aspects of search
Tree Searching.
Informed Search Idea: be smart about what paths to try.
Tree Searching.
Tree Searching.
Problem Spaces & Search
Graphs.
Graphs.
State-Space Searches.
Graphs.
State-Space Searches.
The Rich/Knight Implementation
HW 1: Warmup Missionaries and Cannibals
CS621: Artificial Intelligence
CSE (c) S. Tanimoto, 2004 State-Space Search
Graphs.
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
State-Space Searches.
Informed Search Idea: be smart about what paths to try.
The Rich/Knight Implementation
Presentation transcript:

CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms Alternative objectives: Reach any goal state Find a short or shortest path to a goal state Alternative properties of the state space and moves: Tree structured vs graph structured, cyclic/acyclic Weighted/unweighted edges Alternative programming paradigms: Recursive Iterative Iterative deepening Genetic algorithms CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms

The Painted Squares Puzzle state: partially filled board. Initial state: empty board. Goal state: filled board, in which pieces satisfy all constraints. CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms

Recursive Depth-First Method Current board B  empty board. Remaining pieces Q  all pieces. Call Solve(B, Q). Procedure Solve(board B, set of pieces Q) For each piece P in Q, { For each orientation A { Place P in the first available position of B in orientation A, obtaining B’. If B’ is full and meets all constraints, output B’. If B’ is full and does not meet all constraints, return. Call Solve(B’, Q - {P}). } Return. CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms

State-Space Graphs with Weighted Edges Let S be space of possible states. Let (si, sj) be an edge representing a move from si to sj. w(si, sj) is the weight or cost associated with moving from si to sj. The cost of a path [ (s1, s2), (s2, s3), . . ., (sn-1, sn) ] is the sum of the weights of its edges. A minimum-cost path P from s1 to sn has the property that for any other path P’ from s1 to sn, cost(P)  cost(P’). CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms

CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms Uniform-Cost Search A more general version of breadth-first search. Processes states in order of increasing path cost from the start state. The list OPEN is maintained as a priority queue. Associated with each state is its current best estimate of its distance from the start state. As a state si from OPEN is processed, its successors are generated. The tentative distance for a successor sj of state si is computed by adding w(si, sj) to the distance for si. If sj occurs on OPEN, the smaller of its old and new distances is retained. If sj occurs on CLOSED, and its new distance is smaller than its old distance, then it is taken off of CLOSED, put back on OPEN, but with the new, smaller distance. CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms

Ideal Distances in A* Search Let f(s) represent the cost (distance) of a shortest path that starts at the start state, goes through s, and ends at a goal state. Let g(s) represent the cost of a shortest path from the start state to s. Let h(s) represent the cost of a shortest path from s to a goal state. Then f(s) = g(s) + h(s) During the search, the algorithm generally does not know the true values of these functions. CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms

Estimated Distances in A* Search Let g’(s) be an estimate of g(s) based on the currently known shortest distance from the start state to s. Let the h’(s) be a heuristic evaluation function that estimates the distance (path length) from s to the nearest goal state. Let f’(s) = g’(s) + h’(s) Best-first search using f’(s) as the evaluation function is called A* search. CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms

Admissibility of A* Search Under certain conditions, A* search will always reach a goal state and be able to identify a shortest path to that state as soon as it arrives there. The conditions are: h’(s) must not exceed h(s) for any s. w(si, sj) > 0 for all si and sj. This property of being able to find a shortest path to a goal state is known as the admissibility property of A* search. Sometimes we say that a particular A* algorithm is admissible. We can say this when its h’ function satisfies the underestimation condition and the underlying search problem involves positive weights. CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms

Search Algorithm Summary Unweighted graphs Weighted graphs blind search Depth-first Depth-first Breadth-first Uniform-cost uses heuristics Best-first A* CSE 415 -- (c) S. Tanimoto, 2004 Search Algorithms