Logic in AI CSE 573. © Daniel S. Weld 2 Logistics Monday? Reading Ch 8 Ch 9 thru p 278 Section 10.3 Projects Due 11/10 Teams and project plan due by this.

Slides:



Advertisements
Similar presentations
1 Knowledge Representation Introduction KR and Logic.
Advertisements

Big Ideas in Cmput366. Search Blind Search State space representation Iterative deepening Heuristic Search A*, f(n)=g(n)+h(n), admissible heuristics Local.
Russell and Norvig Chapter 7
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
Logic Use mathematical deduction to derive new knowledge.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Propositional Logic Reading: C , C Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
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.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
Knowledge Representation I (Propositional Logic) CSE 473.
1 AI=Knowledge Representation & Reasoning zSyntax zSemantics zInference Procedure yAlgorithm ySound? yComplete? yComplexity.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Logic in AI CSE 573. © Daniel S. Weld 2 Logistics Monday? Reading Ch 8 Ch 9 thru p 278 Section 10.3 Projects Due 11/10 Teams and project plan due by this.
Knowledge Representation II (Inference in Propositional Logic) CSE 473.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
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]
To do Check slides for next lecture and move some to this lecture. Consider eliminating resolution Simplify discussion of inference – just talk about SAT.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
Lectures 11 / 12 Knowledge Representation Propositional Logic CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Propositional Logic: Methods of Proof (Part II) This lecture topic: Propositional Logic (two lectures) Chapter (previous lecture, Part I) Chapter.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
S P Vimal, Department of CSIS, BITS, Pilani
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
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.
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CSE 473 Propositional Logic SAT Algorithms Dan Weld (With some slides from Mausam, Stuart Russell, Dieter Fox, Henry Kautz, Min-Yen Kan…) Irrationally.
CS6133 Software Specification and Verification
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
© Daniel S. Weld 1 Logistics Problem Set 2 Due Wed A few KR problems Robocode 1.Form teams of 2 people 2.Write design document.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
UBC Department of Computer Science Undergraduate Events More
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
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.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
EA C461 Artificial Intelligence
Inference in Propositional Logic (and Intro to SAT)
EA C461 – Artificial Intelligence Logical Agent
Logical Agents Chapter 7 Selected and slightly modified slides from
Logical Agents Reading: Russell’s Chapter 7
Logic Use mathematical deduction to derive new knowledge.
Artificial Intelligence: Agents and Propositional Logic.
CS 416 Artificial Intelligence
Back to “Serious” Topics…
Knowledge Representation I (Propositional Logic)
Outline for 4/9 Recap Constraint Satisfaction Techniques
Methods of Proof Chapter 7, second half.
Propositional Logic: Methods of Proof (Part II)
Presentation transcript:

Logic in AI CSE 573

© Daniel S. Weld 2 Logistics Monday? Reading Ch 8 Ch 9 thru p 278 Section 10.3 Projects Due 11/10 Teams and project plan due by this Fri

© Daniel S. Weld 3 Problem spaces Blind Depth-first, breadth-first, iterative-deepening, iterative broadening Informed Best-first, Dijkstra's, A*, IDA*, SMA*, DFB&B, Beam, Local search hill climbing, limited discrepancy, RTDP Heuristics Evaluation, construction via relaxation Pattern databases Constraint satisfaction Adversary search Search

© Daniel S. Weld 4 Takeaways Formulating a problem space (and a CSP!) Sampler of methods Importance of heuristics Speed / completeness tradeoff Space complexity

© Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanning Supervised Learning Logic-Based Probabilistic

© Daniel S. Weld 6 Today Review of Propositional Logic Inference Algorithms As search: systematic & stochastic Themes Expressivity vs. Tractability

© Daniel S. Weld 7 Some KR Languages Propositional Logic Predicate Calculus Frame Systems Rules with Certainty Factors Bayesian Belief Networks Influence Diagrams Semantic Networks Concept Description Languages Nonmonotonic Logic

© Daniel S. Weld 8 In Fact… All popular knowledge representation systems are equivalent to (or a subset of) Logic Either Propositional Logic Or Predicate Calculus Probability Theory

© Daniel S. Weld 9 What is Propositional Logic? And why have you studied it? And why are we torturing you again?

© Daniel S. Weld 10 Basic Idea of Logic By starting with true assumptions, you can deduce true conclusions.

© Daniel S. Weld 11 Truth Francis Bacon ( ) No pleasure is comparable to the standing upon the vantage-ground of truth. Thomas Henry Huxley ( ) Irrationally held truths may be more harmful than reasoned errors. John Keats ( ) Beauty is truth, truth beauty; that is all ye know on earth, and all ye need to know. Blaise Pascal ( ) We know the truth, not only by the reason, but also by the heart. François Rabelais (c ) Speak the truth and shame the Devil. Daniel Webster ( ) There is nothing so powerful as truth, and often nothing so strange.

© Daniel S. Weld 12 AI=Knowledge Representation & Reasoning Syntax Semantics Inference Procedure Algorithm Sound? Complete? Complexity Knowledge Engineering

© Daniel S. Weld 13 Propositional Logic Syntax Atomic sentences: P, Q, … Connectives: , , ,  Semantics Truth Tables Inference Modus Ponens Resolution DPLL GSAT Complexity

© Daniel S. Weld 14 Propsitional Logic: Syntax Atoms P, Q, R, … Literals P,  P Sentences Any literal is a sentence If S is a sentence Then (S  S) is a sentence Then (S  S) is a sentence Conveniences P  Q same as  P  Q

© Daniel S. Weld 15 Special Syntactic Forms General Form: ((q  r)  s))   (s  t) Conjunction Normal Form (CNF) (  q  r  s )  (  s   t) Set notation: { (  q, r, s ), (  s,  t) } empty clause () = false Binary clauses: 1 or 2 literals per clause (  q  r) (  s   t) Horn clauses: 0 or 1 positive literal per clause (  q   r  s ) (  s   t) (q  r)  s (s  t)  false

© Daniel S. Weld 16 Semantics Syntax: which arrangements of symbols are legal (Def “sentences”) Semantics: what the symbols mean in the world (Mapping between symbols and worlds) Sentences Facts Sentences Representation World Semantics Inference

© Daniel S. Weld 17 Propositional Logic: SEMANTICS “Interpretation” (or “possible world”) Assignment to each variable either T or F Assignment of T or F to each connective via defns P T T F F Q P T T F F Q P  Q P  Q  P T FF F F TT T T F Q P T F T F

© Daniel S. Weld 18 Satisfiability, Validity, & Entailment S is satisfiable if it is true in some world S is unsatisfiable if it is false all worlds S is valid if it is true in all worlds S1 entails S2 if wherever S1 is true S2 is also true

© Daniel S. Weld 19 Examples R =>  R S  (W   S) T   T X => X P => Q

© Daniel S. Weld 20 Notation Sound Complete  = implies       = Inference Entailment } Proves: S1 |- ie S2 if `ie’ algorithm says `S2’ from S1 Entails: S1 |= S2 if wherever S1 is true S2 is also true    =  =   Implication (syntactic symbol)

© Daniel S. Weld 21 Prop. Logic: Knowledge Engr 1. Choose Vocabulary 1) One of the women is a biology major 2) Lisa is not next to Dave in the ranking 3) Dave is immediately ahead of Jim 4) Jim is immediately ahead of a bio major 5) Mary or Lisa is ranked first Universe: Lisa, Dave, Jim, Mary LD = “Lisa is immediately ahead of Dave” D = “Dave is a Bio Major” 2. Choose initial sentences (wffs)

© Daniel S. Weld 22 Reasoning Tasks Model finding KB = background knowledge S = description of problem Show (KB  S) is satisfiable A kind of constraint satisfaction Deduction S = question Prove that KB |= S Two approaches: Rules to derive new formulas from old (inference) Show (KB   S) is unsatisfiable

© Daniel S. Weld 23 Propositional Logic: Inference A mechanical process for computing new sentences 1.Backward & Forward Chaining Based on rule of modus ponens If know P 1, …, P n & know (P 1 ...  P n )=> Q Then can conclude Q 2.Resolution (Proof by Contradiction) 3.GSAT 4.Davis Putnam

© Daniel S. Weld 24 Inference 1: Forward Chaining Forward (& Backward) Chaining Based on rule of modus ponens If know P 1, …, P n & know (P 1 ...  P n )=> Q Then can conclude Q Pose as Search thru Problem Space? States? Operators?

© Daniel S. Weld 25 Analysis Sound? Complete? Can you prove { } |= Q   Q

© Daniel S. Weld 26 Special Syntactic Forms: CNF General Form: ((q  r)  s))   (s  t) Conjunction Normal Form (CNF) (  q  r  s )  (  s   t) Set notation: { (  q, r, s ), (  s,  t) } empty clause () = false

© Daniel S. Weld 27 Inference 2: Resolution [Robinson 1965] { (p   ), (  p     ) } |- R (      ) Correctness If S1 |- R S2 then S1 |= S2 Refutation Completeness: If S is unsatisfiable then S |- R ()

© Daniel S. Weld 28 If the unicorn is mythical, then it is immortal, but if it is not mythical, it is a mammal. If the unicorn is either immortal or a mammal, then it is horned. Prove: the unicorn is horned. Resolution (  A  H) (M  A) (  H) (  I  H) (  M) (  M  I) (  I)(  A) (M) ()() M = mythical I = immortal A = mammal H = horned

© Daniel S. Weld 29 Resolution as Search States? Operators

© Daniel S. Weld 30 Inference 3: Model Enumeration for (m in truth assignments){ if (m makes  true) then return “Sat!” } return “Unsat!” View as Search? Critique?