Download presentation
Presentation is loading. Please wait.
Published byMelvin Riley Modified over 9 years ago
1
Agents That Communicate Chris Bourne Chris Christen Bryan Hryciw
2
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent Summary
3
Introduction Communication is the intentional exchange of information brought about by the production and perception of signs drawn from a shared system of conventional signs. Most animals employ a fixed set of signs to represent messages that are important to their survival: food here, predator nearby, approach, withdraw, let’s mate. Humans, just as many other animals, use a limited number of signs to communicate (smiling, shaking hands)
4
Introduction Humans are the only animal that has developed a complex, structured system of signs, known as language, that enables us to communicate most of what they know about the world. Although other animals such as chimpanzees and dolphins have shown vocabularies of hundreds of symbols, humans are the only species that can communicate an unbounded number of qualitatively different messages. Although there are other uniquely human attributes, such as wearing clothes and watching TV, Turing created his test based on language because language is closely tied to thinking, in a way these other attributes are not.
5
Origins & Evolution of Language Did humans develop the use of language because we are smart, or are we smart because we use language well? Jerrison, 1991: Human language stems from a need for better cognitive maps of territory. Canines rely heavily on scent marking and their sense of smell to determine where they are and what other animals have been there. Since primates do not have such a highly developed sense of smell, they substituted vocal sounds for scent marking.
6
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
7
Communication as Action Speech Act: The action available to an agent to produce language includes talking, typing, sign language, etc. Speaker - An agent that produces a speech act Hearer - An agent that receives a speech act Why would agents choose to perform a speech act? To be able to: Inform, Query, Answer, Request or Command, Promise, Acknowledge and Share
8
Communication as Action Transferring Information to Hearer: Inform: each other about the part of the world each has explored, so other agent has less exploring to do. Ex. There’s a breeze in 3 4. Answer: questions. This is a kind of informing. Ex. Yes, I smelled the wumpus in 2 3. Acknowledge: requests and offers. Ex. Okay. Share: feelings and experiences with each other. Ex. You know, that wumpus sure needs deodorant.
9
Communication as Action Make the Hearer take some action: Promise: to do things or offer deals. Ex. I’ll shoot the wumpus if you let me share the gold. Query: other agents about particular aspects of the world. Ex. Have you smelled the wumpus anywhere? Request or Command: other agents to perform actions. It can be seen as impolite to make direct requests, so often an indirect speech act (a request in the form of a statement or question) is used instead. Ex. I could use some help carrying this or Could you please help me carry this?
10
Difficulties with Communication Speaking: When is a speech act called for? Which speech act, out of all the possibilities is the right one? Nondeterminism Understanding: Given ambiguous inputs, what state of the world could have created these inputs?
11
Fundamentals of Language Formal Languages: Languages that are invented and are rigidly defined. A set of strings where each string is a sequence of symbols taken from a finite set called the terminal symbols. Lisp, C++, first order logic, etc. Natural Languages: Languages that humans use to talk to one another. Chinese, Danish, English, etc.
12
Component Steps of Communication Three steps take place in the speaker: Intention: S want H to believe P Generation: S chooses words W Synthesis: S utters the words W Four steps take place in the hearer: Perception: H perceives W 1 (ideally, W = W 1 ) Analysis: H infers that W 1 has possible meanings P 1, …, P n Disambiguation: H infers that S intended to convey P i (ideally, P i = P) Incorporation: H decides to believe P i (or rejects it if it is out of line with what H already believes)
13
Component Steps of Communication Three steps take place in the speaker: Intention: S want H to believe P Generation: S chooses words W Synthesis: S utters the words W Four steps take place in the hearer: Perception: H perceives W 1 (ideally, W = W 1 ) Analysis: H infers that W 1 has possible meanings P 1, …, P n Disambiguation: H infers that S intended to convey P i (ideally, P i = P) Incorporation: H decides to believe P i (or rejects it if it is out of line with what H already believes)
14
Models of Communication Encoded Message Model: Speaker encodes a proposition into words or signs. The hearer then tries to decode this message to retrieve the original proposition. The meaning in the speaker’s head, the message that gets transmitted, and the interpretation that hearer arrives at are all the same, unless there is noise during communication, or an error in encoding or decoding occurs. Situated Language Model: Created because of limitations on the encoded message model. The meaning of the message depends on both the words, and the situation. Ex. “Diamond” refers to one thing when the subject is jewelry, and a completely different meaning when the subject is baseball.
15
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
16
Types of Communicating Agents Communicating using Tell and ask: Agents share a common internal representation language Agents are capable of communicating without any external language at all Communicating using Formal Language: Agents make no assumptions about each other’s internal language Agents share a communication language that is a subset of English
17
Tell and Ask Communication with Tell and Ask PerceptsActionsPerceptsActions Reasoning KB Agent A Agent B TELL(KB B, “P”)TELL(KB A, “P”) ASK(KB B, “Q”)TELL(KB B, “Pit(P A1 ) At(P A1,[2,3], S A9 )”)
18
Tell and Ask Communication with Tell and Ask PerceptsActionsPerceptsActions Reasoning KB Agent A Agent B TELL(KB B, “P”)TELL(KB A, “P”) ASK(KB B, “Q”)TELL(KB B, “Pit(P A1 ) At(P A1,[2,3], S A9 )”)
19
Formal Language PerceptsActionsPerceptsActions Reasoning KB Agent A Agent B Language
20
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
21
Formal Grammar for a Subset of English Lexicon: List of allowable vocabulary words. Noun -> stench | breeze | glitter | nothing | wumpus | pit | pits | gold | east | … Verb -> is | see | smell | shoot | feel | stinks | go | grab | carry | kill | turn | … Adjective -> right | left | east | south | back | smelly | … Adverb -> here | there | nearby | ahead | right | left | east | south | back | … Pronoun -> me | you | I | it | … Name -> John | Mary | Boston | Aristotle | … Article -> the | a | an | … Preposition -> to | in | on | near | … Conjunction -> and | or | but | … Digit -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
22
Formal Grammar for a Subset of English NP -> Pronoun -> Noun -> Article Noun -> Digit Digit -> NP PP -> NP RelClause RelClause -> that VP VP -> Verb -> VP NP -> VP Adjective -> VP PP -> VP Adverb PP -> Preposition NP Grammar: S -> NP VP S -> S Conjunction S
23
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
24
Parsing Algorithms There are many algorithms for parsing Top-down parsing Starting with an S and expanding accordingly Bottom-up parsing Combination of top-down and bottom-up Dynamic programming techniques Avoids inefficiencies of backtracking
25
Bottom-up Parse (example) function BOTTOM-UP-PARSE(words, grammar) returns a parse tree forest words loop do if LENGTH(forest) = 1 and CATEGORY(forest[1]) = START(grammar) then return forest[1] else i choose from {1…LENGTH(forest)} rule choose from RULES(grammar) n LENGTH(RULE-RHS(rule)) subsequence SUBSEQUENCE(forest, i, i+n-1) if MATCH(subsequence,RULE-RHS(rule)) then forest[i…i+n-1] [MAKE-NODE(RULE-LHS(rule), subsequence)] else fail end Article the Noun wumpus NP Article Noun Verb is Adjective dead VP Verb VP Verb Adjective S NP VP The wumpus Article Noun is dead Verb VP Adjective NP VP The wumpus is dead Article wumpus is dead Article Noun is dead NP is dead NP Verb dead NP Verb Adjective NP VP Adjective NP VP S rulesubsequenceforest
26
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
27
Definite Clause Grammer (DCG) Problems with Backus-Naur Form (BNF) Need meaning Context sensitive Introduction of First Order Logic BNFFirst Order Logic S NP VPNP(s 1 ) /\ VP(s 2 ) S(Append(s 1,s 2 )) Noun stench | …(s=“stench” \/ …) Noun(s)
28
DCG Notation Positive: Easy to describe grammars Negative: More verbose than BNF 3 Rules: The notation X Y Z … translate as Y(s 1 ) /\ Z(s 2 )… X(Append(s 1, s 2,…). The notation X word translates as X([“word”]). The notation X Y | Z | … translates as Y’(s) \/ Z’(s) \/… X(s), where Y’ is the translation into logic of the DCG expression Y.
29
Extending the Notation Non-terminal symbols can be augmented A variable can appear on RHS An arbitrary logical test can appear on RHS (s=[sem]) Digit(sem, s) Digit(sem, s) Number(sem, s) Number(sem, s 1 ) /\ Digit(sem, s 2 ) /\ sem = 10 sem 1 + sem 2 Number(sem, Append(s 1, s 2 ) Digit(sem) sem { 0 sem 9 } Number(sem) Digit(sem) Number(sem) Number(sem 1 ) Digit(sem 2 ) {sem = 10 sem 1 + sem 2 } First Order LogicDCG
30
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
31
Overgeneration Simple grammar can overgenerate Ex: “Me smells a stench.” To fix we must understand Cases of English Nominative - subjective - “I” Accusative - objective - “me”
32
New Rules Use of Augmentation NP(subjective) VP | … Pronoun(case) | Noun | Article Noun VP NP(Objective) | … Preposition NP(Objective) I | you | he | she | … me | you | him | her | … S NP(case) VP PP Pronoun(Subjective) Pronoun(Objective) NP s VP | … Pronoun s | Noun | Article Noun Pronoun o | Noun | Article Noun VP NP o | … Preposition NP o I | you | he | she | … me | you | him | her | … S NP s Np o VP PP Pronoun s Pronoun o Changes needed to handle subjective and objective cases
33
Verb Subcategorization Now have slight improvement Must create a sub-categorization list Believe the smelly wumpus in 2 2 is dead[S]believe Is smelly is in 2 2 is a pit [Adjective] [PP] [NP] is smell a wumpus smell awful smell like a wumpus [NP] [Adjective] [PP] smell give the gold in 3,3 to me give me the gold [NP, PP] [NP, NP] give ExampleSubcatsVerb
34
Parse Tree S NP VP([]) VP([NP]) VP([NP,NP])NP Pronoun ArticleNounVerb([NP,NP]) Yougivemethegold
35
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
36
Semantic Interpretation Semantic Interpretation: Responsible for combining meanings compositionally to get a set of possible interpretations Formal Languages Compositional Semantics: The semantics of any phrase is a function of its subphrases X + Y We can handle an infinite grammar with a finite set of rules Natural Languages Appears to have a noncompositional semantics “The batter hit the ball” Semantic interpretation alone cannot be certain of the right interpretation of a phrase or sentence
37
Semantic Interpretation Semantics as DCG Augmentation The same idea used to specify the semantics of numbers and digits can applied to the complete language of mathematics Exp(sem) –> Exp(sem 1 ) Operator(op) Exp(sem 2 ) {sem = Apply(op, sem 1, sem 2 )} Exp(sem) –> ( Exp(sem) ) Exp(sem) –> Number(sem) Digit(sem) –> sem { 0 sem 9 } Number(sem) –> Digit(sem) Number(sem) –> Number(sem 1 ) Digit(sem 2 ) { sem = 10 × sem 1 + sem 2 } Operator(sem) –> sem { sem +,–,×,÷}}
38
The Semantics of E 1 Semantic structure is very different from syntactic structure. We use an intermediate form called a quasi-logical form which uses a new construction which we will call a quantified term. “every agent” -> [ a Agent(a)] “Every agent smells a wumpus” e (e Perceive([ a Agent(a)], [ w Wumpus(w)],Nose) During(Now, e))
39
Pragmatic Interpretation Through semantic interpretation, an agent can perceive a string of words and use a grammar to derive a set of possible semantic interpretations. Now we address the problem of completing the interpretation by adding information about the current situation Information which is noncompositional and context- dependant
40
Pragmatic Interpretation Indexicals: Phrases that refer directly to the current situation “I am in Boston today.” Anaphora: Phrases referring to objects that have been mentioned previously “John was hungry. He entered a restaurant.” “After John proposed to Marsha, they found a preacher and got married. For the honeymoon, they went to Hawaii.” Deciding which reference is the right one is a part of disambiguation.
41
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
42
Ambiguity and Disambiguation The biggest problem in communicative exchange is that most utterances are ambiguous. Squad helps dog bite victim. Red-hot star to wed astronomer. Helicopter powered by human flies. Once-sagging cloth diaper industry saved by full dumps.
43
Ambiguity Lexical Ambiguity a word has more than one meaning Syntactic Ambiguity (Structural Ambiguity) more than one possible parse for the phrase Semantic Ambiguity follows from lexical or syntactic ambiguity Referential Ambiguity semantic ambiguity caused by anaphoric expressions
44
Ambiguity Pragmatic Ambiguity Speaker and hearer disagree on what the current situation is. Local Ambiguity A substring can be parsed several ways. Vagueness Natural languages are also vague “It’s hot outside.”
45
Disambiguation Disambiguation is a question of diagnosis. Models of the world are used to provide possible interpretations of a speech act. Models of the speaker Models of the hearer It is difficult to pick the right interpretation because there may be several right ones.
46
Disambiguation In general, disambiguation requires the combination of four models: the world model the mental model the language model the acoustic model Natural language often uses deliberate ambiguity. Most language understanding programs ignore this possibility
47
Disambiguation Context free grammars do not provide a very useful language model. Probabilistic context-free grammars (PCFG’s) each rewrite rule has a probability associated with it S –> NP VP(0.9) S –> S Conjunction S(0.1)
48
Overview Communication as Action Types of Communicating Agents A Formal Grammar for a Subset of English Syntactic Analysis (Parsing) Definite Clause Grammar (DCG) Augmenting a Grammar Semantic Interpretation Ambiguity and Disambiguity A Communicating Agent
49
How does this all fit in to an agent that can communicate? Start with the wumpus world robot slave. Extend the grammar to accept commands “Go east” “Go to 2 2” Identify the kind (i.e, command or statement) of speech as part of the quasi-logical form.
50
A Communicating Agent Rules for commands and statements S(Command(rel(Hearer)) –> VP(rel) S(Statement(rel(obj)) –> NP(obj) VP(rel) Rules for acknowledgements S(Acknowledge(sem)) –> Ack(sem) Ack(True) –> yes Ack(True) –> OK Ack(False) –> no
51
Summary Agents send signals to each other using a speech act. All animals use some conventional signs to communicate, but humans use language in a more sophisticated way that enables them to communicate much more Formal language theory and phrase structure grammars are useful tools for dealing with some aspects of natural language Communication involves three steps by the speaker intention, generation and synthesis four steps by the hearer perception, analysis, disambiguation and incorporation
52
Summary The encoded message model of communication says that a speaker encodes a representation of a proposition into language, and the hearer decodes the message to uncover the proposition The situated language model states that the meaning of a message is a function of both the message and the situation in which it occurs. Augmenting a grammar allows us to handle many problems Definite Clause Grammar (DCG) is an extension of BNF that allows for augmentations There are many algorithms for parsing strings. I.e. bottom up, top down, combination, and dynamic
53
Summary Pragmatic interpretation takes the current situation into account to determine the effect of an utterance in context Disambiguation is the process of deciding which of the possible interpretations is the one that the speaker intended to convey.
54
The End
55
Bibliography Norvig, Peter and Russell, Stuart, 1995. “Artificial Intelligence A Modern Approach”, Prentice-Hall Inc., Upper Saddle River, New Jersey.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.