Title: AND/OR Search for
1- AND/OR Search for
- Mixed Networks
- CSP
Robert Mateescu
ICS280 Spring 2004 - Current Topics in Graphical
Models Professor Rina Dechter
2Mixed Networks
Constraint Networks
A
A
F
F
B
C
B
C
D
E
D
E
3Mixed Networks
A
A
F
F
B
C
B
C
A
D
E
D
E
F
B
C
D
E
4Tasks for Mixed Networks
- Tasks for Belief Networks
- Belief updating evaluating the posterior
probability of each singleton proposition given
some evidence - Most probable explanation (MPE) finding a
complete assignment to all variables having
maximum probability given the evidence - Maximum a posteriori hypothesis (MAP) finding
the most likely assignment to a subset of
hypothesis variables given the evidence - Tasks for Constraint Networks
- Consistent Decide if network is consistent
- Find solutions Find one, some or all solutions
- Tasks for Mixed Networks
- Belief updating, MPE, MAP
- Constraint Probability Evaluation (CPE) Find the
probability of the constraint query
5Auxiliary Network
A
A
F
F
B
C
B
C
A
X
F
D
E
D
E
B
C
Y
Q
D
E
Z
6Mixed Graph
- The mixed graph is the union of the belief
network graph and the constraint network graph - The moral mixed graph is the union of the moral
graph of the belief network and the graph of the
constraint network - Given a mixed graph GM (GB,GR) of a mixed
network M(B,R) where GB is the directed graph of
B, and GR is the undirected constraint graph of
R, the ancestral graph of Y \in X in GM is the
union of GR and the ancestral graph of Y in GB
7dm-separation
- Definition Given a mixed graph, GM and given
three subsets of variables W, Y and Z which are
disjoint, we say that W and Y are dm-separated
given Z in the mixed graph GM, denoted ltW,Z,Ygtdm,
iff in the ancestral mixed graph of WUYUZ, all
the paths between W and Y are intercepted by
variables in Z. - Theorem Given a mixed network M M(B,R) and its
mixed graph GM, then GM is a minimal I-map
relative to dm-separation
8AND/OR Search for Mixed Networks
A
A
F
B
B
C
C
E
D
E
D
F
Mixed network
DFS (legal) tree
9AND/OR Search Space
OR
A
AND
0
1
OR
B
B
AND
0
1
0
1
OR
E
C
E
C
E
C
E
C
AND
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
OR
D
F
D
F
D
F
D
F
D
F
D
F
D
F
D
F
AND
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
10Forward Expanding an AND node
OR
A
AND
0
1
OR
B
B
AND
0
1
0
1
OR
E
C
E
C
E
C
E
C
AND
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
OR
D
F
D
F
D
F
D
F
D
F
D
F
D
F
D
F
AND
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
g-value(ANDnode) ? Pi (or 1, if product is
empty) e.g. g-value(ltB,1gt) P(B1A0)
11Forward Expanding an OR node
OR
A
AND
0
1
OR
B
B
AND
0
1
0
1
OR
E
C
E
C
E
C
E
C
AND
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
OR
D
F
D
F
D
F
D
F
D
F
D
F
D
F
D
F
AND
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
g-value(ORnode) 0
12Backward Propagating g-values
OR
A
AND
0
1
OR
B
B
AND
0
1
0
1
OR
E
C
E
C
E
C
E
C
AND
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
OR
D
F
D
F
D
F
D
F
D
F
D
F
D
F
D
F
AND
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
OR nodes perform summation AND nodes perform
product
13The main idea
- Search algorithms can exploit a wide range of
constraint propagation techniques - When generating AND nodes, consistency is checked
according to the desired level of constraint
propagation
14AND/OR Search (1)
g(A)0
OR
A
AND
OR
AND
OR
AND
OR
AND
15AND/OR Search (2)
g(A)0
OR
A
g(ltA,0gt)P(A0)
AND
0
1
g(ltA,1gt)P(A1)
OR
AND
OR
AND
OR
AND
16AND/OR Search (3)
g(A)0
OR
A
g(ltA,0gt)P(A0)
AND
0
1
g(ltA,1gt)P(A1)
g(B)0
OR
B
AND
OR
AND
OR
AND
17AND/OR Search (4)
g(A)0
OR
A
g(ltA,0gt)P(A0)
AND
0
1
g(ltA,1gt)P(A1)
g(B)0
OR
B
g(ltB,0gt)P(B0A0)
g(ltB,1gt)P(B1A0)
AND
0
1
OR
AND
OR
AND
18AND/OR Search (5)
g(A)0
OR
A
g(ltA,0gt)P(A0)
AND
0
1
g(ltA,1gt)P(A1)
g(B)0
OR
B
g(ltB,0gt)P(B0A0)
g(ltB,1gt)P(B1A0)
AND
0
1
g(E)0
g(C)0
OR
E
C
AND
OR
AND
19AND/OR Search (6)
g(A)0
OR
A
g(ltA,0gt)P(A0)
AND
0
1
g(ltA,1gt)P(A1)
g(B)0
OR
B
g(ltB,0gt)P(B0A0)
g(ltB,1gt)P(B1A0)
AND
0
1
g(E)0
g(C)0
OR
E
C
AND
0
g(ltE,0gt)P(E0A0,B0)
OR
AND
20AND/OR Search (6)
g(A)0
OR
A
g(ltA,0gt)P(A0)
AND
0
1
g(ltA,1gt)P(A1)
g(B)0
OR
B
g(ltB,0gt)P(B0A0)
g(ltB,1gt)P(B1A0)
AND
0
1
g(C)0
OR
E
C
g(E)P(E0A0,B0)
AND
0
OR
AND
21AND/OR Search (8)
g(A)0
OR
A
g(ltA,0gt)P(A0)
AND
0
1
g(ltA,1gt)P(A1)
g(B)0
OR
B
g(ltB,1gt)P(B1A0)
AND
0
1
g(ltB,0gt) P(B0A0) P(E0A0,B0)
g(C)0
OR
E
C
AND
0
OR
AND
22Constraint propagation
All domains are 1,2,3,4
23Constraint checking only
A
OR
AND
1
2
3
4
OR
C
B
C
B
B
B
2
3
4
2
3
4
3
4
3
4
4
AND
E
D
D
E
D
F
F
F
D
D
F
F
D
OR
AND
3
4
3
4
4
4
4
3
4
4
OR
H
G
G
I
I
G
K
K
K
G
K
AND
4
4
4
4
24Forward checking
A
OR
AND
1
2
3
4
OR
C
B
C
B
B
B
2
3
4
2
3
4
3
4
3
4
4
AND
E
D
D
E
D
F
F
F
D
D
F
F
D
OR
AND
3
4
3
4
4
4
4
3
4
4
OR
H
G
G
I
I
G
K
K
K
G
K
AND
4
4
4
4
25Maintaining arc-consistency
A
OR
AND
1
2
3
4
OR
C
B
C
B
B
B
2
3
4
2
3
4
3
4
3
4
4
AND
E
D
D
E
D
F
F
F
D
D
F
F
D
OR
AND
3
4
3
4
4
4
4
3
4
4
OR
H
G
G
I
I
G
K
K
K
G
K
AND
4
4
4
4
26AND/OR vs. OR Space
27Linear space algorithms
28Linear space algorithms
29AND/OR search vs. Bucket Elimination
30CSP
- CSP Counting the solutions of a CSP problem is
very similar to the CPE task in mixed networks - If the belief part in a mixed network is empty,
we can translate the AND/OR search for mixed
networks to an AND/OR search for CSPs. - OR nodes are initialized with g-value 0
- AND nodes are initialized with g-value 1
31Parent set and parent separator set
Parent set Parent separator set
A
B A AB
C AB ABC
D BC D
E AB E
F AC F
A
B
C
E
D
F
32Caching in AND/OR search
- If space is available, parts of the search tree
can be cached, transforming the search space into
a search graph - In principle, we can cache at OR level and/or at
AND level - Caching at AND level gt use parent separator set
- Caching at OR level gt use parent set
-
- size(parent separator set) size(parent set) 1
33ORcache, N20, K3, Nc20 ,Pc4, inst20Time
34ORcache, N20, K3, Nc20 ,Pc4, inst20 of nodes