100% found this document useful (1 vote)
240 views

AOstar Algorithm

The AO* algorithm finds the optimal path through a graph from an initial node to a goal node. It maintains a graph with the initial node and expands it by adding successors. If a successor is a goal node, it is labeled solved. Otherwise, it computes a heuristic value h for the node. It then propagates new information up the graph, recomputing h values and labeling nodes solved to find the optimal path. An example shows applying AO* to find the optimal path from node A to node G in a graph.

Uploaded by

Atharava Bapat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
240 views

AOstar Algorithm

The AO* algorithm finds the optimal path through a graph from an initial node to a goal node. It maintains a graph with the initial node and expands it by adding successors. If a successor is a goal node, it is labeled solved. Otherwise, it computes a heuristic value h for the node. It then propagates new information up the graph, recomputing h values and labeling nodes solved to find the optimal path. An example shows applying AO* to find the optimal path from node A to node G in a graph.

Uploaded by

Atharava Bapat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

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
(8) A
An Example
[12] A [13]
4 5
5
(1) B D (8)

(2)
C
An Example
[15] A [13]
4 5
5
(4) B 2 D (8)

(2)
C
An Example
[15] A [8]
4 5
5
(4) B 2 D (3)

(2)
C 2
4

(1) E

(0) G
An Example
[15] A [9]
4 5
5
(4) B 2 D (4)

(2)
C 2
2
4

(3) E
3

(0) G
An Example
[15] A Solved
4 5
5 Solved
(4) B 2 D
(2)
C 2
2
4

(3) E
3

(0) G Solved

You might also like