1 CS 2710, ISSP 2160 Chapter 12, Part 1 Knowledge Representation.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Knowledge Representation
Artificial Intelligence Knowledge Representation
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
Situation Calculus for Action Descriptions We talked about STRIPS representations for actions. Another common representation is called the Situation Calculus.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Knowledge Representation
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
For Monday Finish chapter 12 Homework: –Chapter 13, exercises 8 and 15.
Knowledge Representation AIMA 2 nd Ed. Chapter 10.
For Friday Finish chapter 10 No homework (get started on program 2)
First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 8 Spring 2004.
First-Order Logic Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 8 Spring 2007.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
Knowledge Representation COMP 151 March 28, 2007 Based slides by B.J. Dorr as modified by Tom Lenaerts.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
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.
Copyright © Cengage Learning. All rights reserved.
Agents that Reason Logically Logical agents have knowledge base, from which they draw conclusions TELL: provide new facts to agent ASK: decide on appropriate.
First-Order Logic Knowledge Representation Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read:
Dr. Samy Abu Nasser Faculty of Engineering & Information Technology Artificial Intelligence.
Ontologies Reasoning Components Agents Simulations Belief Update, Planning and the Fluent Calculus Jacques Robin.
111 Artificial Intelligence CS 165A Thursday, November 15, 2007  Knowledge Representation (Ch 10) 1.
For Friday Exam 1. For Monday No reading Take home portion of exam due.
For Wednesday Read chapter 13 Homework: –Chapter 10, exercise 5 (part 1 only, don’t redo) Progress for program 2 due.
1 Chapter 10 Knowledge Representation. 2 KR previous chapters: syntax, semantics, and proof theory of propositional and first-order logic Chapter 10:
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
LOGIC AND ONTOLOGY Both logic and ontology are important areas of philosophy covering large, diverse, and active research projects. These two areas overlap.
1 Knowledge Representation CS 171/CS How to represent reality? Use an ontology (a formal representation of reality) General/abstract domain Specific.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 13 of 41 Monday, 20 September.
1 CS 2710, ISSP 2160 The Situation Calculus KR and Planning Some final topics in KR.
1 CS 2710, ISSP 2610 Chapter 12 Knowledge Representation.
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.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 14 of 41 Wednesday, 22.
Knowledge Representation
Some Thoughts to Consider 8 How difficult is it to get a group of people, or a group of companies, or a group of nations to agree on a particular ontology?
1 Propositional logic (cont…) 命題論理 Syntax&Semantics of first-order logic 構文論と意味論 Deducing hidden properties Describing actions Propositional logic (cont…)
Lecture 7-2CS250: Intro to AI/Lisp Building Knowledge Bases Lecture 7-2 February 18 th, 1999 CS250.
For Wednesday Read chapter 13 No homework. Program 2 Any questions?
Ontology Applying logic to the real world. D Goforth - COSC 4117, fall Real world knowledge general knowledge / common sense reasoning domain expertise.
Lecture 8-1CS250: Intro to AI/Lisp FOPL, Part Deux Lecture 8-1 November 16 th, 1999 CS250.
For Monday after Spring Break Finish chapter 12 Homework –Chapter 12, exercise 7.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
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,
Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating.
Lecture 8-2CS250: Intro to AI/Lisp What do you mean, “What do I mean?” Lecture 8-2 November 18 th, 1999 CS250.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 14 of 42 Wednesday, 22.
Knowledge Representation. So far... The previous chapters described the technology for knowledge-based agents: – the syntax, semantics, and proof theory.
1 CS 2710, ISSP 2160 Chapter 12 Knowledge Representation.
First-Order Logic Knowledge Representation
Knowledge Representation
Ontology.
The Situation Calculus KR and Planning Some final topics in KR
Introduction to Situation Calculus
Artificial Intelligence I: knowledge repre- sentation
First-Order Logic Knowledge Representation
Knowledge Representation I (Propositional Logic)
Artificial Intelligence I: knowledge repre- sentation
Knowledge Representation
Deniz Beser A Fundamental Tradeoff in Knowledge Representation and Reasoning Hector J. Levesque and Ronald J. Brachman.
Representations & Reasoning Systems (RRS) (2.2)
Knowledge Representation
Presentation transcript:

1 CS 2710, ISSP 2160 Chapter 12, Part 1 Knowledge Representation

2 KR Last 3 chapters: syntax, semantics, and proof theory of propositional and first-order logic Chapter 12: what content to put into an agent’s KB How to represent knowledge of the world

3 Natural Kinds Some categories have strict definitions (triangles, squares, etc) Natural kinds don’t Define a cup (distinguishing it from bowls, mugs, glasses, etc) Bachelor: is the Pope a bachelor? But logical treatment can be useful (can extend with typicality, uncertainty, fuzziness)

4 Upper Ontologies An ontology is similar to a dictionary but with greater detail and structure Ontology: concepts, relations, axioms that formalize a field of interest Upper ontology: only concepts that are meta, generic, abstract; cover a broad range of domain areas IEEE Standard Upper Ontology Working GroupIEEE Standard Upper Ontology Working Group

5 Anything AbstractObjects GeneralizedEvents Sets Numbers RepresentationalObjects Interval Places PhysicalObjects Processes Categories Sentences Measurements Moments things stuff times weights animals agents solid liquid gas Lower concepts are specializations of their parents

6 Categories and Objects I want to marry a Swedish woman –Category of Swedish woman? –A particular woman who is Swedish? Choices for representing categories: predicates or reified objects basketball(b) vs member(b,basketballs) Let’s go with the reified version…

7 Facts about categories and objects in FOL An object is a member of a category A category is a subclass of another category All members of a category have some properties (necessary properties) Members of a category can be recognized by some properties (sufficient properties) A category as a whole has some properties Note: idealization of real categories Examples: in Lecture

Before continuing: inspiration for creative reification! From Through the Looking Glass 8

9 Other Relationships disjoint (no members in common) exhaustive decomposition of a category (all members are in at least one of the sets) Partition: disjoint, exhaustive decomposition Examples in lecture

10 Composite Objects partof(england,europe) All X,Y,Z ((partof(X,Y) ^ partof(Y,Z))  partof(X,Z)) Heavy(bunchOf({apple1,apple2,apple3}))

11 Measures Diameter(basketball12) = inches(9.5) All XY ((member(X,dimestore) ^ sells(X,Y))  cost(Y) = $(1)) member(db1,dollarbills) member(db2,dollarbills) denomination(db1) = $(1) denomination(db2) = $(1) There are multiple dollar bills, but a single $(1)

12 Ordinal Comparisons But often scales are not so precisely defined Often, ordinal comparisons among members of categories are useful member(p1,poems) ^ member(p2,poems) ^ beauty(p1) < beauty(p2) We don’t have to say p1 has beauty Qualitative physics: reasoning about physical systems without detailed equations and numerical simulations.

13 Stuff versus Things Suppose some ice cream and a cat in front of you. There is one cat, but no obvious number of ice-cream things in front of you. A piece of an ice-cream thing is an ice-cream thing (until you get down to very low level) A piece of a cat is not a cat

14 Stuff versus Things Linguistically distinguished, in English through mass versus count noun phrases “a cat” “an ice-cream” (you have to coerce this to a thing, such as an ice-cream bar, or a variety of ice cream) “a sand”, “an energy” (same thing – need coercion) “some cat” (you have to coerce this to a substance; eeewww) Lecture: representation schemes

15 Actions, Situations, and Events The Situation Calculus The robot is in the kitchen. –in(robot,kitchen) He walks into the living room. –in(robot,livingRoom) in(robot,kitchen,2:02pm) in(robot,livingRoom,2:17pm) But what if you are not sure when it was? We can do something simpler than rely on time stamps…

16 Situation Calculus Ontology Actions: terms, such as “forward” and “turn(right))” Situations: terms; initial situation, say s0, and all situations that are generated by applying an action to a situation. result(a,s) names the situation resulting when action a is done in situation s.

17 Situation Calculus Ontology continued Fluents: functions and predicates that vary from one situation to the next. By convention, the situation is the last argument of the fluent. ~holding(robot,gold,s0) Atemporal or eternal predicates and functions do not change from situation to situation. gold(g1). lastName(wumpus,smith). adjacent(livingRoom,kitchen).

18 Sequences of Actions Also useful to reason about action sequences All S resultSeq([],S) = S All A,Se,S resultSeq([A|Se],S) = resultSeq(Se,result(A,S)) resultSeq([a,b,a2,a3],so) is result(a3,result(a2,result(b,result(a,s0)

19 Modified Wumpus World Fluent predicates: at(O,X,S) and holding(O,S) –In our simple world, only the agent can hold a piece of gold, so for simplicity, only the gold and situation are arguments Initial situation: at(agent,[1,1],s0) ^ at(g1,[1,2],s0) But we want to exclude possibilities from the initial situation too…

20 Initial KB All O,X (at(O,X,s0)  [(O=agent ^ X = [1,1]) v (O=g1 ^ X = [1,2])]) All O ~holding(O,s0) Eternals: –gold(g1) ^ adjacent([1,1],[1,2]) ^ adjacent([1,2],[1,1]) etc.

21 Goal: g1 is in [1,1] At(g1,[1,1],resultSeq( [go([1,1],[1,2]),grab(g1),go([1,2],[1,1])],s0) Planning by answering the query: Exists S at(g1,[1,1],resultSeq(S,s0)) So, what has to go in the KB for such queries to be answered?...

22 Possibility and Effect Axioms Possibility axioms: –Preconditions  poss(A,S) Effect axioms: –poss(A,S)  changes that result from that action

23 Axioms for our Wumpus World For brevity: we will omit universal quantifies that range over entire sentence. S ranges over situations, A ranges over actions, O over objects (including agents), G over gold, and X,Y,Z over locations.

24 Possibility Axioms The possibility axioms that an agent can –go between adjacent locations, –grab a piece of gold in the current location, and –release gold it is holding

25 Effect Axioms If an action is possible, then certain fluents will hold in the situation that results from executing the action –Going from X to Y results in being at Y –Grabbing the gold results in holding the gold –Releasing the gold results in not holding it

26 Frame Problem We run into the frame problem Effect axioms say what changes, but don’t say what stays the same A real problem, because (in a non-toy domain), each action affects only a tiny fraction of all fluents

27 Frame Problem (continued) One solution approach is writing explicit frame axioms, such as: (at(O,X,S) ^ ~(O=agent) ^ ~holding(O,S))  at(O,X,result(Go(Y,Z),S)) If something is at X in S, and it is not the agent, and also it is not something the agent holds, then O is still at X if the agent moves somewhere.