0% found this document useful (0 votes)
18 views

Agent Communication

Uploaded by

pocajaw953
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Agent Communication

Uploaded by

pocajaw953
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 64

AJAY KUMAR GARG ENGINEERING COLLEGE

Branch - CSE
ARTIFICIAL INTELLIGENCE

AGENT COMMUNICATION

By

Dr. Anuradha Taluja


Department of Computer Science & Engineering
• Agent communication in software agents
involves the exchange of information,
messages, or data between autonomous
agents to achieve specific tasks or goals.
• It plays a crucial role in distributed artificial
intelligence systems and multi-agent systems.
Key aspects of agent communication include:
• In the domain of multi-agent systems, communication
is an important characteristic to support both
coordination and the transfer of information. Agents
also require the ability to communicate actions or
plans. But how the communication takes place is a
function of its purpose.
1. Agents communicate in order to achieve better the
goals of themselves or of the society/system in which
they exist.
2. Communication can enable the agents to coordinate
their actions and behavior, resulting in systems that
are more coherent
3. Coordination is a property of a system of agents performing
some activity in a shared environment.
4. The degree of coordination is the extent to which they
avoid extraneous activity by reducing resource contention,
avoiding live lock and deadlock, and maintaining applicable
safety conditions.
5. Cooperation is coordination among non-antagonistic
agents, while negotiation is coordination among
competitive or simply self-interested agents.
6. Typically, to cooperate successfully, each agent must
maintain a model of the other agents, and also develop a
model of future interactions. This presupposes sociability
Key aspects of agent communication include:

1.Communication Protocols
Protocols define the rules for interaction,
ensuring agents understand and interpret
messages correctly. Examples include FIPA-
ACL (Foundation for Intelligent Physical
Agents - Agent Communication Language)
and KQML (Knowledge Query and
Manipulation Language).
2. Message Passing
Agents communicate by sending and receiving
structured messages. These messages typically
include:
•Sender and Receiver information
•Performative (indicating the intent, like
request, inform, or agree)
•Content (the actual information or query)
•Language and Ontology (to ensure shared
understanding).
3. Coordination and Negotiation
•Communication enables agents to coordinate
actions, share knowledge, and negotiate for resource
allocation, task assignments, or resolving conflicts.
4. Speech Act Theory
•Messages are viewed as "speech acts" (e.g.,
requests, promises, assertions) that perform specific
functions in a conversation, ensuring purposeful
interactions.
5. Middleware and Frameworks
•Tools like JADE (Java Agent DEvelopment
Framework) and AgentSpeak provide platforms
to design and implement agent communication
with predefined templates and libraries.
6. Challenges
•Semantic alignment: Ensuring shared
understanding despite heterogeneous systems.
•Scalability: Efficient communication in large-
scale systems.
•Security: Safeguarding message integrity and
confidentiality.
Agent communication is vital for applications
like distributed decision-making, collaborative
problem-solving, e-commerce, and intelligent
automation.
Dimensions of Meaning
• There are three aspects to the formal study of
communication:
• syntax (how the symbols of communication are
structured), semantics (what the symbols denote), and
pragmatics (how the symbols are interpreted).
• Meaning is a combination of semantics and
pragmatics.
• Agents communicate in order to understand and be
understood, so it is important to consider the different
dimensions of meaning that are associated with
communication
1. Descriptive vs. Prescriptive. Some messages
describe phenomena, while others prescribe
behavior. Descriptions are important for
human comprehension, but are difficult for
agents to mimic. Appropriately, then, most
agent communication languages are designed
for the exchange of information about
activities and behavior.
• Descriptive Meaning
• Descriptive meaning refers to statements or expressions that
describe how things are, based on observation, facts, or
reports. These are objective and focus on what exists,
avoiding any judgments or norms.
• Purpose: To state facts or provide information.
• Nature: Neutral and value-free.
• Examples:
• "The sky is blue."
• "Humans need oxygen to survive."
• "This road is 10 kilometers long."
• In the context of multi-agent systems or communication,
descriptive meaning allows agents to share factual knowledge
about their environment or status.
• Prescriptive Meaning
• Prescriptive meaning refers to statements or expressions that
prescribe how things should or ought to be. These are
normative and often involve judgment, rules, or
recommendations.
• Purpose: To influence behavior or enforce norms.
• Nature: Often subjective or directive.
• Examples:
• "You should exercise daily."
• "Do not exceed the speed limit."
• "Always report errors immediately."
• In software agents, prescriptive communication may appear
in rules, guidelines, or commands (e.g., "If condition X occurs,
perform action Y").
• Application in Communication Frameworks
• In the context of agent communication:
• Descriptive Communication: Used to share
knowledge, observations, and updates (e.g.,
FIPA-ACL's inform performative).
• Prescriptive Communication: Used for
instructions, requests, and policies (e.g., FIPA-
ACL's request or propose performatives).
2. Personal vs. Conventional Meaning. An agent
might have its own meaning for a message, but
this might differ from the meaning conventionally
accepted by the other agents with which the agent
communicates.
To the greatest extent possible, multiagent
systems should opt for conventional meanings,
especially since these systems are typically open
environments in which new agents might be
introduced at any time.
• 1. Personal Meaning
• Personal meaning refers to the interpretation or understanding
of a term, phrase, or concept that is unique to an individual.
• Subjectivity: Rooted in personal experiences, emotions, cultural
background, or context.
• Dynamic: Can evolve over time based on individual learning
and perspective.
• Examples:
• For someone who loves sunsets, "sunset" might evoke
feelings of peace and beauty.
• The word "home" might mean comfort and warmth for one
person, but loneliness for another.
• In agent systems, personal meaning could represent an agent’s
internalized knowledge or perspective, developed through
learning or interaction.
• 2. Conventional Meaning
• Conventional meaning refers to the shared, socially agreed-
upon interpretation of a term, phrase, or concept within a
group or community.
• Objective: Agreed upon through social or linguistic norms.
• Stable: Changes slowly over time through collective
consensus.
• Examples:
• A "stop sign" universally means to halt at an intersection.
• The term "dog" in English conventionally refers to a
specific type of animal.
• For agents, conventional meaning is often defined by
ontologies, dictionaries, or protocols that enable consistent
communication within a system.
• Applications in Communication
1. Linguistics: Balancing individual interpretations (e.g.,
metaphors) with shared grammatical rules.
2. Multi-Agent Systems: Agents may have unique
internal knowledge (personal meaning) but need to
conform to shared protocols (conventional meaning)
for collaboration.
3. Human-AI Interaction: AI systems must handle both
personalized interpretations (e.g., in user
preferences) and standardized meanings for general
communication.
• 3. Subjective vs. Objective Meaning Similar to
conventional meaning, where meaning is
determined external to an agent, a message
often has an explicit effect on the
environment, which can be perceived
objectively. The effect might be different than
that understood internally, i.e., subjectively,
by the sender or receiver of the message.
• 1. Subjective Meaning
• Subjective meaning is the interpretation of a concept, word, or
phrase that is influenced by individual emotions, perceptions, or
personal context.
• Characteristics:
• Personal and internalized.
• Varies between individuals and contexts.
• Influenced by emotions, experiences, and personal biases.
• Examples:
• "Rain" might feel refreshing and peaceful to one person but
gloomy and inconvenient to another.
• The word "success" may mean wealth to one person and
happiness to another.
• In multi-agent systems or AI, subjective meaning can reflect an
agent's individual perspective or localized knowledge derived
from its environment or interactions.
• 2. Objective Meaning
• Objective meaning refers to the interpretation of a concept,
word, or phrase that is universal, observable, and independent of
personal feelings or opinions.
• Characteristics:
• Shared and consistent across individuals.
• Derived from facts, definitions, or logical frameworks.
• Unaffected by emotional or personal influence.
• Examples:
• "Water boils at 100°C at sea level" is a factual statement with
objective meaning.
• The term "circle" refers to a geometric shape defined by its
mathematical properties.
• In AI and communication, objective meaning is often encoded in
standardized protocols or ontologies to ensure consistency.
• Applications in Communication
1. Linguistics: Subjective meaning accounts for emotional
connotations, while objective meaning focuses on
denotations.
2. AI and Multi-Agent Systems:
1. Subjective Meaning: Enables personalized
recommendations or localized interpretations based on
agent-specific knowledge.
2. Objective Meaning: Ensures consistency in agent
communication using universally agreed-upon definitions.
3. Human-AI Interaction: Balancing subjective user inputs (e.g.,
emotional states) with objective data analysis for better
understanding.
4. Speaker's vs. Hearer's vs. Society's Perspective
Independent of the conventional or objective meaning
of a message, the message can be expressed according
to the viewpoint of the speaker or hearer or other
observers.
Speaker's Perspective refers to the interpretation of a
message or information based on the viewpoint,
intentions, and knowledge of the speaker. This
dimension is critical in tasks like natural language
processing, human-agent interaction, and multi-agent
communication, where systems must infer the implicit
meaning behind a message.
• The speaker's perspective encompasses:
• Intent: Why is the speaker saying this? (e.g.,
to inform, request, persuade, or express
emotion).
• Beliefs: What does the speaker know or
assume about the topic or the listener?
• Context: The situation or environment
influencing the speaker's communication.
• Emotion and Tone: The emotional state or
attitude of the speaker.
• Key Features in AI
• AI systems must infer the speaker's perspective to
ensure meaningful interactions:
• Intent Recognition: Identifying the purpose behind a
message (e.g., asking a question vs. making a
command).
• Belief Modeling: Understanding what the speaker
knows or believes to tailor responses.
• Emotional Understanding: Detecting emotions like
anger, happiness, or sarcasm in speech or text.
• Context Awareness: Incorporating environmental,
temporal, and cultural factors influencing the speaker's
message.
Applications in AI
1. Virtual Assistants:
•Systems like Alexa or Google Assistant infer user intent and
context to provide accurate responses.
•Example: "Can you turn on the light?" is interpreted as a polite
command, not a literal question.
•2. Chatbots:
•Customer support bots adapt their responses based on
detected user frustration or satisfaction.
•Example: Apologizing and escalating an issue when the user is
angry.
3. Sentiment Analysis in Social Media:
•Analyzing speaker perspective to gauge public
sentiment towards topics or events.
•Example: Understanding if a tweet like "This is
unbelievable!" is positive or negative based on
surrounding context.
4. Human-Robot Interaction:
•Robots interpreting commands and emotional cues
to behave more naturally.
•Example: A robot detecting sarcasm in "Nice job
cleaning up that mess!".
Example of Perspective in Action
Scenario: Human-Agent Dialogue
Human: "It’s really cold in here."
Speaker’s Perspective:
•Likely intent: Request to adjust the temperature
(implicit).
•Emotion: Possible discomfort or complaint.
•Context: Physical environment (room temperature).
AI Response:
•Adjust thermostat settings or ask for confirmation:
"Would you like me to increase the temperature?"
Dimension of Meaning: Hearer’s
Perspective in Artificial Intelligence
• In Artificial Intelligence (AI), particularly in systems
dealing with natural language processing (NLP),
conversational agents, or multi-agent
communication, the hearer's perspective focuses on
how the recipient (human or AI agent) interprets,
understands, and acts upon the message received.
• This dimension highlights the importance of the
hearer's cognitive state, expectations, context, and
interpretation.
 Importance of the Hearer's Perspective in AI
• The hearer in AI refers to the system or agent
receiving the message.
• A proper understanding of the hearer’s
perspective is crucial for:
• Ensuring the response is relevant to the received
query or command.
• Managing ambiguity based on the hearer’s
knowledge and intent.
• Adapting communication style based on the
recipient's needs or goals.
 Applications of Hearer’s Perspective in AI
a. Conversational AI and Chatbots
Virtual assistants like Alexa and Siri adjust responses by understanding the
hearer’s intent.
Example:
"What’s the weather?" → User expects a concise weather update, not a detailed
meteorological report.
b. Multi-Agent Systems
In agent-based communication, understanding the hearer’s perspective
allows agents to collaborate effectively.
Example:
Agent A sends a resource request; Agent B interprets urgency and availability
based on predefined ontologies.
c. Adaptive Learning Systems
Personalized e-learning platforms consider the hearer’s learning style and
pace.
Example:
Rephrasing instructions or offering additional resources for struggling students.
d. Sentiment Analysis
Sentiment-aware systems assess the emotional state of the hearer and adjust
responses accordingly.
Example:
In customer support, detecting frustration might lead to empathetic responses
like, "I’m here to help resolve this issue."
Society's Perspective
• When discussing the dimension of meaning
from society's perspective in Artificial
Intelligence (AI), the focus shifts to how society
interprets, accepts, and interacts with AI
systems.
• This dimension reflects the collective
understanding and implications of AI’s role and
behavior in societal contexts, highlighting
ethical, cultural, and social constructs that
influence its use and development.
• Applications Reflecting Society’s Perspective
1.Healthcare AI: Systems like diagnostic tools
must account for societal trust and ethical
considerations when making treatment
recommendations.
2.Education AI: Personalized learning systems
must avoid reinforcing stereotypes or
inequities in education.
3.AI in Policing: Predictive policing algorithms
must be unbiased and socially accountable to
avoid misuse or societal harm.
Semantics vs. Pragmatics
• The semantic dimension in AI refers to
understanding and interpreting the meaning
of data, symbols, or messages. It focuses on
processing content rather than just syntax,
enabling machines to derive meaningful
insights.
Applications of Semantic Understanding in AI
a. Natural Language Processing (NLP)
AI systems, such as chatbots or voice assistants, use semantic
analysis to interpret user input.
Example: Identifying user intent in "Find me a nearby coffee
shop."
b. Machine Translation
Tools like Google Translate aim to preserve semantic meaning
during translation rather than just syntactic accuracy.
Example: Translating idioms like "It's raining cats and dogs"
appropriately based on the target language's context.
c. Semantic Web
An extension of the World Wide Web enabling
machines to understand web content's meaning.
Example: Websites tagged with semantic metadata
allow AI systems to fetch precise, meaningful
results.
d. Image and Video Understanding
AI annotates images or videos with semantic labels.
•Example: Recognizing that an image of a dog
playing in water conveys the concept of "pets" and
"recreation."
 Pragmatics
In Artificial Intelligence (AI), pragmatics refers to the
study of how context and intent influence the
interpretation of meaning in communication.
While semantics focuses on the literal meaning of
words or symbols, pragmatics looks at how meaning
is derived based on the use of language in specific
situations, considering factors like speaker
intentions, the context of the conversation, and
shared knowledge between participants.
Applications of Pragmatics in AI
a. Virtual Assistants
Assistants like Alexa, Siri, or Google Assistant rely on pragmatics to understand user
requests and respond effectively.
Example:
User: "Play something relaxing."
AI interprets this as a request to play calm music, not just any random playlist.
b. Chatbots and Dialogue Systems
Pragmatics allows chatbots to maintain coherent, human-like conversations
and respond contextually.
Example:
User: "I’m starving."
Chatbot: "Would you like me to find nearby restaurants?“
c. Multi-Agent Systems
In multi-agent environments, agents communicate pragmatically to collaborate or
negotiate effectively.
Example:
An agent might interpret "I need resources to complete this task" as a request to share
or allocate resources.
d. Sentiment and Emotion Analysis
Pragmatics helps AI detect subtle emotional cues and
respond empathetically.
Example:
User: "That’s just great!"
Pragmatic understanding reveals whether it’s genuine praise
or sarcasm.
e. Social Robotics
Robots use pragmatics to interact naturally with humans by
understanding non-verbal cues, tone, and situational context.
Example:
A robot greets a person with "Good morning!" and adjusts to
"Good evening!" based on the time of day.
6. Contextuality Messages cannot be
understood in isolation, but must be
interpreted in terms of the mental states of
the agents, the present state of the
environment, and the environment's history:
how it arrived at its present state.
Interpretations are directly affected by
previous messages and actions of the agents.
• Contextuality in Meaning
• Contextuality refers to how the meaning of a
word, phrase, or message changes depending on
the surrounding information, situation, or
environment.
• Key Features:
• Dependent on situational factors, such as time,
location, or social setting.
• Relies on both explicit (clearly stated) and implicit
(understood or assumed) context.
• Crucial for resolving ambiguities or enhancing the
richness of communication.
• Contextuality in Agent Communication
• In systems like FIPA-ACL (Agent Communication
Language), contextuality is essential for enabling
agents to adapt to dynamic environments and
understand the subtleties of exchanged
messages.
• Example in Multi-Agent Systems:
• An agent requesting resources might say: "I need
more bandwidth now." The term "now" requires
temporal context to determine urgency.
• Agents use conversation policies or ontologies to
maintain consistency while accounting for context.
• Applications of Contextuality
1. Natural Language Processing (NLP):
1. Resolving ambiguities in text using context (e.g., "The
chicken is ready to eat" could imply cooking or feeding,
based on the sentence structure).
2. Human-AI Interaction:
1. Virtual assistants like Siri or Alexa use contextuality to
interpret user intent.
3. Multi-Agent Communication:
1. Agents leverage contextuality to negotiate, collaborate, or
respond appropriately based on environmental or task-
specific factors.
4. Sentiment Analysis:
1. Context helps in determining whether a phrase like "That's
great" is sarcastic or genuine.
7. Coverage Smaller languages are more
manageable, but they must be large enough so
that an agent can convey the meanings it
intends.
8. Identity When a communication occurs among
agents, its meaning is dependent on the
identities and roles of the agents involved, and
on how the involved agents are specified.A
message might be sent to a particular agent, or
to just any agent satisfying a specified criterion.
9. Cardinality A message sent privately to one
agent would be understood differently than
the same message broadcast publicly.
MESSAGE TYPES
1. It is important for agents of different capabilities
to be able to communicate. Communication must
therefore be defined at several levels, with
communication at the lowest level used for
communication with the least capable agent.
2. In order to be of interest to each other, the
agents must be able to participate in a dialogue.
Their role in this dialogue may be either active,
passive, or both, allowing them to function as a
master, slave, or peer, respectively.
3. In keeping with the above definition for and
assumptions about an agent, we assume that
an agent can send and receive messages
through a communication network.
4. The messages can be of several types, as
defined next.
5.There are two basic message types: assertions and queries.
Every agent, whether active or passive, must have the
ability to accept information. In its simplest form, this
information is communicated to the agent from an external
source by means of an assertion. In order to assume a
passive role in a dialog, an agent must additionally be able
to answer questions, i.e., it must be able to
1) accept a query from an external source and
2) send a reply to the source by making an assertion.
Note that from the standpoint of the communication
network, there is no distinction between an unsolicited
assertion and an assertion made in reply to a query
6. In order to assume an active role in a dialog, an agent
must be able to issue queries and make assertions.
With these capabilities, the agent then can potentially
control another agent by causing it to respond to the
query or to accept the information asserted. This
means of control can be extended to the control of
subagents, such as neural networks and databases.
7. An agent functioning as a peer with another agent can
assume both active and passive roles in a dialog. It
must be able to make and accept both assertions and
queries
SPEECH ACTS
• Spoken human communication is used as the model for
communication among computational agents. A popular basis
for analyzing human communication is speech act theory.
Speech act theory views human natural language as actions,
such as requests, suggestions, commitments, and replies.
• Speech acts categorize the purpose of utterances into specific
types based on the speaker's intention and the social function
of the communication. Every statement, question, or
command serves one or more of the following purposes:
• Three Levels of Speech Acts:
1. Locutionary Act: The literal act of saying something
(words, phrases, grammar).
1. Example: "It’s raining." (literal meaning)
2. Illocutionary Act: The intention behind the
statement (e.g., informing, requesting, promising).
1. Example: "It’s raining" could mean “Take an umbrella.”
3. Perlocutionary Act: The effect of the statement on
the listener (e.g., causing action, belief, or emotional
response).
1. Example: "It’s raining" may lead the listener to grab a
raincoat.
THANK YOU
Knowledge Query and Manipulation Language (KQML)

• KQML, or Knowledge Query and Manipulation


Language, is a communication protocol and language
designed for exchanging information and knowledge
among intelligent agents in multi-agent systems.
• It provides a framework for expressing messages
with a focus on knowledge sharing, querying, and
collaborative tasks, while being independent of the
underlying knowledge representation.
• Key Features of KQML
1. Message-Based Communication:
KQML is centered on structured messages exchanged between
agents.
2. Layered Protocol:
KQML operates on three layers:
1. Content Layer: The actual data or knowledge being shared.
2. Message Layer: The semantics of the interaction, including performatives.
3. Communication Layer: The low-level transport protocol for exchanging
messages.
3. Agent Communication:
Supports interaction between heterogeneous agents, enabling
collaboration in distributed systems.
4. Extensibility:
KQML is designed to support new types of communication and
performatives as required.
KQML language consists of three
main layers:
• Content layer,
• Message layer, and
• Communication layer.
Performatives in KQML specify the type of communication act an
agent is performing.
These can be thought of as directives or intentions attached to
messages. Common performatives include:

Eg:Communication Performatives
•Tell: Share knowledge or assert a fact.
Example: An agent asserts that the weather is sunny.
•KQML: (tell :content "(weather sunny)")
•Ask-if: Query if a statement is true or false.
Example: Asking if a file exists.
•KQML: (ask-if :content "(file-exists myfile.txt)")
•Ask-about: Request information or details about a specific topic.
Example: Asking for the temperature.
•KQML: (ask-about :content "(temperature)")
•Reply: Respond to a query or request.
Example: Informing that the temperature is 25°C.
•KQML: (reply :content "(temperature 25)")
Example Message
Agent A asks Agent B about the weather:

(ask-about
:sender AgentA
:receiver AgentB
:content "(weather today)"
:language LISP
:ontology WeatherOntology)
DIFFRENCE

Feature KQML FIPA-ACL


Early communication Developed by FIPA, later
Standardization
protocol for agents improved
More formalized and
Performatives Fixed but extensible set
expressive
Knowledge sharing and Generic agent
Focus
manipulation communication
Similar, but focuses on
Layered Architecture Three-layer structure
ontologies
FIPA-ACL
• FIPA-ACL (Foundation for Intelligent Physical
Agents - Agent Communication Language) is a
standardized communication language
developed to enable agents in multi-agent
systems (MAS) to interact effectively. It's part
of the standards established by FIPA, an IEEE
Computer Society standards organization
focusing on interoperability in multi-agent
systems.
• Key Aspects of FIPA-ACL in AI
1. Purpose:
FIPA-ACL is designed to facilitate communication between
autonomous software agents. It provides a formal structure
for messages, ensuring agents can understand each other,
even if they come from different developers or platforms.
2. Message Structure:
Each FIPA-ACL message includes the following components:
1. Performative: The type of communication act (e.g., inform, request,
query).
2. Sender: Identifier of the agent sending the message.
3. Receiver: Identifier of the recipient agent(s).
4. Content: The actual information being communicated.
5. Language: The language used for encoding the message content.
6. Ontology: The shared vocabulary or domain knowledge.
7. Protocol: The communication protocol being followed.
3. These acts enable complex dialogues and collaborations
among agents.
4. Performative Categories: FIPA-ACL defines various
communicative acts, such as:
1. Inform: Sharing information.
2. Request: Asking another agent to perform an action.
3. Query: Seeking information.
4. Agree/Refuse: Accepting or rejecting a request.
5. Propose/Accept-Proposal/Reject-Proposal: Negotiation-related
actions.
5. Semantics:
The semantics of FIPA-ACL are based on speech act theory
and formal logic. Each performative is associated with a
set of conditions that specify its meaning and expected
effects.
Agent A requests Agent B to fetch
a book.
(request
:sender AgentA
:receiver AgentB
:content "(action AgentB (fetch book))"
:language SL
:ontology LibraryOntology
:protocol fipa-request
•)
Advantages
•Facilitates agent interoperability.
•Provides a clear and formal structure for communication.
•Supports complex interactions like negotiation and
collaboration.
Challenges
•Requires agents to adhere strictly to the standard.
•Semantic interpretation can be complex in diverse domains.
•Ensuring security and trust in multi-agent communications.

You might also like