+ All Categories
Home > Technology > T3 Agent oriented programming languages

T3 Agent oriented programming languages

Date post: 11-May-2015
Category:
Upload: easss-2012
View: 1,506 times
Download: 0 times
Share this document with a friend
Description:
14th European
Popular Tags:
160
AOP
Transcript
Page 1: T3 Agent oriented programming languages

AOP

Page 2: T3 Agent oriented programming languages

Outline

1 AOP: Agent Oriented ProgrammingAbout AOPShortfalls

Trends

JasonIntroduction to JasonReasoning Cycle

Main Language Constructs: Beliefs, Goals, and Plans

Other Language Features

Comparison With Other Paradigms

The Jason PlatformPerspectives: Some Past and Future Projects

Conclusions

Page 3: T3 Agent oriented programming languages

About AOP

Page 4: T3 Agent oriented programming languages

AOP About AOP Jason

Agent Oriented Programming

Use of mentalistic notions and a societal view ofcomputation [Shoham, 1993]

Heavily influence by the BDI architecture and reactiveplanning systems

Various language constructs for the sophisticatedabstractions used in AOSE

Agent: Belief, Goal, Intention, PlanOrganisation: Group, Role, Norm, InteractionsEnvironment: Artifacts, Percepts, Actions

4 / 68

Page 5: T3 Agent oriented programming languages

AOP About AOP Jason

Agent Oriented ProgrammingFeatures

Reacting to events × long-term goalsCourse of actions depends on circumstance

Plan failure (dynamic environments)

Rational behaviour

Social ability

Combination of theoretical and practical reasoning

5 / 68

Page 6: T3 Agent oriented programming languages

AOP About AOP Jason

Literature

Books: [Bordini et al., 2005a], [Bordini et al., 2009]Proceedings: ProMAS, DALT, LADS, ... [Baldoni et al., 2010,

Dastani et al., 2010, Hindriks et al., 2009, Baldoni et al., 2009,

Dastani et al., 2008b, Baldoni et al., 2008, Dastani et al., 2008a,

Bordini et al., 2007a, Baldoni and Endriss, 2006,

Bordini et al., 2006b, Baldoni et al., 2006, Bordini et al., 2005b,

Leite et al., 2005, Dastani et al., 2004, Leite et al., 2004]

Surveys: [Bordini et al., 2006a], [Fisher et al., 2007] ...Languages of historical importance: Agent0 [Shoham, 1993],

AgentSpeak(L) [Rao, 1996],MetateM [Fisher, 2005],3APL [Hindriks et al., 1997],Golog [Giacomo et al., 2000]

Other prominent languages: Jason [Bordini et al., 2007b],Jadex [Pokahr et al., 2005], 2APL [Dastani, 2008],GOAL [Hindriks, 2009], JACK [Winikoff, 2005]

But many others languages and platforms... 6 / 68

Page 7: T3 Agent oriented programming languages

AOP About AOP Jason

Some Languages and Platforms

Jason (Hubner, Bordini, ...); 3APL and 2APL (Dastani, vanRiemsdijk, Meyer, Hindriks, ...); Jadex (Braubach, Pokahr);MetateM (Fisher, Guidini, Hirsch, ...); ConGoLog (Lesperance,Levesque, ... / Boutilier – DTGolog); Teamcore/ MTDP (MilindTambe, ...); IMPACT (Subrahmanian, Kraus, Dix, Eiter); CLAIM(Amal El Fallah-Seghrouchni, ...); GOAL (Hindriks); BRAHMS(Sierhuis, ...); SemantiCore (Blois, ...); STAPLE (Kumar, Cohen,Huber); Go! (Clark, McCabe); Bach (John Lloyd, ...); MINERVA(Leite, ...); SOCS (Torroni, Stathis, Toni, ...); FLUX(Thielscher); JIAC (Hirsch, ...); JADE (Agostino Poggi, ...);JACK (AOS); Agentis (Agentis Software); Jackdaw (CalicoJack); ...

7 / 68

Page 8: T3 Agent oriented programming languages

AOP About AOP Jason

The State of Multi-Agent Programming

Already the right way to implement MAS is to use an AOSEMethodology (Prometheus, Gaia, Tropos, ...) and an MASProgramming Language!

Many agent languages have efficient and stable interpreters— used extensively in teaching

All have some programming tools (IDE, tracing of agents’mental attitudes, tracing of messages exchanged, etc.)

Finally integrating with social aspects of MAS

Growing user base

8 / 68

Page 9: T3 Agent oriented programming languages

AOP About AOP Jason

Some Shortfalls

IDEs and programming tools are still not anywhere near thelevel of OO languages

Debugging is a serious issue — much more than “mindtracing” is needed

Combination with organisational models is very recent —much work still needed

Principles for using declarative goals in practicalprogramming problems still not “textbook”

Large applications and real-world experience much needed!

9 / 68

Page 10: T3 Agent oriented programming languages

AOP About AOP Jason

Some Trends I

Modularity and encapsulation

Debugging MAS is hard: problems of concurrency, simulatedenvironments, emergent behaviour, mental attitudes

Logics for Agent Programming languages

Further work on combining with interaction, environments,and organisations

We need to put everything together: rational agents,environments, organisations, normative systems, reputationsystems, economically inspired techniques, etc.

� Multi-Agent Programming

10 / 68

Page 11: T3 Agent oriented programming languages

AOP About AOP Jason

Research on Multi-Agent Systems...

—Whatever you do in MAS, make it available in aprogramming language/platform for MAS!!!

11 / 68

Page 12: T3 Agent oriented programming languages

Jason

Page 13: T3 Agent oriented programming languages

AOP About AOP Jason

AgentSpeakThe foundational language for Jason

Originally proposed by Rao [Rao, 1996]

Programming language for BDI agents

Elegant notation, based on logic programming

Inspired by PRS (Georgeff & Lansky), dMARS (Kinny), andBDI Logics (Rao & Georgeff)

Abstract programming language aimed at theoretical results

13 / 68

Page 14: T3 Agent oriented programming languages

AOP About AOP Jason

JasonA practical implementation of a variant of AgentSpeak

Jason implements the operational semantics of a variant ofAgentSpeak

Has various extensions aimed at a more practicalprogramming language (e.g. definition of the MAS,communication, ...)

Highly customised to simplify extension andexperimentation

Developed by Jomi F. Hbner and Rafael H. Bordini

14 / 68

Page 15: T3 Agent oriented programming languages

AOP About AOP Jason

Main Language Constructs and Runtime Structures

Beliefs: represent the information available to an agent (e.g.about the environment or other agents)

Goals: represent states of affairs the agent wants to bringabout

Plans: are recipes for action, representing the agent’sknow-how

Events: happen as consequence to changes in the agent’sbeliefs or goals

Intentions: plans instantiated to achieve some goal

15 / 68

Page 16: T3 Agent oriented programming languages

AOP About AOP Jason

Main Architectural Components

Belief base: where beliefs are stored

Set of events: to keep track of events the agent will have tohandle

Plan library: stores all the plans currently known by the agent

Set of Intentions: each intention keeps track of the goals theagent is committed to and the courses of action itchose in order to achieve the goals for one ofvarious foci of attention the agent might have

16 / 68

Page 17: T3 Agent oriented programming languages

AOP About AOP Jason

Jason InterpreterBasic Reasoning cycle

perceive the environment and update belief base

process new messages

select event

select relevant plans

select applicable plans

create/update intention

select intention to execute

17 / 68

Page 18: T3 Agent oriented programming languages

AOP About AOP Jason

Jason Rreasoning Cycle

SI

EventsExternal

EventSelected

SE

Beliefs toAdd and

Delete

RelevantPlans

New PlanPush

IntentionUpdated

OS

ApplicablePlans

MeansIntended

EventsExternal

PlanLibrary

Events

InternalEvents

3

checkMail

Intentions

ExecuteIntention

...NewNew

9

BeliefBase

NewIntention

Percepts

act

SelectedIntention

Intentions

Action

Percepts1 2

BUF

10

Events

ContextCheck

EventUnify

BRF

Beliefs

Agent

sendMsg

Beliefs

8

Messages

Plans

perceive

7

5

6

Actions

Beliefs

Suspended Intentions(Actions and Msgs)

...

.send

SocAcc

4

Messages MessagesSM

18 / 68

Page 19: T3 Agent oriented programming languages

AOP About AOP Jason

Beliefs — Representation

Syntax

Beliefs are represented by annotated literals of first order logic

functor(term1, ..., termn)[annot1, ..., annotm]

Example (belief base of agent Tom)

red(box1)[source(percept)].

friend(bob,alice)[source(bob)].

lier(alice)[source(self),source(bob)].

˜lier(bob)[source(self)].

19 / 68

Page 20: T3 Agent oriented programming languages

AOP About AOP Jason

Beliefs — Dynamics I

by perception

beliefs annotated with source(percept) are automatically updatedaccordingly to the perception of the agent

by intention

the plan operators + and - can be used to add and removebeliefs annotated with source(self) (mental notes)

+lier(alice); // adds lier(alice)[source(self)]

-lier(john); // removes lier(john)[source(self)]

20 / 68

Page 21: T3 Agent oriented programming languages

AOP About AOP Jason

Beliefs — Dynamics II

by communication

when an agent receives a tell message, the content is a new beliefannotated with the sender of the message

.send(tom,tell,lier(alice)); // sent by bob

// adds lier(alice)[source(bob)] in Tom’s BB

...

.send(tom,untell,lier(alice)); // sent by bob

// removes lier(alice)[source(bob)] from Tom’s BB

21 / 68

Page 22: T3 Agent oriented programming languages

AOP About AOP Jason

Goals — Representation

Types of goals

Achievement goal: goal to do

Test goal: goal to know

Syntax

Goals have the same syntax as beliefs, but are prefixed by! (achievement goal) or? (test goal)

Example (Initial goal of agent Tom)

!write(book).

22 / 68

Page 23: T3 Agent oriented programming languages

AOP About AOP Jason

Goals — Dynamics I

by intention

the plan operators ! and ? can be used to add a new goalannotated with source(self)

...

// adds new achievement goal !write(book)[source(self)]

!write(book);

// adds new test goal ?publisher(P)[source(self)]

?publisher(P);

...

23 / 68

Page 24: T3 Agent oriented programming languages

AOP About AOP Jason

Goals — Dynamics II

by communication – achievement goal

when an agent receives an achieve message, the content is a newachievement goal annotated with the sender of the message

.send(tom,achieve,write(book)); // sent by Bob

// adds new goal write(book)[source(bob)] for Tom

...

.send(tom,unachieve,write(book)); // sent by Bob

// removes goal write(book)[source(bob)] for Tom

24 / 68

Page 25: T3 Agent oriented programming languages

AOP About AOP Jason

Goals — Dynamics III

by communication – test goal

when an agent receives an askOne or askAll message, thecontent is a new test goal annotated with the sender of themessage

.send(tom,askOne,published(P),Answer); // sent by Bob

// adds new goal ?publisher(P)[source(bob)] for Tom

// the response of Tom will unify with Answer

25 / 68

Page 26: T3 Agent oriented programming languages

AOP About AOP Jason

Triggering Events — Representation

Events happen as consequence to changes in the agent’sbeliefs or goals

An agent reacts to events by executing plans

Types of plan triggering events

+b (belief addition)-b (belief deletion)+!g (achievement-goal addition)-!g (achievement-goal deletion)+?g (test-goal addition)-?g (test-goal deletion)

26 / 68

Page 27: T3 Agent oriented programming languages

AOP About AOP Jason

Plans — Representation

An AgentSpeak plan has the following general structure:

triggering event : context ¡- body.

where:

the triggering event denotes the events that the plan ismeant to handle

the context represent the circumstances in which the plancan be used

the body is the course of action to be used to handle theevent if the context is believed true at the time a plan isbeing chosen to handle the event

27 / 68

Page 28: T3 Agent oriented programming languages

AOP About AOP Jason

Plans — Operators for Plan Context

Boolean operators

& (and)

| (or)not (not)

= (unification)

>, >= (relational)

<, <= (relational)

== (equals)

\ == (different)

Arithmetic operators

+ (sum)

- (subtraction)

* (multiply)

/ (divide)

div (divide – integer)

mod (remainder)

** (power)

28 / 68

Page 29: T3 Agent oriented programming languages

AOP About AOP Jason

Plans — Operators for Plan Body

A plan body may contain:Belief operators (+, -, -+)Goal operators (!, ?, !!)Actions (internal/external) and Constraints

Example (plan body)

+rain : time to leave(T) & clock.now(H) & H ¿= T

¡- !g1; // new sub-goal

!!g2; // new goal

?b(X); // new test goal

+b1(T-H); // add mental note

-b2(T-H); // remove mental note

-+b3(T*H); // update mental note

jia.get(X); // internal action

X ¿ 10; // constraint to carry on

close(door).// external action

29 / 68

Page 30: T3 Agent oriented programming languages

AOP About AOP Jason

Plans — Example

+green patch(Rock)[source(percept)]

: not battery charge(low)

¡- ?location(Rock,Coordinates);

!at(Coordinates);

!examine(Rock).

+!at(Coords)

: not at(Coords) & safe path(Coords)

¡- move towards(Coords);

!at(Coords).

+!at(Coords)

: not at(Coords) & not safe path(Coords)

¡- ...

+!at(Coords) : at(Coords).

30 / 68

Page 31: T3 Agent oriented programming languages

AOP About AOP Jason

Plans — Dynamics

The plans that form the plan library of the agent come from

initial plans defined by the programmer

plans added dynamically and intentionally by

.add plan

.remove plan

plans received from

tellHow messagesuntellHow

31 / 68

Page 32: T3 Agent oriented programming languages

AOP About AOP Jason

Strong Negation

Example

+!leave(home)

: ˜raining¡- open(curtains); ...

+!leave(home)

: not raining & not ˜raining¡- .send(mum,askOne,raining,Answer,3000); ...

32 / 68

Page 33: T3 Agent oriented programming languages

AOP About AOP Jason

Prolog-like Rules in the Belief Base

Example

likely color(Obj,C) :-

colour(Obj,C)[degOfCert(D1)] &

not (colour(Obj, )[degOfCert(D2)] & D2 ¿ D1) &

not ˜colour(C,B).

33 / 68

Page 34: T3 Agent oriented programming languages

AOP About AOP Jason

Plan Annotations

Like beliefs, plans can also have annotations, which go inthe plan label

Annotations contain meta-level information for the plan,which selection functions can take into consideration

The annotations in an intended plan instance can be changeddynamically (e.g. to change intention priorities)

There are some pre-defined plan annotations, e.g. to force abreakpoint at that plan or to make the whole plan executeatomically

Example (an annotated plan)

@myPlan[chance of success(0.3), usual payoff(0.9),

any other property]

+!g(X) : c(t) ¡- a(X).

34 / 68

Page 35: T3 Agent oriented programming languages

AOP About AOP Jason

Failure Handling: Contingency Plans

Example (an agent blindly committed to g)

+!g : g.

+!g : ... ¡- ... ?g.

-!g : true ¡- !g.

35 / 68

Page 36: T3 Agent oriented programming languages

AOP About AOP Jason

“Higher-Order” Variables

Example (an agent that asks for plans on demand)

-!G[error(no relevant)] : teacher(T)

¡- .send(T, askHow, { +!G }, Plans);.add plan(Plans);

!G.

in the event of a failure to achieve any goal G due to norelevant plan, asks a teacher for plans to achieve G andthen try G again

The failure event is annotated with the error type, line,source, ... error(no relevant) means no plan in the agent’splan library to achieve G

{ +!G } is the syntax to enclose triggers/plans as terms

36 / 68

Page 37: T3 Agent oriented programming languages

AOP About AOP Jason

Internal Actions

Unlike actions, internal actions do not change theenvironment

Code to be executed as part of the agent reasoning cycle

AgentSpeak is meant as a high-level language for the agent’spractical reasoning and internal actions can be used forinvoking legacy code elegantly

Internal actions can be defined by the user in Java

libname.action name(. . .)

37 / 68

Page 38: T3 Agent oriented programming languages

AOP About AOP Jason

Standard Internal Actions

Standard (pre-defined) internal actions have an empty libraryname

.print(term1, term2, . . .)

.union(list1, list2, list3)

.my name(var)

.send(ag,perf ,literal)

.intend(literal)

.drop intention(literal)

Many others available for: printing, sorting, list/stringoperations, manipulating the beliefs/annotations/plan library,creating agents, waiting/generating events, etc.

38 / 68

Page 39: T3 Agent oriented programming languages

AOP About AOP Jason

Jason × Java I

Consider a very simple robot with two goals:

when a piece of gold is seen, go to it

when battery is low, go charge it

39 / 68

Page 40: T3 Agent oriented programming languages

AOP About AOP Jason

Jason × Java II

Example (Java code – go to gold)

public class Robot extends Thread {boolean seeGold, lowBattery;

public void run() {while (true) {

while (! seeGold) {}while (seeGold) {

a = selectDirection();

doAction(go(a));

} } } }

(how to code the charge battery behaviour?)

40 / 68

Page 41: T3 Agent oriented programming languages

AOP About AOP Jason

Jason × Java III

Example (Java code – charge battery)

public class Robot extends Thread {boolean seeGold, lowBattery;

public void run() {while (true) {

while (! seeGold)

if (lowBattery) charge();

while (seeGold) {a = selectDirection ();

if (lowBattery) charge();

doAction(go(a));

if (lowBattery) charge();

} } } }

(note where the tests for low battery have to be done)

41 / 68

Page 42: T3 Agent oriented programming languages

AOP About AOP Jason

Jason × Java IV

Example (Jason code)

+see(gold)

¡- !goto(gold).

+!goto(gold) :see(gold) // long term goal

¡- !select direction(A);

go(A);

!goto(gold).

+battery(low) // reactivity

¡- !charge.

ˆ!charge[state(started)] // goal meta-events

¡- .suspend(goto(gold)).

ˆ!charge[state(finished)]

¡- .resume(goto(gold)).

42 / 68

Page 43: T3 Agent oriented programming languages

AOP About AOP Jason

Jason × Prolog

With the Jason extensions, nice separation of theoretical andpractical reasoning

BDI architecture allows

long-term goals (goal-based behaviour)reacting to changes in a dynamic environmenthandling multiple foci of attention (concurrency)

Acting on an environment and a higher-level conception of adistributed system

43 / 68

Page 44: T3 Agent oriented programming languages

AOP About AOP Jason

Communication Infrastructure

Various communication and execution managementinfrastructures can be used with Jason:

Centralised: all agents in the same machine,one thread by agent, very fast

Centralised (pool): all agents in the same machine,fixed number of thread,allows thousands of agents

Jade: distributed agents, FIPA-ACL

Saci: distributed agents, KQML

... others defined by the user (e.g. AgentScape)

44 / 68

Page 45: T3 Agent oriented programming languages

AOP About AOP Jason

Definition of a Simulated Environment

There will normally be an environment where the agents aresituated

The agent architecture needs to be customised to getperceptions and act on such environment

We often want a simulated environment (e.g. to test anMAS application)

This is done in Java by extending Jason’s Environment class

45 / 68

Page 46: T3 Agent oriented programming languages

AOP About AOP Jason

Interaction with the Environment Simulator

EnvironmentSimulator

Agent Architecture

executeAction

getPercepts

changepercepts

Reasoner

perceive

act

46 / 68

Page 47: T3 Agent oriented programming languages

AOP About AOP Jason

Example of an Environment Class

1 import jason.*;

2 import ...;

3 public class robotEnv extends Environment {4 ...

5 public robotEnv() {6 Literal gp =

7 Literal.parseLiteral(”green˙patch(souffle)”);

8 addPercept(gp);

9 }10

11 public boolean executeAction(String ag, Structure action) {12 if (action.equals(...)) {13 addPercept(ag,

14 Literal.parseLiteral(”location(souffle,c(3,4))”);

15 }16 ...

17 return true;

18 } }47 / 68

Page 48: T3 Agent oriented programming languages

AOP About AOP Jason

MAS Configuration Language I

Simple way of defining a multi-agent system

Example (MAS that uses JADE as infrastructure)

MAS my˙system –

infrastructure: Jade

environment: robotEnv

agents:

c3po;

r2d2 at jason.sourceforge.net;

bob #10; // 10 instances of bob

classpath: ”../lib/graph.jar”;

˝

48 / 68

Page 49: T3 Agent oriented programming languages

AOP About AOP Jason

MAS Configuration Language II

Configuration of event handling, frequency of perception,user-defined settings, customisations, etc.

Example (MAS with customised agent)

MAS custom –

agents: bob [verbose=2,paramters=”sys.properties”]

agentClass MyAg

agentArchClass MyAgArch

beliefBaseClass jason.bb.JDBCPersistentBB(

”org.hsqldb.jdbcDriver”,

”jdbc:hsqldb:bookstore”,

...

˝

49 / 68

Page 50: T3 Agent oriented programming languages

AOP About AOP Jason

MAS Configuration Language III

Example (CArtAgO Environment)

MAS grid˙world –

environment: alice.c4jason.CEnv

agents:

cleanerAg

agentArchClass alice.c4jason.CogAgentArch

#3;

˝

50 / 68

Page 51: T3 Agent oriented programming languages

AOP About AOP Jason

Jason Customisations

Agent class customisation:selectMessage, selectEvent, selectOption, selectIntetion, buf,brf, ...

Agent architecture customisation:perceive, act, sendMsg, checkMail, ...

Belief base customisation:add, remove, contains, ...

Example available with Jason: persistent belief base (in textfiles, in data bases, ...)

51 / 68

Page 52: T3 Agent oriented programming languages

AOP About AOP Jason

jEdit Plugin

52 / 68

Page 53: T3 Agent oriented programming languages

AOP About AOP Jason

Eclipse Plugin

53 / 68

Page 54: T3 Agent oriented programming languages

AOP About AOP Jason

Mind Inspector

54 / 68

Page 55: T3 Agent oriented programming languages

AOP About AOP Jason

Some Related Projects I

Speech-act based communicationJoint work with Renata Vieira, Alvaro Moreira, and MikeWooldridge

Cooperative plan exchangeJoint work with Viviana Mascardi, Davide Ancona

Plan Patterns for Declarative GoalsJoint work with M.Wooldridge

Planning (Felipe Meneguzzi and Colleagues)

Web and Mobile Applications (Alessandro Ricci andColleagues)

Belief RevisionJoint work with Natasha Alechina, Brian Logan, Mark Jago

55 / 68

Page 56: T3 Agent oriented programming languages

AOP About AOP Jason

Some Related Projects II

Ontological Reasoning

Joint work with Renata Vieira, Alvaro MoreiraJASDL: joint work with Tom Klapiscak

Goal-Plan Tree Problem (Thangarajah et al.)Joint work with Tricia Shaw

Trust reasoning (ForTrust project)

Agent verification and model checkingJoint project with M.Fisher, M.Wooldridge, W.Visser,L.Dennis, B.Farwer

56 / 68

Page 57: T3 Agent oriented programming languages

AOP About AOP Jason

Some Related Projects III

Environments, Organisation and Norms

Normative environmentsJoin work with A.C.Rocha Costa and F.Okuyama

MADeM integration (Francisco Grimaldo Moreno)

Normative integration (Felipe Meneguzzi)

CArtAgO integration

Moise integration

More on jason.sourceforge.net, related projects

57 / 68

Page 58: T3 Agent oriented programming languages

AOP About AOP Jason

Some Trends for Jason I

Modularity and encapsulation

Capabilities (JACK, Jadex, ...)Roles (Dastani et al.)Mini-agents (?)

Recently done: meta-events

To appear soon: annotations for declarative goals,improvement in plan failure handling, etc.

Debugging is hard, despite mind inspector, etc.

Further work on combining with environments andorganisations

58 / 68

Page 59: T3 Agent oriented programming languages

AOP About AOP Jason

Summary

AgentSpeak

Logic + BDIAgent programming language

Jason

AgentSpeak interpreterImplements the operational semantics of AgentSpeakSpeech-act based communicaitonHighly customisableUseful toolsOpen sourceOpen issues

59 / 68

Page 60: T3 Agent oriented programming languages

AOP About AOP Jason

Acknowledgements

Many thanks to the

Various colleagues acknowledged/referenced throughoutthese slidesJason users for helpful feedbackCNPq for supporting some of our current researh

60 / 68

Page 61: T3 Agent oriented programming languages

AOP About AOP Jason

Further Resources

http://jason.sourceforge.net

R.H. Bordini, J.F. Hubner, andM. WooldrigeProgramming Multi-Agent Systemsin AgentSpeak using JasonJohn Wiley & Sons, 2007.

61 / 68

Page 62: T3 Agent oriented programming languages

AOP About AOP Jason

Bibliography I

Baldoni, M., Bentahar, J., van Riemsdijk, M. B., and Lloyd, J., editors (2010).Declarative Agent Languages and Technologies VII, 7th InternationalWorkshop, DALT 2009, Budapest, Hungary, May 11, 2009. Revised Selectedand Invited Papers, volume 5948 of Lecture Notes in Computer Science.Springer.

Baldoni, M. and Endriss, U., editors (2006).Declarative Agent Languages and Technologies IV, 4th International Workshop,DALT 2006, Hakodate, Japan, May 8, 2006, Selected, Revised and InvitedPapers, volume 4327 of Lecture Notes in Computer Science. Springer.

Baldoni, M., Endriss, U., Omicini, A., and Torroni, P., editors (2006).Declarative Agent Languages and Technologies III, Third InternationalWorkshop, DALT 2005, Utrecht, The Netherlands, July 25, 2005, Selected andRevised Papers, volume 3904 of Lecture Notes in Computer Science. Springer.

Baldoni, M., Son, T. C., van Riemsdijk, M. B., and Winikoff, M., editors(2008).Declarative Agent Languages and Technologies V, 5th International Workshop,DALT 2007, Honolulu, HI, USA, May 14, 2007, Revised Selected and InvitedPapers, volume 4897 of Lecture Notes in Computer Science. Springer.

62 / 68

Page 63: T3 Agent oriented programming languages

AOP About AOP Jason

Bibliography II

Baldoni, M., Son, T. C., van Riemsdijk, M. B., and Winikoff, M., editors(2009).Declarative Agent Languages and Technologies VI, 6th International Workshop,DALT 2008, Estoril, Portugal, May 12, 2008, Revised Selected and InvitedPapers, volume 5397 of Lecture Notes in Computer Science. Springer.

Bordini, R. H., Braubach, L., Dastani, M., Fallah-Seghrouchni, A. E.,Gomez-Sanz, J. J., Leite, J., O’Hare, G. M. P., Pokahr, A., and Ricci, A.(2006a).A survey of programming languages and platforms for multi-agent systems.Informatica (Slovenia), 30(1):33–44.

Bordini, R. H., Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors(2005a).Multi-Agent Programming: Languages, Platforms and Applications, volume 15of Multiagent Systems, Artificial Societies, and Simulated Organizations.Springer.

63 / 68

Page 64: T3 Agent oriented programming languages

AOP About AOP Jason

Bibliography III

Bordini, R. H., Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors(2005b).Programming Multi-Agent Systems, Second International Workshop ProMAS2004, New York, NY, USA, July 20, 2004 Selected Revised and Invited Papers,volume 3346 of Lecture Notes in Computer Science. Springer.

Bordini, R. H., Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors(2006b).Programming Multi-Agent Systems, Third International Workshop, ProMAS2005, Utrecht, The Netherlands, July 26, 2005, Revised and Invited Papers,volume 3862 of Lecture Notes in Computer Science. Springer.

Bordini, R. H., Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors(2007a).Programming Multi-Agent Systems, 4th International Workshop, ProMAS2006, Hakodate, Japan, May 9, 2006, Revised and Invited Papers, volume 4411of Lecture Notes in Computer Science. Springer.

Bordini, R. H., Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors(2009).Multi-Agent Programming: Languages, Tools and Applications.Springer.

64 / 68

Page 65: T3 Agent oriented programming languages

AOP About AOP Jason

Bibliography IV

Bordini, R. H., Hubner, J. F., and Wooldridge, M. (2007b).Programming Multi-Agent Systems in AgentSpeak Using Jason.Wiley Series in Agent Technology. John Wiley & Sons.

Dastani, M. (2008).2apl: a practical agent programming language.Autonomous Agents and Multi-Agent Systems, 16(3):214–248.

Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors (2004).Programming Multi-Agent Systems, First International Workshop, PROMAS2003, Melbourne, Australia, July 15, 2003, Selected Revised and InvitedPapers, volume 3067 of Lecture Notes in Computer Science. Springer.

Dastani, M., Fallah-Seghrouchni, A. E., Leite, J., and Torroni, P., editors(2008a).Languages, Methodologies and Development Tools for Multi-Agent Systems,First International Workshop, LADS 2007, Durham, UK, September 4-6, 2007.Revised Selected Papers, volume 5118 of Lecture Notes in Computer Science.Springer.

65 / 68

Page 66: T3 Agent oriented programming languages

AOP About AOP Jason

Bibliography V

Dastani, M., Fallah-Seghrouchni, A. E., Leite, J., and Torroni, P., editors(2010).Languages, Methodologies, and Development Tools for Multi-Agent Systems,Second International Workshop, LADS 2009, Torino, Italy, September 7-9,2009, Revised Selected Papers, volume 6039 of Lecture Notes in ComputerScience. Springer.

Dastani, M., Fallah-Seghrouchni, A. E., Ricci, A., and Winikoff, M., editors(2008b).Programming Multi-Agent Systems, 5th International Workshop, ProMAS2007, Honolulu, HI, USA, May 15, 2007, Revised and Invited Papers, volume4908 of Lecture Notes in Computer Science. Springer.

Fisher, M. (2005).Metatem: The story so far.In [Bordini et al., 2006b], pages 3–22.

Fisher, M., Bordini, R. H., Hirsch, B., and Torroni, P. (2007).Computational logics and agents: A road map of current technologies andfuture trends.Computational Intelligence, 23(1):61–91.

66 / 68

Page 67: T3 Agent oriented programming languages

AOP About AOP Jason

Bibliography VI

Giacomo, G. D., Lesperance, Y., and Levesque, H. J. (2000).Congolog, a concurrent programming language based on the situation calculus.Artif. Intell., 121(1-2):109–169.

Hindriks, K. V. (2009).Programming rational agents in GOAL.In [Bordini et al., 2009], pages 119–157.

Hindriks, K. V., de Boer, F. S., van der Hoek, W., and Meyer, J.-J. C. (1997).Formal semantics for an abstract agent programming language.In Singh, M. P., Rao, A. S., and Wooldridge, M., editors, ATAL, volume 1365of Lecture Notes in Computer Science, pages 215–229. Springer.

Hindriks, K. V., Pokahr, A., and Sardina, S., editors (2009).Programming Multi-Agent Systems, 6th International Workshop, ProMAS2008, Estoril, Portugal, May 13, 2008. Revised Invited and Selected Papers,volume 5442 of Lecture Notes in Computer Science. Springer.

Leite, J. A., Omicini, A., Sterling, L., and Torroni, P., editors (2004).Declarative Agent Languages and Technologies, First International Workshop,DALT 2003, Melbourne, Australia, July 15, 2003, Revised Selected and InvitedPapers, volume 2990 of Lecture Notes in Computer Science. Springer.

67 / 68

Page 68: T3 Agent oriented programming languages

AOP About AOP Jason

Bibliography VII

Leite, J. A., Omicini, A., Torroni, P., and Yolum, P., editors (2005).Declarative Agent Languages and Technologies II, Second InternationalWorkshop, DALT 2004, New York, NY, USA, July 19, 2004, Revised SelectedPapers, volume 3476 of Lecture Notes in Computer Science. Springer.

Pokahr, A., Braubach, L., and Lamersdorf, W. (2005).Jadex: A bdi reasoning engine.In [Bordini et al., 2005a], pages 149–174.

Rao, A. S. (1996).Agentspeak(l): Bdi agents speak out in a logical computable language.In de Velde, W. V. and Perram, J. W., editors, MAAMAW, volume 1038 ofLecture Notes in Computer Science, pages 42–55. Springer.

Shoham, Y. (1993).Agent-oriented programming.Artif. Intell., 60(1):51–92.

Winikoff, M. (2005).Jack intelligent agents: An industrial strength platform.In [Bordini et al., 2005a], pages 175–193.

68 / 68

Page 69: T3 Agent oriented programming languages

Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Overview Other APLs & Architectural Considerations

Page 70: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Overview • Overview of APL landscape • Some Architectural Considerations • Research Themes • References

Page 71: T3 Agent oriented programming languages

Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Agent Programming Languages: An Overview

Page 72: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

A Brief History of AOP • 1990: AGENT-0 (Shoham) • 1993: PLACA (Thomas; AGENT-0 extension with plans) • 1996: AgentSpeak(L) (Rao; inspired by PRS) • 1996: Golog (Reiter, Levesque, Lesperance) • 1997: 3APL (Hindriks et al.) • 1998: ConGolog (Giacomo, Levesque, Lesperance) • 2000: JACK (Busetta, Howden, Ronnquist, Hodgson) • 2000: GOAL (Hindriks et al.) • 2000: CLAIM (Amal El FallahSeghrouchni) • 2002: Jason (Bordini, Hubner; implementation of AgentSpeak) • 2003: Jadex (Braubach, Pokahr, Lamersdorf) • 2008: 2APL (successor of 3APL) This overview is far from complete!

Page 73: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

A Brief History of AOP • AGENT-0 Speech acts • PLACA Plans • AgentSpeak(L) Events/Intentions • Golog Action theories, logical specification • 3APL Practical reasoning rules • JACK Capabilities, Java-based • GOAL Declarative goals • CLAIM Mobile agents (within agent community) • Jason AgentSpeak + Communication • Jadex JADE + BDI • 2APL Modules, PG-rules, …

Page 74: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

A Brief History of AOP

Agent Programming

Architectures PRS (Planning) , InterRap

Agent-Oriented Programming Agent0, AgentSpeak, ConGolog,

3APL/2APL, Jason, Jadex, JACK, …

Conceptual extension “Declarative Goals”

Agent Logics

BDI, Intention Logic, KARO

Multi-Agent Logics, Norms, Collective Intentionality

CASL, Games and Knowledge

Agent Programming Languages and Agent Logics have not (yet) converged to a uniform conception of (rational) agents.

Page 75: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Agent Features

Agent Programming • “Simple” beliefs and belief

revision • Planning and Plan revision e.g. Plan failure • Declarative Goals • Triggers, Events e.g. maintenance goals • Control Structures • …

Agent Logics • “Complex” beliefs and belief

revision • Commitment Strategies • Goal Dynamics • Look ahead features e.g. beliefs about the future,

strong commitment preconditions

• Norms • …

Many diverse and different features have been proposed, but the unifying theme still is the BDI view of agents.

Part 1: BDI Agents and AOP

Page 76: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

How are these APLs related?

AGENT-01 (PLACA )

Family of Languages Basic concepts: beliefs, action, plans, goals-to-do):

AgentSpeak(L), Jason1

Golog 3APL2 㸻

1 mainly interesting from a historical point of view 2 from a conceptual point of view, we identify AgentSpeak(L) and Jason 3 without practical reasoning rules 4 another example not discussed here is AgentScape (Brazier et al.)

Main addition: Declarative goals

2APL 3APL + GOAL

A comparison from a high-level, conceptual point, not taking into account any practical aspects (IDE, available docs, speed, applications, etc)

Java-based BDI Languages

Jack (commercial), Jadex

Mobile Agents

CLAIM3

Multi-Agent Systems All of these languages

(except AGENT-0, PLACA, JACK) have

versions implemented “on top of” JADE.

Page 77: T3 Agent oriented programming languages

Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Some Architectural Considerations

Page 78: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

GOAL Architecture

Agent

Environment Real or simulated world of events

action percept Beliefs

Goals

Action Rules

Process percepts

Page 79: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Interpreters: GOAL

Process percepts

(= apply percept rules)

Select action (= apply action rules)

Perform action (= send to environment)

Update mental state

(= apply action specs + commitment strategy)

Also called deliberation cycles. GOAL’s cycle is a classic sense-plan-act cycle.

Page 80: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Interpreter: 2APL

Page 81: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Under the Hood: Implementing AOP Example: GOAL Architecture

Plugins

Page 82: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

2APL IDE: Introspector

Page 83: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

2APL IDE: State Tracer

Page 84: T3 Agent oriented programming languages

Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Research Themes

A Personal Point of View

Page 85: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

A Research Agenda Fundamental research questions: • What kind of expressiveness* do we need in AOP? Or, what needs

to be improved from your point of view? We need your feedback! • Verification: Use e.g. temporal logic combined with belief and goal

operators to prove agents “correct”. Model-checking agents, mas(!)

Short-term important research questions: • Planning: Combining reactive, autonomous agents and planning. • Learning: How can we effectively integrate e.g. reinforcement

learning into AOP to optimize action selection? • Debugging: Develop tools to effectively debug agents, mas(!).

Raises surprising issues: Do we need agents that revise their plans? • Organizing MAS: What are effective mas structures to organize

communication, coordination, cooperation? • Last but not least, (your?) applications!

Part 3: Short-term Future

* e.g. maintenance goals, preferences, norms, teams, ...

Page 86: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Combining AOP and Planning

GOAL • Knowledge

• Beliefs

• Goals

• Program Section

• Action Specification

Planning • Axioms

• (Initial) state

• Goal description

• x

• Plan operators

Alternative KRT Plugin: Restricted FOL, ADL, Plan Constraints (PDDL)

Combining the benefits of reactive, autonomous agents and planning algorithms

Page 87: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

Applications

• Use APLs for Programming Robotics Platform • Many other possible applications: • (Serious) Gaming (e.g. RPG, crisis management, …) • Agent-Based Simulation • The Web • <add your own example here>

Part 3: Short-term Future

Need to apply the AOP to find out what works and what doesn’t

Page 88: T3 Agent oriented programming languages

K. Hindriks, J. Leite PL-MAS Tutorial – EASSS09 Koen Hindriks, João Leite PL-MAS Tutorial – EASSS12

References • 2APL: http://www.cs.uu.nl/2apl/ • ConGolog: http://www.cs.toronto.edu/cogrobo/main/systems/index.html • GOAL: http://mmi.tudelft.nl/~koen/goal • JACK: http://en.wikipedia.org/wiki/JACK_Intelligent_Agents • Jadex: http://jadex.informatik.uni-hamburg.de/bin/view/About/Overview • Jason: http://jason.sourceforge.net/JasonWebSite/Jason Home.php

• Multi-Agent Programming Languages, Platforms and Applications,

Bordini, R.H.; Dastani, M.; Dix, J.; El Fallah Seghrouchni, A. (Eds.), 2005

introduces 2APL, CLAIM, Jadex, Jason • Multi-Agent Programming: Languages, Tools and Applications

Bordini, R.H.; Dastani, M.; Dix, J.; El Fallah Seghrouchni, A. (Eds.), 2009

introduces a.o.: Brahms, CArtAgO, GOAL, JIAC Agent Platform

Page 89: T3 Agent oriented programming languages

������������� ��������� ����������������������

�����������������������

���� � ��!

Page 90: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�������

� ��������������

� � �� ����������������

� ����������������������������������������

� ������ ����!��������

� �����" ��!��! ���!������������

� #���!����!����!

Page 91: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

"#�$������������

#��! ��$�!��������������������$��

Page 92: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�����%���

%

�������&� ���� ��

��������

'����!�����

��!��!��

�$������!���"

������ ����

����

���������

����������

���������

����

���������

����

����������

�����

���������

�����

��������

����������

��������

(!�!�

��$ ����!����

!�)$!���!��� ��!���

�!�!

����!���

��������

�����

���!���������

!����!��

���������!��

�����������

���������*

���� ��

��&��&

(!�!

'�������

'�����

����

��������

�(%���(����

'�����

�&����

�)�(�*�(�����

�&����������

Page 93: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

"��������������

�����%���

� ���!����

� +"����,���!��

� (!�!

� ������

� ����� �

� -���!���

� ��������

� ��!�

� .

� ����

� ��!��

� /������&���!��

� ������

� ����� �

� -���!���

� .

� ��!�

� #$���

��(��(�)�����(��)�����

Page 94: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�+�#+,�-��"�����",��'

Page 95: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��.��*������&��*����

� 0112����34.2�+���!�,

� 0115��������+4���!�6���34.2��7������������� �!��,

� 0118������� �!*+�,�+#!�6���� �����9"��#,

� 0118��������+#�����&��� ��)$�&���� ��!���,

� 011:��5����+;�����*�����!�<,

� 011=�����������+��!����&��� ��)$�&���� ��!���,

� >222�������+/$����!&�;�����&�#���)$���&�;������,

� >222�������+;�����*�����!�<,

� >222�����'-�+��!�����!��!������$����,

� >22>���!����+/������&�;$9���6��� ������!������������� �!*,

� >225���!��7�+/�!$9!��&���*!��&��!��������,

� >22=��>����+�$�����������5���,4����� �� ��������!���������� ����?

Page 96: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��.��*������&��*����

� ��34.2 �����!���

� ������ ��!��

� ����� �!*+�, ����@'���������

� ����� ���������������&������!��� ������!����

� 5��� ��!����!����!��������$���

� ���� �! !9�������&��! !.9!���

� ���� (���!�!�� ����!��

� ���'- -�9����!������+�������!���������$���",

� �!��� ����� �!*�A�����$���!����

� �!��7 ��(�A�/('

� >��� -��$���&���.�$���&�B

Page 97: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��.��*������&��*����

���������������

�(%���(����

�#�+��!�����,�&�'����#!

�����������������������

�����2&������ �!*&���������&�

5���@>���&��!���&��!��7&�����&�B

/��(�)������0�������

C(���!�!�� ����!��D

����������(�

/('&�'��������������&���#�

-$���.������������&�3����&

�������� ��'��������!���"

���&��!����!������������

���������������� ���������������� ��������������������������������������������������������������

Page 98: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

������"������

���������������

� C�� ��D�9�������!���9������

�� �����

� ��!������!�����!���� �����

�<�<���!���!��$��

� (���!�!�� ����!��

� 4�������&� ����

�<�<��!�����!������!��

� ����������$��$���

� B

����������(�

� C��� ��7D�9�������!���9������

�� �����

� �������������!������

� ��!��("�!����

� ���*�!��!����!�$���

�<�<�9�������!9�$�������$�$��&�

������������������

������������

� 3����

� B

���������������������������������������������������������������������������������������� ����!���������

���� �� ��� ���� ��� ��

Page 99: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��!�����%���������������1

��34.20

+������,

"����&��*����������

.���(�(��(�)��2�3����*����(������)�����������������42

����� �!*+�,&��!���0

����� 5���>

0��!���"������������������!���������!�� �������� ���>������!������ �$!�� �������� ���&�����������"������ �!*+�,�!����!���5������$�� �!����!����!��������$���%�!��������7!� �����������$�������������������! ��+/�!E�������!�<,

$������������2�'�(����� �������

>����F�5����A�����

��������� ���� � �� !�����" �������#�� �����" ��� ��$��� ���� ����#��

��� ��������� ����� %���" ��������� ���" ����" �����������" ���&

� ��3�����.',����������

�!�*�+��������!�,&��!��7

$�3����������

���'-5

$������������&�����

��������������!��$!����

+�7�� ����34.2&�

�����&�����,��! ��

���������� ���������

C����� ���D���(<

Page 100: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

����/��'�,��$��"#�$�����

�5�6����657�5��5���

Page 101: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

5������������������

� ������G�����������$�������������!����!��

� $������������G�*���������A�9�������A���!��

� $���������!��������!�������$���

� ������ ����!����������������&<

� ������'�������%�����)%&�

H������$������!���!"���!��!��������$���������

� ��"����$!����

Page 102: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

"�����&(%�����(������������

� ;�������$�!����������!��@����7 �!���

!������I�

� 7!� ����� '�9���� ������!���6���&�'�������!*��!��$�9����!��������<

� '����������� �����������9��!$���'��!������������'.��9��<

� '����J��9���� ��9$������$�����!"����'��!*��������!��<

� K������$��� �������������������� ���

9�������A���!���GL�!�����

Page 103: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�������(%���(��������/&(��

�����

�������

�����

����������� �� ������� ��

����

����� ������������

����� ������ ������

������� �����

�������

�������

��������

���� �����

����!���+G�! �"� ���� ���$���,

������!�����+G�! �"�!�������$���,

��������!�����+G����������� ��������,

K �!��

����!����!��+G�! �"�!������� ����A�

��������������!���",

�� �������

����

Page 104: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

���(�����*�5���������

������������8

��9��������:�������*������;

<

�����������8

��9�(���������(�����������&;

<

� �����������8

��9� ����)�(������;

<

Page 105: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

=������-���>�*�����

� ���������������9���*������!9�������������� !��� ��9���*��!��9���� �������������������������������9���*������ ������<

�9M���� ���-� ��9���*����������!����!����$�����!�����$��������!����!��<

�������� �� �!������������

Page 106: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�%��.��(��-����?/���@�4

��"������ ���

� ��9���*�������������������C������������������� �!��D6�������������������

� �������������������� $���!�9���*���� �������

� �����������������!���� �!����9���*�!9� ��!�9���*�������$���9��!9� �

Page 107: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

$�6����������

Page 108: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#�)����������%��.��(��-���

� �����$���������������� �������*��������<

N /!���� �����!�������������

�������

N #$����+$�������������� �����!���,���� �����������������������������

���� ������������������ �

���� ����������������������� ��������

Page 109: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#�)����������%��,������������

'��� � � ��?A�B4 ��������� �� ��� �������� � � ������� ����(

3����*�8

������������

�������

�������� ��

����� ��

��� ����� ��

��������

��������� ��

<

'����!��9������9!������!����

Page 110: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#�)����������%��5���������

'��� � � ��?A�B4 ��������� �� ��� �������� � � ���� ����(

�����8

�������� ����������� ��

�������� ��

�������

��� ����

��������

��������� ��

<

'����!����!��9!������!����

Page 111: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#�)����������%��.��(��-���

� H�!��!9�$�������$���������������9�����I

� '��������!$������!�����������!�������������*���������9!��<�

��� ������������������ �

��� ������������������������ ��������

�� �����������������������������

��!�����8��������������������������������������� ����������

������������������������

� ����������������������������

� ������� ��

��� ����������������� ��

��� ����������������������� ���������

<

�!����*���������9!������!����

Page 112: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

-%&�����)��������!������.���1

� ����� ��������������*���������9!����!��9��$�������

���9��!����������3��%�����9������!�����!��9!��<

� 7!� ���

N �����!�����9���� ����� ����� ������ �&�������������

!�����9���� ������ ����� ��<

N '��!������!������������ ��������&�������������!�����

�!������� ��������<

Page 113: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

$�������������*�5���������

��!�����8

��������������������������������������� ����������

������������������������

� ����������������������������

� ������� ��

��� ����������������� ��

��� ����������������������� ���������

<

3����*�8

��������������������������� ������� ����� ����� ��

����������������� ��

<

�����8

�������� ����������� ���������� ������������ ����

����������������� ��

<

����*����������9�������������!�����������������������������������

�������������������������������������� ! "� �����

'����!������!����!������!����

Page 114: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

,��)�(������%��.����*�C�5����3���

� � ��!����� �� ������� ��������9������9!��<� � ��!��������� ������� ����������!��9!��<

N H����� ����!�����������M$���������������!��<

� 7!� ����

� � ��� �������������������

� �������� ����������

Page 115: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

/��3������.����*������5����

� ����������������

� ������� ��������� ������� �� ��� ���������"��!��!��!���� ��������!�����������������

9���� ��������!���!��9������!�����!���!�"<

� ������������

� ������� ��������� ���� �� �� ��+�$9,.��!�� ��!��9����!���� ����������!�����9���� ������ <

Page 116: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�0)�������.��(��-����/��(�)��

� �����9�������7 �����*�"�/H������ ���9"�

��!������9!����� ��!����<

� (�������9���*����������������������� �������������� ����� ����������

� /$���������!�����!���!"������!��!�9���*����

��� �!��������!"������!��"�$��! ������

!���� ��������!������������ ���������

Page 117: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�(������/%������%���� �������D

��� �����

Page 118: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

����#�E����7)�������$������������

4�����$���!��)$!���9�������!����� ����������!��!����������9������9!������������9��$ �!����+!��� ����9�"�������!��9!��,<

N ��������������9������9!�����������on(a,d) !�����move(a,d)<N #���������9���������������on(a,b) !�����move(a,d)<

Page 119: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

����(������(�����2��(�����#����

� ��������$����!���$��������������!����!���"�����

!���������������<

� (��������!����!���"�����9���*��������

N '��������$��� ���� ���!��9���!��&��!*����<

N '��9���*������� �!���&��� ���������!9��<

� H�!���! ����

N ����*����������&��<�<��!������������ ���������9������ ����� ���

�$����������!����!������!����I

N O��&������+ ������!��",������������ ������� �

)����8

������� ����� �������������������� ������������� � �! ������

������������ ����������� � �! ������� ��

<

Page 120: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

'�$�2���-�#�-�#�'

Page 121: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

����/��'�,��$��"#�$�����

�5�6����657�5�� �/�

Page 122: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�/����������������

� ��������!��!����� �!������!����!��$!���

!�����!�����$���"

� 7�������! !������!���������� ��

� ��� ����� !���$������������9$�������!���

��9$������!������"�����

Page 123: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�/��/�����(��

7�������! !������B�

/�����/�����(��

� �����&� ���&���!�&��! !9����"&�/��������&�P���

'�(��������

� Q�!�����&�Q$���&�Q ����&�Q�����&�Q��!��&�<<<�

#���������$��%��������������?=�������������>4

� R�!��.���&�R�!���!��&�R����&�R�� �"&�R�$9�!�*&� �

R ���&�R!���� �&�R������&�R����&�R���������

Page 124: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�����

�! !9����"

-"��!�

�� ���

-"/�����

����� !��� "� �#�!���$

��%&��� #� � ��'(� �� �)

��%���*+* #������� , �* +��)

����� "����$�-�.

����� ���$

����//�0'12���� �& �

����//�0������� ����� �3# �

����4��#��-�)

��.

.

��!�����%����)��(���*��1

Page 125: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

/�)�3�������

� ��! �$�!����!������$������!������������C��$�����D&��<�<����$�!���"�������$��

� #� ��������$������!��!� ��������!��!�������!���!��9��C �$�������D�!����)$����

� ����!�����!�����&�9$��N �!��9���������+C�$9.!�����D,&��������������$�����7����!�@������!�

N ���J���! ��������$�����

N ���J���! ���������"�+�!�J�����������!�������! !9����",

N ���J���! ��!$�����"

Page 126: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

� ���

� ������������� �!��

� ��� ����������" ���!���������������9�������

!������!��� �!���

N 9����!������!��� �!����$�������!�������� �����

���"��!�����!�������!������� ��������"� �������

����

� #!��������" ���� ���&�-���!�� ���&�

/('-���!�� ���&�/('��!� ���&�B

N -���!�� ����������.!����

N /('��!� ���������"�$ ����!��$��

Page 127: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

'�(������C���������� ����

�3��*�� � ��'��� �*�(� �� "� �#�(� ��$

�����3��*����#����#�)

��%��#� ���#� �� �*����#����#���$

���� �&*#��#������#�)

����.

.

��������������������������������������������������

����'��� �*�!��� "� �#�!���$

%&��� #�5 6� �*�(� ��� 6�� �)

%��#�#� � ��'��� �*�(� �� �)

��� ��$

���

���4#3���#�� � �� �*��� 6�� ���#���)

���.

.

Page 128: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��������(���)�������$�����7�����������S�

F%�������� ����%��������������&���'�

@@���!���������������������!���������������!��$!����Q.��!��������

@@�������9�������!������� �������������� ������&���!��������������&����<�

F)������ ����%��������������&���6

F������� �����������%��������������&���'

F����G����G����*���������4" �����(����'

�����(�3���������� ����+ ���4" �����������,�S

����������@@�������������������������� �!��������� !������!��� ��������!���

T

(����0�+,�S��@U������!��������������������! ���!9����"�U@��T

3��&+,�S�

@@�4��� �!��9��"�������9��������!��$!����� �� ������������������

@@� �!������7��$���<��!������!����! !������!���R.��!�������<

T�

@U���������!��������������������U@

T�

Page 129: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�����&

� �����.9!����!���M! !.9!�������

� �!����!�������� ���

N ����&� ���� ��&�!������&�9������&���!��&� �!��&�

����!���

� -!���������������

N �����.9!�����!��$!����!�������3�����!���

�$ ������(����� ����������

N �! !.9!�����!��$!����$��������������(�����

!���!����!���"�� ������ ��

Page 130: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�5�6���#�5#�$�'��,56

Page 131: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

'���������&�����������*�!��

V��H�!�����"�$���7 ���������������������!�����

�����!��I�H�!������"�$�������!�"&�

��!��������&�! �!����I

V��H�!������"�$���*��!9�$����������!��!�����

����!�����)�����"������!"I

V��H�!������"�$��������!���������!9�$����������

!��!����� ����!�����)�����"������!"*

Page 132: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

'������5����������*�����

V� �!����� �� ������������$������������

�����������!����.��������� ����!��I

�����������

� H�!�����!������!����.��������� ����!�I

� ;������������������� ������!���������� ������!����I

� �!����� �� �����������)������������!���������������

����������I

�� O��&�9$���$���������!���� �����������!��!�����

����!�������!��$!��<

Page 133: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

"�����%�����*���D

��"�)$��������

� ;�������� �����������

����������������I

� ;������*�� ���!�*����

�������������������I

� ;�������� ������������

����!��������$������I

��"�!��� ������

� '������"� ���� ��

� '������"��� ���������!������

� (�������������"�����

�� ������������ ��������

� '������"�!�����J���!��

������!�!�"E������������������!������!���������������<

-!����$��������������&�'�����

Page 134: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�� ��������,����(�����$��������

Page 135: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��&��� ��������6������

��������!9������������ ������������� ����������!��9�������������9"�!����

� �!��9��$��)$��"�����������

� ��� ������������!���!��$!����

������ !�"��������!���!��9�� ������!�� ����� ���������� �������������$���

��������!���!������$ �����!���� �������������$�������������+#$��������

3�� ��,

� ���������������!��� ��� ������$������!���"����������������!�����������������!9�����������

� ��� ����� $������������!����.9!��������!��������� ���� ��

� $ ����� !���$��!�������7��$���������!�����

� $ �����������@��� ������������9$�����$���������!������!����� ��������

Page 136: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

D������%���!����������)����

��"�)$��������

� ;������$���!������

�����������������I

� H����������+��!��,����

!�������! �����!�-�I

� ;������!������

�����������������!������I

��"�!��� ������

� H������ �����$���

� H�����!�������+� ������!�����,

� (������!����������������

���!���"

� �����!����� ����!�

H�������!��!����� ����!�������*����������!���������<

-!����$������������������?�4

Page 137: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�������#����.��������������

/!�����$�����������������������!�!9��������

5��)��������������!���" ����� $� ���<

�����7!� ��&����$ �

� #$������!���!����� !����$�!��� ����

� #$������!���!���������$���!����

� #$������!���!�!�����!����������!����

� #$������!��������$���������� �� �!��

� B

Page 138: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

$���������

��������� �� �����$ �����������$����

K�����������������$��$���"�$������<

�����7!� ��&�$������$��������

� �������� �������������$������!���"

� #�$����������9�������!�����

� (�����9$��������� ����$��� ��������

� B

3/� -!���!�������������"�$���$�������

������9$����������� ����$��� ��������<

Page 139: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��$���B�,/���

����,/��,�6���"����

Page 140: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

������*���&�=�))��(������>

� ��!�����9���*�������&�����������!���&����<

� ��������������*�� !�$$�����!���&��$� $��

�����&��7 ���������!�����&�B

Page 141: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

������.��������������

����� �� �����

� �� !�������$�!���

� ����� ��������!"����$�!���

� /���*��H���������4�!�����9������

Page 142: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

$���������������������/������� '�����!����!��������� ��������+��������������$������,

� �����>200������������-!������!���

� 7 �������$���!��������������"��������� ����� ��� �����

� 02�!�����&��7 �����&���������&��!9���$�&��� !����&���� ������

�����

� ������������"��������������!�����!*�������������

� ������� �@@�$���!�����������<���@

Page 143: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

����������5����

Page 144: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

5����

6�/�����5����

� 4!�*����������!�5(��� ���������������

!������!����$��$�����)���<�

�������5����

� >����������������������$���!������� ���$!��

��!�����������������!����� !�"�P4�<

� �����!��������� ����"��!*�����!������

��������!����� !�"�4"����<

Page 145: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

5�����������������

'�!)���!�*�� �!�������!����������� ���!����� ����+�������!�����,&�!��$������9��9���

+�������!����,�������� �����!���!�-!�������� !�����+�����$�!�� �!"��,<

*����� ��� ��������

Page 146: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#����������%�����5�����$��������M����

� �����!����!�����%�9����������� ����������! �$��.���.��!������!�������K3#���4�K#3�-34�>22%

� K������������ ����!������9���

� >2���!������W���$�����������"�!�<

� ��� ��������!��������� ��M���<

Page 147: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#�3���/�����

� >����!���������! ��9����$���

���������������3!����9��� �!�����<

� )������!��9����$��������������

�����-��������

��9���<

� ���

��� �@@��<�$�����<��@����������� �#�9�����@

��� �@@��9��!9<������<$��<�$@ !���@����<����

��� �@@���><���<��$<�*@XM @���.�!���.3Y4@

Page 148: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#�3���/�����

�����!������! ��!���������3!����9��� �!������!��� ����������!���� ����!�*

Page 149: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

,�����&�����G� ���0

���M������%���7������(!��������

� �����������$����� ���������!������9$�������

��������!�!������<

� ����������!����!"� �� ����!������������������

!9���!�����������������<�

7 ���������������������!������� �

9���������!����������� ���������

!���/('�!���������%���7����9!����

������������������<

Page 150: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

,�����&�����G� ���0

���M���������K���)$��'�����!�����'��������������

� �������������������!���������������������!�!�

��$�����!��� �������������!�!�9��������������9��

���������������!�!9!��<

� (�����9$����9$������� ���������!���$�������

������9����!���!�����9������������!������<

� ������������� �@@���<$���)$�<��@

Page 151: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��%���))��C���H�(��

� 4���-�(�-� ��M��������$���.���!�����������

�!*�������$�����)��� +K�� �����"����P!�����!,

������������� ��M�����

� ��� �@@��<�$�����<��@��!�@��!�@��*�@���M����

� ��� �@@M!��7.!�����<������!��*<$��.

�!�9$��<��@7��*�@9��@ ���@K�!���@���M����

� ��� �@@M!���<��$��������<���@� @ ��M����@

� ��� �@@!���� <���@! ���!�����@����7<�����+����,

Page 152: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�))��(������

-!�"������� ����9���! ���!������

� 4���H�9

� ,����������-���.���������/

���� +� � ���!���� ,#�#��

-��� �� ����� � � �� �� ���� �#� � �� ���$ ��� � �� ����.�

Page 153: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#����#/�����$��

��������!�����������P���

Page 154: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��#����(%��������$��!����!������!����)$��������

� H�!��*��������0)���� �����I������������������I���&���!��������

���9���� �� ��������"�$�� �������� ���I�H�������"�$������9!�*?

� +��*�(�������K����<�<���� ��!�����������9����������9������!�����!��

� ��!�������� �� ��!������C�������D<�-����.����*����!�����&��!�+?,

����.������� ���!�������!����)$��������

� �������������9��������!��� �&�!$������$��!������!��� �!�����<

� ���������;����!������������ ��"�������!����<�<���������������

��!������������������� ����E��!���������������I

� '�3��������(� ��� ����������������� ��"���9$��!�����&��!�+?,<�

#!������$� ����������$����(����������!��������!���� ���������� �!��I

� �����:����$����H�!��!���������� ���!�����$��$����������!��E��

����$���!����&��������!����&���� ��!����I

� �!���9$��������!��&�+"�$�I,��))��(������?

���� +� � ���!���� ,#�#��

U��<�<��!�����!������!��&� ����������&������&���!��&�<<<

Page 155: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

/��3����������������������

5���� ���������

� /������

� ��!��

� �����!��������

� ������� ������!����

��������� �7����

� +'����!�,���!��

� ��!�������� ����

� 7

� ��!��� ��!����

�������� ���#���������

#�������������&��(�&���!��������!�����+�((�,

��������� � � ������� �� ��������" �#������# ����� ��� �������� ������� �

Page 156: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

��������� / ���� ��� ����������

4����"

� ����!�����!�����

� ������������+ ������!����,�

��!�������!9�$��!�����&�

!��������!����!���

� 7 ����� ��"

� � ���!��E!�����+��� ��7��",

� #��!�����������������!�����

�!�����&�*���������

�� ������!����&���� ��.

������������ $����&�

����������������!�����&�

���!��E!�����&�<<<

� ���!�����

� �<�<� ���$!����!���"�+������,&�

��9���&

���$�!����&�

������

�!�!������&

�B

� %���������

9���*������&���� !����

�������&�<<<&

K4>22%� ��M���

Page 157: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

#�*���(��� >�������� �@@���<��<$$<��@>! �@

� ��������� �@@��<�$�����<��@��!�@��!�

� ��������� �@@��<��*� ���!<���@��*�@����Z'����������Z������

� �!��7����� �@@M!��7<������!��*<$��.�!�9$��<��@9��@ ���@�9�$�@� �� ���

� �!�������� �@@M!���<��$��������<���@�!���H�9���@�!����;���< �

� -$���.�����������!�������!��$!���&���!�������!���� ���!�����&�/������&�#<;<6�(!��!��&�-<6�(�7&��<6����!��!�������$����&��<�+��<,&�>22W

�����������0 �"��1" ����)���.��)����

� -$���.�����������!��������!��$!���&�4�����!���� ���!�����/������&�#<;<6�(!��!��&�-<6�(�7&��<6����!��!�������$����&��<�+��<,&�>221

�������������2�3�������1 �� �!�� ! "��)� 1� ������������

I�'�-6���'���������,'���"#�$�����5����-�.��5��I

Page 158: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

Page 159: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

�����#�*���(��� -�����(!��!��&�>�����!� �!����!��!����� ����!�������!��$!��&�'�����!����!����$��!�����

�$������$���������!���-$���.������"������+���-�,&�08+5,�>0%.>%=&� ���!��'��$�����

��� $�!����!�������.9!����������&�+���<,���!�����!�4����!����!�!��/���!�!�&�>22=<

� -�����(!��!���!���/!����$��9���*<�� ��!����!����!����������/('�-��$�������-$���.������

�����!�����<��������������������������'�����!����!��H��*��� ������� $�!����!�����������

-$���.������"������+��'-�.Y,&�>221<

� -�����(!��!��<�-��$�!��#$��./!���������!���������>���&�'���<���$��!&�(<��!�� ��&�!���

�<4! �����+���<,&�;!��9��*����#���!���������������#$��./!�����!��$!����!���

4�������������� �����$������!���� ��!�����+>�P��$���,&�'/3��1:=.0.82W88.%2>.8&�

>221<

� -�����(!��!��&��!! �/�!�����!&������($9���!�������.�$����-�"��<�(�9$������/('.9!����

-$���.�����������!��<�'������ ������������������:���'�����!����!��H��*��� ����

�����!������-$���.������"������+���-��>221,&�>221<�

� -���!���! &�-�����(!��!���!���-!!�*��;!�9���<�/�����@��!���!�����/('�-��$����

+7��������9���!��,<�'������<����02���'��<�����<�����$������$���������!���-$���!�����

"������+��-��>200,&�4$���&�O��$�&�����9����!��������+���<,&�-!"&�>N8&�>200&�

4!� ��&�4!��!�&� <�0>20.0>2><�

Page 160: T3 Agent oriented programming languages

������������� ��������� ����������������������������������� ��������� ����������������������

������������&���������%���

H����!��$����

� ��'�

� ��������$�

� 4�� ��

� �����

��������������!�����I

;�������"�$���!���!��������������� ����!�I


Recommended