Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating.

Slides:



Advertisements
Similar presentations
1 Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms Inference in propositional.
Advertisements

Artificial Intelligence in the 21 st Century S. Lucci / D. Kopec Chapter 5: Logic in Artificial Intelligence 1.
Russell and Norvig Chapter 7
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
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.
Knowledge and reasoning – second part
Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.
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.
CS 561, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
1 DCP 1172 Introduction to Artificial Intelligence Lecture notes for Chap. 7 & 10 [AIMA] Chang-Sheng Chen.
CS 460, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
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 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.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES Prof. Dr. Celso A.A. Kaestner PPGEE-CP / UTFPR Agosto de 2011.
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.
Agents that Reason Logically Logical agents have knowledge base, from which they draw conclusions TELL: provide new facts to agent ASK: decide on appropriate.
Logical Agents. Knowledge bases Knowledge base = set of sentences in a formal language Declarative approach to building an agent (or other system): 
February 20, 2006AI: Chapter 7: Logical Agents1 Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Logical Agents Logic Propositional Logic Summary
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,
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
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.
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Ch 1.4: Basic Proof Methods I A theorem is a proposition, often of special interest. A proof is a logically valid deduction of a theorem, using axioms,
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.
Types of logic. Propositional logic: syntax Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: Each rule has.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
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,
Artificial Intelligence
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
1 UNIT-3 KNOWLEDGE REPRESENTATION. 2 Agents that reason logically(Logical agents) A Knowledge based Agent The Wumpus world environment Representation,
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
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.
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.
Types of logic. Forward Chaining Forward Chaining or data-driven inference works by repeatedly: starting from the current state, matching the premises.
Knowledge and reasoning – second part
Logical Agents.
EA C461 – Artificial Intelligence Logical Agent
Logical Agents Chapter 7.
Artificial Intelligence
Knowledge and reasoning – second part
Logical Agents Chapter 7.
Knowledge Representation I (Propositional Logic)
Methods of Proof Chapter 7, second half.
Presentation transcript:

Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating syntactic expressions to get other syntactic expressions (which will tell us something new) Why proofs? Two kinds of inferences an agent might want to make: –Multiple percepts  conclusions about the world –Current state & operator  properties of next state

Review: Types of logic

Review: Propositional logic: syntax

Review: Propositional logic: semantics

Entailment

Propositional inference: enumeration method

Enumeration: Solution

Validity and satisfiability Theorem

Proof methods

A Typical Wumpus World

Wumpus World Description

Wumpus World Sentences

Wumpus world: example Rules: A square has stench if and only if the square or adjacent squares contain the wumpus –R1: S 1,1 ↔ W 1,1 v W 1,2 v W 2,1 –R2: S 2,1 ↔ W 1,1 v W 2,2 v W 3,1 –… Facts: Percepts inject (TELL) facts into the KB –[There is no stench at 1,1]   S1,1 Inference: –KB contains  S1,1 then using Modus Ponens we infer  (W 1,1 v W 1,2 v W 2,1 ) –Using De Morgan’s Law we get:  W 1,1   W 1,2   W 2,1 –Using And-Elimination we get:  W1,1  W1,2  W2,1

Limitations of Propositional Logic 1. It is too weak, i.e., has very limited expressiveness: Each rule has to be represented for each situation: e.g., “don’t go forward if the wumpus is in front of you” takes 64 rules 2. It cannot keep track of changes: If one needs to track changes, e.g., where the agent has been before then we need a timed-version of each rule. To track 100 steps we’ll then need 6400 rules for the previous example. Its hard to write and maintain such a huge rule- base Inference becomes intractable

Predicate logic Predicate Logic is more expressive, because it allows us to represent : Objects Predicates (facts) Variables

Assume we have the following assertions (facts) Comet is a horse Prancer is a horse Comet is parent of Dasher Comet is a parent of Prancer Prancer is fast Dasher is a parent of Thunder Thunder is fast Thunder is a horse Dasher is a horse

Write predicate logic sentences for these facts : To do so, we need to understand the concepts of: Objects –Comet, Prancer, Dasher, etc Predicates (facts) –horse horse(Comet) –parent-ofparent-of(Comet,Dasher) Variables –horse(x)

Thus, we can write Comet is a horse Prancer is a horse Comet is parent of Dasher Comet is a parent of Prancer Prancer is fast Dasher is a parent of Thunder Thunder is fast Thunder is a horse Dasher is a horse horse(Comet) horse(Prancer) parent-of(Comet,Dasher) parent-of(Comet,Prancer) fast(Prancer) parent-of(Dasher,Thunder) fast(Thunder) horse(Thunder) horse(Dasher)

We also can write compound statements such as: not( horse(Schafer) ) horse(Comet) and parent-of(Comet,Dasher) winner(Prancer) implies fast(Prancer)

Suppose we have the following rule (relation) R1: if x is-a horse x is-parent-of y y is-fast then x is valuable

Bindings In general, there will be variables in the rules which stand for arbitrary objects. We need to find bindings for them so that the rule is applicable.

Bindings

From these we can deduce that there are two possible bindings applicable to the rule: x = Comet and y = Prancer x = Dasher and y = Thunder Since x is valuable, Comet is valuable and Dasher is valuable

Forward Chaining Forward Chaining or data-driven inference works by repeatedly: starting from the current state, matching the premises of the rules (the IF parts), and performing the corresponding actions (the then parts) that usually update the knowledge base or working memory. The process continues until no more rules can be applied, or some cycle limit is met.

Forward Chaining

In this example there are no more rules, so we can draw the inference chain: This seems simple enough, but this had few initial facts and few rules.

Disadvantages of Forward Chaining Many rules may be applicable at each stage – so how should we choose which one to apply next at each stage? The whole process is not directed towards a goal, so how do we know when to stop applying the rules?

Backward Chaining Backward chaining or goal-driven inference works towards a final state by looking at the working memory to see if the sub-goal states already exist there. If not, the actions (the THEN parts) of the rules that will establish the sub-goals are identified and new sub-goals are set up for achieving the premises of those rules (the IF parts).

Backward Chaining The previous example now becomes:

Backward Chaining The first part of the chain works back from the goal until only the initial facts are required, at which point we know how to traverse the chain to achieve the goal state.

Backward Chaining Advantage –The search is goal directed, so we only apply the rules that are necessary to achieve the goal. Disadvantage –The goal has to be known. –Fortunately, many AI systems can be formulated in a goal based fashion.