Logical Agents Logic Propositional Logic Summary

Slides:



Advertisements
Similar presentations
Russell and Norvig Chapter 7
Advertisements

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.
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.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Fall 2005.
ITCS 3153 Artificial Intelligence Lecture 11 Logical Agents Chapter 7 Lecture 11 Logical Agents Chapter 7.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 6 Dr Souham Meshoul CAP492.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge Representation I (Propositional Logic) CSE 473.
Knowledge in intelligent systems So far, we’ve used relatively specialized, naïve agents. How can we build agents that incorporate knowledge and a memory?
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 5 Dr Souham Meshoul CAP492.
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2005.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2008.
Rutgers CS440, Fall 2003 Propositional Logic Reading: Ch. 7, AIMA 2 nd Ed. (skip )
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
I NTRO TO L OGIC Dr Shlomo Hershkop March
February 20, 2006AI: Chapter 7: Logical Agents1 Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent.
Knowledge Representation Use of logic. Artificial agents need Knowledge and reasoning power Can combine GK with current percepts Build up KB incrementally.
‘In which we introduce a logic that is sufficent for building knowledge- based agents!’
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
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 CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
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.
Logical Agents ECE457 Applied Artificial Intelligence Spring 2007 Lecture #6.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
1 Logical Inference Algorithms CS 171/271 (Chapter 7, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
CS6133 Software Specification and Verification
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
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 Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
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.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #6
EA C461 Artificial Intelligence
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
Artificial Intelligence: Agents and Propositional Logic.
CS 416 Artificial Intelligence
Methods of Proof Chapter 7, second half.
Presentation transcript:

Logical Agents Logic Propositional Logic Summary Knowledge-Based Agents Logic Propositional Logic Summary

Knowledge-Based Agents Central component is a knowledge-base Knowledge is made of sentences Sentences are expressed in a language We wish to derive new sentences through inference.

Knowledge-Based Algorthim Function KB (percept) returns action TELL (KB; PERCEPT-SENTENCE(percept,t)) action = ASK(KB,MAKE-ACTION-QUERY(t)) TELL (KB;ACTION-SENTENCE(action,t)) T = t + 1 Return action

Declarative vs Procedural Two approaches to store knowledge: Declarative. Sentences representing knowledge Procedural. Encode behavior directly as code.

An Example Moving on a square to reach a goal state while avoiding risks.

Logical Agents Logic Propositional Logic Summary Knowledge-Based Agents Logic Propositional Logic Summary

Logic Important terms: Syntax .- rules to represent well-formed sentences Semantics.- define the truth of each sentence. Model.- Possible world (m is a model of a) Entailment: a |= b a entails b means: In every model where a is true, b is also true.

Logic Sentence a is derived from KB by algorithm i: KB |=i a Algorithm i is called sound (truth preserving) if it derives only entailed sentences. Algorithm i is called complete if it derives all entailed sentences.

Physical configuration Sentence Sentence entails Representation semantics semantics Real World Real World follows

Allen Newell Born in 1927 – died in 1992 1982 “The Knowledge Level” Rational agents can be described by the knowledge they contain With Herbert Simon he developed the Logic Theorist (first real AI program). Winner of the Turing Award

Logical Agents Logic Propositional Logic Summary Knowledge-Based Agents Logic Propositional Logic Summary

Syntax Atomic sentences: propositional symbols Complex sentences use logical connectives Negation,conjunction,disjunction Implication and biconditional.

Syntax Sentence  Atom | Complex Structure Atom  True | False | Symbol Symbol  P | Q | R Complex S  - sentence | ( sentence ^ sentence ) | ( sentence V sentence ) | ( sentence  sentence) | ( sentence  sentence)

Semantics How to define the truth value of statements? Connectives associate to truth tables. The knowledge base of an agent grows by telling it of new statements: TELL(KB,S1), … TELL(KB,Sn) KB = S1 ^ … ^ Sn

Inference We want to know if KB entails a: KB |= a Approach 1: Try all models KB: {b , b  a} b a Models consistent with KB t t YES t f NO f t NO f f NO

Check All Models Method is characterized as: sound (directly implements entailment) complete (it works for any KB and a and it always terminates. Problem: With n symbols there are 2n models. Time complexity is O(2n) Space complexity is O(n)

Some concepts Equivalence: a = b  a |= b and b |= a Validity A sentence is valid if it is true in all models Example p V -p Satisfiability A sentence is satisfiable if it is true in some model

Reasoning Patterns Modus Ponens a  b, a b And-Elimination a ^ b a Commutativity of ^ and V de Morgan’s Laws, etc.

Proofs Applying a sequence of rules is called a proof. Equivalent to searching for a solution Monotonicity: if KB |= a then KB ^ b |= a {b, b a} a Modus ponens

Resolution Complete and sound inference algorithm a v b ~a v c b v c Cannot derive all conclusions but can tell if they are true or false (refutation completeness).

Applying Resolution Resolution only works on disjunction of literals. How can we apply resolution to all clauses? Solution: convert to conjunctive normal form (CNF) CNF : (L11 V .. V L1k) ^ … ^ (Ln1 V … V Lnk)

Resolution How does it work? To show that KB |= a We show that (KB ^ ~a) is unsatisfiable. Every pair that contains complementary literals is resolved. Continue until there are no new clauses (KB |= a) Or we derive the empty clause (a V ~a) (KB |= a)

Example a v b v ~c d v c KB a v b v d ~b a v d ~d a ~a KB |= b

Horn Clauses In practice we restrict our clauses to Horn Clauses. (base of logic programming) Horn Clause: disjunction of literals with at most one of them being positive. Example: (~a v ~b v c) (definite clause) Equivalent to ( a ^ b  c )

Forward Chaining Begins from known facts in the knowledge base. If premises of implication are known derive conclusion. Continue until query is added or no more inferences can be made. a ^ b ^ c  d a,b,c conclude d

Example Q P  Q L ^ M  P P B ^ L  M A ^ P  L M A ^ B  L A B L A B AND-OR Graph

Backward Chaining Works backwards from the query q Find implications that conclude q If all premises can be proved true then q is true a ^ b ^ c  q How do I prove a? and b? and c?

Logical Agents Logic Propositional Logic Summary Knowledge-Based Agents Logic Propositional Logic Summary

Summary Rational agents need to work with knowledge bases. A language is defined by syntax and semantics KB |= a if a is true in all models where KB is true Inference techniques can be characterized based on soundness and completeness. Simplest logic is propositional logic A strong inference rule is called “resolution” When using Horn clauses, reasoning methods are forward and backward chaining.