0% found this document useful (0 votes)
39 views

AO Star Algorithm

The AO* algorithm is an informed search algorithm that works like best-first search. It is used to efficiently explore solution paths in AND-OR graphs by decomposing problems into smaller subproblems. The algorithm traverses the AND-OR graph, calculating the cost function f(n)=g(n)+h(n) for each node n, where g(n) is the actual cost to reach n and h(n) is a heuristic estimate of n's cost. It explores multiple solution paths simultaneously until it finds a path where f(n) is 0 or exceeds a set futility threshold, at which point it stops exploring further.

Uploaded by

youhateme223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

AO Star Algorithm

The AO* algorithm is an informed search algorithm that works like best-first search. It is used to efficiently explore solution paths in AND-OR graphs by decomposing problems into smaller subproblems. The algorithm traverses the AND-OR graph, calculating the cost function f(n)=g(n)+h(n) for each node n, where g(n) is the actual cost to reach n and h(n) is a heuristic estimate of n's cost. It explores multiple solution paths simultaneously until it finds a path where f(n) is 0 or exceeds a set futility threshold, at which point it stops exploring further.

Uploaded by

youhateme223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

AO* 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.

Own Mobile Phone

AND arc

Steal It Earn Money Buy mobile phone


AND-OR Graph
● Node in the graph will point both down to its successors and up to its parent
nodes.
● Each Node in the graph will also have a heuristic value associated with it.

f(n)=g(n)+h(n)

f(n): Cost function.

g(n): Actual cost or Edge value

h(n): Heuristic/ Estimated value of the nodes


AO* Example 1

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

H 2 f( A-D)=1+5=6, f(A-E)= 1+6=7 so revised


f(A)=6
Revised (S-A-B)=1+6+1+12=20 X
AO* Example 2
A
1
1
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

Path -1: f(A-B-C)= 1+1+3+4= 9


f(B-E)=1+5=6 Path-2: f(A-C-D)=1+1+4+5=11
f(B-F)=1+7=8 f(D-G-H)= 1+1+4+4 =10
f(A-B-C)= 1+1+6+4= 12 f(A-C-D)= 1+1+4+10= 16
AO* Algorithm:

The algorithm does not explore all the


solution path once it find a solution
Example 3

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

You might also like