© J. Christopher Beck 20081 Lecture 15: CP Search.

Slides:



Advertisements
Similar presentations
University of Toronto Mechanical & Industrial Engineering An Introduction to Constraint Programming J. Christopher Beck Dept. of Mechanical & Industrial.
Advertisements

University of Toronto Mechanical & Industrial Engineering An Introduction to Constraint Programming Part II: Solving Scheduling Problems J. Christopher.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
Constraint Satisfaction Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
Lecture 11 Last Time: Local Search, Constraint Satisfaction Problems Today: More on CSPs.
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Lecture 6: Job Shop Scheduling Introduction
© J. Christopher Beck Lecture 7: Shifting Bottleneck.
© J. Christopher Beck Lecture 17: Tabu Search.
Constraint Satisfaction problems (CSP)
Lecture 10: Integer Programming & Branch-and-Bound
© J. Christopher Beck Lecture 12: Constraint Programming 2.
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
Computational Methods for Management and Economics Carla Gomes
Constraint Satisfaction Problems
CS460 Fall 2013 Lecture 4 Constraint Satisfaction Problems.
Constraint Satisfaction
Lecture 5: On-line search Constraint Satisfaction Problems
© J. Christopher Beck Lecture 11: Constraint Programming 1.
CS121 Heuristic Search Planning CSPs Adversarial Search Probabilistic Reasoning Probabilistic Belief Learning.
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.
© J. Christopher Beck Lecture 19: Timetabling with Operator Constraints.
Busby, Dodge, Fleming, and Negrusa. Backtracking Algorithm Is used to solve problems for which a sequence of objects is to be selected from a set such.
Copyright R. Weber Search in Problem Solving ISYS 370 Dr. R. Weber.
Slide 1 CSPs: Arc Consistency & Domain Splitting Jim Little UBC CS 322 – Search 7 October 1, 2014 Textbook §
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
© J. Christopher Beck Lecture 13: Modeling in Constraint Programming.
Midterm Review Prateek Tandon, John Dickerson. Basic Uninformed Search (Summary) b = branching factor d = depth of shallowest goal state m = depth of.
Computer Science CPSC 322 Lecture 13 Arc Consistency (4.5, 4.6 ) Slide 1.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Constraint Satisfaction CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
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,
CSC 423 ARTIFICIAL INTELLIGENCE Constraint Satisfaction Problems.
15.053Tuesday, April 9 Branch and Bound Handouts: Lecture Notes.
Lecture 9: Simplified Shifting Bottleneck
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
Chapter 5 Constraint Satisfaction Problems
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
Review Test1. Robotics & Future Technology Future of Intelligent Systems / Ray Kurzweil futurist Ray Kurzweil / A Long Bet A Long Bet / Robot Soccer.
© J. Christopher Beck Lecture 10: (Full) Shifting Bottleneck.
An Introduction to Artificial Intelligence Lecture 5: Constraint Satisfaction Problems Ramin Halavati In which we see how treating.
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
CS 312: Algorithm Analysis Lecture #33: Branch and Bound, Job Assignment This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
BIL 472 SADI EVREN SEKER Constraint Satisfaction.
© J. Christopher Beck Lecture 16: Local Search.
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information Systems.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Computer Science cpsc322, Lecture 13
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Constraint Satisfaction Problems (CSPs)
Lecture 8: Dispatch Rules
Lecture 11: Tree Search © J. Christopher Beck 2008.
Computer Science cpsc322, Lecture 13
MIP Tools Branch and Cut with Callbacks Lazy Constraint Callback
Lecture 9: Tabu Search © J. Christopher Beck 2005.
Constraints and Search
Constraint satisfaction problems
Constraint Satisfaction Problems. A Quick Overview
Constraint Satisfaction Problems
We have the following incomplete B&B tree:
Constraint satisfaction problems
Constraint Satisfaction Problems (CSP)
Presentation transcript:

© J. Christopher Beck Lecture 15: CP Search

© J. Christopher Beck Outline Quick CP Review Standard CP Search Scheduling Specific Branching Heuristics

© J. Christopher Beck Readings P Ch 5.5, D.2, D.3

© J. Christopher Beck Generic CP Algorithm Assert Commitment Propagators Start Success Solution? Make Heuristic Decision Backtrack Technique Failure Nothing to retract? Dead-end?

© J. Christopher Beck Constraint Satisfaction Problem (CSP) Given: V, a set of variables {v 0, v 1, …, v n } D, a set of domains {D 0, D 1, …, D n } C, a set of constraints {c 0, c 1, …, c m } Each constraint, c i, has a scope c i (v 0, v 2, v 4, v 117, …), the variables that it constrains From Lecture 13

© J. Christopher Beck Idea #1: Partitioning Add constraint to the original problem to form a partition: P 1, P 2, P 3, … Partitions are easier to solve Partitions, sub-partitions, sub-sub- partitions Solution is the best one from all the partitions From Lecture 11

© J. Christopher Beck Standard CP Search Tree Search a, b, c є {0, 1} a = 0a = 1 b = 0b = 1 c = 0c = 1c = 0c = 1c = 0c = 1c = 0c = 1 b = 0b = 1 Branch In CSP there is no optimization function! (think of the Crystal Maze)

© J. Christopher Beck Standard CP Search Branch-and-Infer at each node, run constraint propagation For Constraint Optimization Problems: Branch-Infer-&-Bound Partition/Inference/Relax (see Lecture 11) Often bound calculation is “hidden” in constraint propagation

© J. Christopher Beck Basic MIP B&B Q.push(root) while Q is not empty n = Q.pop() solve LP(n) if better than incumbent if integral update incumbent else v = choose branching variable Q.push(children(n,v)) Priority queue (node selection) Relaxation Branching variable selection From Lecture 12

© J. Christopher Beck Basic CP BI&B CPSearch(Problem P) if propagate(P) == dead-end return dead-end if not all variables are assigned V = choose variable in P x = choose value for V if CPSearch(P + V=x) == solution return solution else return CPSearch(P + V≠x) return solution depth-first search variable ordering heuristic value ordering heuristic

© J. Christopher Beck MIP vs CP Search Conceptually (almost) the same thing Nice exam question: How do node selection & branch selection correspond to DFS, variable ordering, and value ordering?

© J. Christopher Beck CP Heuristics for Scheduling It is common to make a decision (branch) about the sequence of a pair of activities. What pair? Which sequence should be tried first? How do these map into variable and value ordering heuristics?

© J. Christopher Beck Slack slack(A i,A j ) = lft j – est i – p i – p j A A slack(A 1,A 2 ) = 100 – 50 – 15 – 20 = 15 slack(A 2,A 1 ) = 120 – 35 – 15 – 20 = 50 If you post A i  A j, how much time is left between the end of A j and lft j ?

© J. Christopher Beck MinSlack Heuristic Find operation pair with smallest slack Post the opposite sequence Example slack(A  B) = 50, slack(B  A) = 25 slack(A  C) = 150, slack(C  A) = 5 slack(B  C) = 15, slack(C  B) = 50 Pick A,C and post A  C Note: The text is wrong here!

© J. Christopher Beck Branch on Sequence A1  A2A2  A1 … A4  A1 …

© J. Christopher Beck CBA & Slack Find all CBA inferences Find first heuristic decision based on slack A A A 2 5 A

© J. Christopher Beck Generic CP Algorithm Assert Commitment Propagators Start Success Solution? Make Heuristic Decision Backtrack Technique Failure Nothing to retract? Dead-end?

© J. Christopher Beck CP on JSP Run CP on our JSP problem Use CBA, EF Exclusion Min Slack Heuristic JobsProcessing times 0 J0R0[15]  J0R1[50]  J0R2[60] 1 J1R1[50]  J1R0[50]  J1R2[15] 2 J2R0[30]  J2R1[15]  J2R2[20]