AO Star Algorithm
AO Star Algorithm
Introduction
● Its an informed search and works as best first search.
● AO* Algorithm is based on problem decomposition (Breakdown
problem into small pieces).
● Its an efficient method to explore a solution path.
● AO* is often used for the common pathfinding problem in applications
such as video games, but was originally designed as a general graph
traversal algorithm.
● It finds applications in diverse problems, including the problem of
parsing using stochastic grammars in NLP.
● Other cases include an Informational search with online learning.
● It is useful for searching game trees, problem solving etc.
AND-OR Graph
● 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.
AND arc
f(n)=g(n)+h(n)
S
1
1
1
7 12 B 13
A C
1 1 1 1
5 D E 5 F G 7
6
1
H 2
AO* Example 1 Revised cost: 15
min(14,21)=14
S
f(n)=g(n)+h(n) 1
1
Path-1: f(S-C)= 1+13=14 1
Path-2: f(S-A-B)=1+1+7+12=21
f(C-F-G)=1+1+5+7=14 6 7 12 B 13 14
f(S-C)=1+14=15 (revised) A C
1 1 1 1
5 D E 5 F G 7
6
1
3 4 c 5
B D
1 1 1 1
E F G H 4
5 7 4
AO* Example 2
9 12
A
1
1
1
6 3 4 c 5 10
B D
1 1 1 1
E F G H 4
5 7 4
5 B 11 C 8 D
E F G H I
4
7 1 3 3
1 J
Example 4
3 B 2 C 2 D
E F G H
5 0
0 0
Example 5:
AO* Algorithm
1. Initialise the graph to start node
2. Traverse the graph following the current path accumulating nodes that have not yet
been expanded or solved
3. Pick any of these nodes and expand it and if it has no successors call this value
FUTILITY otherwise calculate only f` for each of the successors.
4. If f` is 0 then mark the node as SOLVED
5. Change the value of f` for the newly created node to reflect its successors by back
propagation.
6. Wherever possible use the most promising routes and if a node is marked as
SOLVED then mark the parent node as SOLVED.
7. If starting node is SOLVED or value greater than FUTILITY, stop, else repeat from 2.
A* AO*
It represents an OR graph algorithm that is used It represents an AND-OR graph algorithm that
to find a single solution (either this or that). is used to find more than one solution by
ANDing more than one branch.
It is a computer algorithm which is used in
path-finding and graph traversal. It is used in In this algorithm you follow a similar procedure
the process of plotting an efficiently directed but there are constraints traversing specific
path between a number of points called nodes. paths.
In this algorithm you traverse the tree in depth When you traverse those paths, cost of all the
and keep moving and adding up the total cost of paths which originate from the preceding node
reaching the cost from the current state to the are added till that level, where you find the goal
goal state and add it to the cost of reaching the state regardless of the fact whether they take
current state. you to the goal state or not.
Thank You