Weighted Heuristic Anytime Search Flerova, Marinescu, and Dechter 1 1 University of South Carolina April 24, 2017
Basic Heuristic Best-first Search Blindly follows the heuristic Weighted A Search For w > 1 f (n) = д(n) + w h(n) Larger w yields greedier searches
Basic Heuristic Best-first Search Blindly follows the heuristic Weighted A Search For w > 1 f (n) = д(n) + w h(n) Larger w yields greedier searches
Graphical Definition (Graphical Model) A tuple M = X, D, F, where 1 X = {X 0,..., X n 1 } is a set of variables 2 D = {D 0,..., D n 1 } is a set of domains 3 F = { f 0 (X S0 ),..., f r 1 (X Sr 1 ) } is a set of scopes: X Si X i. f i : X Si R + 4 A combination operator {, } The model M represents the function C(X ) = r 1 i=0 f i (X Si )
Graphical Definition (Graphical Model) A tuple M = X, D, F, where 1 X = {X 0,..., X n 1 } is a set of variables 2 D = {D 0,..., D n 1 } is a set of domains 3 F = { f 0 (X S0 ),..., f r 1 (X Sr 1 ) } is a set of scopes: X Si X i. f i : X Si R + 4 A combination operator {, } The model M represents the function C(X ) = r 1 i=0 f i (X Si )
Graphical Given a model M = X, D, F,, the most common optimization task is either most probable explanation or maximum a posteriori MPE Find the optimal value C : C = C(x ) = max X r 1 i=0 f i (X Si ) MAP Find the optimizing configuration x : x = argmax X r 1 i=0 f i (X Si )
Graphical Given a model M = X, D, F,, the most common optimization task is either most probable explanation or maximum a posteriori MPE Find the optimal value C : C = C(x ) = max X r 1 i=0 f i (X Si ) MAP Find the optimizing configuration x : x = argmax X r 1 i=0 f i (X Si )
Graphical Given a model M = X, D, F,, the most common optimization task is either most probable explanation or maximum a posteriori MPE Find the optimal value C : C = C(x ) = max X r 1 i=0 f i (X Si ) MAP Find the optimizing configuration x : x = argmax X r 1 i=0 f i (X Si )
Graphical : MPE/MAP WCSP MPE C MPE = C(x ) = max X r 1 i=0 f i (X Si ) WCSP Weighted Constraint Satisfaction Problem (MPE in negative log-space) C WCSP C(x ) = min X r 1 i=0 f i (X Si )
Graphical : MPE/MAP WCSP MPE C MPE = C(x ) = max X r 1 i=0 f i (X Si ) WCSP Weighted Constraint Satisfaction Problem (MPE in negative log-space) C WCSP C(x ) = min X r 1 i=0 f i (X Si )
Primal Graph Definition The primal graph of a model is a graph where the vertices are the variables and edges connect variables within the same scope Scopes X S0 = {A, B} X S1 = {A,C} X S2 = {C, D} C D A B E F X S3 = {B, D} X S4 = {B, F } X S5 = {E, F } Figure: Primal
Primal Graph Definition The primal graph of a model is a graph where the vertices are the variables and edges connect variables within the same scope Scopes X S0 = {A, B} X S1 = {A,C} X S2 = {C, D} C D A B E F X S3 = {B, D} X S4 = {B, F } X S5 = {E, F } Figure: Primal
A C D A B E F B C D E F (a) Primal (b) Induced Graph Figure: Induced graph over the natural ordering.
A C D A B E F B C D E F (a) Primal (b) Induced Graph Figure: Induced graph over the natural ordering.
A A C E C E B B D F D F (a) Orig + Ind. Edges (b) Pseudo-tree Figure: Pseudo-tree with edges chosen to respect the order
A A C E C E B B D F D F (a) Orig + Ind. Edges (b) Pseudo-tree Figure: Pseudo-tree with edges chosen to respect the order
OR AND OR AND OR A 0 1 B B 0 1 0 1 C C C C E E E E.. Figure: Context-Minimal Graph For Pseudotree
Assume a graphical model M = X, D, F, with primal graph G, pseudotree T, and search tree S T Definition The context-minimal search graph, denoted C T, is the search graph obtained after merging all identical subproblems. C T is exponential in the depth of T
Assume a graphical model M = X, D, F, with primal graph G, pseudotree T, and search tree S T Definition The context-minimal search graph, denoted C T, is the search graph obtained after merging all identical subproblems. C T is exponential in the depth of T
Assume a graphical model M = X, D, F, with primal graph G, pseudotree T, and search tree S T Definition A solution tree T of C T is a subtree satisfying the following conditions: 1 It contains the root of C T 2 If an internal AND node n is in T, then all the children of n are in T 3 if an internal OR node n is in T, then exactly one child of n is in T 4 Every leaf in T is a terminal node
Assume a graphical model M = X, D, F, with primal graph G, pseudotree T, and search tree S T Definition A solution tree T of C T is a subtree satisfying the following conditions: 1 It contains the root of C T 2 If an internal AND node n is in T, then all the children of n are in T 3 if an internal OR node n is in T, then exactly one child of n is in T 4 Every leaf in T is a terminal node
Assume a graphical model M = X, D, F, with primal graph G, pseudotree T, and search tree S T Definition A solution tree T of C T is a subtree satisfying the following conditions: 1 It contains the root of C T 2 If an internal AND node n is in T, then all the children of n are in T 3 if an internal OR node n is in T, then exactly one child of n is in T 4 Every leaf in T is a terminal node
Assume a graphical model M = X, D, F, with primal graph G, pseudotree T, and search tree S T Definition A solution tree T of C T is a subtree satisfying the following conditions: 1 It contains the root of C T 2 If an internal AND node n is in T, then all the children of n are in T 3 if an internal OR node n is in T, then exactly one child of n is in T 4 Every leaf in T is a terminal node
Best First Search State-of-the-art A for search space. Too complicated to fit on a slide Highlights Input: Graphical Model M = X, D, F, Σ Initial weight w 0 Pseudotree T rooted at X 1 heuristic h i (precalculated) Output: Optimal solution to M
Best First Search State-of-the-art A for search space. Too complicated to fit on a slide Highlights Input: Graphical Model M = X, D, F, Σ Initial weight w 0 Pseudotree T rooted at X 1 heuristic h i (precalculated) Output: Optimal solution to M
Best First Search State-of-the-art A for search space. Too complicated to fit on a slide Highlights Input: Graphical Model M = X, D, F, Σ Initial weight w 0 Pseudotree T rooted at X 1 heuristic h i (precalculated) Output: Optimal solution to M
Best First Search Let M = {X, D, F, Σ} where X = {A, B,C, D} D = {0, 1} s s X F is given by the following tables: A B f (A, B) 0 0 4 0 1 1 1 0 3 1 1 1 B f (B) 0 1 1 9 B C f (B,C) 0 0 3 0 1 2 1 0 2 1 1 1 A B f (A, B) 0 0 4 0 1 1 1 0 3 1 1 1
Best First Search Scopes F = {f (A, B), f (B,C), f (A, D), f (B)} B A C D Figure: Primal Graph
Best First Search Scopes F = {f (A, B), f (B,C), f (A, D), f (B)} B A C D Figure: Primal Graph
Best First Search B h = 7 h = 6 0 1 9 1 h = 3 A 4 3 0 1 h = 1 h = 1 D h = 1 1 1 h = 4 C h = 2 3 2 0 1 h = 0 h = 0 D h = 1 3 1 A h = 2 C h = 1 4 3 3 2 0 1 0 1 h = 1 h = 1 h = 0 h = 0 0 1 h = 0 h = 1 0 1 h = 0 h = 0
Best First Search Algorithm Sketch Down Pass: Expand nodes and mark terminal nodes solved Up Pass: Update v(n) for each node according to the following rules: OR Nodes: v(n) = min w(n, k) + v(k) k succ(n) AND Nodes: v(n) = v(k) k succ(n)
Best First Search B v = 7 v = 6 0 1 9 1 v = 3 A 4 3 0 1 v = 1 v = 1 v = 4 C v = 2 3 2 0 1 v = 0 v = 0 D v = 1 3 1 0 1 v = 0 v = 0