AI Informed-search
AI Informed-search
CIS 521
Outline
PART I
Informed = use problem-specific knowledge
Best-first search and its variants
A* - Optimal Search using Knowledge
Today!!
Proof of Optimality of A*
A* for maneuvering AI agents in games
Heuristic functions?
How to invent them
PART II
Local search and optimization
• Hill climbing, local beam search, genetic algorithms,…
Local search in continuous spaces
Online search agents
Arad
118
Implementation:
• Sort frontier queue monotonically by f(n).
• Special cases: greedy search, A* search
CIS 521 - Intro to AI
4
Arad
11
8
Graphics from
http://theory.stanford.edu/~amitp/GameProgramming/
(A great site for practical AI & game Programming
Goal reached !!
Arad
118
Initial
Goal
When we expand Sibiu, we run into Arad again. Note that we’ve
already expanded this node once; but we still add it to the Frontier
queue again.
CIS 521 - Intro to AI
23
A* search example
Frontier queue:
Fagaras
Pitesti
Timisoara
Zerind
Craiova
Sibiu
Arad
Oradea
When we expand Fagaras, we find Bucharest, but we’re not done. The
algorithm doesn’t end until we “expand” the goal node – it has to be at
the top of the Frontier queue.