First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 8 Spring 2004.

Slides:



Advertisements
Similar presentations
Knowledge Representation using First-Order Logic
Advertisements

First-Order Logic Chapter 8.
Knowledge Representation using First-Order Logic CS 271: Fall 2007 Instructor: Padhraic Smyth.
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
First-Order Logic Chapter 8.
Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Fall 2005.
First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7.
Knowledge Representation & Reasoning.  Introduction How can we formalize our knowledge about the world so that:  We can reason about it?  We can do.
First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 8 Spring 2007.
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.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2008.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Knowledge Representation using First-Order Logic (Part III) This lecture: R&N Chapters 8, 9 Next lecture: Chapter 13; Chapter (Please read lecture.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site.
First-Order Logic Knowledge Representation Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read:
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part A Knowledge Representation and Reasoning.
Knowledge Representation using First-Order Logic 부산대학교 전자전기컴퓨터공학과 인공지능연구실 김민호
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
For Monday Read chapter 8 Homework: –Chapter 7, exercises 1, 8, and 9 May be done in pairs.
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
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.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
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…)
Lecture 8-1CS250: Intro to AI/Lisp FOPL, Part Deux Lecture 8-1 November 16 th, 1999 CS250.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
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 CS 2710, ISSP 2610 Chapter 8, Part 1 First Order Predicate Calculus FOPC.
1 Knowledge Representation Logic and Inference Propositional Logic Vumpus World Knowledge Representation Logic and Inference Propositional Logic Vumpus.
First-Order Logic Knowledge Representation
Knowledge Representation using First-Order Logic
First-Order Logic Chapter 8.
EA C461 – Artificial Intelligence Logical Agent
First-Order Logic Knowledge Representation
First-Order Logic Knowledge Representation
First-Order Logic Knowledge Representation
Logical Agents Chapter 7.
First-Order Logic Chapter 8.
Introduction to Artificial Intelligence
Artificial Intelligence
Logical Agents Chapter 7.
First-order Logic Propositional logic (cont…)
Knowledge Representation using First-Order Logic (Part III)
First-Order Logic Knowledge Representation
Knowledge Representation I (Propositional Logic)
First-Order Logic Chapter 8.
Lecture 5-2 February 4th, 1999 CS250
First-Order Logic Chapter 8.
Representations & Reasoning Systems (RRS) (2.2)
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 8 Spring 2004

CS 471/598 by H. Liu2 Why and what FOL makes a stronger set of ontological commitments (more than facts) shown in Fig 8.1 The world consists of objects and relations. Objects - things with individual identities Properties - sth distinguishing them from others Relations - sth between objects Functions - special relations with one value Facts refer to objects, properties or relations The D-Backs beat the Cardinals. (When?)

CS 471/598 by H. Liu3 FOL FOL is universal - it can express anything that can be programmed - what else do we want? FOL is the most studied and best understood scheme yet devised. Its syntax and semantics

CS 471/598 by H. Liu4 Syntax Symbols (Fig 8.4, Page 247) Constant symbols Predicate symbols - relations, tuples Functional symbols - relations Terms - objects, ground (constant symbols) & complex (functions) terms Atomic sentences Brother(Richard, John), Married(Father(R),Mother(J)) Complex sentences formed by connectives !Brother(Robin,John)

CS 471/598 by H. Liu5 Quantifiers Universal quantification (  ) - to avoid enumerating the objects by name combining with variables, we can do that:  x Cat(x)  Mammal(x)  x P(x)  Q(x) makes a statement about everything, but not when P(x) is false  x P(x) ^ Q(x) leads to a too strong statement   x King(x) ^Person(x)

CS 471/598 by H. Liu6 Existential quantification (  ) - make a statement about some object without naming it.  x P(x) ^ Q(x) - at least one x such that P(x) and Q(x) is true  x P(x)  Q(x) leads to a too weak statement No uniqueness is claimed  is used with , ^ with 

CS 471/598 by H. Liu7 Nested quantifiers Multiple quantifiers can be used. The order of quantification is important.  x  y Loves (y,x)  y  x Loves (y,x) When there is confusion, the variable belongs to the innermost quantifier that mentions it.  x [Cat(x) v (  x Brother(Richard,x))] Well-formed formula (wff) - sentences that have all their variables properly introduced.

CS 471/598 by H. Liu8 Connections, Equality The two quantifiers are connected via negation. De Morgan’s rules Do we really need both quantifiers? Some examples Equality symbol: two terms refer the same object or not the same object Some examples

CS 471/598 by H. Liu9 Using FOL Domain – some part of the world The kinship domain Axioms - basic facts Definitions - concepts defined by axioms  x,y P(x,y)  … Theorems - that are proved using axioms and definitions, or entailed by axioms  x,y Sibling(x,y)  Sibling(y,x) Two important questions in building a KB Are axioms in the KB sufficient? Are all axioms in the KB necessary?

CS 471/598 by H. Liu10 What should be in a KB From a purely logical point of view From a practical point of view Adding sentences (assertions) to a KB Tell(KB, King(John)) Tell(KB,  x King(x)  Person(x)) Asking questions and getting answers Ask(KB, King(John)) - True Ask(KB,  x Child(x,Spot)) – substitution x/Wonder

CS 471/598 by H. Liu11 The domain of sets and lists EpmtySet – constant {} Member, Subset - predicates Intersection, Union, Adjoin - functions Eight axioms of sets (page 257): 1. the only sets are EmptySet and those made by adjoining something to a set {x|s2} where Set(s2). The differences between lists and sets Order and repetition of an element

CS 471/598 by H. Liu12 Logical agents for Wumpus Reflex agents classify percepts and act Model-based agents have an internal representation Goal-based agents form goals and achieve them The first-order axioms are much more concise than propositional logic axioms

CS 471/598 by H. Liu13 Constructing a logical agent Define the interface (percepts) between the environment and the agent Including time using a time stamp  Percept ([Stench, Breeze,Glitter, None,None], 5) Define actions Actions: Turn(Right), Forward, Shoot, Grab, Release, Climb Provide an action:  a BestAction(a, 5) - a/Grab Modify the environment  t,s,b,m,c Percept([s,b,Glitter,m,c],t)  Glitter(t)  t Glitter(t)  BestAction(Grab,t)  This implements a simple reflex behavior

CS 471/598 by H. Liu14 Deducing hidden properties Synchronic rules (vs. diachronic) Causal rules specify the assumed direction of causality - model-based reasoning  Squares adjacent to pits are breezy  A pit causes … Diagnostic rules infer hidden properties from the percept-derived information  If a location is smelly, the wumpus must either be in that location or in an adjacent location  If there is breeze, …

CS 471/598 by H. Liu15 Representing change Storing a complete percept sequence is tedious and inefficient to search for actions An internal model allows an agent to know its current status having gold and at home square Representing change is one of the most important tasks in knowledge representation How to represent change?

CS 471/598 by H. Liu16 Ways of representing change The latest case only, forget about the past = having a shallow memory and no history = repeating errors Each state represented by a KB can’t reason about >1 situation simultaneously need to represent different situations/actions in one KB Situation calculus (Chapter 10.3) representing situations and actions as representing objects

CS 471/598 by H. Liu17 Situation calculus A particular way of describing change in FOL Each situation is a snapshot of the state Situations are generated from previous situations by actions (Fig 10.2, p329) Give an extra situation argument for every relation/property that can change over time it’s always the last one argument  At(Agent,[1,1],S 0 )^ At(Agent,[1,2],S 1 ) using Result(action, situation)  Result(Forward, S 2 ) = S 3

CS 471/598 by H. Liu18 Special axioms Effect axioms - actions are described by stating their effects Holding-gold via Grab, !Holing-gold via Release Are the above enough? Frame axioms - describing how the world stays the same Holding-sth not releasing it, then holding it next state !Holding-sth not (grab or present or portable) The two types of axioms together describe the world in change.

CS 471/598 by H. Liu19 Successor-state (SS) axioms - resulting from the combining of the E- and F- axioms true afterwards  [an action made it true v true already and no action made it false] One SS axiom is needed for each predicate changing with time A SS axiom must list all the ways in which the predicate can become true or false

CS 471/598 by H. Liu20 Keep track of location What direction an agent is facing Orientation(Agent,S 0 ) = 0 How locations are arranged (via a map)  x,y LocationToward([x,y],90)=[x,y+1] Location l ahead of agent p:  p,l,s At(p,l,s)   x,y Adjacent(x,y)   d x=LocationToward(y,d) What’s known about the map  x,y Wall([x,y])  (x=0 or x=5 or y=0 or y=5)

CS 471/598 by H. Liu21 What actions change locations Going forward changes location What actions change orientations Turning changes orientation There are still many research issues: frame problems - the property remains unchanged qualification problem - an action guaranteed to work ramification problem - implicit consequences of an action

CS 471/598 by H. Liu22 Which action Different actions can achieve the same goal depending on constraints Separating facts about actions from facts about goals as goals describe the desirability of outcome states desirability scale: great, good, medium,risky, deadly Defining the desirability of actions, leaving the inference to choose an action that has the highest desirability

CS 471/598 by H. Liu23 A goal-based agent Certain actions lead to radical policy change: getting the gold -> returning  s Holding(Gold,s)  GoalLocation([1,1],s) Explicit goals allow many ways to work out a sequence of actions Inference Search Planning

CS 471/598 by H. Liu24 Summary FOL is a general-purpose representation language based on objects and relations BNF of FOL A logical agent using FOL Situation calculus to handle changes Causal rules are often more flexible and entail a wider range of consequences We’re ready to infer in FOL...