• No results found

JADE: Java Agent Development Framework What is it? How can I use it?

N/A
N/A
Protected

Academic year: 2021

Share "JADE: Java Agent Development Framework What is it? How can I use it?"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

JADE:

Java Agent Development Framework

What is it? How can I use it?

Based on “Online documentation of Jade”

http://jade.tilab.com/

(2)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Overview

Agent Communication Language

Jade Features

The agent Platform

The Agent Class

Agent communication Language Messages (ACL)

Agent Behaviours

(3)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

3

Communications

Speech Acts

Assertive: true or false

Compromise: future actions speaker

Dictatorial: future actions listener

(4)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

4

Communications

FIPA CAL (Communicative Act Library)

Information

Doing Actions

Negotiation

(5)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

5

Communications

FIPA CAL (Communicative Act Library)

Information

Who offers information

»

Inform

»

confirm

»

disconfirm

»

not understood

Who require information

»

query

(6)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

6

Communications

FIPA CAL (Communicative Act Library)

Doing Actions

Who request

»

request

»

request when

»

request whenever

»

cancel

Who perform

»

agree

»

Refuse

»

failure

(7)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

7

Communications

FIPA CAL (Communicative Act Library)

Negotiation

Who need

»

cfp (call for proposals)

»

accept-proposal

»

reject-proposal

Who cooperate

(8)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

8

Communications

FIPA CAL (Communicative Act Library)

Intermediate

Who need

»

propagate

(9)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

9

Communications

FIPA ACL (Agent Communication Language)

Message Structure

Performative

Sender

Receiver

Content

Language

(10)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

10

Communications

FIPA IPL

(Interaction Protocol Library)

AUML

(Protocol Diagram)

(11)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

11

Communications

FIPA IPL

(Interaction Protocol Library)

AUML

(Protocol Diagram)

(12)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

12

Communications

FIPA IPL

(Interaction Protocol Library)

AUML

(Protocol Diagram)

(13)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

13

Communications

FIPA IPL

(Interaction Protocol Library)

AUML

(Protocol Diagram)

(14)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

14

Communications

FIPA IPL

(Interaction Protocol Library)

AUML

(Protocol Diagram)

(15)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

15

Communications

FIPA IPL

(Interaction Protocol Library)

AUML

(Protocol Diagram)

(16)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

MAS Architecture

16

Communications

FIPA IPL

(Interaction Protocol Library)

AUML

(Protocol Diagram)

(17)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Introduction

What is JADE?

JADE is a middleware for the development and

run-time execution of peer-to-peer applications which are

based on the agents paradigm.

FIPA-compliant agent platform

API : Package to develop Java Agents

It is important to read about FIPA standards

1,

at

least:

Agent Management specifications

Agent Communication Language

ACL Message Structure

(18)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Introduction

JADE Packages

jade.core

implements the kernel of the system:

Agent class, jade.core.behaviours

jade.lang.acl

sub-package is provided to process

Agent Communication Language according to FIPA

jade.content

package contains a set of classes to

support user-defined ontologies and

content-languages.

(19)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Introduction

JADE Packages

jade.domain

package contains all classes that

represent the Agent Management entities defined

by the FIPA standard (

AMS and DF

) and others like

Sniffer and Introspector.

jade.gui

package contains a set of generic classes

useful to create GUIs to the agent Plaftform.

jade.mtp

package contains a Java interface for the

Message Transport Protocol

(20)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Introduction

JADE Packages

jade.proto

is the package that contains classes to

model standard interaction protocols their own.

jade.wrapper

package provides wrappers of the

JADE higher-level functionalities that allows the

usage of JADE as a library, where external Java

applications launch JADE agents and agent

containers

(21)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Introduction

JADE Tools:

Remote Management Agent (RMA)

Dummy Agent

Sniffer Agent

Introspector Agent

DF Agent

Log Agent

SocketProxyAgent

21
(22)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

Agent Platform

(23)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

Agent Platform distributed

(24)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

Agent Class

The computational model of an agent is multitask.

Each functionality/service provided by an agent

should be implemented as one or more

behaviours.

A scheduler, internal to the base Agent class and

hidden to the programmer, automatically

manages the scheduling of behaviours.

(25)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

Agent Life cycle

(26)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

Starting the agent execution

the agent constructor is executed

the agent is given an identifier

AgentName@<hostname>:<port number of the JADE RMI

registry>/JADE

it is registered with the AMS

it is put in the ACTIVE state,

the setup() method is executed

necessary add behaviours

(27)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

Stopping agent execution

doDelete().

takeDown()

can be overridden by the programmers

after the takeDown()method is completed, the agent

will be de-registered and its thread destroyed.

The intended purpose of this method is to perform

application specific cleanup

(28)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

Inter agent communications

Asynchronous message passing

ACLMessage Class

Templates Interaccions Protocols at jade.proto

send()

receive() or blockingReceive()

(29)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

Agents with a graphical user interface (GUI)

Raises some problems.

When JADE is used:

the

thread-per-agent concurrency model

of JADE

agents must work together with the

Swing

concurrency

model

.

(30)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

The agent tasks. Implementing Agent behaviours

Behaviour subclasses

addBehaviour(Behaviour)

removeBehaviour(Behaviour)

action()

done()

block()

30
(31)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Creating multi-agent systems

The agent tasks. Implementing Agent behaviours

(32)

Escuela de Ingeniería de Sistemas y Computación - Universidad del Valle Profesora: Paola J. Rodríguez

Installing Jade

Steps:

Dowload from “Campus Virtual”

unzip into /home/<user>

See

Jade

and

META-INF

new directories

Open: /home/<user>/.bashrc file

Add at the end of the file:

export

CLASSPATH=/home/paolajr/jade/lib/jade.jar:/home/paolajr/jade/li

b/jadeTools.jar:/home/paolajr/jade/lib/http.jar:/home/paolajr/jad

e/lib/iiop.jar:/home/paolajr/jade/lib/commons-codec/commons-codec-1.3.jar:/home/paolajr/jade/classes

export JAVA_HOME=/usr/lib/jvm/java-6-sun/ -this is

http://jade.tilab.com/

References

Related documents

The results indicate that (1) using QR codes to provide additional information on food packaging can increase the purchase intention of consumers; (2) the

I nstead of being assembled by the application/Web server in the main data center, the application/Web server would send the page template and the content fragments to an Akamai

Turning Speed Position Aim Turn Accelerate Decelerate Maintenance Body Lane Traffic Look Plan Connect the dots

Any person using, operating, or driving a vehicle that passes a school bus on the side that children enter and exit when the school bus displays a stopped signal commits

71. The Council is required by the CIPFA Code of Practice to put in place Policies and Practices that assist in the delivery of treasury management activity and help to

Within this integrated IT environment, EMC Symmetrix technology is strategic to meeting the demanding performance and availability requirements of IHA’s growing

This thesis contributes four computational methods for the detection of complex SVs of various types and sizes including HGT events from genomic next-generation sequencing (NGS)

The initial hypothesis by the researchers was that the thinner stroke width provided by Clearview 5W and/or Enhanced E(Mod) would provide higher legibility than E(Mod) based on