AND-OR graph is useful for representing the
solution of problems that can be solved by
decomposing them into a set of smaller problems,
all of which must then be solved.
H’=whatever it is
F’=h’ or h’+o or h’+g
5. AND/OR GRAPH Algorithm:-
1. Initialiize the graph to the starting
2. Loop until the starting node is
labeled solved or until its cost goes
A.Traverse the graph & set the nodes
that are on the path & have not yet
been expanded & labeled as solved.
6. B.Pick one of these unexpanded nodes &
axpand it. Of there are no successor assign
FUTTILITY us the value of this node other
vise, add it successor each of them compute f’
value (use only h’ and ignore g).
C.Change the f’ estimate of the newly
expanded nod to reflect the new information
provided by its successor.
11. AO* Algorithm
AO* algorithm is a type of heuristic search algorithm is used
when problem can be divided into sub parts & which can be
combined AO* in artificial intelligence is represented using
& OR-AND graph.
1. Let GRAPH consist only of the NODE representing
the initial state & compute h’(INIT).
2. Until INIT is labeled SOLVED or until INIT’S h’
value becomes greater than FUTILITY repeat the
following procedure :-
A. Trace the labeled are fram INIT at select for
expantion and call the selected Node.
B. Genaret the successor of node if there are none then
assign the FUTTILITY as the h’ value of node. Not
soleved if there are successor. But not for each one
of the successor. But not also and ancestor of node
do the following:-
14. i.)at successor to the graph.
ii.) if successor is a terminate node label it solve and
assign it n h’ value of o.
Iii.) if successor is not a terminal node compute in h’
C propagate the newly decision information by the
following : Let s be a set of node that have been
labeled saved.whode h’ value has been changed and so
need to have a voice propagate back to when it. until
as is empty do the following steps:-
15. i) select from s a node name of whose desent in Graph
accures. Select any node from s call this node to CURRENT
and remove from S.
ii) compute the cast of each of the arc in margin of
CURRENT assign new h’ value the minimum of the cost
just compute for the arcs margin for it.
iii) mark the best path out of CURRENT by making the arc
that had the minimum cost as computed in the previse state.
iv) mark CURRENT solved if as the nodes connected to it
through the new labeled are have been labeled saved.
V) If has been CURRENT label solved of if the cost of
current was just change then its new states must be
propagated backup the graph on the insisters of current to S.