Chapter 5 Constraint Satisfaction Problems

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Constraint Satisfaction Problems Russell and Norvig: Chapter
Constraint Satisfaction Problems
This lecture topic (two lectures) Chapter 6.1 – 6.4, except
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
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.
Constraint Satisfaction problems (CSP)
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
Constraint Satisfaction Problems
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
Constraint Satisfaction Problems
Constraint Satisfaction
Constraint Satisfaction Problems Russell and Norvig: Chapter 3, Section 3.7 Chapter 4, Pages Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm.
CAP 492 Course Dr. Souham Meshoul 1 CONSTRAINT SATISFACTION PROBLEMS Chapter 5.
Chapter 5 Outline Formal definition of CSP CSP Examples
Constraint Satisfaction Not all problems are solved by a sequential series of steps. How do we solve other types of problems?
Constraint Satisfaction Problems
Constraint Satisfaction Problems
Constraint Satisfaction Problems
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 4 Constraint Satisfaction Problems Instructor: Alireza Tavakkoli September 17, 2009 University.
1 Constraint Satisfaction Problems Slides by Prof WELLING.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
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.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Constraint Satisfaction CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
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.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
CSC 423 ARTIFICIAL INTELLIGENCE Constraint Satisfaction Problems.
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.
1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3 Grand Challenge:
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Constraint Satisfaction Problems University of Berkeley, USA
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Computing & Information Sciences Kansas State University Friday, 08 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 7 of 42 Friday, 08 September.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Dr. Shazzad Hosain Department of EECS North South University Lecture 01 – Part C Constraint Satisfaction Problems.
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
Constraint Satisfaction Problems
ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information Systems.
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Constraint Satisfaction Problems (CSPs)
Constraint Satisfaction Problems Lecture # 14, 15 & 16
Constraint Satisfaction
Instructor: Vincent Conitzer
Advanced Artificial Intelligence
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Constraint Satisfaction Problems
Constraint Satisfaction Problems
Artificial Intelligence
Constraint Satisfaction Problems
Constraint satisfaction problems
Constraint Satisfaction Problems. A Quick Overview
Constraint Satisfaction
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Constraint satisfaction problems
Constraint Satisfaction Problems (CSP)
Presentation transcript:

Chapter 5 Constraint Satisfaction Problems CS 2710, ISSP 2610 Chapter 5 Constraint Satisfaction Problems

CSP Previous framework: CSP framework: state is a black box, only accessed via goalp, successors, edgecost, h Heuristic, h, is problem specific CSP framework: States and goals in standard, structured representation Algorithms exploit structure of the state General purpose rather than problem specific heuristics

CSP Variables: X1, X2, …, XN Xi has domain Di of possible values. Constraints: X1, X2, …, XM. Each involves a subset of the vars Specifies allowable combos for that subset State: assignment of values to some or all vars

CSP An assignment that does not violate any constraint (but may not mention all variables) is consistent or legal An assignment that mentions all variables is complete Solution: complete assignment that satisfies all of the constraints. Sometimes, solutions must maximize an objective function. Or, objective function used to choose among solutions.

Example Problems Map Coloring (on board) 8-queens (on board) Course / room scheduling Each course has a room Each room has no more than one course at a given time Additional constraints (e.g. size, projector) Cryptarithmetic Line Labeling

A Cryptarithmetic Problem SEND + MORE = MONEY Constraints S≠E≠N≠D≠M≠O≠R≠Y (rules) M = 1 (It is a carry out of the high-order digit) S ≠ 0 (no leading 0s) D+E = Y or D+E=10+Y N+R = E or N + R + 1 = E or N + R = 10 + E etc.

Line Labeling Label each line in the picture (left) Constraints based on vertices (“L” and “arrow” vertices shown) Both ends of the segment must have the same label! > < + < < + – > > –

Domains Finite domain (fixed number of variables, possible assignments) Discrete variables with infinite domains (e.g. integers, strings) Cannot search by enumeration, need a language to represent constraints Continuous variables (e.g. real numbers) Linear programming and other continuous optimization techniques

Constraint Problem as Search Formulation Order of assignments doesn’t matter Initial state: no assignments Successor function: all assignments to *one* variable that do not violate any constraints Goal test: all variables are assigned Path cost: constant for each step Known solution depth (# of variables) Appropriate search is depth-limited DFS

Backtracking Search for CSP’s Pick an unassigned variable For each possible value that meets constraints Assign the value If all variables are assigned, return the solution Recursively solve the rest of the problem If the recursion succeeded, return the solution Return failure

Searching More Efficiently Choose the most constrained variable (fewest legal values) to assign next # of iterations of loop is minimized “MRV” Minimum Remaining Values heuristic In case of tie, choose the variable that is involved in the most constraints (highest degree) Once a variable is chosen, choose the least constraining value, i.e. rule out the fewest future choices

Constraint Propagation Forward checking Whenever a variable is assigned, delete inconsistent values from other domains Works well with MRV heuristic General constraint propagation Consider results of constraints between variables affected by forward checking Arc consistency: for each assignment, there must be a consistent assignment at the other end of the arc (in the constraint graph) Tradeoff between consistency checking (takes time) and overall search time

AC-3 Function AC-3 (binary csp problem) Queue = all the arcs in csp While queue not empty: (Xi, Xj)  queue(0) if remove-incon-values (Xi,Xj): for each Xk in neighbors(Xi): add (Xk,Xi) to queue Function remove-incon-values(Xi,Xj): Removed  false For each x in domain(Xi): if no value y in domain(Xj) lets (x,y) satisfy (Xi,Xj) constraint delete x from domain(Xi); removed  true Return removed

Chronological vs. Intelligent Backtracking Chronological Backtracking Undoes most recent decision Intelligent Backtracking Undoes the decision that caused the problem in the first place! Set of variables that caused the failure is “conflict set” Backjumping: undo most recent variable in conflict set (redundant with forward-checking)

Local Search for CSP Hill Climbing with min conflicts as heuristic Every state is a complete assignment, count how many variables are conflicted (violate constraints) At each step: choose a conflicted variable at random, change its assignment to the value that causes the minimum number of conflicts Surprisingly effective for many CSP’s e.g. N-queens problem Does depend (like all hill climbing) on initial state though.