No Slide Title

Download Report

Transcript No Slide Title

Multi-Agent Systems
University “Politehnica” of Bucarest
Spring 2010
http://turing.cs.pub.ro/mas_10
curs.cs.pub.ro
JADE - A FIPA-Compliant
Java Agent Development
Framework
Outline
• FIPA Specifications
• The JADE Platform
• Jade In Action - Demo
• 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 ABC
Agent-name: ABC
Locator:
Transport-type
Transport-specific-address Transport-specific-property
HTTP
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])
(source: [1])
• FIPA Agent Communication specifications deal with Agent Communication
• Specifications
• ACL Message Structure - specifies the elements of the FIPA-ACL message
the 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
(2/3)
(source: [1])
Interaction Protocols
(3/3)
(source:
(source:[1])
[1])
(source: [1])
• FIPA Communicative Act (CA) specifications deal with different utterances for ACL
messages.
• Specifications
• Communicative Act Library
FIPA Communicative Acts:
Accept Proposal
Confirm
Inform If
Propose
Refuse
Request Whenever
Andrei Dancus
Agree
Disconfirm
Inform Ref
Proxy
Reject Proposal
Subscribe
Cancel
Failure
Not Understood
Query If
Request
Call for Proposal
Inform
Propagate
Query Ref
Request When
(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
FIPA SL
Content = "(" ContentExpression+ ")".
ContentExpression
= IdentifyingExpression
| ActionExpression
| Proposition.
Proposition
= Wff.
Wff
= AtomicFormula
| "(" UnaryLogicalOp Wff ")"
| "(" BinaryLogicalOp Wff Wff ")"
| "(" Quantifier Variable Wff ")"
not in SL2
| "(" ModalOp Agent Wff ")"
| "(" ActionOp ActionExpression ")"
| "(" ActionOp ActionExpression Wff ")".
…
Quantifier
ModalOp
ActionOp
…
IdentifyingExpression
ReferentialOperator
…
ActionExpression
…
= "forall” | "exists”
= "B” | "U” | "PG” | "I".
= "feasible” | "done".
= "(" ReferentialOperator Term Wff ")".
= "iota” | "any” | "all".
= "(" "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
(source: [1])
• FIPA Agent Management specifications deal with the control and management of
agents within and across agent platforms.
• Specifications
• Agent Management
• Agent Support for Mobility
• 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 Management
(source: [1])
Agent 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:
(source: [1])
Simple Mobility Protocol
• mobility supported by the AP
• simple agent development
Full Mobility Protocol
• agent has enhanced control of the mobility
operations
• more secure (?)
Agent Support for Mobility
(cont.)
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
(source: [1])
• 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
• 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
(source: [1])
• 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
JADE
• 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)
(FIPA-compliant AP)
• 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
JADE 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 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 containercreates/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 calls
1. Update cache from Global Agent Descriptor Table
2. 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 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-perbehavior 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])
JADE Demo
References
[1] FIPA Specifications - available at http://www.fipa.org/specifications
all documents below are available at http://sharon.cselt.it/projects/jade/
[2] F.Bellllifemine at al., JADE - A FIPA-compliant agent framework in
Proceedings of PAAM99, London, April 1999, pg.97-108
[3] Jade Programmer's Guide for JADE2.5, Feb.4th, 2002
[4] Jade Administrator's Guide for JADE2.5, Jan.22nd, 2002
[5] M.Laukkanen (Sonera Ltd.), Evaluation of JADE 1.2