First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.

Slides:



Advertisements
Similar presentations
Knowledge Representation using First-Order Logic
Advertisements

1 Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms Inference in propositional.
First-Order Logic Chapter 8.
Knowledge Representation using First-Order Logic CS 271: Fall 2007 Instructor: Padhraic Smyth.
Artificial Intelligence
March 2, 2006AI: Chapter 8: First-Order Logic1 Artificial Intelligence Chapter 8: First-Order Logic Michael Scherger Department of Computer Science Kent.
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.
3/30/00 Agents that Reason Logically by Chris Horn Jiansui Yang Xiaojing Wu.
First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 8 Spring 2004.
Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.
Knowledge Representation & Reasoning.  Introduction How can we formalize our knowledge about the world so that:  We can reason about it?  We can do.
CS 561, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
CS 561, Session Midterm format Date: 10/10/2002 from 11:00am – 12:20 pm Location: THH 101 Credits: 35% of overall grade Approx. 4 problems, several.
First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 8 Spring 2007.
CS 460, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
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?
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 8 Jim Martin.
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
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.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
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 Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language TELL: operator to.
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.
Limitation of propositional logic  Propositional logic has very limited expressive power –(unlike natural language) –E.g., cannot say "pits cause breezes.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
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.
For Friday Read chapter 8 Homework: –Chapter 7, exercise 1.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Logical Agents. Logical agents for the Wumpus World Three (non-exclusive) agent architectures: Reflex agents –Have rules that classify situations based.
Artificial Intelligence First-Order Logic (FOL). Outline of this Chapter The need for FOL? What is a FOL? Syntax and semantics of FOL Using FOL.
For Wednesday Read chapter 9, sections 1-4 Homework: –Chapter 8, exercise 6 May be done in groups.
1 Propositional logic (cont…) 命題論理 Syntax&Semantics of first-order logic 構文論と意味論 Deducing hidden properties Describing actions Propositional logic (cont…)
First-Order Logic Chapter 8 (not 8.1). Outline Why FOL? Why FOL? Syntax and semantics of FOL Syntax and semantics of FOL Using FOL Using FOL Wumpus world.
First-Order Logic. Outline Why FOL? Syntax and semantics of FOL Using FOL Knowledge engineering in FOL.
Lecture 8-1CS250: Intro to AI/Lisp FOPL, Part Deux Lecture 8-1 November 16 th, 1999 CS250.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
1 UNIT-3 KNOWLEDGE REPRESENTATION. 2 Agents that reason logically(Logical agents) A Knowledge based Agent The Wumpus world environment Representation,
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating.
For Wednesday Finish chapter 8 Homework: –Chapter 8, exercise 6 May be done in pairs.
1 Knowledge Representation Logic and Inference Propositional Logic Vumpus World Knowledge Representation Logic and Inference Propositional Logic Vumpus.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
First-Order Logic Chapter 8.
Knowledge and reasoning – second part
First-Order Logic Chapter 8.
Artificial Intelligence First Order Logic
EA C461 – Artificial Intelligence Logical Agent
Logical Agents Chapter 7.
First-Order Logic Chapter 8.
Artificial Intelligence
Artificial Intelligence: Logic agents
Knowledge and reasoning – second part
Logical Agents Chapter 7.
First-order Logic Propositional logic (cont…)
CS 416 Artificial Intelligence
Knowledge Representation I (Propositional Logic)
First-Order Logic Chapter 8.
Lecture 5-2 February 4th, 1999 CS250
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate to each other Properties: features of an object Functions: output an object, given others

Syntax and Semantics Propositional logic has the following: Constant symbols: book, A, cs327 Predicate symbols: specify that a given relation holds Example: Teacher(CS327sec1, Dave) Teacher(CS327sec2, Dave) “Teacher” is a predicate symbol For a given set of constant symbols, relation may or may not hold

Syntax and Semantics Function Symbols FatherOf(Luke) = DarthVader Variables Refer to other symbols x, y, a, b, etc. In Prolog, capitalization is reverse: Variables are uppercase Symbols are lower case Prolog example ([user], ;)

Syntax and Semantics Atomic Sentences Father(Luke,DarthVader) Siblings(SonOf(DarthVader), DaughterOf(DarthVader)) Complex Sentences and, or, not, implies, equivalence Equality

Universal Quantification “For all, for every”: Examples: Usually use with Common mistake to use

Existential Quantification “There exists”: Typically use with Common mistake to use True if there is no one at Carleton!

Properties of quantifiers Can express each quantifier with the other

Some examples Definition of sibling in terms of parent:

First-Order Logic in Wumpus World Suppose an agent perceives a stench, breeze, no glitter at time t = 5: Percept([Stench,Breeze,None],5) [Stench,Breeze,None] is a list Then want to query for an appropriate action. Find an a (ask the KB):

Simplifying the percept and deciding actions Simple Reflex Agent Agent Keeping Track of the World

Using logic to deduce properties Define properties of locations: Diagnostic rule: infer cause from effect Causal rule: infer effect from cause Neither is sufficient: causal rule doesn’t say if squares far from pits can be breezy. Leads to definition:

Keeping track of the world is important Without keeping track of state... Cannot head back home Repeat same actions when end up back in same place Unable to avoid infinite loops Do you leave, or keep searching for gold? Want to manage time as well Holding(Gold,Now) as opposed to just Holding(Gold)

Situation Calculus Adds time aspects to first-order logic Result function connects actions to results

Describing actions Pick up the gold! Stated with an effect axiom When you pick up the gold, still have the arrow! Nonchanges: Stated with a frame axiom

Cleaner representation: successor-state axiom For each predicate (not action): P is true afterwards means An action made P true, OR P true already and no action made P false Holding the gold: (if there was such a thing as a release action – ignore that for our example)

Difficulties with first-order logic Frame problem Need for an elegant way to handle non-change Solved by successor-state axioms Qualification problem Under what circumstances is a given action guaranteed to work? e.g. slippery gold Ramification problem What are secondary consequences of your actions? e.g. also pick up dust on gold, wear and tear on gloves, etc. Would be better to infer these consequences, this is hard

Keeping track of location Direction (0, 90, 180, 270) Define function for how orientation affects x,y location

Location cont... Define location ahead: Define what actions do (assuming you know where wall is):

Primitive goal based ideas Once you have the gold, your goal is to get back home How to work out actions to achieve the goal? Inference: Lots more axioms. Explodes. Search: Best-first (or other) search. Need to convert KB to operators Planning: Special purpose reasoning systems (chapter 11)