Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart CSC384: Intro to Artificial Intelligence  Jan 12 th  Announcements: Tutorial splits.

Similar presentations


Presentation on theme: "1 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart CSC384: Intro to Artificial Intelligence  Jan 12 th  Announcements: Tutorial splits."— Presentation transcript:

1 1 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart CSC384: Intro to Artificial Intelligence  Jan 12 th  Announcements: Tutorial splits.  A-G SS2135  H-L IN204  M-S LA240  T-Z BA3012 Readings  Text 2.5-2.6  Wednesday 14 th Jan, 2.7-2.9

2 2 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Set theoretic semantics  We want a clear mapping from our representation to features of the environment. In other words, we want to be able to provide an intuitive interpretation of any piece of our representation. Similar in spirit to having an intuitive understanding of what individual statements in a program mean. It does not mean that it is easy to understand the whole, but it provides the means to understand the whole by understanding the parts. the parts are correct the correctness of the whole  We also want to have a formal, mathematical, characterization of the meaning of the representation so that we can guarantee, e.g., various properties of the reasoning mechanism.  Set theoretic semantics facilitates both goals. It is a formal characterization, and it can be used to prove a wide range of properties of the representation It is close enough to how we think about the real world that it also provides an intuitive interpretation of the representation.

3 3 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Set theoretic semantics Representation Set Theoretic Semantics The Agent’s Environment Direct map from representation difficult

4 4 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Set theoretic semantics  A set of objects. These are objects in the environment that are important for your application. The ontology.  Distinguished subsets of objects. Properties.  Distinguished sets of tuples of objects. Relations.  Distinguished functions mapping tuples of objects to objects. Functions.

5 5 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Example  Teaching CSC384, want to represent knowledge that would be useful for making the course a successful learning experience.  Ontology: students, subjects, assignments, numbers.  Predicates: difficult(subject), CSMajor(student).  Relations: handedIn(student, assignment)  Functions: Grade(student, assignment) → number

6 6 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart DCL 1. Syntax: A grammar specifying what are legal syntactic constructs of the representation. 2. Semantics: A formal mapping from syntactic constructs to set theoretic assertions.

7 7 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart DCL Syntax Start with a set of primitive sybols. 1. constant symbols. 2. function symbols. 3. predicate symbols (for predicates and relations). 4. variables. constant, function, and predicate symbols are lower case, variables are UPPER CASE. Each function and predicate symbol has a specific arity (determines the number of arguments it takes).

8 8 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart DCL Syntax—Building up.  A term is either: a variable a constant an expression of the form f(t 1, … t k ) where (a) f is a function symbol; (b) k is its arity; (c) each t i is a term  An atom is an expression of the form p(t 1, … t k ) where (a) p is a predicate symbol; (b) k is its arity; (c) each t i is a term  Note: if p takes zero args, we write “p”, not “p()” constants are the same as functions taking zero arguments.

9 9 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Intuitions (to be formalized later)  Terms denote objects in the ontology: constants denote particular objects; functions map tuples of objects to other objects  bill jane father(jane) father(father(jane))  X father(X) hotel7 rating(hotel7) cost(hotel7)  Atoms denote facts that can be true of false about the world father_of(jane, bill) female(jane) system_down satisfied(client15) satisfied(C) desires(client15,rome,week29) desires(X,Y,Z) rating(hotel7, 4) cost(hotel7, 125)

10 10 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart DCL Syntax—Building up further.  A body is a 1 & a 2 & … & a n where each a i is an atom a conjunction of atoms (denotes that each is true)  A rule is a . where a is an atom  A fact is a. where a is an atom note the period it’s a rule with an empty body  A definite clause is a fact or a rule  A knowledge base (KB) is a set of definite clauses

11 11 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Example Clauses happy(client17) <- desires(client17,rome,week29) & available(hotel7, week29) & location(hotel7, rome) & rating(hotel7) > 4. happy(C) <- desires(C,Dest,Date) & available(H, Date) & location(H, Dest) & rating(H) >= R & minQuality(C) = R. happy(C) <- desires(C,Dest,Date) & available(H, Date) & location(H, Dest) & rating(H) < R & minQuality(C) = R & offerTravelMug(C). desires(client17,rome,week29). desires(client12,rome,week22). location(hotel7,rome). …

12 12 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart DCL Semantics—Formal Details  The semantics provide a way of mapping the syntax constructs to set-theoretic constructs.  First, we must fix the particular DCL language we are going to provide semantics for. The basic symbols included in the syntax defines the particular language. Let L(F,P,V) be the language, where F = F(0), F(1), F(2),… (the set of function symbols of each arity) P = P(0), P(1), … (the set predicate symbols of each arity) V is set of variable symbols

13 13 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart DCL Semantics—Formal Details  An interpretation is a tuple where D is a non-empty set (domain of individuals, the ontology) is a mapping is a mapping (note that π maps predicate symbols to sets of k-ary tuples of indivduals).

14 14 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Intuitions: Domain  Domain D: d  D is an individual  E.g., { craig, jane, grandhotel, lefleabag, rome, portofino, 100, 110, 120 …}  Underlined symbols denote domain individuals (as opposed to language elements)  Domains often infinite, but we’ll use finite models to prime our intuitions

15 15 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Intuitions:   given k-ary function, k individuals, what individual does f(d1, … dk) denote  F(0): maps constants to individuals, (D 0 = {} )  (client17) = craig  (hotel5) = lefleabag  (rome) = rome  F(1): maps symbols from F(1) to functions from D → D  (minquality)=f_minquality: f_minquality(craig) = 3stars  (rating)=f_rating: f_rating(grandhotel) = 5stars  F(2): maps symbols F(2), to functions from D 2 → D  (distance)=f_distance: f_distance(toronto,siena) = 3256km

16 16 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart Intuitions:   given k-ary predicate, k individuals, does relation denoted by P hold of these? is P(d1, … dk) true? what facts are made true by the interpretation?  P(0): maps symbol from P(0) to T/F  (rainy) = T  (sunny) = F  P(1): maps symbol from P(1) to indicator function over D  (satisfied) = p_satisfied: p_satisfied(craig) = T  (privatebeach) = p_privatebeach: p_privatebeack(lefleabag) = F  P(2): maps symbols from P(2) to indicator function over D 2  (location) = p_location: p_location(grandhotel, rome) = T p_location(grandhotel, siena) = F  (available) = p_available: p_available(grandhotel, week29) = T


Download ppt "1 CSC 384 Lecture Slides (c) 2002-2003, C. Boutilier and P. Poupart CSC384: Intro to Artificial Intelligence  Jan 12 th  Announcements: Tutorial splits."

Similar presentations


Ads by Google