This preview shows pages 1–4. Sign up to view the full content.
1
CS 188: Artificial Intelligence
Spring 2011
Lecture 4: A* + (beginnings of)
Constraint Satisfaction
1/31/2011
Pieter Abbeel – UC Berkeley
Many slides from Dan Klein and Max Likhachev
Announcements
s
Project 1 (Search)
s
If you don’t have a class account yet, pick one up after lecture
s
Still looking for project partners?
 Come to front after lecture
s
Lecture videos
s
In the works
Today
s
A* (tree) search
s
Admissible heuristics
s
Graph search
s
Consistent heuristics
s
Extensions
s
Weighted A*: f = g + eps h
s
Anytime A*
s
Memory issue (O(n))
b
IDA*
s
Bidirectional
s
Example Applications
s
(Beginnings of CSPs)
Recap: Search
s
Search problem:
s
States (configurations of the world)
s
Successor function: a function from states to
lists of (state, action, cost) triples; drawn as a graph
s
Start state and goal test
s
Search tree:
s
Nodes: represent plans for reaching states
s
Plans have costs (sum of action costs)
s
Search Algorithm:
s
Systematically builds a search tree
s
Chooses an ordering of the fringe (unexplored nodes)
General Tree Search
s
Important ideas:
s
Fringe
s
Expansion
s
Exploration strategy
s
Main question: which fringe nodes to explore?
Detailed pseudocode
is in the book!
A* Review
s
A* uses both backward costs g and forward
estimate h: f(n) = g(n) + h(n)
s
A* tree search is optimal with admissible heuristics
(optimistic future cost estimates)
s
Proof forthcoming
s
Heuristic design is key: relaxed problems can help
s
Special cases:
s
Greedy: g = 0
[nonoptimal!]
s
Uniform cost: h = 0
[optimal]
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 2
Comparison
Uniform Cost
Greedy
A star
UCS vs A* Contours
s
Uniformcost expanded
in all directions
s
A* expands mainly
toward the goal, but
does hedge its bets to
ensure optimality
Start
Goal
Start
Goal
Creating Admissible Heuristics
s
Most of the work in solving hard search problems optimally
is in coming up with admissible heuristics
s
Often, admissible heuristics are solutions to
relaxed
problems,
with new actions (“some cheating”) available
s
Inadmissible heuristics are often useful too (why?)
15
366
Admissible Heuristics
s
A heuristic
h
is
admissible
(optimistic) if:
where
is the true cost to a nearest goal
s
Example:
s
Coming up with admissible heuristics is most of
what’s involved in using A* in practice.
15
Example: 8 Puzzle
s
What are the states?
s
How many states?
s
What are the actions?
s
What states can I reach from the start state?
s
What should the costs be?
8 Puzzle I
s
Heuristic: Number of
tiles misplaced
s
Why is it admissible?
s
h(start) =
s
This is a
relaxed
problem
heuristic
8
Average nodes expanded when
optimal path has length…
…4 steps …8 steps …12 steps
UCS
112
6,300
3.6 x 10
6
TILES
13
39
227
3
8 Puzzle II
s
What if we had an
easier 8puzzle where
any tile could slide any
direction at any time,
ignoring other tiles?
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 08/26/2011 for the course CS 188 taught by Professor Staff during the Spring '08 term at University of California, Berkeley.
 Spring '08
 Staff
 Artificial Intelligence

Click to edit the document details