Chapter 5: General search strategies: Look-ahead
ICS 275 275 Spr pring ing 2014 2014
Spring 2014
ICS 275 275 Spr pring ing 2014 2014 Spring 2014 What if the - - PowerPoint PPT Presentation
Chapter 5: General search strategies: Look-ahead ICS 275 275 Spr pring ing 2014 2014 Spring 2014 What if the Constraint network is not backtrack-free? l Backtrack-free in general is too costly so what to do? l Search? l What is
Spring 2014
Spring 2014
Spring 2014
2,3,5
2,5,6 2,3,4
2,3,4
Z X Y L
Spring 2014
l After arc-consistency z=5
l After path-consistency
2,3,5 2,5,6 2,3,4
2,3,4
Z X Y L
Spring 2014
Spring 2014
l Number of consistency checks for toy problem:
l Reminder:
Spring 2014
Spring 2014
Spring 2014
Spring 2014
Spring 2014
Spring 2014
Not-equal
BFS space is exp(n) while no Time gain use DFS
l Complexity of extending a
O(e log t), t bounds tuples, e constraints
O(e k log t)
Spring 2014
Spring 2014
l Intuition:
tree
l Forward-checking
l Maintaining arc-consistency (MAC)
l Full look-ahead
l Partial look-ahead
Spring 2014
Spring 2014
Spring 2014
) (
2
ek O
Spring 2014
) (
2
ek O
2
FC overhead:
For each value of a future variable e_u Tests: O(k e_u), for all future variables O(ke) For all current domain O(k^2 e)
Spring 2014
) (
2
ek O
2
FW overhead: :
2
Spring 2014
(Gashnig, 1977)
l Applies full arc-consistency on all un-
3
Spring 2014
) ( ) (
3 2
ek O ek O
Forward-checking: Full arc-consistency look-ahead With optimal AC:
l Perform arc-consistency in a binary search
l If inconsistency is not discovered, a new
Spring 2014
Spring 2014
) (
2
ek O
3 2
FW overhead: MAC overhead:
Spring 2014
) (
2
ek O
3 2
FW overhead: MAC overhead: Arc-consistency prunes x1=red Prunes the whole tree
Not searched By MAC
Spring 2014
3
Spring 2014
Spring 2014
(Kask, Dechter and Gogate, 2004)
Spring 2014
l Following constraint propagation, choose the
l Intuition: early discovery of dead-ends l Highly effective: the single most important
l Most popular with FC l Dynamic search rearrangement (Bitner and Reingold, 1975) (Purdon,1983)
Spring 2014
Spring 2014
) (
2
ek O
3 2
FW overhead: MAC overhead:
Spring 2014
) (
2
ek O
3 2
FW overhead: MAC overhead:
After X1 = red choose X3 and not X2
Spring 2014
) (
2
ek O
3 2
FW overhead: MAC overhead:
After X1 = red choose X3 and not X2
Spring 2014
) (
2
ek O
3 2
FW overhead: MAC overhead:
After X1 = red choose X3 and not X2
Spring 2014
l dom: choose a variable with min domain l deg: choose variable with max degree l dom+deg: dom and break ties with max
l dom/deg (Bessiere and Ragin, 96): choose min dom/deg
l dom/wdeg: domain divided by weighted degree.
Spring 2014
l Cost of node generation should be reduced l Solution: keep a table of viable domains for
l Space complexity l Node generation = table updating
) ( ) ( ek O k e O
d
⇒
2k
Spring 2014
(see vanBeek, chapter 4 in Handbook)
Spring 2014
l Randomized variable selection (for tie breaking
l Randomized value selection (for tie breaking
l Random restarts with increasing time-cutoff l Capitalizing on huge performance variance l All modern SAT solvers that are competitive us
Spring 2014
) 2 ( +
c
Spring 2014
l Extend to path-consistency or i-consistency or
Spring 2014
(Davis-Putnam, Logeman and Laveland, 1962) Spring 2014
Spring 2014
Spring 2014
4 3 2 6 5 4 1
3 2
6 1,
1 1
Spring 2014
CSP is NP-Complete
Spring 2014
Problem reduction
l vvp → term
(V1, d),
l The vvp’s of a variable → disjunction of terms
l (Optional) At most one VVP per variable
4 3 2 1
4 3 2 1 4 3 2 1 4 3 2 1 4 3 2 1
Spring 2014
1.
2.
2 1
V
7 1
5 1
5 4 6 3 7 2 6 1 5 1