Upload
nikita
View
34
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Agent Platforms etc. Martin Beer, School of Computing & Management Sciences, Sheffield Hallam University, Sheffield, United Kingdom [email protected]. Overview. Computational organization theories Organizational dimensions Agent platforms JADE and FIPA FIPA Specifications - PowerPoint PPT Presentation
Citation preview
Agent Platforms etc
Martin Beer,
School of Computing & Management Sciences,
Sheffield Hallam University, Sheffield,
United Kingdom
Overview
• Computational organization theories
• Organizational dimensions
• Agent platforms
• JADE and FIPA– FIPA Specifications– The JADE Platform– Jade In Action - Demo
3
MAS organizational MAS organizational dimensionsdimensions
(a) Structure(a) Structure• Centralized versus decentralized• Flat versus hierarchical
4
Structure
Centralized Decentralized
Group Team Hierarchy
Communityof practice
Market Federation
Coalition
Cooperative Self-interested
(b) Dynamics(b) DynamicsCoupling/relationships and roles• Fixed coupling• Variable coupling• Evolutionary coupling
(c) Degree of specialization and of redundancy(c) Degree of specialization and of redundancy• Non-redundant, specialized organization
- every agent Ai knows to carry out task Ti
• Non-redundant, generalist organization
- every agent Ai knows to carry out tasks T1i..Tmi
i
• Redundant, specialized organization
- group of agents Gai know to carry out task Ti
• Redundant, generalist organization
- group of agents Gai know to carry out tasks Ti1...Tim5
Solve problems using agent and MAS technology
• Analysis• Design• Implementation• Test• Maintenance
Methodologies• Agent-oriented software engineering (see next
class)
MAS platforms and languages6
Agent platformsAgent platforms
Agents must have a support for the tasks they are required to do
• distributed execution• communication• sense the environment
7
Agent application (Client)
Middleware
Operation system
Transport layer
Network
Other agentapplications
Environment
Agentplatforms
Fat client + thin middleware vs
Thin client + fat middeware
• FIPA Abstract Architecture specifications deal with the abstract entities that are required to build agent services and an agent environment
• Specifications
• Abstract Architecture - focus on interoperability
• Domains and Policies - enforce constraints on the behavior of agents within agent environments
- encoding- non-local access- QoS (encryption, non-repudiation)- number of agents- system resources
(source: [1])
Directory entry for ABCAgent-name: ABCLocator:Transport-type Transport-specific-address Transport-specific-propertyHTTP http://www.whiz.net/abc (none)SMTP [email protected] (none)Agent-attributes: Attrib-1: yes
Attrib-2: yellow Language: French, German, English Preferred negotiation: contract-net
(source: [1])
• FIPA Agent Communication specifications deal with Agent Communication • Specifications
• ACL Message Structure - specifies the elements of the FIPA-ACL messagethe elements are:
- performative- sender, receiver, reply-to
- content- language, encoding, ontology- protocol, conversation-id, reply-with, in-reply-to, reply-by
(source: [1])
• FIPA Interaction Protocols (IPs) specifications deal with pre-agreed message exchange protocols for ACL messages. A FIPA ACL-compliant agent need not implement any of the standard IPs, nor is it restricted from using other IP names. However, if one of the standard IP names is used, the agent must behave consistently with the IP specification given here.
• Specifications• Interaction Protocol Library• Request Interaction Protocol• Query Interaction Protocol• Contract Net Interaction Protocol• Iterated Contract Net Interaction Protocol• English Auction Interaction Protocol• Dutch Auction Interaction Protocol• Brokering Interaction Protocol• Recruiting Interaction Protocol• Propose Interaction Protocol
Interaction Protocols (1/3)
Interaction Protocols (1/3)
(source: [1])
Interaction Protocols(2/3)
Interaction Protocols(2/3)
(source: [1])
(source: [1])
Interaction Protocols(3/3)
Interaction Protocols(3/3)
(source: [1])
• FIPA Communicative Act (CA) specifications deal with different utterances for ACL
messages. • Specifications
• Communicative Act LibraryFIPA Communicative Acts:
Accept Proposal Agree Cancel Call for Proposal
Confirm Disconfirm Failure InformInform If Inform Ref Not Understood PropagatePropose Proxy Query If Query RefRefuse Reject Proposal Request Request
WhenRequest Whenever Subscribe
(source: [1])
• FIPA Content Language (CL) specifications deal with different representations of the content of ACL messages.
• Specifications• Content Language Specification• FIPA-SL (Semantic Language) Content Language
- “a general purpose representation formalism that may be suitable for use in a number of different agent domains”
• FIPA-CCL (Constraint Choice Language) Content Language - intended to enable agent communication for applications that involve exchanges about multiple interrelated choices.
- based on the representation of choice problems as Constraint Satisfaction Problems (CSPs) • FIPA-KIF (Knowledge Interchange Format) Content Language
- goal - to specify KIF as a language for use in the interchange of knowledge among disparate computer systems (created by different programmers, at different times, in different languages...)
• FIPA-RDF (Resource Description Framework) Content Language - RDF framework is based on an entity-relationship model; proposes XML as encoding syntax - FIPA-RDF deals with how objects, propositions and functions can be expressed in RDF
(source: [1])
Content = "(" ContentExpression+ ")".ContentExpression = IdentifyingExpression
| ActionExpression | Proposition.
Proposition = Wff.Wff = AtomicFormula
| "(" UnaryLogicalOp Wff ")"| "(" BinaryLogicalOp Wff Wff ")"| "(" Quantifier Variable Wff ")"| "(" ModalOp Agent Wff ")"| "(" ActionOp ActionExpression ")"| "(" ActionOp ActionExpression Wff ")".
…
Quantifier = "forall” | "exists”ModalOp = "B” | "U” | "PG” | "I".ActionOp = "feasible” | "done".…IdentifyingExpression = "(" ReferentialOperator Term Wff ")".ReferentialOperator = "iota” | "any” | "all".… ActionExpression = "(" "action" Agent Term ")"
……
Reduced Expressivity Subsets of FIPA SL
• SL0 - the minimal subset of FIPA-SL - actions and simple binary propositions
• SL1 - SL0+simple propositional logic
• SL2 - allows FOPL and modal logic - restriction - must be decidable - well-known effective algorithms exist that can derive whether or not an FIPA SL2 Wff is a logical consequence of a set of Wffs
not in SL0
not in SL1
not in SL0, SL1, SL2
not in SL2
FIPA SLFIPA SL
• FIPA Agent Management specifications deal with the control and management of agents within and across agent platforms.
• Specifications• Agent Management• Agent Support for Mobility
(source: [1])
• Directory Facilitator (DF)• provides a yellow pages directory service to agents• an AP can have more than one DF• Operations that DF must support: register, deregister, modify, search
• Agent Management System (AMS) - management of the AP• only one AMS per AP • maintains and controls agent life-cycle • authorization for agents to access MTS• operations that AMS must support: register, deregister, modify, search,
get-description• can instruct the AP to: suspend, terminate, create, execute agent,
resume agent execution, resource management
Agent ManagementAgent Management
(source: [1])
Agent Life CycleAgent Life Cycle
(source: [1])
• FIPA does not mandate a single form of agent mobility but supports a core set of actions that allow flexible and extensible forms of mobility protocols to be supported. Two example protocol abstractions:
Simple Mobility Protocol• mobility supported by the AP
• simple agent development
Full Mobility Protocol• agent has enhanced control of the mobility operations
• more secure (?)
(source: [1])
Agent profiles• different agents have different demands/dependencies
• meta-information of an mobile agent (:profile parameter):• :system
Expresses requirements of the mobile agent system which the mobile agent uses (if any), such as Aglets, Mole, AgentTcl or Voyager
• :language
Expresses requirements of the language in which the mobile agent is written,
such as Java source code, i386 native code or April byte-code • :os
- requirements of the operating system for which the mobile agent was
intended (if any), such as a Solaris SPARC box or a Linux i386 box • Extra dependency information can be stated in the :dependencies parameter of each
profile description
Agent Support for Mobility (cont.)
Agent Support for Mobility (cont.)
• FIPA Agent Message Transport specifications deal with the transport and representation of messages across different network transport protocols, including wireline and wireless environments
• Specifications• Agent Message Transport Service• Messaging Interoperability Service
(source: [1])
• FIPA ACL Message Representation specifications deal
with different representation forms for ACL messages. • Specifications: ACL Message Representation in
• Bit-Efficient • String• XML
• FIPA Envelope Representation specifications deal with different representation forms for ACL message
envelopes. • Specifications Agent Message Transport Envelope Representation in
• Bit-Efficient • XML
• FIPA Agent Message Transport Protocol (MTP) specifications deal with different network transport protocols for delivering ACL messages.
• Specifications Agent Message Transport Protocol for
• IIOP• HTTP• WAP
(source: [1])
• FIPA Application specifications are example application areas in which FIPA agents can be deployed. They represent ontology and service descriptions specifications for a particular domain.
• Specifications• Nomadic Application Support• Agent Software Integration• Personal Travel Assistance• Audio-Visual Entertainment and Broadcasting• Network Management and Provisioning• Message Buffering Service
(source: [1])
JADEJADE
• A Java-based agent development framework
• A combination of two products:
• A FIPA-Compliant Agent Platform
• A package to develop Java agents
• Includes the following agents
• AMS (Agent Management System)
• DF (Directory Facilitator)
• Sniffer
• RMA
• Includes features like:
• library of FIPA interaction protocols
• automatic registration of agents with AMS
• FIPA-compliant naming service
• FIPA-compliant IIOP to connect to different AP-s
• GUI to manage several agents and AP-s
(FIPA-compliant AP)
JADE ArchitectureJADE Architecture
• Each agent lives inside a container
• A container
• is a JVM
• provides a complete runtime environment for agent execution
• allows several agents to run concurrently
• controls the life-cycle of agents (create, suspend, resume, kill)
• deals with communication (dispatches and routes messages)
• Light-weight container provided for agent execution within a web browser
• Special Container - the front-end (FE) container
• it runs the management agents
• it represents the whole platform to the outside world
• The GUI itself is implemented as an agent - Remote Management Agent (RMA)
(source: [2])
Communication SubsystemCommunication Subsystem
• The FE container includes an RMI registry used by other agent containers to join the AP
• The FE container maintains • an Agent Container Table
• an Agent Global Descriptor Table (updated every time a container creates/destroys an agent)
• Each container maintains a cache of other containers’ object references• references are added to cache as messages are sent• Global Descriptor Table lookup for every message is avoided
• Agent containers transparently choose the most efficient available messaging mechanism, according to receiver agent location:
• same container: no remote invocations (clone() is called on ACL message object)
• same AP, different container, cache hit: a single RMI call; ACL message object is serialized/de-serialized by RMI runtime
• same AP, different container, cache miss: two RMI calls1. Update cache from Global Agent Descriptor Table2. Send the message
• different AP (JADE): one IIOP call to remote AP plus the cost of one of the previous cases
• different AP (non-JADE): same as previous
(source: [2])
Agent Execution ModelAgent Execution Model
• Behavior - abstraction used to model the tasks that an agent is able to perform (for instance, multiple simultaneous conversations)
• Agents instantiate behaviors according to their needs and capabilities
• JADE uses the thread-per-agent concurrency model instead of a thread-per-behavior model in order to keep the number of threads small
• Agents extend from the base Agent class which implements a scheduler
• The scheduler carries out a round-robin non-preemptive policy among all behaviors available in the ready queue
• The execution of a Behaviour derived classes ends when the task itself relinquishes control
• Behaviors can be added/removed using Agent’s methods (addBehaviour(Behaviour), removeBehavior(Behavior))
• Developers can use existing behaviors provided by JADE or define their own classes, which need to extend Behavior and implement the abstract methods action() and done()
(source: [2])
newer model
(source: [3])
newer model
(source: [3])
Problem Definition
• It implements a meeting scheduler agent that helps a user in scheduling meetings with other users.
• Contract-Net protocol is used to make a appointment.
Contract-Net Protocol Support in JADE
cfp
proposerefuseNot-understood
acceptreject
cancelinformfailure
Initiator Responder
Initiator: createCfpContent
Responder: handleCfpMessage
Initiator:
handleProposeMessages
handleOtherMessagesResponderhandleAcceptProposalMessagehandleRejectProposalMessage
This Program
• It allows to try and check: • the registration of an agent with the default DF of
the platform; • the registration of an agent with a remote DF
belonging to another platform or, different from the default DF;
• the search within the known DFs for a list of agents and their properties, in particular the list
of MeetingScheduler agents and the name of the user that they represent;
• the usage of the FipaContractNet protocol, both the initiator and responder role.
JADE DemoJADE Demo
ReferencesReferences
1. FIPA Specifications - available at http://www.fipa.org/specifications
The following documents are available at http://sharon.cselt.it/projects/jade/1. F.Bellllifemine at al., JADE - A FIPA-compliant agent framework in
Proceedings of PAAM99, London, April 1999, pg.97-1082. Jade Programmer's Guide for JADE2.5, Feb.4th, 20023. Jade Administrator's Guide for JADE2.5, Jan.22nd, 20024. M.Laukkanen (Sonera Ltd.), Evaluation of JADE 1.2
1. J. Ferber. Multi-agent Systems. An Introduction to Distributed Artificial Intelligence. Addison-Wesley, 1999.
2. K. Carley, L. Gasser. Computational organization theories. In Multiagent Systems - A Modern Approach to Distributed Artficial Intelligence, G. Weiss (Ed.), The MIT Press, 2001, p.299-330.