Title: Knowledge Acquisition by an Intelligent Acting Agent
1Knowledge Acquisition by an Intelligent Acting
Agent
- Michael Kandefer and Stuart Shapiro
- Department of Computer Science and Engineering,
Center for Cognitive Science, and The National
Center for Multisource Information Fusion - mwk3shapiro_at_cse.buffalo.edu
- Logical Formalizations of Commonsense Reasoning
- AAAI 2007 Spring Symposia
- March 28, Stanford University, California
2Outline
- Problem Description and Requirements
- Basic algorithm
- Example Interactions with Agent
- Architecture for agent embodiment (GLAIR)
- Symbol anchoring in GLAIR
- Solution Details
- Conclusions
3McCarthys Second Telephone Problem
- McCarthy (1979) presents several problems that
require commonsense reasoning. - Second telephone problem
- A computer program that wants to telephone
someone must reason about who knows the number.
More generally, it must reason about what actions
will obtain needed knowledge. Knowledge in books
and computer files must be treated in a parallel
way to knowledge held by persons. Furthermore,
a program must often determine that it does not
know something or that someone else doesnt.
McCarthy, J. 1979. First order theories of
individual concepts and propositions. In Hayes,
J. Michie, D. and Mikulich, L., eds.,
Machine Intelligence 9. Ellis Horwood Ltd.
129-147
4Problem Requirements
- Determining the absence of the requisite
knowledge for completing the task at hand. - Determining the external information sources that
might contain the required information. - Knowing how to consult the source(s).
- Retrieving and representing the needed
information. - Completing the task with the acquired
information.
5External Sources
- Text files
- Telephone book
- John 305 Pine Tree Lane 479-2344
- Campus telephone directory
- Bill NSC 678 555-8989
- User is used as an external source
- User can type English statements asserting
knowledge - User can enter a phone number when queried by the
agent
6Basic Calling Procedure
- Believe none of the information sources have been
searched - If the individuals phone number is known, dial
it. - Otherwise, search each information source that is
believed to contain the phone number, dial it if
found.
7Example Interactions
- What is Mikes telephone number?
- Mikes telephone number is 555-5612.
- Call Mike.
- I am pressing 5. I am pressing 5. I am pressing
5. I am pressing 5. I am pressing 6. I am
pressing 1. I am pressing 2.
8Example Interactions
- What is Stus telephone number?
- I dont know.
- Call Stu.
- Checking Campus Database for Stus telephone
number. - I am pressing 5. I am pressing 5. I am pressing
5. I am pressing 7. I am pressing 8. I am
pressing 9. I am pressing 0. - What is Stus telephone number?
- Stus telephone number is 555-7890.
9Example Interactions
- What is Alberts telephone number?
- I dont know.
- Call Albert.
- Checking Phonebook for Alberts telephone
number... - I could not find Alberts phone number in any
external information - source available to me.
- Do you know Alberts number? Yes
-
- What is Alberts number (e.g. 555-5555)?
555-1234 - I am pressing 5. I am pressing 5. I am pressing
5. I am pressing 1. I am pressing 2. I am
pressing 3. I am pressing 4. - What is Alberts telephone number?
- Alberts telephone number is 555-1234.
10GLAIR
- Grounded Layered Architecture with Integrated
Reasoning - Architecture for embodied agents.
- Knowledge layer (KL)
- Conscious reasoning
- Beliefs, Plans and Policies
- Perceptuo-motor layer (PML)
- Primitive actions
- Link to embodiment
- Sensory-actuator layer (SAL)
- Sensors and actuators
KL
PML
SAL
11Implementing the KL
- SNePS-based agents have first-person belief base
- Structured as a set of propositions in a
language of thought independent of the natural
language used to express these beliefs - SNePSLOG higher-order logical language
interface to SNePS
12GLAIR and Symbol Anchoring
KL
PML
SAL
SNePSLOG terms
Mikelex
Lexicon (Mikelex ((ctgy
. npr) (root . Mike")))
English
Mike
SNePSLOG expressions Has(b5,compCat(lex(teleph
onelex), lex(numberlex)), b10). Name(b5,
Mikelex). Value(b10,N(n5,N(n5,N(n5,N(n5,
N(n6,N(n1,n2))))))).
Grammar GATN
English Mikes telephone
number is 555-5612.
SNePSLOG prim. act terms
act(lex(presslex), n5)
Attach-primaction (attach-primaction
lex(presslex) press) (press 5)
Sensors and actuators I am
pressing 5. Presses button 5 on
simulated phone
13Domain of Discourse
- Entities
- Propositions
- Acts
- Policies
- Things
14Individual Constants Denoting Things
- Mikelex - Lexeme Mike
- telephonelex - Lexeme telephone
- numberlex - Lexeme number
- studentlex - Lexeme student
- professorlex - Lexeme professor
- digitlex - Lexeme digit
- sequencelex - Lexeme sequence
- presslex Lexeme press
- bDB - A campus telephone directory
- bPB - A telephone directory
- n0-n9 - Digits 0-9
- b5 denotes the individual named Mike
- b10 denotes the value of Mikes telephone
number.
15Thing-denoting Functions
- lex(x) the thing that can be expressed by the
lexeme denoted by x - compCat(c1,c2) the complex category which is
a subcategory of the category denoted by
c2 and is modified by c1 -
- Ex. compCat(lex(telephonelex),lex(numberlex))
16Telephone Number Values
- N(d,n) - the sequence d,n
- N(n5,N(n5,N(n5,N(n1,N(n2,N(n3,n4)))))
- Digit sequence axiomall(d)(Member(d,
lex(digitlex)) gt all(n)(Member(n,lex(digitle
x)),
Member(n,compCat(lex(digitlex),le
x(sequencelex))) vgt Member(N(d,n),
compCat(lex(digitlex),lex(sequencelex))))).
17Proposition-valued Functions
- Possession
- Has(p,r,o) ps r is o.
- Name(e,pn) the proper-name of entity e is pn.
- Value(e,v) - the value of entity e is v.
- Ex. Has(b5,compCat(lex(telephonelex),lex(numberl
ex)), b10). - Name(b5, Mikelex).
- Value(b10, N(n5,N(n5,N(n5,N(n5,N(n6,N
(n1,n2))))))). - Act definition
- ActPlan(a1,a2) To perform act a1, perform act a2.
18Act-denoting Functions (SNeRE)
- SNeRE acting system used for an online acting
solution - SNeRE primitive acts
- snsequence(a1,a2)
- snif(if(p1,a),...,if(pn,an),else(da))
- withsome(x, p(x), a(x), da)
- SNeRE Mental Acts
- disbelieve(p)
- believe(p)
19Primitive Act-denoting Functions
- Information retrieving primitives
- search(p, s)
- ask-user(p)
- Dialing Primitives
- pickup()
- putdown()
- press(n)
20Symbol Anchoring vs. Quotation
- Since
- propositions are first-class objects in the
domain, - proposition-denoting functional terms are
employed - alignment is used to connect lexeme-denoting
terms with the actual lexemes - Therefore, there is no need for a quotation or
string operator.
21Belief Base Introspection
- Agent requires the ability to introspect on its
belief base and act on the results - Lack of knowledge reasoning is captured by the
else clause of withsome - Ex. withsome(n,n1,
- (Has(b5,compCat(lex(telephonelex),
lex(numberlex)),n1) and Value(n1,n)), - dial(b5,n),
- lookup(b5))
22Reasoning About External Information Sources
- Determining the source
- all(p)(Member(p, lex(personlex))
- gt (Member(p,lex(professorlex)),
Member(p,lex(studentlex)) - vgt Contains(bDB,compCat(lex(tel
ephonelex),lex(numberlex)),p))). - all(p)(Member(p, lex(personlex)) gt
(Member(p,lex(professorlex)),
Member(p,lex(studentlex)) gt
Contains(bPB,compCat(lex(telephonelex),lex(numberl
ex)),p))). - Using the source
- withsome(i,
- (Member(i,compCat(lex(informationlex),lex(source
lex))) - and Contains(i,compCat(lex(telephonelex),lex(num
berlex)),p) - and Searched(i)),
- )
23Using the Information
- Regardless of how the information is acquired the
dial defined act is performed - dial is a recursive procedure that processes the
digit sequence one digit at a time, performing
press on each.
24Dial Defined Act
- all(a,v,pn)(Member(a,lex(personlex)),
- Value(v,pn),
- Has(a,compCat(lex(telephonelex),
lex(numberlex)), v) - gt ActPlan(dial(a,pn),
ordered-press(pn))). - all(n1,n2)(Member(N(n1,n2), compCat(lex(digitlex),
lex(sequencelex))) - gt ActPlan(ordered-press(N(n1,n2
)), - snif(if(Member(n2,lex(digitlex)),
- snsequence(act(lex(pressl
ex),n1),
act(lex(presslex),n2))), - else(snsequence(act(lex(pressle
x),n1), ordered-press(n2)))))).
25Conclusions
- Demonstrated the necessary elements to an
embodied solution to McCarthys Second Telephone
number using SNePS - Determining missing information with withsome
- Determining external sources to check using rules
- Consulting those sources through the GLAIR
architecture - Used GLAIR to retrieve and represent the needed
information by anchoring the symbols of the
knowledge base with the English language - Executed the task using the SNePS acting system
with integrated reasoning