agent-based software engineering

advertisement
In the Name of God
Agent-Oriented Software
Engineering
Mohammad Badri
Bio-IT Research Group
(Bioinformatics Research Center)
Advanced Information and Communication Technology Center
Sharif University of Technology
Badri@bioinformatics.ir
www.Bio-IT.org/~badri
Objectives
• To introduce agents and multi-agent systems
• To introduce applications of agent-based systems
• To study the relationship between agents and objects
( object-oriented vs. agent-oriented )
• To introduce agent-oriented Software development
methodologies
Agenda
• Definition
• Why agent-oriented software engineering
– Advantages
– Disadvantages
• Question to be answered by AOSE
• System lifecycle
–
–
–
–
Requirements
Analysis
Design
Implementation
Paradigm Shifts
real world mapping
(abstraction level)
role/goal oriented
object oriented
function oriented
command oriented
agents
C++, Java
3GL, C, Pascal, ...
2GL, Assembler
time
Definition of agents (weak notion)
•
•
•
•
Autonomous
Pro-active
Reactive
Social ability
Definition of agents (strong notion)
•
•
•
•
•
•
Belief
Desire
Intentions
Goals
Knowledge
Obligations
Other possible attributes
•
•
•
•
•
Rationality
Veracity
Mobility
Learning capacity
Cooperativeness
Definition
“encapsulated computer system, situated in some
environment, and capable of flexible autonomous
action in that environment in order to meet its
design objectives”
(Wooldridge)
Relationship between Agents and Objects
• An object encapsulates some state, and has some control over
this state in that it can only be accessed or modified via the
methods that the object provides. Agents encapsulate state in
just the same way.
• However, we also think of agents as encapsulating behavior, in
addition to state. An object does not encapsulate behavior: it has
no control over the execution of methods
• Significant difference is the degree to which agents and objects
are autonomous
Relationship between Agents and Objects-2
• The locus of control with respect to the decision about whether
to execute an action is different. In OO case the decision lies
with the object that invokes the method. In the agent case, the
decision lies with the agent that receives the request.
• Agents exhibit flexible (reactive, pro-active and social)
autonomous behaviour. Objects do not.
• Agents are considered to have their own thread of control and
assumed to be continually active. Objects are assumed to be
quiescent for most of the time and active when required by
another object.
Agents vs. ES
• Personalized
– agents -> different actions
– ES -> same actions
• active, autonomous
– agents - on their own
– ES - passively answer
• adaptive
– agent - learn and change
– ES - remain static
Types of Agents
Agents
Architecture
Deliberative Reactive
Agent
Agent
Functionality
Interface
Agent
Information/
Internet
Agent
Mobility
Mobile
Agent
Stationary
Agent
Building Agents
•
Agent Oriented Programming (e.g. 3APL)
–
•
Close to agent theory, but far from industrial use
Based on Java components (e.g. Jade)
–
•
More robust, but build intelligence yourself in Java
Based on robust infrastructure (e.g. Tryllian ADK)
–
Industry standard systems (robust, efficient, scalable), but no
intelligence
3APL agents (I)
3APL agents (II)
• PROGRAM "patrol_agent.3apl"
• CAPABILITIES:
{ at_east(self) } WalkWest() { NOT at_east(self) ,
at_west(self) } ,
{ at_west(self) } WalkEast() { at_east(self) , NOT
at_west(self) }
• BELIEFBASE:
at_west(self)
• GOALBASE:
patrol()
• RULEBASE:
patrol() ¬ at_east(self) | WalkWest() ; patrol() ,
patrol() ¬ at_west(self) | WalkEast() ; patrol() .
From Agents to Multi-Agent Systems
• Agent communication
• Agent societies
– realise there are other agents
– use other agents for your actions
• Collective plans, goals, etc.
• MAS vs. Autonomous agents
Some General Application Areas: (I)
•
•
•
•
Industrial applications
– manufacturing
– process control
– Air Traffic Control
– telecommunications
– transportation systems
Electronic Commerce
– electronic markets/auctions
– buying agents (e.g. Jango, shopbot, etc.)
Business Process Management
Information Management
– information gathering
– information filtering
Some General Application Areas: (II)
• Medical Applications
– Patient Monitoring
– Healthcare
• E-Learning
– Intelligent Tutoring
Systems
• …
Electronic Data Interchange (EDI)
Purchase order
Purchaser
Supplier
Payment
Business Partners
electronically exchange
trading documents in a
pre-arranged format.
Advantages:
Reduced paperwork,
faster transactions, easy
to automate.
Disadvantages:
Lock-in to small number of
business partners.
Electronic Markets
•Many potential trading
partners meet and negotiate
at an internet site.
•Advantages:
•Very flexible. More
competition, leading to better
deals.
•Disadvantages:
•Not automated, so slower and
more labour-intensive than EDI.
Seller
Buyer
Buyer
Buyer
E-Market
Seller
Seller
Agent-Mediated Electronic Commerce
Agents represent buyers and sellers, and can participate in many
Electronic markets.
Agent
E-Market
Buyer
Auction
Agent
Seller
Advantages: Best of both worlds – Flexible but automated.
Disadvantages: Technology not yet widely accepted.
The Stages of E-Commerce
•
•
•
•
Matchmaking
Negotiation
Contracting
Contract Fulfilment
List of
contacts
Matchmaking
Buyer
Purchase goal Buyer
Agent
Directory
Service
Request
Negotiation
Buyer
Agent
Seller
Agent
Seller
Buyer
A
Auction
A
A
E-Market
A
A
A
Contracting
Contract
Buyer
Agent
Buyer
Seller
Agent
Seller
Contract Fulfilment
Payment
Buyer
Agent
Seller
Agent
Buyer
Service delivery
Seller
General MAS Architecture for
Information Management
User1
Source agent
Userinterface
agent
Profile agent
Information
agent
Source agent
User2
Info
Source1
Userinterface
agent
Source agent
Info
Source2
Info
Source3
The User interface agent
User interface agent
Profile Manager
User
Profile
Agent
Interface
Manager
User
profile
Query handler
Agent-oriented approaches can
significantly enhance our ability to
model, design and build complex
(distributed) software systems
Tackling Complexity
• Decomposition
• Abstraction
• Organization
(Grady Booch)
Complex System
Agent-Based System
Sub-systems
Agent organisations
Sub-system components
Agents
Interactions between subsystems and
sub-system components
“cooperating to achieve
common objectives”
“coordinating their actions”
“negotiating to resolve conflicts”
Relationships between subsystems and sub-system
components
- change over time
- treat collections as single
coherent unit
Explicit mechanisms for
representing &
managing organisational
relationships
Structures for modelling
collectives
Agent-Oriented Software Engineering
• What is it?
– An approach to developing software using
agent-oriented abstractions
• Agents
• High-level interactions
• Organizational relationships
Agent-Based Computing:
A New Synthesis for AI and CS
Why Agent-oriented Software Engineering
(AOSE)?
• Agent-oriented decomposition is an effective way of
partitioning complex problems
• The key abstractions of agent-orientation are a natural
way to model complex systems
• The agent-oriented
– approach to dealing with organizational relationships
is appropriate for complex systems
Agent-oriented Decomposition
• A natural representation for complex systems that are invariably
distributed
• Agents make run-time decisions about the nature and scope of
interactions
– complexity makes it
– impossible to know a
– priori about all potential
– links
– process of managing
– control relationships is
– simplified
• coordination is handled
•
bottom-up
Agent-Oriented Abstraction
• Complex systems can be characterized by subsystems,
interactions, and organizational relationships
– subsystems can be viewed as agents
– interaction between
– subsystems can be
– viewed as high-level social
– interactions
– complex system organization
– must be flexible to meet
– demands of its changing
– environment
Flexible Management of Organizational Structure
• Organizational constructs are first-class entities in
multiagent systems
• Multiagent systems have built in mechanisms for flexibly
forming, maintaining, and disbanding organizations
• Multiagent systems can
•
provide a variety of
•
stable intermediary forms
•
in rapid systems
•
development
Downside to Agent-Oriented Software Engineering
• The patterns and outcomes of interactions
are inherently unpredictable
 Predicting
behavior of the overall
system based on its components is
extremely difficult (and
sometimes impossible)
due to possibility of
emergent behavior
Questions to be Answered AOSE
• An agent-oriented software engineering
methodology must address two levels
– individual agent level
– multiagent level
Individual Agent Questions
• What in the system should become an
agent?
• How will each agent model the
environment?
• How will agents be
•
structured internally?
Multiagent Questions
• How many agents are there?
• What communication mechanisms will the
agents use?
• What communication protocols will the agents
use?
• How will relationships between agents be
established?
• How will agents coordinate their actions?
Agent-Oriented Software Life Cycle
• Requirements specifications for agent
systems
• Requirements Analysis
• Design
• How to implement such systems
• How to verify that implemented systems
satisfy their specifications
Approaches to
Agent-Oriented Analysis and Design
– Object-oriented
• Extend/adapt existing techniques or methodologies
– Knowledge-based systems
• Build on existing modeling techniques from
knowledge engineering
– Formal methods
• Use formal methods & languages such as Z and provide
definitions to support agent systems
– Domain specific
• Focus on a particular type of agent system
Requirements
• Provided by the user
– Often in terms of desired scenarios or
undesired scenarios
– Often ambiguous and contradictory
– Generally insufficient basis for system design
Analysis
• Analyze requirements to determine
– What is the overall desired behavior of the
system
•
•
•
•
•
Main goals of the system
What roles must be played to solve the problem
Resources available to solve the problem
Human interface
requirements
– What can be varied to
– achieve this behavior
– What cannot be varied
Design
• Transform high-level goals and roles into
concrete agent types
– What agents will perform which roles
– Define number and types of agents
• Transform high-level interactions into
specific interaction protocols
– Derived from high-level role
– Interactions
Design (2)
• Define low-level functions of each agent
type to carry out high-level behaviors
– Define ontology used by each agent
Implementation
• If not part of requirements, decide on
– communication mechanism
– communication languages
– content languages
– implementation language
• Transform protocols and
•
low-level behavior into
•
code
Summary
• AOSE methodology must be able to answer
questions about individual as well us
organizational issues
• Agent-oriented software engineering covers
typical software development lifecycle
–
–
–
–
Requirements
Analysis
Design
Implementation
Conclusions
•
•
•
•
Agents are here to stay!
Agents are NOT simple
Difference between theory and implementation
Useful in complex domains:
– Inter-organizational applications
– Internet applications
– Distributed applications
• Agents have a high potential
• Agents are increasingly used in practice
Agent research and practice
• AgentLink: Network of excellence
– Research groups in agents
www.agentlink.org
• Agent Cities: Network for deploying agent
applications www.agentcities.org
• FIPA: foundation for agent standards
www.fipa.org
Thanks for your attention
Mohammad Badri
badri@bioinformatics.ir
Presentation available at
www.Bio-IT.org/~badri/presentation/agent.ppt
Decomposition: Agents
•
In terms of entities that have:
– own persistent thread of control (active: “say go”)
– control over their own destiny (autonomous: “say no”)
• Makes engineering of complex systems easier:
– natural representation of multiple loci of control
• “real systems have no top” (Meyer)
– allows competing (sub-) objectives to be represented
and reconciled in context sensitive fashion
Decomposition: Interactions
• Agents make decisions about nature & scope of
interactions at run time
• Makes engineering of complex systems easier:
– unexpected interaction is expected
• all interactions need not be set at design time
– simplified management of control relationships between
components
• coordination occurs on as-needed basis
between continuously active entities
Suitability of Abstractions
• Design is about right models
• In software, minimise gap between units
of analysis and constructs of solution
paradigm
• OO techniques natural way of modelling
world
Agents Consistent with Trends
in Software Engineering
• Conceptual basis rooted in problem domain
• Increasing localisation and encapsulation
• Greater support for re-use of designs and
programs
– whole sub-system components (cf. design
patterns, component-ware)
• e.g. agent architectures, system structures
– flexible Interactions (cf. application frameworks)
• e.g. contract net protocol, auction protocols
– legacy software
• e.g. place “wrapper” around existing code
to give it agent interface
Agents Support System Development by
Synthesis
• An agent is a stable intermediate form
• able to operate to achieve its objectives
and interact with others in flexible ways
•
construct “system” by bringing agents
together and watching overall functionality
emerge from their interplay
• well suited to developments in:
– open systems (eg Internet)
– e-commerce
3. Flexible Management of Changing
Organisational Structures
• Organisations are first-class entities in agent
systems:
– explicit representations of relationships and
structures
– computational mechanisms for forming,
maintaining and disbanding them
• Makes engineering of complex systems easier:
– primitive component varied according to
observer’s needs
– provide variety of stable intermediate forms
• build up system in incremental fashion
Software Development is getting harder!
Internet applications
Open
Environment’s
Properties
Increasing
demand
Closed
Traditional applications
Static
Dynamic
Download