Title: Learning
1- Learning
- From your mistakes, or
- By thinking
St Andrews
2 for constraint satisfaction problems
3Why learn?
- Improve performance
- stop making the same mistakes!
- Provide explanations
- why is there no solution?
- why cant I have a chocolate tea pot?
- React to change
- when constraints are retracted/relaxed
4Why bother?
all good sat solvers learn
constraint programmers dont learn
But some are starting to (palm, the Germans, )
cp might be ignoring a win
5Learning while searching
Brief/incomplete history of learning
- Dechters deep and shallow learning (late 80s
?) - The reactive scheduling agent (IJCAI91)
- DAS (PhD thesis, 1990)
- Ginsbergs 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
6Learning by thinking
Reformulate the problem and think about it for as
long as you want
7Reformulate a csp as a problem of finding a
maximal independent set of a hypergraph
8Whats 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
9(No Transcript)
10Show Me!
A Hypergraph
11Show Me!
An Independent Set
You could add vertex 3 or vertex 8!
12Show Me!
A Maximal Independent Set
There are 11 maximal independent sets of size 6
13Show Me!
The Largest Independent Set
There is only one for this graph
14Show Me!
A Minimal Maximal Independent Set
15(No Transcript)
16CP/Choco
But what about maximality?
17CP/Choco
Encoding Maximality
An example, vertex 2
That is, we state when a variable MUST be
selected and when it MUST NOT be selected
18CP/Choco
Example, vertices 1,2, and 3
19More Generally
20So?
21You 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
22An 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 variables domain
23(No Transcript)
24Another Example
Golomb Ruler
- 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
25Maximality 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
26(No Transcript)
27Conclusion
- We might learn by thinking
- reformulate the problem
- look for maximal independent sets
- post these as new constraints
- will this be useful?
28(No Transcript)