940 likes | 1.26k Views
Introduction to JADE presenter: Ji-Yu Li. Outline. Introduction Foundation for Intelligent Physical Agents (FIPA) Java Agent Development Environment (JADE) Running JADE Platform Install JDK 1.5 Install JADE Platform Run JADE Platform Run Agent on JADE Platform. Outline. Introduction
E N D
Outline • Introduction • Foundation for Intelligent Physical Agents (FIPA) • Java Agent Development Environment (JADE) • Running JADE Platform • Install JDK 1.5 • Install JADE Platform • Run JADE Platform • Run Agent on JADE Platform
Outline • Introduction • Foundation for Intelligent Physical Agents (FIPA) • Java Agent Development Environment (JADE) • Running JADE Platform • Install JDK 1.5 • Install JADE Platform • Run JADE Platform • Run Agent on JADE Platform
Foundation for Intelligent Physical Agents (FIPA) • IEEE Computer Society standards organization • A body for developing and setting computer software standards for heterogeneous and interacting agents and agent-based systems. • Agent management • Agent communication language (ACL) • Integration agent and other computer software • http://www.fipa.org/ • A software agent • A piece of software that acts for a user or other program in a relationship of agency
Outline • Introduction • Foundation for Intelligent Physical Agents (FIPA) • Java Agent Development Environment (JADE) • Running JADE Platform • Install JDK 1.5 • Install JADE Platform • Run JADE Platform • Run Agent on JADE Platform
JADE • JADE (Java Agent Development Framework) • Framework aimed at developing multi-agent systems and applications conforming to FIPA standards for intelligent agents.
JADE • The agent platform can be split among several hosts. Only one Java application(Main container) is executed on each host.
JADE • Support to the execution of multiple, parallel and concurrent agent activities via the behaviour model.
JADE platform • JADE is a middleware that facilitates the development ofMulti Agent Peer-to-Peer applications. • Full Java • Runs on all JVM from J2EE to J2ME MIDP1.0 • Downloadable from http://jade.tilab.com
Containers and Platforms • Each running instance of the JADE runtime environment is called a Container as it can contain several agents.
Containers and Platforms • The set of active containers is called a Platform.
Containers and Platforms • A single special Main container must always be active in a platform and all other containers register with it as soon as they start.
JADE • Main container
JADE • AMS (Agent Management System) • Provides the naming service and represents the authority in the platform. • DF (Directory Facilitator) • Provides a Yellow Pages service by means of which an agent can find other agents providing the services he requires in order to achieve his goals. • RMA(Remote Management Agent) • Acting as graphical console for platform management and control.
Agent Management System • Provides the naming service • Ensures that each agent in the platform has a unique name • Represents the authority in the platform • To create/kill agents on remote containers by requesting that to the AMS
Directory Facilitator • Provides a Yellow Pages service by means of which an agent can find other agents providing the services he requires in order to achieve his goals.
Remote Monitoring Agent • Provide the GUI to control agents’ lifecycle
Message Transport System • Agent Communication Channel (ACC) • Agent to Agent • Agent Platform to Agent Platform
JADE • Agent identifier • <nickname>@<platform_name> nickname platform_name
Outline • Introduction • Foundation for Intelligent Physical Agents (FIPA) • Java Agent Development Environment (JADE) • Running JADE Platform • Install JDK 1.5 • Install JADE Platform • Run JADE Platform • Run Agent on JADE Platform
Install JDK 1.5 • http://java.sun.com/ • Download J2SE Development Kit (JDK) 1.5 • The Java Runtime Environment (JRE) • Command-line development tools, such as compilers and debuggers, that are necessary or useful for developing applets and applications
Install JDK 1.5 -- step 1 Web Site downloads
Install JDK 1.5 -- step 2 Select Java SE
Install JDK 1.5 -- step 3 Download
Outline • Introduction • Foundation for Intelligent Physical Agents (FIPA) • Java Agent Development Environment (JADE) • Running JADE Platform • Install JDK 1.5 • Install JADE Platform • Run JADE Platform • Run Agent on JADE Platform
JADE http://jade.tilab.com/
JADE Package • JADE-doc • Document • JADE-src • Source Code • JADE-bin • Binary Code • JADE-example • Example Code
Download eclipse • Eclipse - an open development platform • Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. • http://www.eclipse.org/downloads/
Outline • Introduction • Foundation for Intelligent Physical Agents (FIPA) • Java Agent Development Environment (JADE) • Running JADE Platform • Install JDK 1.5 • Install JADE Platform • Run JADE Platform • Run Agent on JADE Platform
2 1 3 jade.Boot
1 -gui 2 3
Outline • Introduction • Foundation for Intelligent Physical Agents (FIPA) • Java Agent Development Environment (JADE) • Running JADE Platform • Install JDK 1.5 • Install JADE Platform • Run JADE Platform • Run Agent on JADE Platform
Implementation • Import jade.core.Agent Library • setup()初始化agent,向 AMS 註冊,此時狀態為ACTIVE • addBehaviour() 加入behaviours到排程佇列,傳入的參數為一個Behaviour class • action() 定義behaviour中的行為 • doDelete()結束此agent
Implementation import jade.core.Agent; import jade.core.behaviours.OneShotBehaviour; public class HelloAgent extends Agent { protected void setup() { addBehaviour(new InitBeha()); } class InitBeha extends OneShotBehaviour { public void action() { System.out.println(“Hello!"); doDelete(); } } }