SlideShare a Scribd company logo
Informed Search
1AI, Subash Chandra Pakhrin
Instructional Objectives
• The students will learn the following strategies
for informed search:
– A*
– Greedy search
– Uniform Cost Search
2AI, Subash Chandra Pakhrin
Instructional Objectives
• At the end of this lesson the student should be
able to do the following:
– Understand what is a heuristic function.
– They should be able to design heuristic functions
for a given problem.
– They should be able to determine if A* uses an
admissible heuristic function, it will produce an
optimum solution.
– They should learn how to compare two heuristic
functions.
3AI, Subash Chandra Pakhrin
Informed Search
• We have seen un-informed search methods
that systematically explore the state space and
find the goal.
• Inefficient in most cases
• Informed search methods use problem
specific knowledge, are more efficient
4AI, Subash Chandra Pakhrin
Heuristics
• “Heuristics are criteria, methods or principles
for deciding which among several alternatives
course of action promises to be the most
effective in order to achieve some goal”
Judea Pearl
Can we use heuristics to identify the most
promising search path
5AI, Subash Chandra Pakhrin
Heuristic Distance
• The distance as the crow fly between two
places even though there is no road that goes
between those two places.
• Being close is actually not a good thing
because it may result in dead end.
AI, Subash Chandra Pakhrin 6
3
S
G
D
E
B
A
C
5
4
4
6
3
5
7+
6
7+
Heuristic Distance
• Objective of enlisted search algorithm is to be
close to the goal.
– Hill Climbing
– Beam Search
• When Beam Search value (b) = 2
AI, Subash Chandra Pakhrin 7
C B A D
Reject
Keep Keep
Reject
Remember
• FRINGE: Nodes not yet expanded
• CLOSED: Nodes that are expanded
AI, Subash Chandra Pakhrin 8
Branch and Bound
AI, Subash Chandra Pakhrin 9
S
A B
B D
C G
A C
D E
3 5
7
1111 12 15
996
C, D, E need not be
extended any
further because
their accumulated
length so far is less
than or equal to the
length of the goal
Branch and Bound + Extended List
• Don’t extend the node
which has been
extended
• Saved some work
because no extension
• Vast area of tree has
been pruned away
and don’t have to be
examined at all
AI, Subash Chandra Pakhrin 10
S
A B
B D
G
A C
E
3 5
7
11 15
996
Example of Heuristic Function
• A heuristic function at a node n is an estimate of
the optimum cost from the current node to a
goal. Denoted by h(n)
h(n) = estimated cost of the cheapest path from
node n to a goal node
• Example
– Want path from Kathmandu to Delhi
– Heuristic from Kathmandu may be straight – line
distance between Kathmandu to Delhi
– H(Kathmandu) = Euclidean Distance (Kathmandu,
Delhi)
11AI, Subash Chandra Pakhrin
Heuristics - example
8 – puzzle: Number of tiles out of place
12AI, Subash Chandra Pakhrin
h1(n) = 5
h1(n) = 5; is an underestimate of the actual
number of states to move into goal state
Heuristics - example
8-puzzle: Manhattan Distance (distance tile is out of
place)
13AI, Subash Chandra Pakhrin
h2(n) = 6; is an underestimate of the actual number of
move required to move from initial state to goal state
h n(n) = max{h1(n), h2(n)}= 6
Best – First Search
Priority queue of nodes to be explored
Cost function f(n) applied to each node
AI, Subash Chandra Pakhrin 14
5
A
B
C
D
3 1
E F
4 6HG
5
7
I J
STEP 1:
CLOSED: A
OPEN: BCD
STEP 2: D expanded
CLOSED: AD
OPEN: BCEF
Best – First Search
Let Fringe be a priority queue containing the initial state
LOOP
if Fringe is empty return failure
Node <- remove-first (Fringe)
if Node is a goal
then return the path from initial state to Node
else generate all successors of Node, and
put the newly generated nodes into fringe
according to their f values
End LOOP
AI, Subash Chandra Pakhrin 15
Greedy Search
• Idea: Expand node with the smallest
estimated cost to reach the goal
• Use heuristic function f(n) = h(n)
– Not optimal
– Incomplete
AI, Subash Chandra Pakhrin 16
Greedy Best First Search
AI, Subash Chandra Pakhrin 17
Solution using Greedy Best First Search
AI, Subash Chandra Pakhrin 18
Arad
366
Solution using Greedy Best First Search
AI, Subash Chandra Pakhrin 19
A* Search
• Hart, Nilsson & Rafael 1968
– Best first search with f(n) = g(n) + h(n)
– Where g(n) = sum of edge cost from start to n
– And h(n) = estimate of lowest cost path from node n
to goal
– If h(n) is admissible then search will find optimal
solution.
• A* = Branch and Bound + Extended List +
Admissible Heuristic
AI, Subash Chandra Pakhrin 20
Consistency ( Monotonicity )
• A heuristic is said to be consistent if for any
node N and any successor N’ of N , estimated
cost to reach to the goal from node N is less
than the sum of step cost from N to N’ and
estimated cost from node N’ to goal node.
h(n) ≤ c(n, n’) + h(n’)
Where;
h(n) = Estimated cost to reach to the goal node from
node n
• c(n, n’) = actual cost from n to n’
AI, Subash Chandra Pakhrin 21
Admissible
• A heuristic h(n) is admissible if for every node
n, h(n) ≤ h*(n), where h*(n) is the true cost to
reach the goal state from n.
• An admissible heuristic never overestimates
the cost to reach the goal, i.e., it is optimistic.
• Theorem: If h(n) is admissible, A* using TREE-
SEARCH is optimal.
AI, Subash Chandra Pakhrin 22
Optimality of A* (Proof)
• Suppose some suboptimal goal G2 has been
generated and is in the fringe. Let n be an
unexpanded node in the fringe such that n is on a
shortest path to an optimal goal G.
We want to prove:
f(n) < f(G2)
(then A* will prefer n over G2)
f (G2) = g(G2) since h(G2) = 0
g(G2) > g(G) since G2 is suboptimal
f(G) = g(G) since h(G) = 0
f(G2) > f (G) from aboveAI, Subash Chandra Pakhrin 23
Optimality of A* (Proof)
f(G2) > f(G) (from above)
h(n) ≤ h*(n), (since h is admissible(under –
estimate))
g(n) + h(n) ≤ g(n) + h*(n)
Since g(n) + h(n) = f(n) &
g(n) + h*(n) = f(G)
f(n) ≤ f(G) < f (G2)
Hence f (G2) > f(n), and A* will never select G2 for
expansion
• Therefore A* does find the optimal solutionAI, Subash Chandra Pakhrin 24
Theorem: If h(n) is consistent , then the values of f(n)
along the path are non-decreasing.
• A heuristic is consistent (or monotonic) if for
every node n, every successor n' of n
generated by any action a:
h(n) ≤ c(n, a, n’) + h(n’)
• If h is consistent, we have:
f(n’) = g(n’) + h(n’)
= g(n) + c(n, a, n’) + h(n’)
≥ g(n) + h(n) = f(n)
i.e., f(n) is non-decreasing along any path.
Theorem: If h(n) is consistent, A* using GRAPH-
SEARCH is optimal
AI, Subash Chandra Pakhrin 25
Triangle Inequality
A* Search
Lower Bound on the path (crow fly) =
Accumulated Distance + Airline Distance
*** Forget Everything Use the concept of Airline
Distance ***
AI, Subash Chandra Pakhrin 26
S
G
D
E
B
A
C
5
4
4
6
3
5
7+
6
7+
3
A* Search
AI, Subash Chandra Pakhrin 27
S
A B
B D
G
A C
3 + 7+ = 10+
7 + 6 = 13
6 + 5 = 11
5 + 6 = 11
9 + 7+ = 16+
11 + 0 = 11
9 + 7+ = 16+
Tie: Lexically Least
A* Search
AI, Subash Chandra Pakhrin 28
A* Search
AI, Subash Chandra Pakhrin 29
A* Search
AI, Subash Chandra Pakhrin 30
Algorithm A* (graphs)
OPEN = nodes on frontier. CLOSED = expanded nodes.
OPEN = {<s, nil>}
While OPEN is not empty
remove from OPEN the node <n, p> with minimum f(n)
place <n, p> on CLOSED
if n is a goal node, return success (path p)
for each edge connecting n & m with cost c
if <m, q> is on CLOSED and { p| e} is cheaper than q
then remove n from CLOSED, put <m, { p | e} > on OPEN
else if <m, q> is on OPEN and {p| e} is cheaper than q
then replace q with {p| e}
else if m is not on OPEN put <m, {p| e} > on OPEN
Return failure
AI, Subash Chandra Pakhrin 31
A* Search
• Optimal – optimally efficient
• Complete
• Number of nodes searched still exponential in
the worst case
AI, Subash Chandra Pakhrin 32
Admissible Heuristics
• An admissible heuristic is one that never
overestimates the cost to reach the goal.
AI, Subash Chandra Pakhrin 33
S
C
A
B
G
1
1
10
1
100
100
0
0
The graph satisfy admissibility but does not satisfy consistency
Estimated Distance {H( x , G)} ≤ Actual Distance {D(x , G)}
| H( x , G) - H( y , G)| ≤ D ( x , y)
A*
AI, Subash Chandra Pakhrin 34
S
G
C
BB
C
1+0 = 1
11+0 = 11
111+0 = 111
1+100 = 101
2+0 = 2
Do not extend C because it has been extended
Conditions
• Admissibility
Estimated Distance {H( x , G)} ≤ Actual Distance {D(x
, G)}
• Consistency
| H( x , G) - H( y , G)| ≤ D ( x , y)
AI, Subash Chandra Pakhrin 35
Admissible + Consistence
AI, Subash Chandra Pakhrin 36
S
C
A
B
G
1
1
10
2
100
2
0
0
A* Search
• Admissibility: Provided a solution exists, the
first solution found is an optimal solution
• Condition for admissibility
– State space graph
• Every node has a finite number of successors
• Every arc in the graph has a cost greater than some є > 0
– Heuristic function
• For every node n, h(n) < h*(n)
AI, Subash Chandra Pakhrin 37
Admissibility of A*
• A* is optimally efficient for a given heuristic of the
optimal search algorithms that expand search
paths from the root node, it can be shown that no
other optimal algorithm will expand fewer nodes
and find a solution
• Monotone heuristic: along any path the f - cost
never decreases.
– If this property does not hold we can use the following
trick ( m is a child of n)
f(m) = max ( f(n), g(m)+h(m))
AI, Subash Chandra Pakhrin 38
Completeness of A*
• Let G be an optimum goal state.
• A* cannot reach a goal state only if there are
infinitely many nodes where f(n) ≤ f*
• Can only happen if either happens:
– A node with infinite branching factor
– A path with finite cost but infinitely many nodes
• Thus A* is complete.
AI, Subash Chandra Pakhrin 39
Optimality
• Lemma: A* expands nodes in order of increasing f
value.
• Gradually adds “f-contours” of nodes.
• Contour I has all nodes with f= f i, where f i< fi+1.
• That is to say, nodes inside a given contour have
f-costs less than or equal to contour value.
AI, Subash Chandra Pakhrin 40
Maze Traversal (for A* Search)
Problem: To get from square A3 to
square E2, one step at a time,
avoiding obstacles (black squares).
Operators: (in order)
Go left(n), Go down(n), Go right(n)
Each operator costs 1.
Heuristic: Manhattan distance
• Start Position: A3
• Goal: E2
AI, Subash Chandra Pakhrin 41
Maze Traversal (for A* Search)
AI, Subash Chandra Pakhrin 42
Using multiple heuristics
• Suppose you have identified a number of non-
overestimating heuristics for a problem:
h1(n), h2(n), … , h k(n)
Then
max (h1(n), h2(n), … , h k(n))
Is a more powerful non-overestimating
heuristic.
AI, Subash Chandra Pakhrin 43

More Related Content

What's hot

Pathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic searchPathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic search
Stavros Vassos
 
Astar algorithm
Astar algorithmAstar algorithm
Astar algorithm
Shuqing Zhang
 
16890 unit 2 heuristic search techniques
16890 unit 2 heuristic  search techniques16890 unit 2 heuristic  search techniques
16890 unit 2 heuristic search techniquesJais Balta
 
A star algorithms
A star algorithmsA star algorithms
A star algorithms
sandeep54552
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchPalGov
 
04 search heuristic
04 search heuristic04 search heuristic
04 search heuristic
Nour Zeineddine
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
Tianlu Wang
 
High-dimensional polytopes defined by oracles: algorithms, computations and a...
High-dimensional polytopes defined by oracles: algorithms, computations and a...High-dimensional polytopes defined by oracles: algorithms, computations and a...
High-dimensional polytopes defined by oracles: algorithms, computations and a...
Vissarion Fisikopoulos
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
IOSR Journals
 
Informed search (bst)
Informed search (bst)Informed search (bst)
Informed search (bst)
radhika puri
 
Pathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsPathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basics
Stavros Vassos
 
Presentation - Bi-directional A-star search
Presentation - Bi-directional A-star searchPresentation - Bi-directional A-star search
Presentation - Bi-directional A-star searchMohammad Saiful Islam
 
Scalable k-means plus plus
Scalable k-means plus plusScalable k-means plus plus
Scalable k-means plus plus
Prabin Giri, PhD Student
 
Global Optimization with Descending Region Algorithm
Global Optimization with Descending Region AlgorithmGlobal Optimization with Descending Region Algorithm
Global Optimization with Descending Region Algorithm
Loc Nguyen
 
ABC in Roma
ABC in RomaABC in Roma
ABC in Roma
Christian Robert
 
Unit 3
Unit 3Unit 3
Unit 3
guna287176
 
Unit 4
Unit 4Unit 4
Unit 4
guna287176
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
RahulSharma4566
 

What's hot (19)

Pathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic searchPathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic search
 
Astar algorithm
Astar algorithmAstar algorithm
Astar algorithm
 
M4 Heuristics
M4 HeuristicsM4 Heuristics
M4 Heuristics
 
16890 unit 2 heuristic search techniques
16890 unit 2 heuristic  search techniques16890 unit 2 heuristic  search techniques
16890 unit 2 heuristic search techniques
 
A star algorithms
A star algorithmsA star algorithms
A star algorithms
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
 
04 search heuristic
04 search heuristic04 search heuristic
04 search heuristic
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
 
High-dimensional polytopes defined by oracles: algorithms, computations and a...
High-dimensional polytopes defined by oracles: algorithms, computations and a...High-dimensional polytopes defined by oracles: algorithms, computations and a...
High-dimensional polytopes defined by oracles: algorithms, computations and a...
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
 
Informed search (bst)
Informed search (bst)Informed search (bst)
Informed search (bst)
 
Pathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsPathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basics
 
Presentation - Bi-directional A-star search
Presentation - Bi-directional A-star searchPresentation - Bi-directional A-star search
Presentation - Bi-directional A-star search
 
Scalable k-means plus plus
Scalable k-means plus plusScalable k-means plus plus
Scalable k-means plus plus
 
Global Optimization with Descending Region Algorithm
Global Optimization with Descending Region AlgorithmGlobal Optimization with Descending Region Algorithm
Global Optimization with Descending Region Algorithm
 
ABC in Roma
ABC in RomaABC in Roma
ABC in Roma
 
Unit 3
Unit 3Unit 3
Unit 3
 
Unit 4
Unit 4Unit 4
Unit 4
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
 

Similar to Final slide (bsc csit) chapter 5

informed_search.pdf
informed_search.pdfinformed_search.pdf
informed_search.pdf
SankarTerli
 
Informed Search.pptx
Informed Search.pptxInformed Search.pptx
Informed Search.pptx
MohanKumarP34
 
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttktshamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
PEACENYAMA1
 
Artificial intelligence and machine learning
Artificial intelligence and machine learningArtificial intelligence and machine learning
Artificial intelligence and machine learning
GuruKiran18
 
AI 22-23 Chpt3 informed.pptx
AI 22-23 Chpt3 informed.pptxAI 22-23 Chpt3 informed.pptx
AI 22-23 Chpt3 informed.pptx
DrChhayaPawar1
 
A Star Search
A Star SearchA Star Search
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
Nazir Ahmed
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
Nazir Ahmed
 
3.informed search
3.informed search3.informed search
3.informed search
KONGU ENGINEERING COLLEGE
 
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdfAI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
Asst.prof M.Gokilavani
 
Heuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptxHeuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptx
Swagat Praharaj
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
maharajdey
 
Astar.ppt hjguyjgukyjgoyjgugukgulgoyulgyilglyi
Astar.ppt hjguyjgukyjgoyjgugukgulgoyulgyilglyiAstar.ppt hjguyjgukyjgoyjgugukgulgoyulgyilglyi
Astar.ppt hjguyjgukyjgoyjgugukgulgoyulgyilglyi
kamaleshs183
 
Informed-search TECHNIQUES IN ai ml data science
Informed-search TECHNIQUES IN ai ml data scienceInformed-search TECHNIQUES IN ai ml data science
Informed-search TECHNIQUES IN ai ml data science
devvpillpersonal
 
Searching
SearchingSearching
lecture 6 AI - A star.pdf
lecture 6 AI - A star.pdflecture 6 AI - A star.pdf
lecture 6 AI - A star.pdf
HassanElalfy4
 
Searching Informed Search.pdf
Searching Informed Search.pdfSearching Informed Search.pdf
Searching Informed Search.pdf
DrBashirMSaad
 
m4-heuristics.ppt
m4-heuristics.pptm4-heuristics.ppt
m4-heuristics.ppt
WaqarAli934582
 
Presentacion nro 1 redes y comunicaciones de datos
Presentacion nro 1 redes y comunicaciones de datosPresentacion nro 1 redes y comunicaciones de datos
Presentacion nro 1 redes y comunicaciones de datos
LuisGabrielVasquez
 

Similar to Final slide (bsc csit) chapter 5 (20)

informed_search.pdf
informed_search.pdfinformed_search.pdf
informed_search.pdf
 
Informed Search.pptx
Informed Search.pptxInformed Search.pptx
Informed Search.pptx
 
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttktshamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
 
Artificial intelligence and machine learning
Artificial intelligence and machine learningArtificial intelligence and machine learning
Artificial intelligence and machine learning
 
M4 heuristics
M4 heuristicsM4 heuristics
M4 heuristics
 
AI 22-23 Chpt3 informed.pptx
AI 22-23 Chpt3 informed.pptxAI 22-23 Chpt3 informed.pptx
AI 22-23 Chpt3 informed.pptx
 
A Star Search
A Star SearchA Star Search
A Star Search
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
 
3.informed search
3.informed search3.informed search
3.informed search
 
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdfAI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
 
Heuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptxHeuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptx
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Astar.ppt hjguyjgukyjgoyjgugukgulgoyulgyilglyi
Astar.ppt hjguyjgukyjgoyjgugukgulgoyulgyilglyiAstar.ppt hjguyjgukyjgoyjgugukgulgoyulgyilglyi
Astar.ppt hjguyjgukyjgoyjgugukgulgoyulgyilglyi
 
Informed-search TECHNIQUES IN ai ml data science
Informed-search TECHNIQUES IN ai ml data scienceInformed-search TECHNIQUES IN ai ml data science
Informed-search TECHNIQUES IN ai ml data science
 
Searching
SearchingSearching
Searching
 
lecture 6 AI - A star.pdf
lecture 6 AI - A star.pdflecture 6 AI - A star.pdf
lecture 6 AI - A star.pdf
 
Searching Informed Search.pdf
Searching Informed Search.pdfSearching Informed Search.pdf
Searching Informed Search.pdf
 
m4-heuristics.ppt
m4-heuristics.pptm4-heuristics.ppt
m4-heuristics.ppt
 
Presentacion nro 1 redes y comunicaciones de datos
Presentacion nro 1 redes y comunicaciones de datosPresentacion nro 1 redes y comunicaciones de datos
Presentacion nro 1 redes y comunicaciones de datos
 

More from Subash Chandra Pakhrin

Prismoid
PrismoidPrismoid
Torsion Angles, ASA Used for prediction of Non - Enzymatic PTM
Torsion Angles, ASA Used for prediction of Non - Enzymatic PTMTorsion Angles, ASA Used for prediction of Non - Enzymatic PTM
Torsion Angles, ASA Used for prediction of Non - Enzymatic PTM
Subash Chandra Pakhrin
 
COVID 19
COVID 19 COVID 19
Lstm covid 19 prediction
Lstm covid 19 predictionLstm covid 19 prediction
Lstm covid 19 prediction
Subash Chandra Pakhrin
 
Rnn & Lstm
Rnn & LstmRnn & Lstm
Characterization and identification of lysine succinylation sites based
Characterization and identification of lysine succinylation sites basedCharacterization and identification of lysine succinylation sites based
Characterization and identification of lysine succinylation sites based
Subash Chandra Pakhrin
 
Deep Learning or Convolutional Neural Network
Deep Learning or Convolutional Neural Network Deep Learning or Convolutional Neural Network
Deep Learning or Convolutional Neural Network
Subash Chandra Pakhrin
 
Ncit 1st ai lab
Ncit 1st ai labNcit 1st ai lab
Ncit 1st ai lab
Subash Chandra Pakhrin
 
Ai lab
Ai labAi lab
Constraint satisfaction problem
Constraint satisfaction problem Constraint satisfaction problem
Constraint satisfaction problem
Subash Chandra Pakhrin
 
Analysis
AnalysisAnalysis
Planning
PlanningPlanning
Intelligent agents (bsc csit) lec 2
Intelligent agents (bsc csit) lec 2Intelligent agents (bsc csit) lec 2
Intelligent agents (bsc csit) lec 2
Subash Chandra Pakhrin
 
Final slide4 (bsc csit) chapter 4
Final slide4 (bsc csit) chapter 4Final slide4 (bsc csit) chapter 4
Final slide4 (bsc csit) chapter 4
Subash Chandra Pakhrin
 
Lec 6 bsc csit
Lec 6 bsc csitLec 6 bsc csit
Lec 6 bsc csit
Subash Chandra Pakhrin
 
Two player games
Two player gamesTwo player games
Two player games
Subash Chandra Pakhrin
 
Knnowledge representation and logic lec 11 to lec 15
Knnowledge representation and logic lec 11 to lec 15Knnowledge representation and logic lec 11 to lec 15
Knnowledge representation and logic lec 11 to lec 15
Subash Chandra Pakhrin
 
Final slide (bsc csit) chapter 2
Final slide (bsc csit) chapter 2Final slide (bsc csit) chapter 2
Final slide (bsc csit) chapter 2
Subash Chandra Pakhrin
 
Final slide (bsc csit) chapter 3
Final slide (bsc csit) chapter 3Final slide (bsc csit) chapter 3
Final slide (bsc csit) chapter 3
Subash Chandra Pakhrin
 

More from Subash Chandra Pakhrin (20)

Prismoid
PrismoidPrismoid
Prismoid
 
Torsion Angles, ASA Used for prediction of Non - Enzymatic PTM
Torsion Angles, ASA Used for prediction of Non - Enzymatic PTMTorsion Angles, ASA Used for prediction of Non - Enzymatic PTM
Torsion Angles, ASA Used for prediction of Non - Enzymatic PTM
 
COVID 19
COVID 19 COVID 19
COVID 19
 
Lstm covid 19 prediction
Lstm covid 19 predictionLstm covid 19 prediction
Lstm covid 19 prediction
 
Rnn & Lstm
Rnn & LstmRnn & Lstm
Rnn & Lstm
 
Characterization and identification of lysine succinylation sites based
Characterization and identification of lysine succinylation sites basedCharacterization and identification of lysine succinylation sites based
Characterization and identification of lysine succinylation sites based
 
Cnn april 8 2020
Cnn april 8 2020Cnn april 8 2020
Cnn april 8 2020
 
Deep Learning or Convolutional Neural Network
Deep Learning or Convolutional Neural Network Deep Learning or Convolutional Neural Network
Deep Learning or Convolutional Neural Network
 
Ncit 1st ai lab
Ncit 1st ai labNcit 1st ai lab
Ncit 1st ai lab
 
Ai lab
Ai labAi lab
Ai lab
 
Constraint satisfaction problem
Constraint satisfaction problem Constraint satisfaction problem
Constraint satisfaction problem
 
Analysis
AnalysisAnalysis
Analysis
 
Planning
PlanningPlanning
Planning
 
Intelligent agents (bsc csit) lec 2
Intelligent agents (bsc csit) lec 2Intelligent agents (bsc csit) lec 2
Intelligent agents (bsc csit) lec 2
 
Final slide4 (bsc csit) chapter 4
Final slide4 (bsc csit) chapter 4Final slide4 (bsc csit) chapter 4
Final slide4 (bsc csit) chapter 4
 
Lec 6 bsc csit
Lec 6 bsc csitLec 6 bsc csit
Lec 6 bsc csit
 
Two player games
Two player gamesTwo player games
Two player games
 
Knnowledge representation and logic lec 11 to lec 15
Knnowledge representation and logic lec 11 to lec 15Knnowledge representation and logic lec 11 to lec 15
Knnowledge representation and logic lec 11 to lec 15
 
Final slide (bsc csit) chapter 2
Final slide (bsc csit) chapter 2Final slide (bsc csit) chapter 2
Final slide (bsc csit) chapter 2
 
Final slide (bsc csit) chapter 3
Final slide (bsc csit) chapter 3Final slide (bsc csit) chapter 3
Final slide (bsc csit) chapter 3
 

Recently uploaded

Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 

Final slide (bsc csit) chapter 5

  • 1. Informed Search 1AI, Subash Chandra Pakhrin
  • 2. Instructional Objectives • The students will learn the following strategies for informed search: – A* – Greedy search – Uniform Cost Search 2AI, Subash Chandra Pakhrin
  • 3. Instructional Objectives • At the end of this lesson the student should be able to do the following: – Understand what is a heuristic function. – They should be able to design heuristic functions for a given problem. – They should be able to determine if A* uses an admissible heuristic function, it will produce an optimum solution. – They should learn how to compare two heuristic functions. 3AI, Subash Chandra Pakhrin
  • 4. Informed Search • We have seen un-informed search methods that systematically explore the state space and find the goal. • Inefficient in most cases • Informed search methods use problem specific knowledge, are more efficient 4AI, Subash Chandra Pakhrin
  • 5. Heuristics • “Heuristics are criteria, methods or principles for deciding which among several alternatives course of action promises to be the most effective in order to achieve some goal” Judea Pearl Can we use heuristics to identify the most promising search path 5AI, Subash Chandra Pakhrin
  • 6. Heuristic Distance • The distance as the crow fly between two places even though there is no road that goes between those two places. • Being close is actually not a good thing because it may result in dead end. AI, Subash Chandra Pakhrin 6 3 S G D E B A C 5 4 4 6 3 5 7+ 6 7+
  • 7. Heuristic Distance • Objective of enlisted search algorithm is to be close to the goal. – Hill Climbing – Beam Search • When Beam Search value (b) = 2 AI, Subash Chandra Pakhrin 7 C B A D Reject Keep Keep Reject
  • 8. Remember • FRINGE: Nodes not yet expanded • CLOSED: Nodes that are expanded AI, Subash Chandra Pakhrin 8
  • 9. Branch and Bound AI, Subash Chandra Pakhrin 9 S A B B D C G A C D E 3 5 7 1111 12 15 996 C, D, E need not be extended any further because their accumulated length so far is less than or equal to the length of the goal
  • 10. Branch and Bound + Extended List • Don’t extend the node which has been extended • Saved some work because no extension • Vast area of tree has been pruned away and don’t have to be examined at all AI, Subash Chandra Pakhrin 10 S A B B D G A C E 3 5 7 11 15 996
  • 11. Example of Heuristic Function • A heuristic function at a node n is an estimate of the optimum cost from the current node to a goal. Denoted by h(n) h(n) = estimated cost of the cheapest path from node n to a goal node • Example – Want path from Kathmandu to Delhi – Heuristic from Kathmandu may be straight – line distance between Kathmandu to Delhi – H(Kathmandu) = Euclidean Distance (Kathmandu, Delhi) 11AI, Subash Chandra Pakhrin
  • 12. Heuristics - example 8 – puzzle: Number of tiles out of place 12AI, Subash Chandra Pakhrin h1(n) = 5 h1(n) = 5; is an underestimate of the actual number of states to move into goal state
  • 13. Heuristics - example 8-puzzle: Manhattan Distance (distance tile is out of place) 13AI, Subash Chandra Pakhrin h2(n) = 6; is an underestimate of the actual number of move required to move from initial state to goal state h n(n) = max{h1(n), h2(n)}= 6
  • 14. Best – First Search Priority queue of nodes to be explored Cost function f(n) applied to each node AI, Subash Chandra Pakhrin 14 5 A B C D 3 1 E F 4 6HG 5 7 I J STEP 1: CLOSED: A OPEN: BCD STEP 2: D expanded CLOSED: AD OPEN: BCEF
  • 15. Best – First Search Let Fringe be a priority queue containing the initial state LOOP if Fringe is empty return failure Node <- remove-first (Fringe) if Node is a goal then return the path from initial state to Node else generate all successors of Node, and put the newly generated nodes into fringe according to their f values End LOOP AI, Subash Chandra Pakhrin 15
  • 16. Greedy Search • Idea: Expand node with the smallest estimated cost to reach the goal • Use heuristic function f(n) = h(n) – Not optimal – Incomplete AI, Subash Chandra Pakhrin 16
  • 17. Greedy Best First Search AI, Subash Chandra Pakhrin 17
  • 18. Solution using Greedy Best First Search AI, Subash Chandra Pakhrin 18 Arad 366
  • 19. Solution using Greedy Best First Search AI, Subash Chandra Pakhrin 19
  • 20. A* Search • Hart, Nilsson & Rafael 1968 – Best first search with f(n) = g(n) + h(n) – Where g(n) = sum of edge cost from start to n – And h(n) = estimate of lowest cost path from node n to goal – If h(n) is admissible then search will find optimal solution. • A* = Branch and Bound + Extended List + Admissible Heuristic AI, Subash Chandra Pakhrin 20
  • 21. Consistency ( Monotonicity ) • A heuristic is said to be consistent if for any node N and any successor N’ of N , estimated cost to reach to the goal from node N is less than the sum of step cost from N to N’ and estimated cost from node N’ to goal node. h(n) ≤ c(n, n’) + h(n’) Where; h(n) = Estimated cost to reach to the goal node from node n • c(n, n’) = actual cost from n to n’ AI, Subash Chandra Pakhrin 21
  • 22. Admissible • A heuristic h(n) is admissible if for every node n, h(n) ≤ h*(n), where h*(n) is the true cost to reach the goal state from n. • An admissible heuristic never overestimates the cost to reach the goal, i.e., it is optimistic. • Theorem: If h(n) is admissible, A* using TREE- SEARCH is optimal. AI, Subash Chandra Pakhrin 22
  • 23. Optimality of A* (Proof) • Suppose some suboptimal goal G2 has been generated and is in the fringe. Let n be an unexpanded node in the fringe such that n is on a shortest path to an optimal goal G. We want to prove: f(n) < f(G2) (then A* will prefer n over G2) f (G2) = g(G2) since h(G2) = 0 g(G2) > g(G) since G2 is suboptimal f(G) = g(G) since h(G) = 0 f(G2) > f (G) from aboveAI, Subash Chandra Pakhrin 23
  • 24. Optimality of A* (Proof) f(G2) > f(G) (from above) h(n) ≤ h*(n), (since h is admissible(under – estimate)) g(n) + h(n) ≤ g(n) + h*(n) Since g(n) + h(n) = f(n) & g(n) + h*(n) = f(G) f(n) ≤ f(G) < f (G2) Hence f (G2) > f(n), and A* will never select G2 for expansion • Therefore A* does find the optimal solutionAI, Subash Chandra Pakhrin 24
  • 25. Theorem: If h(n) is consistent , then the values of f(n) along the path are non-decreasing. • A heuristic is consistent (or monotonic) if for every node n, every successor n' of n generated by any action a: h(n) ≤ c(n, a, n’) + h(n’) • If h is consistent, we have: f(n’) = g(n’) + h(n’) = g(n) + c(n, a, n’) + h(n’) ≥ g(n) + h(n) = f(n) i.e., f(n) is non-decreasing along any path. Theorem: If h(n) is consistent, A* using GRAPH- SEARCH is optimal AI, Subash Chandra Pakhrin 25 Triangle Inequality
  • 26. A* Search Lower Bound on the path (crow fly) = Accumulated Distance + Airline Distance *** Forget Everything Use the concept of Airline Distance *** AI, Subash Chandra Pakhrin 26 S G D E B A C 5 4 4 6 3 5 7+ 6 7+ 3
  • 27. A* Search AI, Subash Chandra Pakhrin 27 S A B B D G A C 3 + 7+ = 10+ 7 + 6 = 13 6 + 5 = 11 5 + 6 = 11 9 + 7+ = 16+ 11 + 0 = 11 9 + 7+ = 16+ Tie: Lexically Least
  • 28. A* Search AI, Subash Chandra Pakhrin 28
  • 29. A* Search AI, Subash Chandra Pakhrin 29
  • 30. A* Search AI, Subash Chandra Pakhrin 30
  • 31. Algorithm A* (graphs) OPEN = nodes on frontier. CLOSED = expanded nodes. OPEN = {<s, nil>} While OPEN is not empty remove from OPEN the node <n, p> with minimum f(n) place <n, p> on CLOSED if n is a goal node, return success (path p) for each edge connecting n & m with cost c if <m, q> is on CLOSED and { p| e} is cheaper than q then remove n from CLOSED, put <m, { p | e} > on OPEN else if <m, q> is on OPEN and {p| e} is cheaper than q then replace q with {p| e} else if m is not on OPEN put <m, {p| e} > on OPEN Return failure AI, Subash Chandra Pakhrin 31
  • 32. A* Search • Optimal – optimally efficient • Complete • Number of nodes searched still exponential in the worst case AI, Subash Chandra Pakhrin 32
  • 33. Admissible Heuristics • An admissible heuristic is one that never overestimates the cost to reach the goal. AI, Subash Chandra Pakhrin 33 S C A B G 1 1 10 1 100 100 0 0 The graph satisfy admissibility but does not satisfy consistency Estimated Distance {H( x , G)} ≤ Actual Distance {D(x , G)} | H( x , G) - H( y , G)| ≤ D ( x , y)
  • 34. A* AI, Subash Chandra Pakhrin 34 S G C BB C 1+0 = 1 11+0 = 11 111+0 = 111 1+100 = 101 2+0 = 2 Do not extend C because it has been extended
  • 35. Conditions • Admissibility Estimated Distance {H( x , G)} ≤ Actual Distance {D(x , G)} • Consistency | H( x , G) - H( y , G)| ≤ D ( x , y) AI, Subash Chandra Pakhrin 35
  • 36. Admissible + Consistence AI, Subash Chandra Pakhrin 36 S C A B G 1 1 10 2 100 2 0 0
  • 37. A* Search • Admissibility: Provided a solution exists, the first solution found is an optimal solution • Condition for admissibility – State space graph • Every node has a finite number of successors • Every arc in the graph has a cost greater than some є > 0 – Heuristic function • For every node n, h(n) < h*(n) AI, Subash Chandra Pakhrin 37
  • 38. Admissibility of A* • A* is optimally efficient for a given heuristic of the optimal search algorithms that expand search paths from the root node, it can be shown that no other optimal algorithm will expand fewer nodes and find a solution • Monotone heuristic: along any path the f - cost never decreases. – If this property does not hold we can use the following trick ( m is a child of n) f(m) = max ( f(n), g(m)+h(m)) AI, Subash Chandra Pakhrin 38
  • 39. Completeness of A* • Let G be an optimum goal state. • A* cannot reach a goal state only if there are infinitely many nodes where f(n) ≤ f* • Can only happen if either happens: – A node with infinite branching factor – A path with finite cost but infinitely many nodes • Thus A* is complete. AI, Subash Chandra Pakhrin 39
  • 40. Optimality • Lemma: A* expands nodes in order of increasing f value. • Gradually adds “f-contours” of nodes. • Contour I has all nodes with f= f i, where f i< fi+1. • That is to say, nodes inside a given contour have f-costs less than or equal to contour value. AI, Subash Chandra Pakhrin 40
  • 41. Maze Traversal (for A* Search) Problem: To get from square A3 to square E2, one step at a time, avoiding obstacles (black squares). Operators: (in order) Go left(n), Go down(n), Go right(n) Each operator costs 1. Heuristic: Manhattan distance • Start Position: A3 • Goal: E2 AI, Subash Chandra Pakhrin 41
  • 42. Maze Traversal (for A* Search) AI, Subash Chandra Pakhrin 42
  • 43. Using multiple heuristics • Suppose you have identified a number of non- overestimating heuristics for a problem: h1(n), h2(n), … , h k(n) Then max (h1(n), h2(n), … , h k(n)) Is a more powerful non-overestimating heuristic. AI, Subash Chandra Pakhrin 43

Editor's Notes

  1. Admissible: Underestimates cost of any solution which can reached from node
  2. Triangle Inequality Theorem. The sum of the lengths of any two sides of a triangle is greater than the length of the third side. Graph Search : keeps all checked nodes in memory to avoid repeated states