UN FRAMEWORK AD AGENTI

Download Report

Transcript UN FRAMEWORK AD AGENTI

An Agent Programming
Framework Based on
the C# Language and the CLI
A. Grosso, A. Gozzi, M. Coccoli, A. Boccalatte
University of Genova, DIST
07 – 02 – 2003
Agent Service
Goals
• To provide a software infrastructure able to offer efficient
solution to the common problems which we have to face
programming multi-agent systems
 Definition of the agent model and its implementation
 Realization of the agent platform (AgentService)
- Reliability
- Security
- Interoperability
- Performance
- Scalability
2
Alberto Grosso 07 - 02 - 2003
Agent Service
Contents
• Software agents and their applications
• State of the art in agent programming
• The Agent Service platform project
– Framework architecture
– The agent model, scheduling and agent
persistence
– Comunication services
• Conclusions
3
Alberto Grosso 07 - 02 - 2003
Agent Service
Contents
•
•
•
•
Software agents and their applications
State of the art in agent programming
The Agent Service platform project
Conclusions
4
Alberto Grosso 07 - 02 - 2003
Agent Service
Software agents and their applications
• Agent
– Autonomous entity having:
 Intelligence
 Reactivity
 Pro-activeness
 Multi-behaviour
5
Alberto Grosso 07 - 02 - 2003
Agent Service
Software agents and their applications
• Multi–agent system
– Agent community where agents interact
in order to meet its designed objectives
 Comunication and location
 Cooperation
 Competition
 Negotiation
6
Alberto Grosso 07 - 02 - 2003
Agent Service
Software agents and their applications
• Agent system applications
– Problems dealing with distributed and concurrent
systems
 Electronic commerce and electronic markets
 Real time monitoring and management of
telecommunication networks
 Information handling in information environments like
the Internet
 Improving the flow of urban or air traffic
 Optimization of industrial manufacturing and
production processes
7
Alberto Grosso 07 - 02 - 2003
Agent Service
Contents
•
•
•
•
Software agents and their applications
State of the art in agent programming
The Agent Service platform project
Conclusions
8
Alberto Grosso 07 - 02 - 2003
Agent Service
The state of art in agent programming
• Dealing with agent oriented programming
– Agent community management
Concurrent contest (scheduling,
synchronization)
Location and communication
Persistence
9
Alberto Grosso 07 - 02 - 2003
Agent Service
The state of art in agent programming
• FIPA
– The Foundation for Intelligent Physical Agents
– FIPA was formed in 1996 to produce software
standards for heterogeneous and interacting
agents and agent-based systems
– The aim is to provide standard strategies for
agent communication, referring to industrial and
commercial world
10
Alberto Grosso 07 - 02 - 2003
Agent Service
The state of art in agent programming
• What does FIPA standardize?
 The platform architecture
 Agent communication
 Message structure
 Message exchange interaction protocols
 Content language (ACL)
11
Alberto Grosso 07 - 02 - 2003
Agent Service
The state of art in agent programming
• Existing platform
 Designing tools
 Agent Tool, Jive, Zeus
 Services and developing libraries
 FIPA – OS, Jade, Open Cybele, Zeus
12
Alberto Grosso 07 - 02 - 2003
Agent Service
Schema of analyzed frameworks
Characteristics
AgentTool
FIPA-OS
JADE
JiVE
OpenCybele
Zeus
Developing tools
Yes
In part
No
Yes
No
Yes
Library
Very limited
Good
Good
Limited
Quite good
Good
Runtime tools
No
Yes
Yes
No
No
Yes
Java version
1.3
1.2
1.2
1.2/1.1
1.3
1.2
FIPA-compliant
No
Yes
Yes
In part
No
Yes
Methodology
MaSE
No one
No one
JAFMAS
ACP
Role-Modelling
Coordinator agent
No
AMS,DF,ACC
AMS,DF,ACC
No
No
AMS,DF,ACC
Documentation
Quite good
Good
Good
Quite good
Good
Quite good
Comunication technics
Direct
Direct
Direct
Direct
Direct
Direct
Communication language
Own
FIPA-ACL
FIPA-ACL
FIPA-ACL
KQML
Java objects
FIPA-ACL
KQML
Multi-agent in one JVM
No
Yes
Yes
No
Yes
Only ZSH vers.
13
Alberto Grosso 07 - 02 - 2003
Agent Service
The state of art in agent programming
• Existing frameworks are realized in Java
 Reliability, security, authentication, transactions …
 Integration at project level with other
software components
• J2EE
14
Alberto Grosso 07 - 02 - 2003
Agent Service
The .NET choice
•
•
•
•
•
•
Work with all Microsoft product family
Deal with a new technology
.NET Framework
ECMA Standard
Rotor project
Common Language Runtime
– Automatic memory management, threading system,
security, type safety
– Application domain
15
Alberto Grosso 07 - 02 - 2003
Agent Service
Contents
•
•
•
•
Software agents and their applications
State of the art in agent programming
The Agent Service platform project
Conclusions
16
Alberto Grosso 07 - 02 - 2003
Agent Service
The Agent Service platform project
•
•
•
•
•
Platform architecture
The agent model
Scheduling of agent activity
Agent Service library
Communication services
17
Alberto Grosso 07 - 02 - 2003
Agent Service
Platform architecture
Agent
Management
System
Agent
Message
Transport
Directory
Facilitator
System
 FIPA compliant
18
Alberto Grosso 07 - 02 - 2003
Agent Service
The service components
• AMS
–
–
–
–
Active agents management
Scheduling of agent activities
Platform services supervision
White pages services
• DF
– Agent location
– Yellow pages service
• MTS
– Agent communication
19
Alberto Grosso 07 - 02 - 2003
Agent Service
The agent model
• Isolation
– Agent autonomy
• Concurrent behaviour
– Agents are multi-behaviour
• Functionality
– Agent state management
– Ability to access platform services
– Interactions with external components not agent
base (ex. DBMS)
20
Alberto Grosso 07 - 02 - 2003
Agent Service
Scheduling
• Agent – process
– Complete isolation
– Limit activating/suspending agents, interacting with
external software components, scalability
• Agent – thread
– Easy to manage interactions, synchronization,
scalability
– No isolation (possible data structure shared among
agents, same address space memory)
– Security problems (authentication)
21
Alberto Grosso 07 - 02 - 2003
Agent Service
Scheduling
• Agent – single thread
- Easy management
- No real concurrent environment: a behaviour could
stop all the agent activity
• Agent – multi thread
- Concurrent behaviours
- Synchronization
22
Alberto Grosso 07 - 02 - 2003
Agent Service
.NET Scheduling
• Application Domain
– CLR provide multiple application execution within
the same process
– Mini process of CLR
– Provide execution boundaries for data and type
isolation
23
Alberto Grosso 07 - 02 - 2003
Agent Service
.NET Scheduling
• Application Domain
– Direct access to an object from a different
Application Domain denied
– Authentication
– Library for creation and control
 Intra-process but they ensure isolation
24
Alberto Grosso 07 - 02 - 2003
Agent Service
AgentService-Agent
• Knowledge
AGENT
KNOWLEDGE
BEHAVIOUR
– Shared data structure
– Concurrent and transactional
access
– Deadlock avoidance
– Persistence
• Behaviour
– Agent activity
– Concurrent execution
– Controlled access to the
Knowledge
– Access to AMS, DF and MTS
services
25
Alberto Grosso 07 - 02 - 2003
Agent Service
AgentService-Agent
• AgentTemplate
Agent
-agentReference
-platformServices
-scheduler
AgentTemplate
-knowledges
-behaviours
– Data and knowledge definition
– Behaviour definition
• Agent
– Behaviour scheduling
– Knowledge management
– Registration and management of
the DF and AMS services
– Registration and control of the
MTS communication service
26
Alberto Grosso 07 - 02 - 2003
Agent Service
Agent implementation
Knowledge
Behaviour
-itemList
AgentTemplate
+AddItem()
+Body()
-behaviourList
-knowledgeList
+Inizialize()
+Ending()
MyBehaviour
MyKnowledge
-knowledgeItem
MyAgent
-know1
-behav1
-attributes
+Inizialize()
+Ending()
+Methods()
+Constructor()
-knowledge
-attributes
+Body()
+Methods()
27
Alberto Grosso 07 - 02 - 2003
Agent Service
Examples: Knowledge
// my knowledge class
class Knowledge1:Knowledge
{
// constructor
public Knowledge1(string knowledgeId,object
istance1):base(id)
{
MyClass istance2 = new MyClass();
AddItem("itemIdentifier1",itemType1,istance1);
AddItem("itemIdentifier2",itemType2,istance2);
}
}// end class definition
Inherit from the abstract class Knowledge
knowledgeItem definitions
28
Alberto Grosso 07 - 02 - 2003
Agent Service
Examples: Behaviour
// my behaviour class
Inherit from the abstract
class MyBehaviour:Behaviour
{
Knowledge1 myknowledge1;
Knowledge2 myknowledge2;
// constructor
public MyBehaviour(string behaviourId, Knownowledge1 k1,
Knowledge2 k2):base(id)
{
myknowledge1 = k1;
Knowledge assignment
myknowledge2 = k2;
}
// developers must override
Behaviour Entry point
public override void Body()
{
// algorithm implementation
// defining the behaviour’s activity
}
} //end class definition
class Behaviour
29
Alberto Grosso 07 - 02 - 2003
Agent Service
Examples: knowledge access
public override void Body()
Deadlock
{
......
LockKnowledge(myknowledge1,myknowledge2,...);
string name =
(string)myknowledge1.GetItemIstance("itemIdentifie
r");
name = "Alberto";
CommitChange(myknowledge1,"itemIdentifier",name
);
ReleaseKnowledge();
......
}
avoidance
30
Alberto Grosso 07 - 02 - 2003
Agent Service
Examples: Agent
// my agent class
Inherit from the abstract class AgentTempla
public class MyAgent : AgentTemplate
{
public MyAgent():base(){}
// developers must override
Behaviour and Knowledge
public override void Inizialize(object o)
{
Knowledge1 k1 = new Knowledge1("knowledge1Identifier", “value");
AddKnowledge(k1);
MyBehaviour b = new MyBehaviour("BehaviourId",k1);
AddBehaviour(b);
}
// developers must override
public override void End()
Invoke before terminating
{
Console.WriteLine("Agent terminated");
}
}// end class definition MyAgent
31
Alberto Grosso 07 - 02 - 2003
Agent Service
Agent activation process
PLATFORM
AGENT
AMS
DF
Agent Instance
Related Data Structures
Related Assemblies
AgentTemplate
Assembly
Agent’s
Application Domain
32
Alberto Grosso 07 - 02 - 2003
Agent Service
Persistence
• Preserve platform
state
- Configuration
- Agent state
- Knowledge
• Object Spaces
(available in Technical Preview)
– Deal with data as objects
– Abstraction of DataSet
from Xml/DB
– Limitation
• Xml serialization
• Binary serialization
33
Alberto Grosso 07 - 02 - 2003
Agent Service
Directory Facilitator
DF
Agent
Active Directory
• Register, modify and
delete the agent
service description
• Search
• Active Directory
customization
– Platform
– Agent
Agents
Agent
Service
• Wrapper (DF)
34
Alberto Grosso 07 - 02 - 2003
Agent Service
Message Transport Service
• Message exchange and
message filter
• Message structure
– Envelope (standard FIPA)
– Body (object list)
• Agent
– In box queue
– Conversation Manager
• Wrapper (MTS)
35
Alberto Grosso 07 - 02 - 2003
Agent Service
Contents
•
•
•
•
Software agents and their applications
State of the art in agent programming
The Agent Service platform project
Conclusions
36
Alberto Grosso 07 - 02 - 2003
Agent Service
Conclusions
•
•
•
•
•
New agent model
New software agent vision
New scheduling model
Agent persistence
Directory and communication
services
37
Alberto Grosso 07 - 02 - 2003