10/28 Homework 3 returned Homework 4 socket opened (No office hours today) Where hard problems are Phase Transition.

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems Russell and Norvig: Chapter
Advertisements

Constraint Satisfaction Problems
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
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Artificial Intelligence
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Constraint Satisfaction problems (CSP)
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Midterm Review CMSC421 – Fall CH1 Summary: Intro AI Definitions: dimensions human/rational think/act Three Major Components of AI Algorithms Representation.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
10/1  Project 2 will be given out by 10/3 Will likely be on Sudoku solving using CSP techniques  Mid-term will likely be around 10/17.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Constraint Satisfaction Problems
Constraint Satisfaction
Methods of Proof Chapter 7, second half.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Python logic Tell me what you do with witches? Burn And what do you burn apart from witches? More witches! Shh! Wood! So, why do witches burn? [pause]
Prop logic First order predicate logic (FOPC) Prob. Prop. logic Objects, relations Degree of belief First order Prob. logic Objects, relations.
Chapter 5 Outline Formal definition of CSP CSP Examples
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
Logic - Part 2 CSE 573. © Daniel S. Weld 2 Reading Already assigned R&N ch 5, 7, 8, 11 thru 11.2 For next time R&N 9.1, 9.2, 11.4 [optional 11.5]
Why FOPC If your thesis is utter vacuous Use first-order predicate calculus. With sufficient formality The sheerest banality Will be hailed by the critics:
Constraint Satisfaction Problems
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
Constraint Satisfaction Problems
1 Constraint Satisfaction Problems Slides by Prof WELLING.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
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.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
First-Order Logic and Inductive Logic Programming.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
Constraint Satisfaction Problems (Chapter 6)
SAT 2009 Ashish Sabharwal Backdoors in the Context of Learning (short paper) Bistra Dilkina, Carla P. Gomes, Ashish Sabharwal Cornell University SAT-09.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
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.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
EXAMPLE: MAP COLORING. Example: Map coloring Variables — WA, NT, Q, NSW, V, SA, T Domains — D i ={red,green,blue} Constraints — adjacent regions must.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
Inference in Propositional Logic (and Intro to SAT)
Logical Inference 1 introduction
Constraint Satisfaction Problems (CSPs)
First-Order Logic and Inductive Logic Programming
Artificial Intelligence: Agents and Propositional Logic.
Methods of Proof Chapter 7, second half.
Presentation transcript:

10/28 Homework 3 returned Homework 4 socket opened (No office hours today) Where hard problems are Phase Transition

Davis-Putnam-Logeman-Loveland Procedure  detect failure

DPLL Example Clauses (p,s,u) (~p, q) (~q, r) (q,~s,t) (r,s) (~s,t) (~s,u) Pick p; set p=true unit propagation (p,s,u) satisfied (remove) p;(~p,q)  q derived; set q=T (~p,q) satisfied (remove) (q,~s,t) satisfied (remove) q;(~q,r)  r derived; set r=T (~q,r) satisfied (remove) (r,s) satisfied (remove) pure literal elimination in all the remaining clauses, s occurs negative set ~s=True (i.e. s=False) At this point all clauses satisfied. Return p=T,q=T;r=T;s=False s was not Pure in all clauses (only The remaining ones)

Model-checking by Stochastic Hill-climbing Start with a model (a random t/f assignment to propositions) For I = 1 to max_flips do –If model satisfies clauses then return model –Else clause := a randomly selected clause from clauses that is false in model With probability p whichever symbol in clause maximizes the number of satisfied clauses /*greedy step*/ With probability (1-p) flip the value in model of a randomly selected symbol from clause /*random step*/ Return Failure Remarkably good in practice!! Clauses 1. (p,s,u) 2. (~p, q) 3. (~q, r) 4. (q,~s,t) 5. (r,s) 6. (~s,t) 7. (~s,u) Consider the assignment “all false” -- clauses 1 (p,s,u) & 5 (r,s) are violated --Pick one—say 5 (r,s) [if we flip r, 1 (remains) violated if we flip s, 4,6,7 are violated] So, greedy thing is to flip r we get all false, except r otherwise, pick either randomly

Phase Transition in SAT Theoretically we only know that phase transition ratio occurs between 3.26 and Experimentally, it seems to be close to 4.3 (We also have a proof that 3-SAT has sharp threshold)

Progress in nailing the bound.. (just FYI) Not discussed in class

A longer proof for 5.19 bound (FYI) Not discussed in class Probability that a 3-sat clause is satisfied is 7/8 3 vars; 2 3 possible assignments only one is all false P(X >= t  t

An easy upper bound for 3-sat transition (optional) Suppose there are n variables and c clauses Probability that a random assignment satisfied a clause if 7/8 –Each clause contains 3 variables; so 2 3 possible assignments for the variables. Of these, just one, the all false one, makes the clause false Probability that all c clauses are satisfied is (7/8) c (assuming clause independence; holds when n>>3) There are 2 n possible random assignments. So, the number of assignments which will satisfy the entire 3SAT instance is 2 n (7/8) c This is the expected number of satisfying assignments We want to know when the expected num of satisfying assignments becomes less than 1 (i.e., unsatisfiable) –2 n (7/8) c < 1 –n + c log 2 7/8 < 0 Taking log to the base 2 on both sides –n < - c log 2 7/8 –n < c log 2 8/7 –c/n > 1/log 2 8/7 = 1/ = Not discussed in class

CSP: SAT with multi-valued variables It is easy to generalize the SAT problem to handle non-boolean variables –CSP problem Given a set of discrete variables and their domains And a set of constraints (expressed as legal value combinations that can be taken by various subsets of the variables) –Clausal constraints (such as p=>q ) can be seen in this way too Find a model (an assignment of domain values to the variables) that satisfies all constraints –SAT is a boolean CSP

We can model any CSP problem also as a SAT problem Consider the variables “WA-is-red” “WA-is-green”…. |V|*|D| boolean variables --but this leads to some loss of structure

Planning as CSP Variables: propositions at each level Domains: the actions supporting them at that level + NULL value Goal constraints: Certain Constraints: Activity constraints:

We will mostly talk about discrete domain variables All CSPs can be compiled to binary CSPs (by introducing additional variables)  Most early work on CSP concentrated on binary CSPs

10/30 Counseling today during office hours

Most of the SAT improvements work for CSP too. Main differences are: --Variable selection heuristics CSP solvers typically consider most constrained variable first heuristic (i.e., heuristic with the smallest domain) --Value selection heuristics CSP solvers consider “least constraining value first” heuristic -- Lookahead Instead of unit propagation, CSP solvers use variety of constraint propagation algorithms (forward checking, arc-consistency, path consistency) Backtracking Search As is the case for SAT, basic search For CSP is in the space of partial Assignments --extend the assignment by selecting a variable and considering all its values (in different branches) --prune any (even partial) assignment if it violates a constraint Red Violates

Variable Ordering Strategies Notice that for “boolean CSPs” (SAT), most constrained variable heuristics are less effective (since all variables have domains of size 2 (normal), 1 (have a specific value) or 0 (backtrack)

Value Ordering Heuristics

Lookahead Variable ordering can be improved in the presence of FC DVO (Dynamic variable ordering) --Consider the variable with the smallest remaining domain next

K-consistency Forward checking is a “weak” form of look-ahead --stronger look-ahead are based on the notion of enforcing k-consistency A CSP is k-consistent, if any legal assignment of values for any k-1 sized subset of variables can be extended to cover any kth variable. If a CSP is n-consistent, then it can be solved without backtracking! [Make sure you get this…] Enforcing higher than 2 or 3 consistency is rarely worth it

2-consistency Forward checking will stop thinking everyone has non-empty domains. However, NT is blue; if you propagate that we know that SA cannot be blue. This means SA is empty domain Graphplan mutex propagation can be Seen as a form of 3-consistency Enforcement..

Consistency enforcement as inference A:{1,2} B:{1,2} A<B A=1 V A=2 B=1 V B=2 ~(A=1) V ~(B=1) ~(A=2) V ~(B=1) ~(A=2) V ~(B=2) A=2 V ~(B=1) ~(B=1) V ~(B=1) = ~(B=1) A:{1,2} B:{1,2} A<B Currently, B=2 A=1 V A=2 B=1 V B=2 ~(A=1) V ~(B=1) ~(A=2) V ~(B=1) ~(A=2) V ~(B=2) B=2 ~(A=2) 1-level “unit resolution” One of the resolvers is Derived from A’s domain Constraint. The other is a Inter-variable constraint of Size 2

Inference/ Theorem Proving Satisfaction “Conditioning” Inference satisfaction Inference/Satisfaction (Conditioning) Duality “Try to explicate hidden structure” “Try to split cases (disjunction) into search tree (by committing)”

Summary of Propositional Logic Syntax Semantics (entailment) Entailment computation –Model-theoretic Using CSP techniques –Proof-theoretic Resolution refutation –Heuristics to limit type of resolutions »Set of support Connection to CSP –K-consistency can be seen as a form of limited inference

Why FOPC If your thesis is utter vacuous Use first-order predicate calculus. With sufficient formality The sheerest banality Will be hailed by the critics: "Miraculous!"

Left-leg-of Tarskian Interpretations

Inference in first order logic For “ground” sentences (i.e., sentences without any quantification), all the old rules work directly –P(a,b)=> Q(a); P(a,b) |= Q(a) –~P(a,b) V Q(a) resolved with P(a,b) gives Q(a) What about quantified sentences? –Universal Instantiation (a universally quantified statement entails every instantiation of it) Can we combine these (so we can avoid unnecessary instantiations?) Yes. Generalized modus ponens Needs UNIFICATION