Foundations of Constraint Processing

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Constraint Satisfaction Problems
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
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 CSP 101: continued1 Foundations of Constraint Processing CSCE421/821, Spring
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Foundations of Constraint Processing, Fall 2005 September 12, 2005CSP 101: continued1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
Constraint Satisfaction Problems
Foundations of Constraint Processing, Fall 2005 Sep 20, 2005BT: A Theoretical Evaluation1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
Distributed Scheduling. What is Distributed Scheduling? Scheduling: –A resource allocation problem –Often very complex set of constraints –Tied directly.
Foundations of Constraint Processing, Fall 2004 November 18, 2004More on BT search1 Foundations of Constraint Processing CSCE421/821, Fall 2004:
Constraint Satisfaction Problems
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
CONSTRAINT PROGRAMMING Computer Science Seminar April 9 th, 2004 Kerem Kacel.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
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 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.
Foundations of Constraint Processing, Spring 2008 Jan 14, 2008 Overview 11 Foundations of Constraint Processing CSCE421/821, Spring 2008:
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
1 Chapter 5 Constraint Satisfaction Problems. 2 Outlines  Constraint Satisfaction Problems  Backtracking Search for CSPs  Local Search for CSP  The.
Foundations of Constraint Processing, CSCE421/821 Overview 11 CSCE421/821, Fall Questions: Piazza Berthe Y.
Chapter 5 Constraint Satisfaction Problems
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.
Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs1 Foundations of Constraint Processing CSCE421/821, Fall 2004:
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.
Constraint Propagation Artificial Intelligence CMSC January 22, 2002.
Foundations of Constraint Processing, CSCE421/821 Overview 11 CSCE421/821, Fall Questions: Piazza Berthe Y.
Constraint Programming
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Consistency Methods for Temporal Reasoning
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Constraint Satisfaction Problems (CSPs)
Constraint Satisfaction Problems Lecture # 14, 15 & 16
Constraint Satisfaction
Constraint Satisfaction
Design and Analysis of Algorithm
Constraint Satisfaction Problem
Lecture 7 Constraint Satisfaction Problems
Constraint Satisfaction 101
Berthe Y. Choueiry (Shu-we-ri)
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Constraint Satisfaction Problems
Berthe Y. Choueiry (Shu-we-ri)
Foundations of Constraint Processing
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Constraint Satisfaction Problems
Artificial Intelligence
Class #20 – Wednesday, November 5
Hierarchical Search on DisCSPs
Constraints and Search
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Berthe Y. Choueiry (Shu-we-ri)
Constraint satisfaction problems
Constraint Satisfaction Problems. A Quick Overview
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Foundations of Constraint Processing
CS 8520: Artificial Intelligence
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Constraint Satisfaction Problems
Constraint satisfaction problems
Presentation transcript:

Foundations of Constraint Processing CSCE421/821, Fall 2003: www.cse.unl.edu/~choueiry/F03-421-821/ Berthe Y. Choueiry (Shu-we-ri) Ferguson Hall, Room 104 choueiry@cse.unl.edu Tel: +1(402)472-5444 7/1/2019 Lecture slides 2

Constraint Satisfaction 101 Motivating example, application areas Application examples Definition, representation, & formal characterization Solving techniques Issues & research directions 7/1/2019 Lecture slides 2

How to solve a CSP? Search 1. Constructive, systematic 2. Iterative repair 7/1/2019 Lecture slides 2

Systematic search Starting from a root node Consider all values for a variable V1 For every value for V1, consider all values for V2 etc.. For n variables, each of domain size d Maximum depth? fixed! Maximum number of paths? size of search space, size of CSP 7/1/2019 Lecture slides 2

Systematic search Before starting search, consider Importance of modeling/formulation: to control the size of the search space Preprocessing (i.e., constraint filtering/propagation, consistency checking) to reduce size of search space 7/1/2019 Lecture slides 2

Importance of modeling N-queen: formulation 1 Variables? Domains? Size of CSP? N-queens: formulation 2 4 Column positions 1 2 3 4 4 Rows V1 V2 V3 V4 16 Cells V11 V12 V13 V14 V21 V22 V23 V24 V31 V32 V33 V34 V41 V42 V43 V44 {0,1} 7/1/2019 Lecture slides 2

Constraint checking Arc-consistency B 1- B: [ 5 .. 14 ] A < B A 13 1- B: [ 5 .. 14 ] A < B 14 A [ 5.... 18] C: [ 6 .. 15 ] 2 2- A: [ 2 .. 10 ] B < C [ 1.... 10 ] C: [ 6 .. 14 ] 2 < C - A < 5 3- B: [ 5 .. 13 ] 6 14 [ 4.... 15] C 7/1/2019 Lecture slides 2

Constraint checking Arc-consistency: every combination of two adjacent variables 3-consistency, k-consistency (k  n) Constraint filtering, constraint checking, etc.. Eliminate non-acceptable tuples prior to search Warning: arc-consistency does not solve the problem still is not a solution! 7/1/2019 Lecture slides 2

Systematic search (I) Back-checking Systematic search generates dn possibilities Are all possibilities acceptable? Expand a partial solution only when it is consistent This yields early pruning of inconsistent paths 7/1/2019 Lecture slides 2

Systematic search (II) Chronological backtracking What if only one solution is needed? Depth-first search & Chronological backtracking DFS: Soundness? Completeness? 7/1/2019 Lecture slides 2

Systematic search (III) Intelligent backtracking What if the reason for failure was higher up in the tree? Backtrack to source of conflict !! Backjumping, conflict-directed backjumping, etc. 7/1/2019 Lecture slides 2

Systematic search (IV) Ordering heuristics Which variable to expand first? Heuristics: most constrained variable first (reduce branching factor) most promising value first (find quickly first solution) 7/1/2019 Lecture slides 2

Systematic search (V) Back-checking Search tree with only backtrack search? Root node Backtrack 2 Q Q 1 3 Q 4 Q Backtrack 1 2 4 Q 1 2 3 2 Q 3 Backtrack 4 1 2 3 4 1 1 Q Q 3 Solution! 26 nodes Visited 1 2 3 4 1 2 7/1/2019 Lecture slides 2

Systematic search (VI) Forward checking Search Tree with domains filter by Forward Check Root Node Q 1 2 Domain Wipe out V4 Q Q 3 Domain Wipe Out V3 4 Q Q 4 2 Q Q 1 3 Q Solution! 8 nodes visited 7/1/2019 Lecture slides 2

Summary of backtrack search Constructive, systematic, exhaustive In general sound and complete Back-checking: expands nodes consistent with past Backtracking: Chronological vs. intelligent Ordering heuristics: Static Dynamic variable Dynamic variable-value pairs Looking ahead: Partial look-ahead Forward checking (FC) Directional arc-consistency (DAC) Full (a.k.a. Maintaining Arc-consistency or MAC) 7/1/2019 Lecture slides 2

CSP: a decision problem (NP-complete) Modeling: abstraction and reformulation Preprocessing techniques: eliminate non-acceptable tuples prior to search Systematic search: potentially dn paths of fixed lengths chronological backtracking intelligent backtracking variable/value ordering heuristics Search ‘hybrids:’ Mixing consistency checking with search: look-ahead strategies 7/1/2019 Lecture slides 2

Non-systematic search Iterative repair, local search: modifies a global but inconsistent solution to decrease the number of violated constraints Examples: Hill climbing, taboo search, simulated annealing, GSAT, WalkSAT, Genetic Algorithms, Swarm intelligence, etc. Features: Incomplete & not sound Advantage: anytime algorithm Shortcoming: cannot tell that no solution exists 7/1/2019 Lecture slides 2

Decomposition Decomposition Conjunctive Disjunctive Partition constraints (DB) Decomposition Conjunctive Disjunctive Properties of disjunctive decompositions 7/1/2019 Lecture slides 2

Properties of disjunctive decompositions Conjunctive or disjunctive? Consistent: No constraint is removed Simplifying: Size(Pi) < Size( P) Semi-complete: At least one solution is kept Complete: No solution is lost Redundant: Solutions replicated in { Pi} Reducible: may be < Size( P) 7/1/2019 Lecture slides 2

Deep analysis Uncover particular properties, e.g. bound the required level of consistency (islands of tractability) predict ease/difficulty of solving a given instance Structure, topology of the constraint graph tree, DAGs, chordal, etc. Types, semantics of the constraints subsets of Allen's relations, all-diffs, functional, monotonic, row-convex, linear inequalities, etc. Order parameter (phase transition) 7/1/2019 Lecture slides 2

Multi agents 1. Computational tasks: problem decomposed, replicated 2. Types of agent: broker, solver, problem, solver+problem 3. Architecture and authority: hierarchical, egalitarian, priority-based (e.g., vote) 4. Nature of communication: agent-to-agent, group, broadcast 5. Interaction strategies: cooperating vs. competing transparent vs. secretive negotiation + alliance/coalition formation 7/1/2019 Lecture slides 2

Computational tasks At one end of the spectrum, agents may be involved in solving heterogeneous, distinct and completely independent problems and request other agents to supply specific functionalities for the completion of the individual tasks. At the other end of the spectrum, the same problem could be replicated and assigned to all agents, which can then share their individual results with other agents incrementally in order to speed up the execution of the global computational task. 7/1/2019 Lecture slides 2

Types of agent An agent in the system can be any of the following: an agent that collects data from the environment and formulates the CSP a reasoning module with specific computational characteristics (e.g., various search algorithms) brokers that facilitate matching between a service seeker and a number of service providers (e.g., CORBA brokers). 7/1/2019 Lecture slides 2

Agent architecture and how is authority granted Agents could be organized in a strict hierarchy in which a given agent has full control over the activities of the agents that lie underneath it in the hierarchy. It decides how the lower level agents may cooperate while ensuring coordination with the higher-level agent. Agents could be in a strictly flat structure competing for services and rewards, either chaotically or according to some strict priority policy, for example, based on voting or time-responsiveness. 7/1/2019 Lecture slides 2

Communication environment Communications among agents may be conducted according to: a one-to-one schema multi-cast (i.e., one-to-group), or broadcast, where all agents in the environment have access to the content of the communicated information. 7/1/2019 Lecture slides 2

Type of supported interactions Agents may be cooperative, pooling their resources and capabilities to achieve a common, global objective, or they could be competitive trying to win rewards and optimize their individual gain. They could also adopt a midway strategy, dynamically forming coalitions and gathering support to acquire more resources and realize greater gains. Also, agents may be transparent about their intentions, resources, needs, and constraints or may be secretive, hiding one or the other of their strengths or weaknesses. 7/1/2019 Lecture slides 2

Research Directions Preceding (i.e., search, backtrack, iterative repair, V/V/ordering, consistency checking, decomposition, symmetries & interchangeability, deep analysis) Evaluation of algorithms worst-case analysis vs. empirical studies random problems vs. real-world problems Cross-fertilization: DB, SAT & theoretical computer science (TCS), mathematical programming, interval mathematics, logical inference, applications, etc. Modeling & Reformulation Multi agents Distribution and negotiation decomposition & alliance formation 7/1/2019 Lecture slides 2

CSP in a nutshell (I) Definition: P = (V, D, C ) Constraint graph, constraint network Finite domains Binary constraints, universal constraints Examples: map coloring, puzzles, resource allocation, temporal reasoning, product configuration, databases, spreadsheets, graphical layouts, graphical user-interfaces, bioinformatics, etc. 7/1/2019 Lecture slides 2

CSP in a nutshell (II) Solution technique: Search constructive Enhancing search: constructive iterative repair Intelligent backtrack Variable/value ordering Consistency checking Hybrid search  Symmetries  Decomposition 7/1/2019 Lecture slides 2

CSP in a nutshell (III) Deep analysis:  Graph topology exploit problem structure Research  Graph topology  Constraint semantics Phase transition - k-ary constraints, soft constraints - continuous vs. finite domains - evaluation of algorithms (empirical) - cross-fertilization (mathematical program.)  reformulation and approximation  architectures (multi-agent, negotiation) 7/1/2019 Lecture slides 2

Constraint Logic Programming (CLP) A merger of  Constraint solving  Logic Programming, mostly Horn clauses e.g., Prolog) Building blocks Constraint: primitives but also user-defined cumulative/capacity (linear ineq), MUTEX, cycle, etc. domain: Booleans, natural/rational/real numbers, finite Rules (declarative): a statement is a conjunction of constraints and is tested for satisfiability before execution proceeds further Mechanisms: satisfiability, entailment, delaying constraints 7/1/2019 Lecture slides 2

Constraint Processing Techniques Were you to ask me which programming paradigm is likely to gain most in commercial significance over the next 5 years, I would have to pick Constraint Logic Programming (CLP), even though it is perhaps currently one of the least known and understood. That’s because CLP has the power to tackle those difficult combinational problems encountered for instance in job scheduling, timetabling, and routing which stretch conventional programming techniques beyond their breaking point. Though CLP is still the subject of intensive research, it is already being used by large corporation such as manufacturers Michelin and Dassault, the French railway authority SNCF, airlines Swissair and SAS and Cathay Pacific, and Hong Kong International Terminals, the world’s largest privately-owned container terminal. Byte, Dick Powntain 7/1/2019 Lecture slides 2