0% found this document useful (0 votes)
154 views31 pages

8 - Problem Reduction Search

The document describes AND/OR graphs and the AO* algorithm for solving planning problems that can be decomposed into subproblems in multiple ways. It presents an example problem involving decomposing tasks A1, A2, and A3 in different orders and selecting the optimal decomposition by traversing an AND/OR graph. The example shows applying the AO* algorithm to iteratively expand the graph and prune suboptimal paths until arriving at the lowest-cost solution.

Uploaded by

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

8 - Problem Reduction Search

The document describes AND/OR graphs and the AO* algorithm for solving planning problems that can be decomposed into subproblems in multiple ways. It presents an example problem involving decomposing tasks A1, A2, and A3 in different orders and selecting the optimal decomposition by traversing an AND/OR graph. The example shows applying the AO* algorithm to iteratively expand the graph and prune suboptimal paths until arriving at the lowest-cost solution.

Uploaded by

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

Problem Reduction

Search
AND/OR Graphs (AO* Algorithm)
Problem Reduction Search
 Planning how best to solve a problem that can
be recursively decomposed into sub problems
in multiple ways.
Formulations
 AND/OR Graphs
 An OR node represents a choice between possible
decompositions
 An AND node represents a given decomposition

 Game Trees
 Max nodes represent the choice of my opponent
 Min nodes represent my choice
OR
A1A2A3

AND
(A1A2)A3 A1(A2A3)
AND

A3 A1
OR
A1A2 OR OR
(A2A3) OR

A1 = 3 X 4
A2 = 4 X 10
A3 = 10 X 1
OR
A1A2A3

AND
(A1A2)A3 A1(A2A3)
AND

A3 A1
OR
A1A2 OR OR
(A2A3) OR

40 0
A1 = 3 X 4 [ 4 X 1] [ 3 X 4]
A2 = 4 X 10
A3 = 10 X 1
OR
A1A2A3

(A1A2)A3 A1(A2A3)
AND 12 + 40 AND
=52 [3 X 1]

A3 A1
OR
A1A2 OR OR
(A2A3) OR

40 0
A1 = 3 X 4 [4 X 1] [3 X 4]
A2 = 4 X 10
A3 = 10 X 1
OR
A1A2A3

(A1A2)A3 A1(A2A3)
AND 12 + 40 AND
=52 [3 X 1]

A3 A1
OR
A1A2 OR OR
(A2A3) OR
[3 X 10] [10 X 1]
120 0 40 0
A1 = 3 X 4 [4 X 1] [3 X 4]
A2 = 4 X 10
A3 = 10 X 1
OR
A1A2A3

(A1A2)A3 A1(A2A3)
30 +120 AND 12 + 40 AND
=150 [3 X 1] =52 [3 X 1]

A3 A1
OR
A1A2 OR OR
(A2A3) OR
[3 X 10] [10 X 1]
120 0 40 0
A1 = 3 X 4 [4 X 1] [3 X 4]
A2 = 4 X 10
A3 = 10 X 1
OR
A1A2A3

(A1A2)A3 A1(A2A3)
30 +120 AND 12 + 40 AND
=150 [3 X 1] =52 [3 X 1]

A3 A1
T
A1A2 T T
(A2A3) T
[3 X 10] [10 X 1]
120 0 40 0
A1 = 3 X 4 [4 X 1] [3 X 4]
A2 = 4 X 10 This is solved in the absence of
A3 = 10 X 1
heuristic function
AND/OR Graph Search Problem
 Problem definition:
 Given: [G, s, T, h] where:
 G: implicitly specified AND/OR graph
 s: start node of the AND/OR graph
 T: set of terminal nodes

 h(n): heuristic function estimating the cost of solving


the sub problem at n
 To Find:
 Minimum Cost Solution Tree
AND
h=7
AND
h=7 10

2 1

OR
h=4 OR
h=3
AND
h=10

2 1
h=4 h=3
OR OR
1
1
h=8
T
h=6 T
AND
h=10 14

2 1
h=4 h=3 7
OR OR
1
1
h=8
T
h=6 T
AND
h=14

2 1
h=4 h= 7
OR OR

2 1 1
1
h=8
h=2 h=5 T
AND AND h=6 T
AND
h=14

2 1
h=4 h= 7
OR OR

2 1 1
1
h=8
h=2 14 h=5 T
AND AND h=6 T
0 h=10
1
OR
OR
h=3
AND
h=14

2 1
h=4 16 h= 7
OR OR

2 1 1
1
h=8
h=14 h=5 T
AND AND h=6 T
0 h=10
1
OR
OR
h=3
AND
h=14

2 1
h=16 h= 7
OR OR

2 1 1
1
h=8
h=14 h=5 T
AND AND h=6 T
0 h=10
1
OR
OR
h=3
AND
h=14

2 1
h=16 6 h= 7
OR OR

2 1 1
1
h=8
h=14 h=5 T
AND AND h=6 T
0 h=10
1
OR
OR
h=3
AND
h=14 16

2 1
h=6 h= 7
OR OR

2 1 1
1
h=8
h=14 h=5 T
AND AND h=6 T
0 h=10
1
OR
OR
h=3
AND
h=16

2 1
h=6 h= 7
OR OR

2 1 1
1
h=8
h=14 h=5 T
AND AND h=6 T
0 1
h=10
1
T 1 h=3
T
OR h=2
h=3 T
AND
h=16

2 1
h=6 h= 7
OR OR

2 1 1
1
h=8
h=14 h=5 7 T
AND AND h=6 T
0 1
h=10
1
T 1 h=3
T
OR h=2
h=3 T
AND
h=16

2 1
h=6 8 h= 7
OR OR

2 1 1
1
h=8
h=14 h=7 T
AND AND h=6 T
0 1
h=10
1
T 1 h=3
T
OR h=2
h=3 T
AND
h=16 18

2 1
h=8 h= 7
OR OR

2 1 1
1
h=8
h=14 h=7 T
AND AND h=6 T
0 1
h=10
1
T 1 h=3
T
OR h=2
h=3 T
AND
h=18
2 1
h=8 h= 7
OR OR

2 1 1
1
h=8
h=14 h=7 T
AND AND h=6 T
0 1
h=10
1
T 1 h=3
T
OR h=2
h=3 T
AND
h=18
2 1
h=8 h= 7
OR OR

2 1 1
1
h=8
h=14 h=7 T
AND AND h=6 T
0 1
h=10
1
T 1 h=3
T
OR h=2
h=3 T Now all the leaf nodes of the marked
tree are solved. Thus solve each sub
problem(node) at marked sub tree.
AO* Algorithm
1. Initialize: Set G* = {s}, f(s) = h(s)
if s  T, label s as SOLVED
2. Terminate: if s is SOLVED, then Terminate
3. Select: A non-terminal leaf node n from
the marked sub tree.
4. Expand: Mark explicit the successors of n
For each new successor m:
set f(m) = h(m)
if m  T, label m as SOLVED
AO* Algorithm
5. Cost Revision: Call cost-revise(n)
6. Loop: Goto step 2
Cost Revisoin in AO*
cost-revise(n)
1. Create Z={n}
2. If Z = { } then return
3. Select the node m from Z such that m has no
descendants in Z
4. If m is an AND node with successors R1, R2,
R3, …….. Rk
set f(m) =  [f(Ri) + C(m,Ri)]
Mark the edge to each successor of m
if each successor is labeled SOLVED then
label m as SOLVED
Cost-revise(n)
5. If m is an OR node with successors R1,
R2, R3, …….. Rk
set f(m) = min [f(Ri) + C(m,Ri)]
Mark the edge to best successor of m
if marked successor is labeled SOLVED
then label m as SOLVED
6. If the cost or label of m has changed, then
insert those parents of m into Z for which
m is a marked successor
7. Goto step 2
Searching OR Graph
 How would AO* behave when we have only
OR nodes ????

You might also like