Session 13 AO Memory Bounded Heuristic Search Heuristic Functions
Session 13 AO Memory Bounded Heuristic Search Heuristic Functions
Session 13 AO Memory Bounded Heuristic Search Heuristic Functions
AO*
Memory Bounded Heuristic search
Heuristic functions
Algorithm AO*
Each of this sub-problem can then be solved to get its sub solution.
These sub solutions can then recombined to get a solution as a whole.
That is called is Problem Reduction. AND-OR graphs or AND - OR trees
are used for representing the solution.
This method generates arc which is called as AND-OR arcs. One AND
arc may point to any number of successor nodes, all of which must be
solved in order for an arc to point to a solution.
AND-OR graph is used to represent various kind of complex problem
solutions.
AO* search algo. is based on AND-OR graph so ,it is called AO* search
algo.
AO* SEARCH ALGORITHM
Just as in an OR graph, several arcs may emerge from a single
node, indicating a variety of ways in which the original problem might
be solved.
This is why the structure is called not simply an OR-graph but rather an
AND-OR graph (which also happens to be an AND-OR tree)
AO* SEARCH ALGORITHM
An algorithm to find a solution in an AND - OR graph must handle
AND area appropriately.
A* algorithm can not search AND - OR graphs efficiently.
This can be understand from the give figure
In figure (a) the top node A has been expanded producing two area one
leading to B and leading to C-D . the numbers at each node represent
the value of f ' at that node (cost of getting to the goal state from
current state). For simplicity, it is assumed that every operation(i.e.
applying a rule) has unit cost, i.e., each are with single successor will
have a cost of 1 and each of its components.
AO* SEARCH ALGORITHM
With the available information till now , it appears that C is the most
promising node to expand since its f ' = 3 , the lowest but going through
B would be better since to use C we must also use D' and the cost would
be 9(3+4+1+1). Through B it would be 6(5+1).
Thus the choice of the next node to expand depends not only on a value
but also on whether that node is part of the current best path form the
initial mode. Figure (b) makes this clearer. In figure the node G appears
to be the most promising node, with the least f ' value. But G is not on
the current beat path, since to use G we must use GH with a cost of 9
and again this demands that arcs be used (with a cost of 27).
AO* SEARCH ALGORITHM
The path from A through B, E-F is better with a total cost of (17+1=18).
Thus we can see that to search an AND-OR graph, the following three
things must be done.
1. traverse the graph starting at the initial node and following the
current best path, and accumulate the set of nodes that are on the path
and have not yet been expanded.
2. Pick one of these best unexpanded nodes and expand it. Add its
successors to the graph and compute f ' (cost of the remaining distance)
for each of them.
AO* SEARCH ALGORITHM
3. Change the f ' estimate of the newly expanded node to reflect the new
information produced by its successors. Propagate this change
backward through the graph. Decide which of the current best path.
Disadvantages of AO*:
It is not optimal as it does not explore all the path once it find a
solution.
MEMORY-BOUNDED HEURISTIC SEARCH
The simplest way to reduce memory requirements for A* is to adapt the idea
of ITERATIVE DEPENING deepening to the heuristic search context,
resulting in the iterative-deepening A* (IDA*) algorithm.
The main difference between IDA* and standard iterative deepening is that
the cutoff used is the f-cost (g + h) rather than the depth; at each iteration, the
cutoff value is the smallest f-cost of any node that exceeded the cutoff on the
previous iteration.
IDA* is practical for many problems with unit step costs and avoids the
substantial overhead associated with keeping a sorted queue of nodes.
SMA proceeds just like A*, expanding the best leaf until memory is full. At
this point, it cannot add a new node to the search tree without dropping an old
one.
SMA* always drops the worst leaf node—the one with the highest f -value.
Like RBFS, SMA* then backs up the value of the forgotten node to its parent. In
this way, the ancestor of a forgotten sub-tree knows the quality of the best path
in that sub-tree.
With this information, SMA* regenerates the sub-tree only when all other
paths have been shown to look worse than the path it has forgotten.
Another way of saying this is that, if all the descendants of a node n are
forgotten, then we will not know which way to go from n, but we will still have
an idea of how worthwhile it is to go anywhere from n.
SMA* expands the Best leaf and deletes the worst leaf.
To avoid selecting the same node for deletion and expansion, SMA* expands
the newest best leaf and deletes the oldest worst leaf.
These coincide when there is only one leaf, but in that case, the current search
tree must be a single path from root to leaf that fills all of memory.
If the leaf is not a goal node, then even if it is on an optimal solution path, that
solution is not reachable with the available memory. Therefore, the node can be
discarded exactly as if it had no successors.
In practical terms, SMA* is a fairly robust choice for finding optimal
solutions, particularly when the state space is a graph, step costs are not
uniform, and node generation is expensive compared to the overhead of
maintaining the frontier and the explored set.
Heuristic Functions
An informed search make use of heuristic functions in order to reach the goal node in
a more prominent way. Therefore, there are several pathways in a search tree to reach
the goal node from the current node.
The selection of a good heuristic function matters certainly. A good heuristic function
is determined by its efficiency. More is the information about the problem, more is the
processing time.
Examples: Toy problems, such as 8-puzzle, 8-queen, tic-tac-toe, etc., can be solved
more efficiently with the help of a heuristic function.
8-Puzzle Problem
Consider the following 8-puzzle problem where we have a start state and a goal state.
Our task is to slide the tiles of the current/start state and place it in an order followed
in the goal state. There can be four moves either left, right, up, or down. There can
be several ways to convert the current/start state to the goal state, but, we can use a
heuristic function h(n) to solve the problem more efficiently.
Heuristic Functions
A heuristic function for the 8-puzzle problem is defined below:
h(n)=Number of tiles out of position.
So, there is total of three tiles out of position i.e., 6,5 and 4. Do not count the empty
tile present in the goal state). i.e. h(n)=3. Now, we require to minimize the value
of h(n) =0.
We can construct a state-space tree to minimize the h(n) value to 0, as shown below:
Heuristic Functions
It is seen from the above state space tree that the goal state is minimized from h(n)=3
to h(n)=0. However, we can create and use several heuristic functions as per the
reqirement. It is also clear from the above example that a heuristic function h(n) can
be defined as the information required to solve a given problem more efficiently. The
information can be related to the nature of the state, cost of transforming from one
state to another, goal node characteristics, etc., which is expressed as a heuristic
function.
Properties of a Heuristic search Algorithm