jade学习系列之一

做服务发现还是服务组合,目前用agent还是很火的。好些日子之前把agent下载了,今天开始对它的研究。刚开始在网上找了些资料,开始。

http://jade.tilab.com/jade是基于java的开源的多agent开发平台

FIPA(Foundation for Intelligent Physical Agents)

FIPA是由来自多个国家的活跃于Agent领域的大学和公司组成的非盈利组织,其宗旨是:“促进基于Agent的应用,业务和设备的成功。” 

   FIPA规范从不同方面规定或建议了Agent在体系结构,通信,移动,知识表达,管理和安全等方面的内容,对于Agent技术起到了很大的推动,其中Agent管理,ACL,Agent安全管理和Agent移动管理与移动技术关系较紧密。

jade在此规范基础上开始

 

What is JADE?

JADE (Java Agent DEvelopment Framework) is a software framework to develop agent-based applications in compliance with the FIPA specifications for interoperable intelligent multi-agent systems. The goal is to simplify the development while ensuring standard compliance through a comprehensive set of system services and agents. JADE can then be considered an agent middle-ware that implements an Agent Platform and a development framework. It deals with all those aspects that are not peculiar of the agent internals and that are independent of the applications, such as message transport, encoding and parsing, or agent life-cycle.
The version 2.X of the JADE framework complies with the latest FIPA specs, also called FIPA2000 specs. The agent platform includes all those mandatory components that manage the platform, that is the ACC, the AMS, and the DF. All agent communication is performed through message passing, where FIPA ACL is the language to represent messages.
The version 1.X of the JADE framework, instead, complies with FIPA97 version 1.2 specifications.

Can anybody tell me which is the best materials for a beginner and how can I get the materials?

A possible sequence of readings for a JADE beginner is the following:
1. Introduction to JADE
2. Introduction to JADE,
3. Programming with JADE,
4. Tutorial for beginners,
5. JADE Programmer's Guide,
6. JADE Administrator's Guide,
Finally, take a look at all the documentation available on-line and select the most useful to your needs, there are also several links to material for beginners written by other colleagues.

What is LEAP and what are its relationships with JADE?

LEAP is the name of the European IST project that has developed the LEAP libraries. These libraries, combined with the JADE platform, provide a run-time environment (that we like to call JADEpL - JADE powered by LEAP) with reduced footprint and suitable for mobile lightweight Java environments down to J2ME-CLDC. The LEAP site provides instructions on how to integrate these libraries with the JADE platform. JADEpL provides the same set of APIs of JADE and therefore users can continue using JADE in the PC-environment and later seamless deploy their application code onto a wide range of Java-enabled mobile devices.

What is an agent?

JADE is absolutely neutral in respect to a definition of an agent. The interested reader should refer to more appropriate scientific sources. JADE conceptualizes an agent as an independent and autonomous process that has an identity, possibly persistent, and that requires communication (e.g. collaboration or competition) with other agents in order to fulfill its tasks. This communication is implemented through asynchronous message passing and by using an Agent Communication Language with a well-defined and commonly agreed semantics.

What is FIPA?

The Foundation for Intelligent Physical Agents ( FIPA) is a not-for-profit association registered in Geneva, Switzerland. Its purpose is the promotion of the success of emerging agent-based applications, services and equipment. This goal is pursued by making available in a timely manner, internationally agreed specifications that maximize interoperability across agent-based applications, services and equipment. This is realized through the open international collaboration of member organizations, which are companies and universities active in the agent field. FIPA's specifications are public available. They are not a technology for a specific application, but generic technologies for different application areas, and not just independent technologies but a set of basic technologies that can be integrated by developers to make complex systems with a high degree of interoperability.
JADE implements all those basic FIPA specifications that provide the normative framework within which FIPA agents can exist, operate, and communicate.

What is agent communication?

Communication is necessary in order to allow collaboration, negotiation, cooperation, etc... between independent entities. For this purpose, it requires a well-defined, agreed and commonly understood semantics. Therefore, there cannot be any interoperability without standards.
Agent communication is based on message passing, where agents communicate by formulating and sending individual messages to each other. The FIPA ACL specifies a standard message language by setting out the encoding, semantics and pragmatics of the messages. The standard does not set out a specific mechanism for the internal transportation of messages. Instead, since different agents might run on different platforms and use different networking technologies, FIPA just specifies how transporting and encoding the messages between different remote platforms. The syntax of the ACL is very close to the KQML communication language.

Which software architecture is JADE based on?

The software architecture is based on the coexistence of several Java Virtual Machines (VM) and communication relies on Java RMI (Remote Method Invocation) between different VMs, event signaling within a single VM, and IIOP between different agent platforms. Each VM is a basic container of agents that provides a complete runtime environment for agent execution and allows several agents to concurrently execute on the same host.

How do JADE agents send a message?

From the point of view of the programmer, it is just a single method call ( send()).
However, the internals of JADE select the most appropriate transport protocol for each different situation:
- If the receiver agent lives on the same agent container, the Java object representing the ACL message is passed to the receiver by using an event object, without any message translation.
- If the receiver agent lives on the same JADE platform but within a different container, the ACL message is sent by using Java Remote Method Invocation. Java RMI allows transparent object marshaling and unmarshaling, avoiding tedious message conversions. Apart from performance, the agent receives a Java object, just like intra-container messaging.
- If the receiver lives on a different agent platform, the IIOP protocol and OMG IDL interface are used, according to the FIPA standard. This involves translating ACL message object into a character string and then performing a remote invocation using IIOP as middleware protocol. On receiver side, an IIOP unmarshaling will occur, yielding a Java String object, which will be parsed into an ACLMessage object. Eventually, the Java object will be dispatched to the receiver agent (via Java events or RMI calls).

How the agent platform can be controlled?

The agent platform provides a Graphical User Interface (GUI) for the remote management,  monitoring and controlling of the status of agents, allowing, for example, to stop and restart agents. The GUI allows also to create and start the execution of an agent on a remote host, provided that an agent container is already running. The GUI itself has been implemented as an agent, called RMA (Remote Monitoring Agent). All the communication between agents and this GUI and all the communication between this GUI and the AMS is done through ACL via an ad-hoc extension of the Fipa-agent-management ontology.

Are JADE agents intelligent?

JADE alone does not endow agents with specific capabilities beyond those needed for communication and interaction. However, the behavior abstraction of our agent model allows simple integration of external software into one of the agent tasks. The provided library includes a behavior that allows the usage of JESS as the agent-reasoning engine. An implementation practice that we have found useful is the usage of JESS to control the activation and deactivation of the JADE Behaviors by implementing, as a consequence, a mixed reactive-deliberative agent architecture (where JESS plays the deliberative role and the JADE behaviors play the reactive role).

Which programming languages can be used?

Jade has been completely implemented in Java. Its capabilities can only be fully exploited by using the Java programming language. However, a special agent, called JessAgent, is provided that allows programmers to use just the JESS language without writing any line of Java code.
JESS is an expert system shell that supports rule-based code with the same style of CLIPS.
A user wishing to use JessAgent must before download JESS.
Some users have also reported on the mailing list experiences in using JADE from Prolog.

What are the system requirements to run JADE?

The minimal system requirement is the JDK 1.2 Runtime or later.

What features does JADE offer?

JADE offers the following list of features to the agent programmer:
- FIPA-compliant Agent Platform, which includes the AMS (Agent Management System), the DF (Directory Facilitator), and the ACC (Agent Communication Channel), all automatically activated at the agent platform startup;
- distributed agent platform. The agent platform can be split on several hosts (provided that there is no firewall between them). Only one Java application, and therefore only one Java Virtual Machine, is executed on each host. Agents are implemented as one Java thread and Java events are used for effective and lightweight communication between agents on the same host. Parallel tasks can be still executed by one agent, and JADE schedules these tasks in an efficient way;
- a number of FIPA-compliant DFs (Directory Facilitator) can be launched and federated;
- programming interface to simplify registration of agent services with one, or more, domains (i.e. DF);
- transport mechanism and interface to send/receive messages to/from other agents;
- FIPA-compliant MTPs (Message Transport Protocol) to connect different agent platforms;
- lightweight transport of ACL messages inside the same agent platform, as messages are transferred encoded as Java objects, rather than strings, in order to avoid marshaling and unmarshaling procedures. When sender or receiver do not belong to the same platform, the message is automatically converted to /from the FIPA compliant string format. In this way, this conversion is hidden to the agent programmers that only need to deal with the same class of Java object;
- library of FIPA interaction protocols ready to be used;
- automatic registration of agents with the AMS;
- FIPA-compliant naming service: at startup agents obtain their GUID (Globally Unique Identifier) from the platform;
- graphical user interface to remotely manage the life-cycle of agents and agent containers.
- graphical tools for debugging the multi-agent system, like the dummy agent to send/receive ACL messages and the sniffer agent to monitor the ongoing communication between several agents.

Does JADE include graphical tools?

The JADE distribution includesa set of graphical tools to support the debugging and platform administration phase:
- Remote Monitoring Agent (RMA), a tool to monitor and administer the status of all the components of the distributed platform, including agents and containers. The life-cycle of agents can also be controlled by the RMA as well as the connection with remote platforms and the installation of Message Transport Protocols. The RMA is therefore a kind of console of the system and it provides buttons to launch all the other graphical tools.
- Sniffer Agent, a tool to sniff message exchange between agents. This tool is useful to debug a conversation between agents. It allows also to save the conversation to a file and load from a file.
- Introspector Agent, a tool to debug a specific agent. This tool allows to introspect the message queues (incoming and outgoing messages) and the agent tasks (the behavior according to the JADE abstraction). The tool allows also to control the execution of the agent, in particular stopping and executing slowly or step-by-step.
- Dummy Agent, a tool to compose custom messages to send and display the received messages. Messages can also be saved to a file and loaded from a file. The tool allows to simulate by hand the communicative behavior of an agent.
- Directory Facilitator (DF), the graphical console of the FIPA DF, the yellow page component of the system. This console allows to register/deregister/modify/search for agents and services, it allows also to federate the DF with other DF's and to propagate searches to the federated DFs.
- DFFederatorAgent. This tool is only available in the misc add-on and it supports the administrator in creating a network of federated DFs.
A shell that allows skilled programmers to create more and more tools (such as logging exchanged messages and platform events into a DataBase for later statistical analysis) is also available.

java -Djava.ext.dirs=lib MyClass 

1运行,自己一向不喜欢手动将jar设置到classpath,如果很多歌东西那我的classpath不是很麻烦。呵呵

cmd ---JADE-all-3.6.1\JADE-bin-3.6.1\jade在这个目录下,看到有个lib文件夹,应该是将里面的jar添加到classpath中,如果添加了则用下面的命令即可:java jade.Boot -gui。我没有添加则在运行时手动加上jar包:java –jar lib\jade.jar -gui  不知道为什么本来想用

java -Djava.ext.dirs=lib这个不行看样子自己对这个的理解还是不行啊。控制台输出:

----------------------------------------
2009-6-19 10:44:50 jade.core.BaseService init
信息: Service jade.core.management.AgentManagement initial
2009-6-19 10:44:50 jade.core.BaseService init
信息: Service jade.core.messaging.Messaging initialized
2009-6-19 10:44:50 jade.core.BaseService init
信息: Service jade.core.mobility.AgentMobility initialized
2009-6-19 10:44:50 jade.core.BaseService init
信息: Service jade.core.event.Notification initialized
2009-6-19 10:44:50 jade.core.messaging.MessagingService cl
信息: Clearing cache
2009-6-19 10:44:50 jade.mtp.http.HTTPServer <init>
信息: HTTP-MTP Using XML parser com.sun.org.apache.xerces.
rImpl$JAXPSAXParser
2009-6-19 10:44:50 jade.core.messaging.MessagingService bo
信息: MTP addresses:
http://miao:7778/acc
2009-6-19 10:44:50 jade.core.AgentContainerImpl joinPlatfo
信息: --------------------------------------
Agent container Main-Container@miao is ready.
--------------------------------------------

界面:

2009061911040575.jpg

转载于:https://www.cnblogs.com/zhxiaomiao/archive/2009/06/19/1506469.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值