Lecture - Computer Science

Download Report

Transcript Lecture - Computer Science

Introduction to AI
&
AI Principles (Semester 1)
WEEK 5 – Wednesday
(2008/09)
John Barnden
Professor of Artificial Intelligence
School of Computer Science
University of Birmingham, UK
Reminder
Representing the Information
in a situation
(Planning the Delivery of One Drink,
contd)
Reminder
Possible Logical Forms, 1(corrected)
 D is a door. (D is the door’s name. We might use D-KS, say, as D.)

is-door(D).
 D [stated separately to be a door] is open.

is-open(D)
 Door [stated separately to be a door] D is closed.

is-closed(D) or
¬is-open(D)
 D is an open door

is-door(D)  is-open(D)
 Mike (M) is in the sitting-room (S).

in(M, S)
or
in(S, M)
[Caution children! Do it consistently!]
Possible Logical Forms, 2
D-KS connects the kitchen (K) and sitting-room (S).

door-connects(D-KS, K, S)
[but other “argument” orders are usable]
Mike is holding B [which is a bottle] [somehow or other]

holds0(Mike, B)
Mike’s right hand is free.

is-free(the-right-hand-of(Mike))
I am holding B in my right hand

holds-in-right-hand(Ego, B)

holds1(Ego, B, the-right-hand-of(Ego))
Possible Logical Forms, 3
I am holding B in both hands

holds-in-both-hands(Ego, B)

holds2(Ego, B, the-right-hand-of(Ego), the-left-hand-of(Ego))

holds3(Ego, B)
A less good option would be

holds1(Ego, B, the-right-hand-of(Ego)) 
holds1(Ego, B, the-left-hand-of(Ego))
I am holding B in one hand

holds1(Ego, B, the-right-hand-of(Ego)) 
holds1(Ego, B, the-left-hand-of(Ego))
Cautions about Logical Expressions
 Reminder: the order of “arguments” is arbitrary,

but you must be consistent for any given “predicate symbol” such as holds1

or for any given “function symbol” such as the-right-hand-of.
 A predicate symbol is for constructing assertions (statements that
something is the case) about the entities referred top by the
arguments in the assertion.
 A function symbol is for constructing expressions that refer to
entities related to entities referred to by the arguments in the
expression.
 An [individual] constant such as Mike or D-KS or B is a basic
means for referring to an entity.
Cautions, contd.
 The symbols themselves are arbitrary.

E.g., you could use zsljkhHGCVn instead of holds1,

or Jane instead of Mike to refer to the person called “Mike”!!
 This is similar to the case of user-chosen names in computer
programs.
 But it’s just convenient to invent logical symbols that are similar to
appropriate human-language words.
 Caution Children! Don’t read too much into symbols that look like
words.
The AI system doesn’t regard them as words and even if it did would probably
not understand them at all, or as richly as you do.
Exercises on Logic Expression
1) holds0(Mike, B)  is-open(D-KH)
2) next-to(Mike,D-KS)  is-open(the-door-of(F))
[remember that F refers to the fridge door]
3) Mike is holding the bottle or I am not holding it.
4) I am next to the fridge and the bottle is in it.
5) I am not holding the bottle in my right hand.
6) The bottle is empty. [Invent a new symbol.]
7) The bottle is full. [Invent a new symbol.]
8) The bottle is neither full nor empty.
9) The bottle is open.