Constraint Satisfaction Basics strongly influenced by Dr. Rina Dechter: “Constraint Processing”

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

CONSTRAINT Networks Chapters 1-2
Constraint Satisfaction Problems
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
1 CMSC 471 Fall 2002 Class #6 – Wednesday, September 18.
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.
Foundations of Constraint Processing, Fall 2005 October 21, 2005CSPs and Relational DBs1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
CPSC 322, Lecture 11Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Computer Science cpsc322, Lecture 11 (Textbook Chpt 4.0 – 4.2) January,
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Constraint Satisfaction Problems
CONSTRAINT Networks Chapters 1-2 Compsci-275 Spring 2009 Spring
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
1 Binary C ONSTRAINT P ROCESSING Chapter 2 ICS-275A Fall 2007.
Constraint Satisfaction Problems
Constraint Networks ( slides courtesy of Natalia Flerova, based on slides courtesy of Rina Dechter)
1 Chapter 8 Advanced Consistency Methods Yaling Zheng CSCE : Advanced Constraint Processing.
Constraint Satisfaction Problems
Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Jim Little UBC CS 322 – CSP 1 September 27, 2014 Textbook §
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Constraint Satisfaction Basics strongly influenced by Rina Dechter, “Constraint Processing”, 2003.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Constraint Networks Overview. Suggested reading Russell and Norvig. Artificial Intelligence: Modern Approach. Chapter 5.
Searching by Constraint CMSC Artificial Intelligence January 24, 2008.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Solving Constraint Satisfaction Problems (CSPs) using Search CPSC 322 – CSP 2 Textbook § January 31, 2011.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
CSC 8520 Spring Paula Matuszek CS 8520: Artificial Intelligence Search 3: Constraint Satisfaction Problems Paula Matuszek Spring, 2013.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 6 Binary CSP.
Principles of Intelligent Systems Constraint Satisfaction + Local Search Written by Dr John Thornton School of IT, Griffith University Gold Coast.
C ONSTRAINT Networks Chapters 1-2 Compsci-275 Fall
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
CS 175 Project in AI. 2 Lectures: ICS 180 Tuesday, Thursday Hours: am Discussion: DBH 1300 Wednesday Hours: pm Instructor: Natalia.
G51IAI Introduction to Artificial Intelligence
Constraint Propagation influenced by Dr. Rina Dechter, “Constraint Processing”
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Introduction to State Space Search
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Constraint Propagation Artificial Intelligence CMSC January 22, 2002.
Lecture 5: Constraint Satisfaction Problems
Constraint Satisfaction Problems/Programming ZUI 2012/2013.
Problem Solving with Constraints CSPs and Relational DBs1 Problem Solving with Constraints CSCE496/896, Fall
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
Constraint Satisfaction Problems
Introduction to graphical models. Outline Course goals and policies Overview of graphical models, examples Constraint networks Probabilistic networks.
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
Constraint Satisfaction Problems (CSPs) Introduction
Constraint Satisfaction Problems (CSPs)
Constraint Satisfaction Problems (CSPs) Introduction
Constraint Satisfaction Problem
CS 188: Artificial Intelligence
Computer Science cpsc322, Lecture 13
Problem Solving with Constraints
Running example The 4-houses puzzle:
Constraint Satisfaction Problems
Artificial Intelligence
Advanced consistency methods Chapter 8
Problem Solving with Constraints
Problem Solving with Constraints
Constraint Satisfaction Problems
CS 8520: Artificial Intelligence
ALGEBRA 1.6 Inequalities.
Constraint Satisfaction Problems
Constraint Satisfaction Problems (CSP)
Presentation transcript:

Constraint Satisfaction Basics strongly influenced by Dr. Rina Dechter: “Constraint Processing”

complete search space of a problem  variables V = {v 1, v 2, …., v n }  domains D = {D 1, D 2, …., D n }, v i  D i  search space T = D 1 X D 2 X…. X D n  size of search space |D 1 |. |D 2 |. ….. |D n | if there are no constraints, any solution in T is feasible

constraint satisfaction problems  variables V = {v 1, v 2, …., v n }  domains D = {D 1, D 2, …., D n }, v i  D i  constraints C = {C 1, C 2, …., C k } C i is a relation on scope S i  V C i puts constraints on some variables in the problem  search space T = D 1 X D 2 X…. X D n a solution in the search space T whose values violate a constraint is infeasible a constraint satisfaction problem is often called a constraint network

example: 4 queens problem column version  variables V = {v 1, v 2, v 3, v 4 }  domains D 1 = D 2 = D 3 = D 4 = {1,2,3,4}  constraints: “no two queens should attack one another” C = {C 1, C 2, …., C 6 } C 1 is a relation on scope S 1 = {v 1, v 2 } (constraint between first and second queens) enumerated: {(1,3),(1,4),(2,4),(3,1),(4,1),(4,2)} algebraic: { (v 1,v 2 ) | v 1 ≠ v 2, v 1 ≠ v 2 ± 1 }  others defined likewise v 1 v 2 v 3 v

describing constraints  scope S i :the set of variables on which a constraint C i is defined  scheme S = {S 1, S 2, …, S k } set of all scopes on which constraints are defined  arity of a constraint C i is the size of its scope |S i | unary constraint on one variable binary constraint on two variables (4 queens eg) n-ary constraint on n variables* *n-ary constraints can be rewritten as (many) binaries

simple scheduling problem five tasks to schedule, T1, T2, T3, T4, T5  each lasts one hour  each may start at 1PM, 2PM, 3PM  tasks can be executed simultaneously except: T1 starts after T3 T3 starts before T4 and after T5 T2 cannot be concurrent with T1 or T4 T4 cannot start at 2PM

simple scheduling problem five tasks to schedule, T1, T2, T3, T4, T5  variables? domains?  constraints? scopes? arity?

constraint graphs  vertices: variables  edges: (binary) variable scopes 4 queensscheduling problem v1v1 v1v1 v2v2 v2v2 v4v4 v4v4 v3v3 v3v3 T1 T2 T3 T4 T5

crossword puzzle (after Dechter) HOSESLASERSHEETSNAIL STEERALSOEARNHIKE IRONSAMEEATLET RUNSUNTENYES MEITNOUS

crossword puzzle HOSESLASERSHEETSNAIL STEERALSOEARNHIKE IRONSAMEEATLET RUNSUNTENYES MEITNOUS variables: 13 (letters) domains: alphabet constraints: S 1 {1,2,3,4,5} C1 {(H,O,S,E,S), (L,A,S,E,R), (S,H,E,E,T), (S,N,A,I,L), (S,T,E,E,R)}

crossword puzzle HOSESLASERSHEETSNAIL STEERALSOEARNHIKE IRONSAMEEATLET RUNSUNTENYES MEITNOUS S 1 {1,2,3,4,5} arity 5 S 2 {3,6,9,12} S 3 {5,7,11} S 4 {8,9,10,11} S 5 {10,13} S 6 {12,13}

crossword puzzle HOSESLASERSHEETSNAIL STEERALSOEARNHIKE IRONSAMEEATLET RUNSUNTENYES MEITNOUS partial solution satisfying C 4 and C 5 over S 4  S 5 {8,9,10,11,13} {(S,A,M,E,E)}

graphs for arity > 2  hypergraph multiple nodes per “hyperedge”

graphs for arity > 2  dual of hypergraph nodes are constraints edges are common variables ,2,3,4,5 5,7,11 3,6,9,12 8,9,10,11 12,13 10,

crossword puzzle another formulation HOSESLASERSHEETSNAIL STEERALSOEARNHIKE IRONSAMEEATLET RUNSUNTENYES MEITNOUS variables: 6 domains: words by length constraints: crossings S 1 {1,3}S 2 {1,5}S 3 {10,12} S 4 {3,8}S 5 {3,12}S 6 {5,8} S 7 {10,8} all binary constraints

binary constraint networks only unary and binary constraints  constraint deduction inferring new constraints from initial set 1.constraints between unconstrained variables 2.tightening of existing constraints

constraint deduction example: V = { v 1,v 2,v 3 } D 1 = D 2 = D 3 = { red, green} C 1 : {(v 2,v 1 )|v 2 ≠v 1 } = {(red, green),(green, red)} C 2 : {(v 1,v 3 )|v 1 ≠v 3 } = {(red, green),(green, red)} solutions: {(red, green, green), (green, red, red)} red green red green red green v1v1 v2v2 v3v3

constraint deduction example: new constraint network with same solutions --> better for partial solutions (more later) red green red green red green v1v1 v2v2 v3v3 red green red green red green v1v1 v2v2 v3v3 inferred constraint: v 2 = v 3

constraint composition given two binary* constraints C 1, C 2 on scopes S 1 = {x,y} and S 2 = {y,z} then the composition C 3 =C 1. C 2 is defined on S 3 = {x,z} C3 = {(a,b)| a  D x, b  D z,  c  Dy such that (a,c)  C 1 and (c,b)  C 2 } e.g.,C 1 = {(red, green),(green, red)} C 2 = {(red, green),(green, red)} C 3 =C 1. C 2 = {(red, red), (green, green)} *also works for a unary and a binary

inferring with constraints who owns the zebra? variables domains constraints constraint graph