CPM!. Just do it! JChoco We jumped in, and took it for a spin Some counting problems Meeting scheduling problem … you got your hands dirty.

Slides:



Advertisements
Similar presentations
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,
Advertisements

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.
Its search Jim, but not as we know it. Local Search (aka neighbourhood search) We start off with a complete solution and improve it or We gradually construct.
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Constraint Satisfaction Patrick Prosser. An Example, Exam Timetabling Someone timetables the exams We have a number of courses to examine how many? Dept.
University of Toronto Mechanical & Industrial Engineering An Introduction to Constraint Programming J. Christopher Beck Dept. of Mechanical & Industrial.
Global Constraints Toby Walsh NICTA and University of New South Wales
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
CP2014: Teaching CP. Context Final Year 120 credits (1 credit approx 10 hours) 30 credit project 4 modules in semester 1 4 modules in semester 2.
Non-binary constraints Toby Walsh Dept of CS University of York England.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Constraint Satisfaction CSE 473 University of Washington.
Constraint Satisfaction Problems
Chapter 5 Outline Formal definition of CSP CSP Examples
Distributed Scheduling. What is Distributed Scheduling? Scheduling: –A resource allocation problem –Often very complex set of constraints –Tied directly.
Global Constraints for Lexicographic Orderings Alan Frisch, Ian Miguel (University of York) Brahim Hnich, Toby Walsh (4C) Zeynep Kiziltan (Uppsala University)
Constraint Satisfaction Problems
Distributions of Randomized Backtrack Search Key Properties: I Erratic behavior of mean II Distributions have “heavy tails”.
A simple assessed exercise Ciaran McCreesh & Patrick Prosser + 21.
Specialised (user defined) constraints in JChoco 2 examples: max and subtour elimination.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Constrainedness Including slides from Toby Walsh.
Shop Scheduling Reformulation of Vehicle Routing Evgeny Selensky Dept of Computing Science Glasgow University.
Search Methods An Annotated Overview Edward Tsang.
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.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
© J. Christopher Beck Lecture 13: Modeling in Constraint Programming.
Modelling for Constraint Programming Barbara Smith CP 2010 Doctoral Programme.
On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group.
15 July 2005Edward Tsang (Copyright)1 Constraint Satisfaction and Optimization Professor Edward Tsang University of Essex URL:
Constraint Satisfaction Read Chapter 5. Model Finite set of variables: X1,…Xn Variable Xi has values in domain Di. Constraints C1…Cm. A constraint specifies.
A talk with 3 titles By Patrick Prosser Research … how not to do it LDS revisited (aka Chinese whispers) Yet Another Flawed Talk by Patrick Prosser.
Searching by Constraint CMSC Artificial Intelligence January 24, 2008.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CP Summer School Modelling for Constraint Programming Barbara Smith 4. Combining Viewpoints, Modelling Advice.
1 Chapter 5 Constraint Satisfaction Problems. 2 Outlines  Constraint Satisfaction Problems  Backtracking Search for CSPs  Local Search for CSP  The.
CSC 8520 Spring Paula Matuszek CS 8520: Artificial Intelligence Search 3: Constraint Satisfaction Problems Paula Matuszek Spring, 2013.
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.
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Thursday, 07 January 2016Edward Tsang (Copyright)1 Constraint Satisfaction for Decision Making Professor Edward Tsang University of Essex URL:
Put a different number in each circle (1 to 8) such that adjacent circles cannot take consecutive numbers.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Eliminating non- binary constraints Toby Walsh Cork Constraint Computation Center.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Constraint Propagation Artificial Intelligence CMSC January 22, 2002.
Constraint Satisfaction Problems/Programming ZUI 2012/2013.
Where are the hard problems?. Remember Graph Colouring? Remember 3Col?
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
Where are the hard problems?
543 cbj fans can’t be wrong.
Constraint Satisfaction
Constraint Satisfaction
CSP Search Techniques Backtracking Forward checking
Number partitioning.
Constraints and Search
at Glasgow (and Strathclyde till mid April)
Searching by Constraint & Searching by Evolution
Constraint Satisfaction
Constraint Satisfaction Problems
Presentation transcript:

CPM!

Just do it!

JChoco We jumped in, and took it for a spin Some counting problems Meeting scheduling problem … you got your hands dirty

JChoco Meeting scheduling problem … you got your hands dirty Model and solve Reflect on alternative models Symmetries Heuristics Pre-processing Equitable graph colouring with side constraints A surprisingly rich problem!

Opening up the hood: part 1, search

So how does CP work? BT: Chronological BackTracking Thrashing! FC: forward checking Thrashing! CBJ: Conflict-directed BackJumping Thrashing!

Opening up the hood: part 2, arc-consistency

So how does CP work? Arc-consistency Definition (aka 2-consistency) Covered Consistency Algorithms AC3 AC4/6/2001 AC5 Is AC a decision procedure?

modelling

We modelled some problems number partitioning jobshop scheduling magic square n-queens bin packing knight’s tour Ramsey number Orthogonal Latin Squares Crystal Maze graph colouring m-queens Team allocation Crossword Puzzle Round-robin scheduling Meeting scheduling problem 75 integer sequence sudoku

What are the decision variables? Are there any symmetries? Is there a variable/value ordering heuristic? Is there another model? We modelled some problems How does search go? Redundant constraints? Dual or Hidden Variable encoding?

Variables & their domains Constraints Identifying the decision variables Size of the model number of variables, number of constraints Use big-O Size of the search space (worst case) Use big-O Symmetries And how to eliminate if possible Heuristics Alternative models Swap the perspective variable/values? Replace constraints with variables? Did this in crossword puzzle Zero/one possible? Did this in team allocation and others Channeling between models See above We modelled some problems

phase transition phenomena

Where are the hard problems? Constrainedness? Who cares? In optimisation, as a heuristic, in solving problems

heuristics

Variable and value ordering heuristics Static, topological properties Fail-first, and it’s realisation Constrainedness Dual viewpoint heuristics Promise Regret Domain Specific (example JSSP slack-based, Warnsdorff)

Specialised constraints

specialised constraints max sub-tour elimination Knight’s tour … the glass box

local search

Search againLocal search (aka neighbourhood search) HC, SA, TS, GLS, GA, ACO, … Why we need them escape local optima Problems in using them incompleteness, move operators, evaluation/fitness functions, tuning parameters, Problems in using them in CP aka meta-heuristics

Search againLimited Discrepancy Search lds motivation for LDS when might we use it? when should we not use it? what happens when problem is unsat?

Parallel search Amdahl’s law How much speed up can we get? Satisfiable v Unsatisfiable problems Optimisation Superlinear? BitSet parallelism How to split up work Static Embarrassingly Dynamic work stealing/donation

change of representation

dual and hidden variable encoding change of representation Crossword puzzle, turn constraints into variables Interchange values and variables Zero/one? SAT encoding of Graph Colouring

Levels of consistency

Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path Consistency (IPC aka PIC) Singleton Arc-consistency (SAC) … and others consistency

Mechanics of choco

homework Ramsey & max Local Search demo m-queens 75 integers

summary

theory csp and it’s complexity search (bt, fc, cbj, …) thrashing arc-consistency levels of consistency heuristics local search & lds & parallel search dual & hidden variables sat phase transition phenomena & constrainedness summary

practice number partitioning jobshop scheduling magic square n-queens bin packing knight’s tour Meeting SchedulingOrthogonal Latin Squares Crystal Maze graph colouring Modelling & Solving Problems

practice variables (enumerated/bound/setsVar) and their domains constraints (neq, allDiff, ifOnlyIf, …) decision variables what propagation might take place size of the encoding/model (how it scales with problem size) heuristics (dynamic/static, variable/value) size of the search/state space how search goes (example was knight’s tour) alternative models (dual? hidden? values as variables?) optimisation (with maximise/minimise, seqn of decision problems) dealing with conflicts (soft constraints & penalties) symmetry breaking (ramsey, bin packing, …) redundant constraints (magic square, MOLS …) what will make problems hard to solve and what will make them easy? Modelling & Solving Problems

Where to next?

smarter (explanation/interaction) local search (comet & beyond) exploiting multi-cores (Moore’s law ends July 2017) in propagation in search easier to use (Miguel & Frisch) don’t need a BSc, MSc, MRes, PhD a killer app constraint spread sheet? something on a phone? you