SlideShare a Scribd company logo
1 of 27
LOCAL SEARCH & INFORMED
SEARCH
HILL CLIMBING
• It is also known as discrete optimization algorithm.
• It uses a simple heuristic function viz., the amount of distance the
node is from the goal.
• Algorithm:-
Step1 : Put the initial node on a list START
Step 2 : If (START is empty) or (START=GOAL) terminate search
Step 3 : Remove the first node from START. Call this node a
Step 4 : If (a==GOAL) terminate search with success.
Step 5 : Else if node a has successor, generate all of them. Find out
how far they are from the goal node. Sort them by the remaining
distance from the goal and add them to the beginning of START
Step 6 : Goto Step 2.
SEARCH TREE FOR HILL CLIMBING
Problems of Hill-Climbing Technique
1. Local maximum : A state that is better than
all its neighbors but not so when compared
to states to states that are farther away.
2. Plateau : A flat area of the search space, in
which all neighbors have the same value.
3. Ridge : This is an area in the path which must
be traversed very carefully because
movement in any direction might maintain
one at the same level or result in fast decent.
SOLUTION
• Backtracking for local maximum. Backtracking
helps in doing what has been done so far and
permits to try a totally different path to attain
the global peak.
• A big jump is the solution to escape from the
plateau.
• Trying different paths at the same time is the
solution for ridges.
Best-First Search
• This search procedure is an evaluation-function variant of breadth-
first search.
• Algorithm:-
Step1 : Put the initial node on a list START
Step 2 : If (START is empty) or (START=GOAL) terminate search
Step 3 : Remove the first node from START. Call this node a
Step 4 : If (a==GOAL) terminate search with success.
Step 5 : Else if node a has successor, generate all of them. Find out
how far they are from the goal node. Sort them by the remaining
distance from the goal.
Step 6 : Name this list as START 1
Step 7 : Replace START with START 1
Step 8 : Goto Step 2.
A Sample tree for best-first search
7
5
6
3
9
8
1
2
6
1
4
5
2
0
1
A
D
E
F
G
B
H
C
J
I L
M
K
Start
node
Goal
node
Search Process of Best-First Search
Step Node being
expanded
Children Available nodes Node Chosen
1 S (A:3), (B:6), (C:5) (A:3), (B:6), (C:5) (A:3)
2 A (D:9),(E:8) (B:6),(C:5),(D:9),(E:8) (C:5)
3 C (H:7) (B:6),(D:9),(E:8),(H:7) (B:6)
4 B (F:12), (G:14) (D:9), (E:8), (H:7), (F:12),
(G:14)
(H:7)
5 H (I:5), (J:6) (D:9), (E:8), (F:12), (G:14),
(I:5), (J:6)
(I:5)
6 I (K:1), (L:0), (M:2) (D:9), (E:8), (F:12), (G:14),
(J:6), (K:1), (L:0), (M:2)
Search stops as
the goal is
reached
A* Algorithm
• In this algorithm, we use the evaluation function
and cost function.
• Evaluation function estimates how far a particular
node is from goal.
• Cost functions indicates how much resources like
time, energy, money etc., have been spent in
reaching a particular node from the start.
• The sum of the evaluation function value and the
cost along the path leading to that state is called
fitness number.
A Sample tree with fitness number
used for A* Search
7
5
6
3
9
8
1
2
6
1
4
5
2
0
1
A
D
E
F
G
B
H
C
J
I L
M
K
Start
node
Goal
node
3
2
2
6
2
2
1
3
4
7
3
5
2
A* Algorithm
Step1 : Put the initial node on a list START
Step 2 : If (START is empty) or (START=GOAL) terminate search
Step 3 : Remove the first node from START. Call this node a
Step 4 : If (a==GOAL) terminate search with success.
Step 5 : Else if node a has successor, generate all of them.
Estimate the fitness number of the successor by totaling
the evaluation-function value and the cost-function value.
Sort the list by fitness number.
Step 6 : Name the new list as START 1
Step 7 : Replace START with START 1
Step 8 : Goto Step 2.
AND/OR graphs
• Some problems are best represented as
achieving subgoals, some of which achieved
simultaneously and independently (AND)
• Up to now, only dealt with OR options
Possess TV set
Steal TV Earn Money Buy TV
AND/OR Search (AO*)
• We must examine several nodes
simultaneously when choosing the next
move
A
B C D
38
E F G H I J
17 9 27
(5) (10) (3) (4) (15) (10)
A
B C D
(3)
(4)
(5)
(9)
AND/OR Best-First-Search
• Traverse the graph (from the initial node)
following the best current path.
• Pick one of the unexpanded nodes on that
path and expand it. Add its successors to the
graph and compute f for each of them
• Change the expanded node’s f value to reflect
its successors. Propagate the change up the
graph.
• Reconsider the current best solution and
repeat until a solution is found
AND/OR Best-First-Search example
A
B C
D
(3)
(4)
(5)
(9)
A
(5)
2.
1.
A
B C
D
E F
(4) (4)
(10)
(3)
(9)
(4)
(10)
3.
AND/OR Best-First-Search example
B C D
G H E F
(5) (7) (4) (4)
(10)
(6)
(12)
(4) (10)
4. A
A Longer path may be better
B C D
G H E F
A
J
I
Unsolvable B C D
G H E F
A
J
I
Unsolvable
Interacting Sub goals
C
D
E
A
(2)
(5)
AO* algorithm
1. Let G be a graph with only starting node INIT.
2. Repeat the followings until INIT is labeled SOLVED or
h(INIT) > FUTILITY
a) Select an unexpanded node from the most promising path
from INIT (call it NODE)
b) Generate successors of NODE. If there are none, set h(NODE)
= FUTILITY (i.e., NODE is unsolvable); otherwise for each
SUCCESSOR that is not an ancestor of NODE do the following:
i. Add SUCCESSSOR to G.
ii. If SUCCESSOR is a terminal node, label it SOLVED and set
h(SUCCESSOR) = 0.
iii. If SUCCESSPR is not a terminal node, compute its h
AO* algorithm (Cont.)
c) Propagate the newly discovered information up the graph
by doing the following: let S be set of SOLVED nodes or
nodes whose h values have been changed and need to
have values propagated back to their parents. Initialize S to
Node. Until S is empty repeat the followings:
i. Remove a node from S and call it CURRENT.
ii. Compute the cost of each of the arcs emerging from CURRENT.
Assign minimum cost of its successors as its h.
iii. Mark the best path out of CURRENT by marking the arc that had
the minimum cost in step ii
iv. Mark CURRENT as SOLVED if all of the nodes connected to it
through new labeled arc have been labeled SOLVED
v. If CURRENT has been labeled SOLVED or its cost was just changed,
propagate its new cost back up through the graph. So add all of the
ancestors of CURRENT to S.
An Example
An Example
A
(8)
An Example
C
D
B
A
(8)
(1)
(2)
[12]
4 5
5
[13]
An Example
C
D
B
A
(8)
(4)
(2)
[15]
4 5
5
[13]
2
An Example
C
D
B
A
(3)
(4)
G
E
(2)
(1)
(0)
[15]
4 5
5
2
2
4
[8]
An Example
C
D
B
A
(4)
(4)
G
E
(2)
(3)
(0)
[15]
4 5
5
2
2
2
4
[9]
3
An Example
C
D
B
A
(4)
G
E
(2)
(3)
(0)
[15]
4 5
5
2
2
2
4
Solved
3
Solved
Solved

More Related Content

Similar to HEURISTIC SEARCH and other technique.pptx

Artificial intelligence topic for the btech studentCT II.pptx
Artificial intelligence topic for the btech studentCT II.pptxArtificial intelligence topic for the btech studentCT II.pptx
Artificial intelligence topic for the btech studentCT II.pptx
bharatipatel22
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
Tianlu Wang
 
AI unit-2 lecture notes.docx
AI unit-2 lecture notes.docxAI unit-2 lecture notes.docx
AI unit-2 lecture notes.docx
CS50Bootcamp
 
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxArtificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
CCBProduction
 

Similar to HEURISTIC SEARCH and other technique.pptx (20)

A* algorithm
A* algorithmA* algorithm
A* algorithm
 
AI3391 Session 10 A searching algorithm.pptx
AI3391 Session 10 A searching algorithm.pptxAI3391 Session 10 A searching algorithm.pptx
AI3391 Session 10 A searching algorithm.pptx
 
Decision Science.pdf
Decision Science.pdfDecision Science.pdf
Decision Science.pdf
 
Artificial intelligence topic for the btech studentCT II.pptx
Artificial intelligence topic for the btech studentCT II.pptxArtificial intelligence topic for the btech studentCT II.pptx
Artificial intelligence topic for the btech studentCT II.pptx
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Analysis of Pathfinding Algorithms
Analysis of Pathfinding AlgorithmsAnalysis of Pathfinding Algorithms
Analysis of Pathfinding Algorithms
 
CS3491-AI and ML lab manual cs3491 r2021
CS3491-AI and ML lab manual    cs3491 r2021CS3491-AI and ML lab manual    cs3491 r2021
CS3491-AI and ML lab manual cs3491 r2021
 
BFS algo.ppt
BFS algo.pptBFS algo.ppt
BFS algo.ppt
 
problem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , problomsproblem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , probloms
 
Training at AI Frontiers 2018 - LaiOffer Self-Driving-Car-lecture 2: Incremen...
Training at AI Frontiers 2018 - LaiOffer Self-Driving-Car-lecture 2: Incremen...Training at AI Frontiers 2018 - LaiOffer Self-Driving-Car-lecture 2: Incremen...
Training at AI Frontiers 2018 - LaiOffer Self-Driving-Car-lecture 2: Incremen...
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
Artificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptxArtificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptx
 
AI unit-2 lecture notes.docx
AI unit-2 lecture notes.docxAI unit-2 lecture notes.docx
AI unit-2 lecture notes.docx
 
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxArtificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
 
AI3391 ARTIFICIAL INTELLIGENCE Session 7 Uniformed search strategies.pptx
AI3391 ARTIFICIAL INTELLIGENCE Session 7 Uniformed search strategies.pptxAI3391 ARTIFICIAL INTELLIGENCE Session 7 Uniformed search strategies.pptx
AI3391 ARTIFICIAL INTELLIGENCE Session 7 Uniformed search strategies.pptx
 
Informed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxInformed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptx
 
R01741124127
R01741124127R01741124127
R01741124127
 

Recently uploaded

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 

Recently uploaded (20)

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 

HEURISTIC SEARCH and other technique.pptx

  • 1. LOCAL SEARCH & INFORMED SEARCH
  • 2. HILL CLIMBING • It is also known as discrete optimization algorithm. • It uses a simple heuristic function viz., the amount of distance the node is from the goal. • Algorithm:- Step1 : Put the initial node on a list START Step 2 : If (START is empty) or (START=GOAL) terminate search Step 3 : Remove the first node from START. Call this node a Step 4 : If (a==GOAL) terminate search with success. Step 5 : Else if node a has successor, generate all of them. Find out how far they are from the goal node. Sort them by the remaining distance from the goal and add them to the beginning of START Step 6 : Goto Step 2.
  • 3. SEARCH TREE FOR HILL CLIMBING
  • 4. Problems of Hill-Climbing Technique 1. Local maximum : A state that is better than all its neighbors but not so when compared to states to states that are farther away. 2. Plateau : A flat area of the search space, in which all neighbors have the same value. 3. Ridge : This is an area in the path which must be traversed very carefully because movement in any direction might maintain one at the same level or result in fast decent.
  • 5. SOLUTION • Backtracking for local maximum. Backtracking helps in doing what has been done so far and permits to try a totally different path to attain the global peak. • A big jump is the solution to escape from the plateau. • Trying different paths at the same time is the solution for ridges.
  • 6. Best-First Search • This search procedure is an evaluation-function variant of breadth- first search. • Algorithm:- Step1 : Put the initial node on a list START Step 2 : If (START is empty) or (START=GOAL) terminate search Step 3 : Remove the first node from START. Call this node a Step 4 : If (a==GOAL) terminate search with success. Step 5 : Else if node a has successor, generate all of them. Find out how far they are from the goal node. Sort them by the remaining distance from the goal. Step 6 : Name this list as START 1 Step 7 : Replace START with START 1 Step 8 : Goto Step 2.
  • 7. A Sample tree for best-first search 7 5 6 3 9 8 1 2 6 1 4 5 2 0 1 A D E F G B H C J I L M K Start node Goal node
  • 8. Search Process of Best-First Search Step Node being expanded Children Available nodes Node Chosen 1 S (A:3), (B:6), (C:5) (A:3), (B:6), (C:5) (A:3) 2 A (D:9),(E:8) (B:6),(C:5),(D:9),(E:8) (C:5) 3 C (H:7) (B:6),(D:9),(E:8),(H:7) (B:6) 4 B (F:12), (G:14) (D:9), (E:8), (H:7), (F:12), (G:14) (H:7) 5 H (I:5), (J:6) (D:9), (E:8), (F:12), (G:14), (I:5), (J:6) (I:5) 6 I (K:1), (L:0), (M:2) (D:9), (E:8), (F:12), (G:14), (J:6), (K:1), (L:0), (M:2) Search stops as the goal is reached
  • 9. A* Algorithm • In this algorithm, we use the evaluation function and cost function. • Evaluation function estimates how far a particular node is from goal. • Cost functions indicates how much resources like time, energy, money etc., have been spent in reaching a particular node from the start. • The sum of the evaluation function value and the cost along the path leading to that state is called fitness number.
  • 10. A Sample tree with fitness number used for A* Search 7 5 6 3 9 8 1 2 6 1 4 5 2 0 1 A D E F G B H C J I L M K Start node Goal node 3 2 2 6 2 2 1 3 4 7 3 5 2
  • 11. A* Algorithm Step1 : Put the initial node on a list START Step 2 : If (START is empty) or (START=GOAL) terminate search Step 3 : Remove the first node from START. Call this node a Step 4 : If (a==GOAL) terminate search with success. Step 5 : Else if node a has successor, generate all of them. Estimate the fitness number of the successor by totaling the evaluation-function value and the cost-function value. Sort the list by fitness number. Step 6 : Name the new list as START 1 Step 7 : Replace START with START 1 Step 8 : Goto Step 2.
  • 12. AND/OR graphs • Some problems are best represented as achieving subgoals, some of which achieved simultaneously and independently (AND) • Up to now, only dealt with OR options Possess TV set Steal TV Earn Money Buy TV
  • 13. AND/OR Search (AO*) • We must examine several nodes simultaneously when choosing the next move A B C D 38 E F G H I J 17 9 27 (5) (10) (3) (4) (15) (10) A B C D (3) (4) (5) (9)
  • 14. AND/OR Best-First-Search • Traverse the graph (from the initial node) following the best current path. • Pick one of the unexpanded nodes on that path and expand it. Add its successors to the graph and compute f for each of them • Change the expanded node’s f value to reflect its successors. Propagate the change up the graph. • Reconsider the current best solution and repeat until a solution is found
  • 15. AND/OR Best-First-Search example A B C D (3) (4) (5) (9) A (5) 2. 1. A B C D E F (4) (4) (10) (3) (9) (4) (10) 3.
  • 16. AND/OR Best-First-Search example B C D G H E F (5) (7) (4) (4) (10) (6) (12) (4) (10) 4. A
  • 17. A Longer path may be better B C D G H E F A J I Unsolvable B C D G H E F A J I Unsolvable
  • 19. AO* algorithm 1. Let G be a graph with only starting node INIT. 2. Repeat the followings until INIT is labeled SOLVED or h(INIT) > FUTILITY a) Select an unexpanded node from the most promising path from INIT (call it NODE) b) Generate successors of NODE. If there are none, set h(NODE) = FUTILITY (i.e., NODE is unsolvable); otherwise for each SUCCESSOR that is not an ancestor of NODE do the following: i. Add SUCCESSSOR to G. ii. If SUCCESSOR is a terminal node, label it SOLVED and set h(SUCCESSOR) = 0. iii. If SUCCESSPR is not a terminal node, compute its h
  • 20. AO* algorithm (Cont.) c) Propagate the newly discovered information up the graph by doing the following: let S be set of SOLVED nodes or nodes whose h values have been changed and need to have values propagated back to their parents. Initialize S to Node. Until S is empty repeat the followings: i. Remove a node from S and call it CURRENT. ii. Compute the cost of each of the arcs emerging from CURRENT. Assign minimum cost of its successors as its h. iii. Mark the best path out of CURRENT by marking the arc that had the minimum cost in step ii iv. Mark CURRENT as SOLVED if all of the nodes connected to it through new labeled arc have been labeled SOLVED v. If CURRENT has been labeled SOLVED or its cost was just changed, propagate its new cost back up through the graph. So add all of the ancestors of CURRENT to S.