1 / 50

Introduction of Java Agent Development Environment (JADE)

Introduction of Java Agent Development Environment (JADE). Presented by Po-Cheng Huang. 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

liliha
Download Presentation

Introduction of Java Agent Development Environment (JADE)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction of Java Agent Development Environment (JADE) Presented by Po-Cheng Huang

  2. 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

  3. 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

  4. 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

  5. JADE Platform

  6. Directory Facilitator

  7. 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.

  8. Agent Management System (AMS)

  9. 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

  10. Message Transport System • Agent Communication Channel (ACC) • Agent to Agent • Agent Platform to Agent Platform

  11. Remote Monitoring Agent • Provide the GUI to control agents’ lifecycle

  12. 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

  13. Install JDK 1.5 -- step 1 Web Site downloads

  14. Install JDK 1.5 -- step 2 Select Java SE

  15. Install JDK 1.5 -- step 3 Download

  16. Other Revisions of JDK Next Release Previous Release

  17. JADE Package • JADE-doc • Document • JADE-src • Source Code • JADE-bin • Binary Code • JADE-example • Example Code

  18. Install JADE Platform Library Batch file

  19. Install JADE Platform • Write batch file • run_jade.bat • Include related library • Base64.jar • http.jar • iiop.jar • jade.jar • jadeTools.jar

  20. Batch file to start JADE platform • Set Library Path • set JADE=C:\jade\lib\base64.jar;C:\jade\lib\http.jar;C:\jade\lib\iiop.jar;C:\jade\lib\jade.jar;C:\jade\lib\jadeTools.jar;./; • Execute Command • java -classpath %JADE% jade.Boot -gui Use Java to start jade platform Interface

  21. Run JADE Platform • Run run_jade.bat

  22. Connect Remote JADE Platform

  23. Batch File to Connect the Remote JADE Platform • Set Library Path • set JADE=C:\jade\lib\base64.jar;C:\jade\lib\http.jar;C:\jade\lib\iiop.jar;C:\jade\lib\jade.jar;C:\jade\lib\jadeTools.jar;./; • Set Connection Command • java -classpath %JADE% jade.Boot -gui-container-host 140.116.xxx.xxx Add new containe Destination IP

  24. Connect Remote JADE platform • Execute connect_remote_jade.bat • Connect Remote JADE platform

  25. Example • Book Seller & Book Buyer Seller1 Buyer Seller2

  26. Implement Agent with Eclipse (1) Main Function of JADE

  27. Implement Agent with Eclipse (2) -gui Seller1 : BookSerllerAgent Class Name Agent Name

  28. Implement Agent with Eclipse (3) -gui –container –host localhost Seller2 : BookSerllerAgent Class Name Agent Name

  29. Run Agent on JADE Platform

  30. Observe Agent Communication Language

  31. Agent Communication Language

  32. Agent Communication Language • sender of the message • list of receivers • communicative intention (or “performative”) • content • content language • ontology • some fields

  33. Agent Communication Language • Receiving Messages

  34. An Example of Sender

  35. An Example of Receiver

  36. BookSellerAgent • BookSellerAgent extends Agent • import jade.core.Agent; • Initial process • Setup() • addBehaviour(new InitBeha()) • Agent Behaviour • import jade.core.behaviours.*; • InitBehaextends Behaviour class

  37. BookSellerAgent Setup() • Service Registration • Service Name • Service Type Add Behaviour

  38. BookSellerAgent Takedown() Service deregistration

  39. class Behaviour • This abstract class provides an abstract base class for modelling agent tasks, and it sets the basis for behaviour scheduling as it allows for state transitions (i.e. starting, blocking and restarting a Java behaviour object).

  40. class Behaviour (Cont.) • class SimpleBehaviour • This abstract class models simple atomic behaviours. Its reset() method does nothing by default, but it can be overridden by user defined subclasses. • class OneShotBehaviour • This abstract class models atomic behaviours that must be executed only once and cannot be blocked. So, its done() method always returns true. • class CyclicBehaviour • This abstract class models atomic behaviours that must be executed forever. So its done() method always returns false.

  41. BookSellerAgent OneShotBehaviour()

  42. BookSellerAgent CyclicBehaviour()

  43. class Behaviour (Cont.) • class WakerBehaviour • This abstract class implements a one-shot task that must be executed only once just after a given timeout is elapsed. • class TickerBehaviour • This abstract class implements a cyclic task that must be executed periodically.

  44. class Behaviour (Cont.) • class CompositeBehaviour • This abstract class models behaviours that are made up by composing a number of other behaviours (children). So the actual operations performed by executing this behaviour are not defined in the behaviour itself, but inside its children while the composite behaviour takes only care of children scheduling according to a given policy. • class SequentialBehaviour • This class is a CompositeBehaviour that executes its sub-behaviours sequentially and terminates when all sub-behaviours are done. Use this class when a complex task can be expressed as a sequence of atomic steps (e.g. do some computation, then receive a message, then do some other computation).

  45. class Behaviour (Cont.) • class ParallelBehaviour • This class is a CompositeBehaviour that executes its sub-behaviours concurrently and terminates when a particular condition on its sub-behaviours is met. Proper constants to be indicated in the constructor of this class are provided to create a ParallelBehaviour that ends when all its sub-behaviours are done, when any one among its sub-behaviour terminates or when a user defined number N of its sub-behaviours have finished. Use this class when a complex task can be expressed as a collection of parallel alternative operations, with some kind of termination condition on the spawned subtasks.

  46. class Behaviour (Cont.) • class FSMBehaviour • This class is a CompositeBehaviour that executes its children according to a Finite State Machine defined by the user. More in details each child represents the activity to be performed within a state of the FSM and the user can define the transitions between the states of the FSM. When the child corresponding to state Si completes, its termination value (as returned by the onEnd() method) is used to select the transition to fire and a new state Sj is reached. At next round the child corresponding to Sj will be executed. Some of the children of an FSMBehaviour can be registered as final states. The FSMBehaviour terminates after the completion of one of these children.

  47. Reference • http://www.fipa.org/ • 高師大共同科--楊錦潭、高師大資教所--蕭淳豐,”開發智慧型代理人軟體工程平台初探”

More Related