280 likes | 481 Views
Learning From your mistakes, or By thinking. St Andrews. … for constraint satisfaction problems. Why learn?. Improve performance stop making the same mistakes! Provide explanations why is there no solution? why can’t I have a chocolate tea pot? React to change
E N D
Learning • From your mistakes, or • By thinking St Andrews
Why learn? • Improve performance • stop making the same mistakes! • Provide explanations • why is there no solution? • why can’t I have a chocolate tea pot? • React to change • when constraints are retracted/relaxed
Why bother? all good sat solvers learn constraint programmers don’t learn But some are starting to (palm, the Germans, …) cp might be ignoring a win
Learning while searching Brief/incomplete history of learning • Dechter’s deep and shallow learning (late 80’s ?) • The reactive scheduling agent (IJCAI91) • DAS (PhD thesis, 1990) • Ginsberg’s Dynamic Backtracking (DB or not DB?, JAIR 93) • Conflict-directed backjumping (CI 9(3)) • MAC-CBJ (apes report) • Relevance bounded learning (help!) • Nogood recording in local search (Richards2 CP98 (BMS external?)) • Quick Xplain (Ulrich Junkers, IJCAI 2001) • Sat solvers (see paper by Innes) Almost all are learning from mistakes
Learning by thinking Reformulate the problem and think about it for as long as you want
Reformulate a csp as a problem of finding a maximal independent set of a hypergraph
What’s that then? • A hypergraph G = (V,E) • V is a set of vertices • E is a set of hyperedges • an edge with 2 or more vertices • An independent set S • assume vertices(e) is set of vertices in hyperedge e • Maximal independent set S • there is no independent set S’ that subsumes S
A Hypergraph Show Me! 1 9 2 3 4 5 7 8 6
An Independent Set Show Me! 1 It aint maximal 9 2 3 4 5 7 8 6 You could add vertex 3 or vertex 8!
A Maximal Independent Set Show Me! 1 9 2 3 4 5 7 8 6 There are 11 maximal independent sets of size 6
The Largest Independent Set Show Me! 1 9 2 3 4 5 7 8 6 There is only one for this graph
A Minimal Maximal Independent Set Show Me! 1 9 2 3 4 5 7 8 6 There are 3 minimal maximal independent set Honest!
CP/Choco 1 9 2 3 4 5 7 8 6 But what about maximality?
Encoding Maximality CP/Choco 1 9 2 3 4 5 7 8 6 An example, vertex 2 That is, we state when a variable MUST be selected and when it MUST NOT be selected
CP/Choco 1 9 2 3 4 5 7 8 6 Example, vertices 1,2, and 3
You can reformulate a csp as a problem of finding a independent set of a hypergraph (this is not new) The independent set has to be of size n It is also maximal
An Example X + Y + Z = 2 where X, Y and Z are in {0,1} Give me an independent set of size n We have n.m vertices A hyper edge for each nogood An m-clique for each variable’s domain
Golomb Ruler Another Example • A ruler with N “ticks” • Distance between every pair of ticks is different • Ruler is of length L Independent Set encoding N.L vertices, corresponding to the L possible values for each of the N ticks N cliques of size L (binary nogoods) Hyper edges of arity 3
Maximality learning Learning by thinking • Use maximality as learning, at the top of search? • For a csp with n variables, what is a maximal independent set of size less than n, say k? • It is a nogood, but what kind of nogood? • It is a set of instantiations of k variables such that • no other variable can be instantiated with any value • i.e. EVERYTHING is in conflict We can find a maximal independent set in polytime It is NPC to find a maximal independent set of a specified size
Conclusion • We might learn by thinking • reformulate the problem • look for maximal independent sets • post these as new constraints • will this be useful?