Week 1-Mids
Week 1-Mids
Week 1-Mids
Agent-based
Software Engineering
Behrouz Far
Schulich School of Engineering, University of Calgary
far@ucalgary.ca
http://www.enel.ucalgary.ca/People/far/
far@ucalgary.ca 1
Contents
Introduction
Software vs. software agent
Software agent models
Agent decision making process
Conclusion
far@ucalgary.ca 2
Course Curriculum
Overview of agent-based SE
Principles of
Methodologies for agent-based
Object Technology
analysis and design
Other topics:
Agent-based System Agent Interaction,
Architecture & Organization Infrastructure, APIs,
Performance metrics,
FIPA: Foundation for Learning,
Self-organizing
Intelligent Physical Agents
systems
etc.
far@ucalgary.ca 3
Realities: High
Risk
Software development is a very high risk task (may be!)
About 20% of the software projects are canceled
About 84% of software projects are incomplete when
released (need patches, service packs, etc.)
Almost all of the software projects costs exceed initial
estimations (cost overrun)
Question: What can be done to improve
software product and
software development process?
far@ucalgary.ca 4
Software Product: Trends
…Past: centralized computing system; monolithic
programming model
Now: distributed computing system; heterogeneous,
scalable, open and distributed programming model
far@ucalgary.ca 5
Software Process: Trends
…Past: waterfall development process model
Now: incremental, agile, experimental development
process model
far@ucalgary.ca 6
Paradigm Shift
…May be the “software concept” itself should
be revised not only the process and/or the
product
Software agents: new experimental
embodiment of computer programs
far@ucalgary.ca 7
Controversial Definitions /1
An agent is a software entity that functions
continuously and autonomously in a
particular environment, often inhabited by
other agents and processes [Shoham 97]
Possible examples: A cell phone? A time
controlled sprinkler?
A notification program: e.g., CCTray?
Other concerns such as weight,
knowledge, learning, inference
capability, etc. … are equally important
far@ucalgary.ca 8
Controversial Definitions /2
An agent is a software entity that might possess some of
the following attributes
Reactivity (i.e., selectively sense and act)
Autonomy (i.e., goal directness, proactive & self-started behavior)
Collaborative (i.e., work with other agents and entities to achieve a
common goal)
Knowledge-level communication ability (i.e., communicate with other
entities in a language like speech-act, higher level than symbol level program
to program protocols)
Inferential capability (i.e., act on abstract task spec., using models of self,
situation, and/or other agents)
Temporal continuity (i.e., persistence of state and personality)
Personality (i.e., manifesting attributes of a believable agent. Personality is
composed of beliefs and behavior based on those beliefs)
Adaptability (i.e., learn and improve with experience)
Mobility (i.e., migrate from one host to another in a self-directed way)
far@ucalgary.ca 9
Controversial Definitions /3
An agent is a software entity that exhibits
(a subset of) the following characteristics:
Knowledgeability (cognitive capabilities, interaction)
Capability to interact (cooperate, coordinate
Mobility
and compete) with the other people,
agents and processes Knowledgeability
Learning
Capability to learn autonomously
Learning Autonomy
Autonomy (set own goal, proactive)
Communication (high level
Communication
language)
Mobility (physical or software
mobility)
far@ucalgary.ca 10
Controversial Development
Agent-oriented programming
Agent-oriented software
development
Agent-oriented design
etc.
Agent system development is dominated by informal
guidelines, heuristics and inspirations rather than
formal principles and well-defined engineering
techniques. [Jennings] Good on paper… hard to
use in practice
far@ucalgary.ca 11
Software vs. Software
Agent
Similarities and differences:
Software aspect of a software agent
Agent aspect of a software agent
Software
Software
Agent
far@ucalgary.ca 12
What Makes them
1.Different?
Roles vs. tasks
2. Emergent behaviour
3. Knowledge cycle
4. Interactions vs. intra-actions
5. Symbol level communication
6. Knowledge completeness
7. Indeterminism: Decision making
far@ucalgary.ca 13
1. Roles vs.
Tasks
We assign “tasks” to software
Example: on-line registration software Use Cases: How to
use bathroom
“What” and “how” are specified in advance
far@ucalgary.ca 15
3. Knowledge
Cycle
Data Information Knowledge
Data is a sequence of quantified or quantifiable symbols
Information is about taking data and putting it into a
meaningful pattern
Knowledge is the ability to use that information
Concepts:
Knowledge, belief, words,
personality, behaviour,
truth, uncertainty, data,
inference, probability, etc.
B
e
r
17
far@ucalgary.ca
t
4. Interactions vs. Intra--
actions
In software systems, relationships among
subsystems (or components, packages) are:
Inter-actions among subsystems and
Intra-actions within a subsystem
Interactions are between the artifact and its outer
environment. E.g., giveaway: give the puck to
the other team
Intra-actions are the characteristics of the artifact’s
inner environment. E.g., pass: pass the puck to a
teammate
far@ucalgary.ca 18
4. Interactions vs. Intra--
actions
In nearly decomposable systems intra-actions are more
frequent (typically at least 10 times more) and more
predictable than inter-actions [Herbert Simon].
Software systems are nearly decomposable: subsystems can
SENG697 far@ucalgary.ca 20
5. Symbol Level
Communication
Software: Signal-level communication
Agents: Symbol-level communication
ComAgpeonnte1nt 1
Signal level: Symbol level:
Assign responsibilities Dynamic Message Passing
Invoke operations Knowledge sharing
ComAgpeonnte2
nt 2
far@ucalgary.ca 21
5. Symbol Level
Communication
For a message from one agent to be understood by
another, the agents must ascribe the same
meaning to the constants used in the message
Thus, we require an “ontology” to map a given
constant to some well-understood meaning
Dynamic Message Passing:
Agents should first discover whether
or not they share a mutual understanding
of the domain constants before further
message passing
far@ucalgary.ca 22
Taxonomy: What is?
Object
Student Researcher
far@ucalgary.ca 23
Thesaurus: What
is? Object
Student Researcher
synonym
far@ucalgary.ca 24
Topic Map: What
is? Object
knows described_in
Person Topi Document
writes c
Student Researcher
synonym
far@ucalgary.ca 25
Ontology: What
is? Object
is_a
knows described_in
Person Document
Topic writes
is_a
far@ucalgary.ca 26
Ontology
Not only
conceptualization but
also relations
May be no good for
human but good
for machine
processing
SENG697 far@ucalgary.ca 27
6. Knowledge
Completeness
Interacting software systems must have
complete knowledge of each other
Interacting software agents may have complete
knowledge about the other agents’ goals, strategies
(i.e., actions to select from) and utilities (i.e., the
pay-offs of actions)
Interactions based on the complete knowledge
assumption are usually classified as
cooperation and coordination
In many cases knowledge completeness assumption
may not hold: competition
far@ucalgary.ca 28
7. Indeterminism: Decision
Making
Software systems: Decision points in algorithms
are deterministic
“Intelligent” software systems: empowered by
Reasoning mechanisms
Reasoning is based on a single thread of control
has long term consequences
Decision making is based on
multiple threads of control!
has immediate
consequences
far@ucalgary.ca 29
Therefore: Definition
Software agents are
Knowledgeable: capable of managing their own set
of beliefs (information) and/or desires (goals) and
they can decide upon the next operations to execute
Autonomous: we don’t define tasks for them
instead we assign roles and responsibilities to them
Situated: defined with respect to their environment
Interactive: capable of filtering communications
and managing dialogues
software entities.
far@ucalgary.ca 30
Software Agent
Models
far@ucalgary.ca 32
1. Agent
Models
There are various ways of modeling and
viewing software agents.
Examples:
Computer science models: e.g.,
indeterministic push-down automaton
Software engineering models: based on the
object-agent analogy [Jennings and Wooldridge’s
works]
Interaction models: subsystems;
software components; or packages
far@ucalgary.ca 32
1. Agent – Object
Analogy
Object-agent analogy can potentially be
misinterpreted and can lead to overselling the
agent-based approaches.
Because object is a component level concept
and agent is an application level one.
Similarity of agent-oriented and object-
oriented terms should not imply that agent
and object are similar entities.
far@ucalgary.ca 33
1. Agent – Object Analogy
(contd.)
Object-oriented software engineering:
engineering a computer program based on objects
which are its building block and we use object-
oriented methodologies during software analysis
and design. building software with objects
Agent-oriented software engineering:
development of a computer program that has
properties of an agent and it involves concepts
like knowledgeability, autonomy and
interactivity. We use agent development
methodologies for analysis and design and we use
objects to implement them.
building software with agent capabilities
far@ucalgary.ca 34
2. Subsystem
Analogy
Modeling agents as software
components, i.e., a subsystem with
complete encapsulation of its behavior
that has an attribute, called interface
(i.e., what they can do). The component
can be accessed through its interface. interface
An agents requiring services of another
agent may consult directory and naming subsystem
services (i.e., agent yellow pages) and
use the services that the agent offers by
adhering to the rules specified in the
interface document for that agent.
Experience shows that this limits the scope of the software
agents, in the sense that autonomy, proactiveness and
interactivity may be compromised.
far@ucalgary.ca 35
Enhanced Interaction
Model
What I want to do? Goal(s)
When to do?
Control
What resources I
need?
What can I do? Agent
Interface
Who am I?
Identity
What is my security
clearance?
How to do?
Knowledge
Library of reusable procedures
far@ucalgary.ca 36
Enhanced Model:
Attributes
Attributes:
Interface (I) (i.e., what the agent can do?)
Goal list (G) (i.e., what the agent wants
to do?)
Knowledge (K) (i.e., how to do?)
Control (C) (when to do?)
Identity (Id) (whom to contact?)
far@ucalgary.ca 37
Enhanced Model:
Attributes
I-G-K-C-Id attributes can be declared public, private or
protected
Public: means that the attribute is accessible and readable by
all the other agents
Protected: means that the attributes are visible only to a
certain group of agents
Private: indicates that the attributes are not visible
externally
Combination of the attributes and their states lead to various
interaction scenarios
Each interaction scenario has certain properties and
satisfying those properties requires implementation of certain
reasoning and decision making mechanisms
far@ucalgary.ca 38
Interaction Scenarios
Using the enhanced model, each agent can
decide upon the next task to accomplish
using the current I-G-K-C-Id list: interfaces,
goals, knowledge, identity and thread of
control of self and the other agents with
whom interacting.
far@ucalgary.ca 39
Cooperation &
Coordination
Cooperation & Coordination Scenario
Attribute Visibility Requirements
Goal (G) Public Necessary requirement
Knowledge (K) Public
Interface (I) Public Full automation and bilateral service
Protected or Private Unilateral service only (publish/subscribe)
Control (C) Public Sync and/or concurrency
Protected or Private No sync and/or concurrency
Identity (Id) Public Full communication and bilateral service
Protected or Private Unilateral
service only
Requirements:
Knowledge sharing and semantics level message passing methods are needed.
Additional decision making and/or reasoning methods are not needed.
Uncertainty management techniques are not needed.
far@ucalgary.ca 40
Competition
Loose Competition Scenario
Attribute Visibility Requirements
Goal (G) Public Necessary requirement
Knowledge (K) Private
Interface (I) Public Comparison of services
Protected or Private Encapsulate own
Control (C) Public Strategic or dynamic game
Protected or Private Strategic game only
Identity (Id) Public Role changing is impossible Protected or
Private Role changing possible
Requirements:
Ability to gather and interpret signals indirectly.
Additional decision making and/or reasoning methods, based on certainty and uncertainty,
such as game and utility theory are needed.
far@ucalgary.ca 41
Agent-SE:
What will be
next?
far@ucalgary.ca 61
Will Agent-SE
Survive?
Two reasons for survival of Agent-SE:
As a next step in evolution of SE
Agent-SE is a natural next step in the evolution of a
whole range of software engineering paradigms, such
as object-orientation, design patterns and
component- ware.
Appropriateness for open, networked and
distributed systems
Agent-based approach is ideal for developing
software for open, networked (i.e., Internet) and
distributed systems.
far@ucalgary.ca 43
Next Step in Evolutional
SEAgent
Will /1 SE approach replace OO approach?
No. Agent SE enhances OO and benefits from it.
Why?
Similarities:
Both accept the principle of encapsulation and information hiding
and both recognize the importance of interactions.
Differences:
Object-oriented approaches provide minimal support for specifying and
managing organizational relationships, i.e., relationships are merely defined
by static inheritance hierarchies.
Objects encapsulate state and behavior realization they do
not encapsulate action choice.
far@ucalgary.ca 44
Next Step in Evolutional
SE /2
Will Agent-based approach replace contemporary
software engineering techniques such as design patterns
or component-ware?
No.
Why?
Agent-based approach provides a higher level of
computational abstraction
This may, in turn, be realized through object-oriented systems or in a
design pattern or component-based fashion.
far@ucalgary.ca 45
Appropriateness for Open
Systems
Characteristics of open, networked systems
Control is distributed
Constant change is present
In an open, networked environment, the software model
should be based on synthesis or construction, rather than
decomposition or reduction [Jennings].
far@ucalgary.ca 46
What Shall I Do
Next?
Agents seem to be quite interesting software
entities. So from now on should I start
developing software using agents only?
Why?
far@ucalgary.ca 47
Why?
Depends on problem you have at hand to be solved.
Software Agents ARE NOT appropriate for
System control issues:
Agent based solution may not be appropriate for systems and
domains with global constraints (where global control is a
must), real-time response required, and where emergent
behavior (e.g. deadlocks) have to be avoided.
Global perspective & Optimality issues:
All decisions are made based on local knowledge and reaching
globally optimal performance is almost impossible.
far@ucalgary.ca 48
Why? (cont’d)
Depends on problem you have at hand to be solved.
Agents MAY NOT be appropriate for
Performance & Security issues:
All patterns and all outcomes of the interactions are inherently
unpredictable. Predicting the behavior of the overall system
based on its constituent components is extremely difficult
(sometimes impossible).
Trust & delegation issues:
Agents should be trusted to delegate tasks to them.
Agents should trust each other.
far@ucalgary.ca 49
Why? (cont’d)
Opposed to OOAD
Agent development methodologies are not matured
enough
Development processes are not standardized yet
Testing agent based systems has yet to be
formalized
Scaling and performance issues still exist
Libraries of reusable agent tasks are yet to
be developed
far@ucalgary.ca 50
Issues to be
Considered
Knowledge sharing issues:
Ontology
Uncertainty issues:
Uncertain about the parameters of the
environment, actions of the other agents,
reasoning of the other agents,
imperfectly informed of the events
happened, etc.
Development issues:
Development; testing; deployment
far@ucalgary.ca 51
Research Areas
far@ucalgary.ca 71
Agent Technology
Social aspects
Organization
Emergent
behaviour
Technical
aspects
Experimenta
l science
Artificial science (protocols, individual and
group models regression and aggregation models,
53
etc.) far@ucalgary.ca
Areas of
Investigation
Methodologies for agent-based analysis and design
Agent communication
Knowledge sharing
Agent-based system architecture and organization
Metrics for agent-based systems
(predictive measures, quality,
performance, etc.)
Agent based testing
Agent infrastructure, APIs, learning, self-organizing
systems, etc.
far@ucalgary.ca 54
Conclusions
Agents are Software++ not alternatives
Interaction and decision making are at the
core of agent system research
Much must be done on agent-based
software development
far@ucalgary.ca 55
Questions?
far@ucalgary.ca 56