I am a senior lecturer at Glasgow

Slides:



Advertisements
Similar presentations
I am Patrick Prosser I am a senior lecturer at Glasgow I teach AF2 & CP4 I am a member of the algorithms group the apes (distributed, not disbanded) I.
Advertisements

I am Patrick Prosser I am a senior lecturer at Glasgow I teach algorithms & data structures in java I am a member of the algorithms group the apes (distributed,
Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path.
Slides by Peter van Beek Edited by Patrick Prosser.
Constraint Satisfaction Patrick Prosser. An Example, Exam Timetabling Someone timetables the exams We have a number of courses to examine how many? Dept.
Backward Checking Search BT, BM, BJ, CBJ. An example problem Colour each of the 5 nodes, such that if they are adjacent, they take different colours 12.
Fc. Consider the following problem (csp5) variables V[1] to V[10] uniform domains D[1] to D[10] = {1,2,3} constraints V[1] = V[4] V[4] > V[7] V[7] = V[10]
Foundations of Constraint Processing Lookahead Schemas 1 Foundations of Constraint Processing CSCE421/821, Spring
Backward Checking Search BT, BM, BJ, CBJ. An example problem Colour each of the 5 nodes, such that if they are adjacent, they take different colours.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
Backtracking COP Backtracking  Backtracking is a technique used to solve problems with a large search space, by systematically trying and eliminating.
Foundations of Constraint Processing, Fall 2005 September 11, 2005Backtracking1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
Foundations of Constraint Processing, Fall September 2004Backtracking1 Foundations of Constraint Processing CSCE421/821, Fall 2004:
Constraint Satisfaction CSE 473 University of Washington.
Constraint Satisfaction Problems
Constraint Satisfaction
Foundations of Constraint Processing, Fall 2005 Sep 20, 2005BT: A Theoretical Evaluation1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
Chapter 5 Outline Formal definition of CSP CSP Examples
Subgraph Isomorphism Problem Simple algorithms. Given two graphs G = (V,E) and H = (W,F) is there a subgraph of H that is isomorphic to G?
Relaxation and Hybrid constraint processing Different relaxation techniques Some popular hybrid techniques.
I am Patrick Prosser I am a senior lecturer at Glasgow (and Strathclyde till mid April) I teach algorithms & data structures in java I am a member of.
On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group.
Constraint Satisfaction CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Problem Solving with Constraints Lookahead Schemas 1 Foundations of Constraint Processing CSCE496/896, Fall
Edge and Boundary interpretation Consistent line drawing labeling via backtracking Presented by Guy Shtub.
Chapter 5 Constraint Satisfaction Problems
Review Test1. Robotics & Future Technology Future of Intelligent Systems / Ray Kurzweil futurist Ray Kurzweil / A Long Bet A Long Bet / Robot Soccer.
An Introduction to Artificial Intelligence Lecture 5: Constraint Satisfaction Problems Ramin Halavati In which we see how treating.
Arc consistency AC5, AC2001, MAC. AC5 A generic arc-consistency algorithm and its specializations AIJ 57 (2-3) October 1992 P. Van Hentenryck, Y. Deville,
Problem Solving with Constraints Intelligent Backtracking Algorithms 1 Problem Solving with Constraints CSCE496/896, Fall2011:
Constraint Satisfaction Problems
Contents 1 Systematic Search Guided by Local Search with Conflict-based Heuristic in N-queen problem Hyoung rae Kim Debasis Mitra Ph.D Florida Institute.
Constraint Satisfaction CSE 473 University of Washington.
Lecture 8CSE Intro to Cognitive Science1 Interpreting Line Drawings II.
1 CSC 384 Lecture Slides (c) , C. Boutilier and P. Poupart CSC384: Lecture 16  Last time Searching a Graphplan for a plan, and relaxed plan heuristics.
Foundations of Constraint Processing, Spring 2008 Intelligent Backtracking AlgorithmsApril 16, Foundations of Constraint Processing CSCE421/821,
Cbj. What’s a csp? a set of variables each with a domain of values a collection of constraints (I’m going to assume binary for the present) assign each.
Where are the hard problems?
Constraint Satisfaction Problems
Iterative Deepening A*
Constraint Satisfaction Problems Lecture # 14, 15 & 16
543 cbj fans can’t be wrong.
Constraint Satisfaction
An Empirical Study of the Performance
Constraint Satisfaction
Lecture 7 Constraint Satisfaction Problems
Empirical Comparison of Preprocessing and Lookahead Techniques for Binary Constraint Satisfaction Problems Zheying Jane Yang & Berthe Y. Choueiry Constraint.
I am a senior lecturer at Glasgow
CSCI 5582 Artificial Intelligence
Iterative Deepening Search
Foundations of Constraint Processing
CSP Search Techniques Backtracking Forward checking
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Constraint Satisfaction Problems
Foundations of Constraint Processing All questions to Piazza
Lookahead Schemas Foundations of Constraint Processing
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Intelligent Backtracking Algorithms
Constraints and Search
Chapter 5: General search strategies: Look-ahead
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Intelligent Backtracking Algorithms: A Theoretical Evaluation
at Glasgow (and Strathclyde till mid April)
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Artificial Intelligence
Foundations of Constraint Processing All questions to Piazza
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Announcements Assignment #4 is due tonight. Last lab program is going to be assigned this Wednesday. ◦ A backtracking problem.
Presentation transcript:

I am a senior lecturer at Glasgow I am Patrick Prosser I am a senior lecturer at Glasgow I teach algorithms & data structures in java I am a member of the algorithms group the apes (distributed, not disbanded) I am a Glaswegian This is all that I am allowed to tell you

CI9(4) Hybrid Algorithms for the Constraint Satisfaction Problem Patrick Prosser CI9(4) Hybrid Algorithms for the Constraint Satisfaction Problem Still using that old greasy stuff? Who cares? So?

What’s he going to cover! Stop wasting time get on with it! How to do it (the idiot’s guide) (good old fashioned) chronological backtracking BT Forward checking FC FC with CBJ Conflict directed backjumping CBJ

What do we want from the algorithm? Minimise consistency checks minimise nodes visited fast (woooooosh!) pretty

Preamble d[i] is a set of values for variable v[i] v[i] is a variable d[i] is a set of values for variable v[i] x is a value in d[i] ( and y in d[j]) c[i,j] is a binary relation/constraint such as >, <, =, nextto, f(x,y), nil (no constraint) check(i,j) tests if v[i]=x is compatible with v[j]=y cd[i] is the current domain of v[i] i.e. the working domain of v[i] Preamble

It’s all just depth first search, right?

BT bt-label iterate over x in cd[i] until an x is found that is compatible with all past variables i.e. check(h,i) true for all 0 < h < i On route to finding this compatible value if any incompatible value x is found remove it from cd[i] return (i+1,true) or (i,false)

BT bt-unlabel bt-label(i) returned (i,false) or bt-unlabel(i) returned (i,false) the variable to backtrack to is h = i-1 i.e. the previous variable remove the value v[h] from cd[h] reset cd[i] return (h,true) or (h,false)

BT Thrashes! past variable v[h] past conflict with v[h] current variable v[i] future future variable v[j]

CBJ (reduce thrashing) 1 2 conflict set 3 4 {2,0} 5 {4,1,0} 6

{2,1,0} CBJ (reduce thrashing) Jump back to deepest past variable 3 4 {2,1,0} 5 6 Jump back to deepest past variable in confSet (call it h) and then combine confSet[i] with confSet[h] History: Konkrat and V Beek, Gent and Underwood

CBJ implementation Implementation confSet[0..n][0..n] is a boolean confSet[i][h] = true if v[i] in conflict with v[h] on backjumping do logical OR … and then clear out confset[i] For DVO h is the depth in the search tree of the variable v[i] conflicts with!

What is forward checking? OZ Show me!

Check Forwards instantiate v[i] = x for all variables v[j] where v[j] is adjacent to v[i] & v[j] is in the future of v[i] remove all values from cd[j] inconsistent with v[i]=x with respect to constraint c[i][j] do this every time we instantate a variable a lot of work! does it pay off? Can you bear the suspense?

NOTE: arrows go forward! Forward Checking 1 2 3 NOTE: arrows go forward! 4 5 6 7 8 9

Forward Checking, a marking scheme associate with each variable v[i] future[i][j] = true if v[i] = x removes values from cd[j] past[j][y] = i if v[i] = x removes value y from cd[j] cd[i][x] = true if x is currently in current domain of i checkForwards(i,j) does as follows for y in (1 .. m) if cd[j][y] and not(check(i,x,j,y)) cd[j][y] = false

Forward checking by marking Marking scheme uses static space! Makes it easy to retract/backtrack It’s neat But it still thrashes :(

Forward Checking Can Thrash 1 2 3 4 5 Forward Checking Can Thrash 6 7 8 9

Check Forwards, Jump Back! 1 2 There are no values in cd[6] compatible with v[9] get more values into cd[9] (undo v[1]?) OR get more values into cd[6] (undo v[4]) … and if that doesn’t work? undo v[3] so cd[4] gets value compatible with cd[6] that is then compatible with cd[9] 3 4 5 6 All the information is already there 7 8 9

Check forwards, jump back! assume v[i] = x causes dwo on v[j] v[i] is now in conflict with all variables forward checking against v[j] h = past[j][y] means that v[h] removes y from cd[j] therefore confSet[i][h] = true do this for all y! assume no more values to try in cd[i], must backjump to v[h] where h is the deepest variable that is in confSet[i] or in past[i] confSet[h] is united with confSet[i] and past[i]

OZ What is a dvo heuristic? (you kind of skipped that) Does it make any difference Show me! OZ

So? Paper rejected from IJCAI91 (written in 1990) I was a Lisp programmer at the time (it shows) I think the experiments were very good (so there!) Nice study of influence of topological parameter on search cost. In conclusion I forgot to say CBJ was new … why? I like BMJ, it is cool (I was smart for 1 day) I think CBJ is pretty (natural, discovered, not invented) I like FC-CBJ (I can understand it) I identify work to be done (researchers love that (why?)) … and I make errors re-dvo’s (researchers love that (why?)) I put my results in perspective (trash them :) I got encouragement (Nadel) and help (Ole and Peter) I got a whole load of background (Rina) But it hurt … why did it take 3 years to get somebody to read it?