Beruflich Dokumente
Kultur Dokumente
mission
role ORGAMISATION
org
LEVEL
agent
AGENT
LEVEL
artifact ENDOGENOUS
ENVIRONMENT
wsp
LEVEL
EXOGENOUS
ENVIRONMENT
4 / 200
Introduction AOP EOP OOP Conclusion
5 / 200
Introduction AOP EOP OOP Conclusion
6 / 200
Introduction AOP EOP OOP Conclusion
BDI Architecture
7 / 200
Introduction AOP EOP OOP Conclusion
8 / 200
Introduction AOP EOP OOP Conclusion
9 / 200
Introduction AOP EOP OOP Conclusion
10 / 200
Introduction AOP EOP OOP Conclusion
11 / 200
Introduction AOP EOP OOP Conclusion
12 / 200
AOP
Outline
2 AOP: Agent Oriented Programming
About AOP
Jason
Introduction to Jason
Reasoning Cycle
Main Language Constructs: Beliefs, Goals, and Plans
Other Language Features
Comparison With Other Paradigms
The Jason Platform
Perspectives: Some Past and Future Projects
Conclusions
About AOP
Introduction AOP EOP OOP Conclusion About AOP Jason
16 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
17 / 200
Introduction AOP EOP OOP Conclusion 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., 2007b, 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., 2007c],
Jadex [Pokahr et al., 2005], 2APL [Dastani, 2008a],
GOAL [Hindriks, 2009], JACK [Winikoff, 2005]
But many others languages and platforms... 18 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
19 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
20 / 200
Jason
Introduction AOP EOP OOP Conclusion About AOP Jason
AgentSpeak
The foundational language for Jason
22 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Jason
A practical implementation of a variant of AgentSpeak
23 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
24 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
25 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Jason Interpreter
Basic Reasoning cycle
26 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Belief Agent
Beliefs Base
5
1 2 Events
Percepts Percepts SE Plan
perceive BUF BRF
Library
4 7 Relevant 6
Beliefs to Internal
Check Plans Unify
SocAcc Add and Events Plans
Delete Context Event
Applicable Beliefs
Plans
3
Messages Messages 8 9 Selected 10
checkMail SM Intended Intention Execute Action Actions
SO SI act
Means Intention
.send
Intentions
... New
New
... Updated
Intention
27 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Beliefs — Representation
Syntax
Beliefs are represented by annotated literals of first order logic
28 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Beliefs — Dynamics I
by perception
beliefs annotated with source(percept) are automatically updated
accordingly to the perception of the agent
by intention
the plan operators + and - can be used to add and remove
beliefs annotated with source(self) (mental notes)
29 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Beliefs — Dynamics II
by communication
when an agent receives a tell message, the content is a new belief
annotated with the sender of the message
30 / 200
Introduction AOP EOP OOP Conclusion 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)
31 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Goals — Dynamics I
by intention
the plan operators ! and ? can be used to add a new goal
annotated with source(self)
...
// adds new achievement goal !write(book)[source(self)]
!write(book);
32 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Goals — Dynamics II
33 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
34 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
35 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Plans — Representation
where:
the triggering event denotes the events that the plan is
meant to handle
the context represent the circumstances in which the plan
can be used
the body is the course of action to be used to handle the
event if the context is believed true at the time a plan is
being chosen to handle the event
36 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
37 / 200
Introduction AOP EOP OOP Conclusion 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).
39 / 200
Introduction AOP EOP OOP Conclusion 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 messages
untellHow
40 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Strong Negation
Example
+!leave(home)
: ˜raining
¡- open(curtains); ...
+!leave(home)
: not raining & not ˜raining
¡- .send(mum,askOne,raining,Answer,3000); ...
41 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Example
likely color(Obj,C) :-
colour(Obj,C)[degOfCert(D1)] &
not (colour(Obj, )[degOfCert(D2)] & D2 ¿ D1) &
not ˜colour(C,B).
42 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Plan Annotations
43 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
44 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Meta Programming
Internal Actions
libname.action name(. . .)
46 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
47 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Jason × Java I
48 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Jason × Java II
doAction(go(a));
} } } }
49 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
50 / 200
Introduction AOP EOP OOP Conclusion 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.
51 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Jason × Prolog
52 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Communication Infrastructure
53 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
54 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
act
executeAction
change
percepts
55 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
57 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
58 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
environment: alice.c4jason.CEnv
agents:
cleanerAg
agentArchClass alice.c4jason.CogAgentArch
#3;
˝
59 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Jason Customisations
60 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
jEdit Plugin
61 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Eclipse Plugin
62 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Mind Inspector
63 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
64 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Ontological Reasoning
Joint work with Renata Vieira, Álvaro Moreira
JASDL: 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 checking
Joint project with M.Fisher, M.Wooldridge, W.Visser,
L.Dennis, B.Farwer
65 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
66 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
67 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Summary
AgentSpeak
Logic + BDI
Agent programming language
Jason
AgentSpeak interpreter
Implements the operational semantics of AgentSpeak
Speech-act based communicaiton
Highly customisable
Useful tools
Open source
Open issues
68 / 200
Introduction AOP EOP OOP Conclusion About AOP Jason
Further Resources
http://jason.sourceforge.net
69 / 200
Environment Oriented
Programming
— EOP —
Outline
3 Environment Programming
Why Environment Programming in MAS
Basic Level
Advanced Level
A&A and CArtAgO
Conclusions and Wrap-up
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
72 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
sensors
ack
db
pe
fee PERCEPTION
r
ce
pts
ENVIRONMENT
DECISION
act
ion
s o do
o nt
ti
ac ACTION
effectors / actuators
Perception
process inside agent inside of attaining awareness or
understanding sensory information, creating percepts
perceived form of external stimuli or their absence
Actions
the means to affect, change or inspect the environment
73 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Multi-Agent Perspective
In evidence
overlapping spheres of visibility and influence
..which means: interaction
74 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Basic level
to create testbeds for real/external environments
to ease the interface/interaction with existing software
environments
Advanced level
to uniformly encapsulate and modularise functionalities of
the MAS out of the agents
typically related to interaction, coordination, organisation,
security
externalisation
this implies changing the perspective on the environment
environment as a first-class abstraction of the MAS
endogenous environments (vs. exogenous ones)
programmable environments
75 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
76 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
actions
SIMULATED REAL WORLD
mimicking
WORLD (PHYSICAL OR
COMPUTATIONAL)
OR
INTERFACE EXTERNAL
WORLD
(PHYSICAL OR
COMPUTATIONAL)
OR
WRAPPER TO
EXISTING Example:
percepts JAVA
TECHNOLOGY
AGENTS PLATFORM
77 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
78 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
UserEnvironment
+init(String[] args)
change
+executeAction(String agName, Structure action): boolean
percepts
79 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
80 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
// mars robot 1
...
/* Initial beliefs */
+!take(S,L) : true
at(P) :- pos(P,X,Y) & pos(r1,X,Y). <- !ensure_pick(S);
!at(L);
/* Initial goal */ drop(S).
+!carry_to(R)
<- // remember where to go back
?pos(r1,X,Y);
-+pos(last,X,Y);
// carry garbage to r2
!take(garb,R);
81 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
2APL
BDI-based agent-oriented programming language integrating
declarative programming constructs (beliefs, goals) and
imperative style programming constructs (events, plans)
Java-based Environment API
Environment base class
implementing actions as methods
inside action methods external events can be generated to be
perceived by agents as percepts
82 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
package blockworld;
...
83 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
BeliefUpdates: ...
{ bomb(X,Y) } RemoveBomb(X,Y){ not bomb(X,Y) }
{ true } AddBomb(X,Y) { bomb(X,Y) } PC-rules:
{ carry(bomb) } Drop( ) { not carry(bomb)} goto( X, Y ) <- true |
{ not carry(bomb) } PickUp( ) { carry(bomb) } {
@blockworld( sensePosition(), POS );
Beliefs: B(POS = [A,B]);
start(0,1). if B(A > X) then
bomb(3,3). { @blockworld( west(), L );
clean( blockWorld ) :- goto( X, Y )
not bomb(X,Y) , not carry(bomb). }
else if B(A < X) then
Plans: { @blockworld( east(), L );
B(start(X,Y)) ; goto( X, Y )
@blockworld( enter( X, Y, blue ), L ) }
else if B(B > Y) then
Goals: { @blockworld( north(), L );
clean( blockWorld ) goto( X, Y )
}
PG-rules: else if B(B < Y) then
clean( blockWorld ) <- bomb( X, Y ) | { @blockworld( south(), L );
{ goto( X, Y )
goto( X, Y ); }
@blockworld( pickup( ), L1 ); }
PickUp( );
RemoveBomb( X, Y ); ...
goto( 0, 0 );
@blockworld( drop( ), L2 );
Drop( )
}
...
84 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
EIS Meta-Model
86 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Interface functions
attaching, detaching, and notifying observers (software design
pattern);
registering and unregistering agents;
adding and removing entities;
managing the agents-entities-relation;
performing actions and retrieving percepts;
managing the environment
Interface Intermediate language
to facilitate data-exchange
encoding percepts, actions, events
87 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
88 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
89 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
90 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Abstraction Support
91 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Interaction-Mediation Support
92 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
93 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
94 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Environment Programming
95 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
96 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Abstraction
keeping the agent abstraction level e.g. no agents sharing and
calling OO objects
effective programming models for controllable and observable
computational entities
Modularity
away from the monolithic and centralised view
Orthogonality
wrt agent models, architectures, platforms
support for heterogeneous systems
97 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Dynamic extensibility
dynamic construction, replacement, extension of environment
parts
support for open systems
Reusability
reuse of environment parts for different kinds of applications
98 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
CLOCK WHITEBOARD
BAKERY
artifact artifact workspace
ARCHIVE
artifact
COM. CHANNEL
artifact
RESOURCE
artifact
TASK SCHEDULER
artifact
101 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Agents
autonomous, goal-oriented pro-active entities
create and co-use artifacts for supporting their activities
besides direct communication
Artifacts
non-autonomous, function-oriented, stateful entities
controllable and observable
modelling the tools and resources used by agents
designed by MAS programmers
Workspaces
grouping agents & artifacts
defining the topology of the computational environment
102 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Abstraction
artifacts as first-class resources and tools for agents
Modularisation
artifacts as modules encapsulating functionalities, organized
in workspaces
Extensibility and openness
artifacts can be created and destroyed at runtime by agents
Reusability
artifacts (types) as reusable entities, for setting up different
kinds of environments
103 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Manual consult
has
create
Workspace Artifact dispose
link
link
Observable
perceive
Property
observe
join
quit
104 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
SIGNALS
ObsPropName(Args)
OBSERVABLE
... PROPERTIES
USAGE
INTERFACE OperationX(Params)
...
OPERATIONS
OperationY(Params)
...
LINK
INTERFACE
105 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
A World of Artifacts
n_records 1001
state available
count 5 table_names ...
state true wsdl ... ... ...
inc
reset switch GetLastTradePrice createTable
... addRecord
a flag query
a counter ...
a Stock Quote Web Service
a data-base
106 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
A Simple Taxonomy
107 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
PropName Value
PropName Value
...
op(parms) ...
action
op(Params)
AGENT
109 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
SIGNALS
PropName Value OBS PROPERTIES
CHANGE
Value
...
op(parms) ...
action
op(Params)
AGENT OPERATION EXECUTION
action completion
- with success or failure -
PropName(Value).
PropName(Value).
...
PropName Value
PropName Value
Belief base ...
(or alike) focus
AGENT
OBSERVER
111 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
PropName(Value).
PropName(Value).
...
PropName Value
PropName Value
Belief base ...
(or alike)
use
AGENT
OBSERVER
By focussing an artifact
observable properties are mapped into agent dynamic
knowledge about the state of the world, as percepts
e.g. belief base
signals are mapped as percepts related to observable events
112 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Artifact Linkability
linkedOp
WSP-X WSP-Y
113 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Artifact Manual
114 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
CArtAgO
115 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
116 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
JaCa Platform
117 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
void init(){
defineObsProp("count",0); count 5
}
USER(S) OBSERVER(S)
!create_and_use. !observe.
-?myTool(CounterId): true
<- .wait(10);
?myTool(CounterId).
Pre-defined Artifacts
PRODUCERS CONSUMERS
item_to_produce(0). !consume.
!produce.
+!consume: true
+!produce: true <- ?bufferReady;
<- !setupTools(Buffer); !consumeItems.
!produceItems.
+!consumeItems: true
+!produceItems : true <- get(Item);
<- ?nextItemToProduce(Item); !consumeItem(Item);
put(Item); !!consumeItems.
!!produceItems.
+!consumeItem(Item) : true
+?nextItemToProduce(N) : true <- .my_name(Me);
<- -item_to_produce(N); println(Me,": ",Item).
+item_to_produce(N+1).
+?bufferReady : true
+!setupTools(Buffer) : true <- lookupArtifact("myBuffer",_).
<- makeArtifact("myBuffer","BoundedBuffer", -?bufferReady : true
[10],Buffer). <-.wait(50);
?bufferReady.
-!setupTools(Buffer) : true
<- lookupArtifact("myBuffer",Buffer).
122 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Remarks
123 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
124 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Internal operations
execution of operations triggered by other operations
implementing controllable processes
125 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
value 16.0 ok
setValue closed
user
agent
126 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
linkActionEventToOp(frame.okButton,"ok"); +value(V)
linkKeyStrokeToOp(frame.text,"ENTER","updateText"); <- println("Value updated: ",V).
linkWindowClosingEventToOp(frame, "closed");
defineObsProperty("value",getValue()); +ok : value(V)
frame.setVisible(true); <- setValue(V+1).
}
+closed
@INTERNAL_OPERATION void ok(ActionEvent ev){ <- .my_name(Me);
signal("ok"); .kill_agent(Me).
}
@INTERNAL_OPERATION
void updateText(ActionEvent ev){
updateObsProperty("value",getValue());
}
127 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Other Features
128 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
130 / 200
Introduction AOP EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up
Wrap-up
Environment programming
environment as a programmable part of the MAS
encapsulating and modularising functionalities useful for
agents’ work
Artifact-based environments
artifacts as first-class abstraction to design and program
complex software environments
usage interface, observable properties / events, linkability
artifacts as first-order entities for agents
interaction based on use and observation
agents dynamically co-constructing, evolving, adapting their
world
CArtAgO computational framework
programming and executing artifact-based environments
integration with heterogeneous agent platforms
JaCa case
131 / 200
Organisation Oriented
Programming
— OOP —
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
mission
role ORGAMISATION
org
LEVEL
agent
AGENT
LEVEL
artifact ENDOGENOUS
ENVIRONMENT
wsp
LEVEL
EXOGENOUS
ENVIRONMENT
133 / 200
Outline
4 Organisation Oriented Programming (OOP)
Fundamentals
Motivations
Some OOP approaches
Focus on the Moise framework
Moise Organisation Modelling Language (OML)
Moise Organisation Management Infrastructure (OMI)
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
What is an organisation?
135 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
What is an organisation?
135 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Agent Centred
Organisation Centred
Organisation Specification Local Representation Designer / Observer
Organisation Entity Observed Organisation Bottom-up Top-down
137 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Agent Centred
Swarms, AMAS, SASO Social Reasoning
Self-organisations … Coalition formation
Contract Net Protocol …
Organisation is observed. Organisation is observed.
Implicitly programmed Coalition formation
in Agents, Interactions,
mechanisms programmed
Environment.
in Agents.
Agents don’t know Agents know
about organisation about organisation
138 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Programming outside
the agents
Agent
Using organisational
concepts
Agent To define a cooperative
Organisation
Specification pattern
139 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Agent
Organisation
Entity
139 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Agent
Second approach
Agent
Agents are forced to
Organisation follow the program
Specification
Agent
Organisation
Entity
139 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Agent
Second approach
Agent
Agents are forced to
Organisation follow the program
Specification
Agents are rewarded if
Agent they follow the program
...
Organisation
Entity
139 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Agent
Components
Programming language
Agent (OML)
Organisation
Specification Platform (OMI)
Integration to agent
Agent
architectures and
environment
Organisation
Entity
139 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Components of OOP:
Organisation Modelling Language (OML)
140 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Components of OOP:
Organisation Management Infrastructure (OMI)
141 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Components of OOP:
Integration mechanisms
Agent integration mechanisms
allow agents to be aware of and to deliberate on:
entering/exiting the organisation
modification of the organisation
obedience/violation of norms
sanctioning/rewarding other agents
e.g. J -Moise+ [Hübner et al., 2007], Autonomy based
reasoning [Carabelea, 2007], ProsA2 Agent-based reasoning
on norms [Ossowski, 1999], ...
Environment integration mechanisms
transform organisation into embodied organisation so that:
organisation may act on the environment (e.g. enact rules,
regimentation)
environment may act on the organisation (e.g. count-as rules)
e.g [Piunti et al., 2009b], [Okuyama et al., 2008]
142 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
143 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
144 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
146 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
147 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
148 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Summary
Several models
Several dimensions on modelling organisation
Structural (roles, groups, ...)
Functional (global plans, ....)
Dialogical (scenes, protocols, ...)
Normative (norms)
149 / 200
The Moise Framework
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Moise Framework
OML (language)
Tag-based language
(issued from Moise [Hannoun et al., 2000],
Moise+ [Hübner et al., 2002],
MoiseInst [Gâteau et al., 2005])
OMI (infrastructure)
developed as an artifact-based working environment
(ORA4MAS [Hübner et al., 2009a] based on CArtAgO
nodes, refactoring of S-Moise+ [Hübner et al., 2006] and
Synai [Gâteau et al., 2005])
Integrations
Agents and Environment (c4Jason, c4Jadex
[Ricci et al., 2009b])
Environment and Organisation ([Piunti et al., 2009a])
Agents and Organisation (J -Moise+ [Hübner et al., 2007])
151 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Environment
P
E
OS
Structural OF Functional
Specification B Specification
152 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Agent Goal
Structural create
Specification delete
create
delete
Normative Social Scheme
Specification
Group achieve
Functional
Specification Goal
adopt
leave
commit
leave
Mission
Role Norm
153 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Moise OML
154 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
155 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
m1, m2, m3
score a goal
m1 m3
get the ball shot at the opponent’s goal
m1 m2
go towards the opponent field kick the ball to the goal area
m2 m2
be placed in the middle field go to the opponent back line
m1
m3
kick the ball to (agent committed to m2)
be placed in the opponent goal area
158 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Goal States
waiting enabled
impossible satisfied
160 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
161 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Organisational Entity
group schema
instances role instances
mission Organisation
player player Entity
agents
162 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
163 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Organisation OMI
Specification
164 / 200
Introduction AOP EOP OOP Conclusion Introduction Motivations OOP Moise
Summary – Moise
165 / 200
Programming MAS
in JaCaMo
Introduction AOP EOP OOP Conclusion Configuration
INTERNAL
BELIEFS GROUPS ROLES
EVENTS
GOALS SANCTIONS
PLANS MISSIONS REWARDS
?
AGENTS Agent Prog. FrameworkORGANISATIONS
Language
CarTaGO JADE
Platform Platform SPEECH COMMUNICATION
RESOURCES ACTS LANGUAGES
LEGACY
INTERACTION
SERVICES OBJECTS PROCOLS
ENVIRONMENTS INTERACTIONS
167 / 200
Introduction AOP EOP OOP Conclusion Configuration
Exploiting Orthogonality
168 / 200
Introduction AOP EOP OOP Conclusion Configuration
JaCaMo
169 / 200
Introduction AOP EOP OOP Conclusion Configuration
JaCaMo Meta-Model
Environment
Manual consult External Action Internal Action
dimension
has
create
Workspace Artifact dispose Action
link
Agent
join dimension
quit
update generate
Belief
perceive
Goal
create
create delete
delete
Social Scheme
Group
Goal commit
adopt leave
leave
Organisation Mission
Role Norm
dimension
170 / 200
Introduction AOP EOP OOP Conclusion Configuration
JaCaMo Platform
artifact(SB,SchemeBoard,ID1) Specification
Specification
artifact(CONS,Console,ID2) Groups
Schemes
... Players
Goals
Goals
Obbligations
linkArtifacts adoptRole
lookupArtifact leaveRole commintMission
(make/dispose)Artifact addScheme leaveMission
quitWorkspace removeScheme setGoalAchieved
NodeArtifact
workspace(WspName,ID)
...
Console
createWorkspace
joinWorkspace
joinRemoteWorkspace print
shutdownNode println
Platform
Java Platform
level
Operating System
171 / 200
Introduction AOP EOP OOP Conclusion Configuration
Downloads
172 / 200
Introduction AOP EOP OOP Conclusion Configuration
JaCaMo Wizard
173 / 200
Introduction AOP EOP OOP Conclusion Configuration
174 / 200
Introduction AOP EOP OOP Conclusion Configuration
Code organization
175 / 200
Introduction AOP EOP OOP Conclusion Configuration
176 / 200
Introduction AOP EOP OOP Conclusion Configuration
Application in execution
177 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography I
Baldoni, M., Bentahar, J., van Riemsdijk, M. B., and Lloyd, J., editors (2010).
Declarative Agent Languages and Technologies VII, 7th International
Workshop, DALT 2009, Budapest, Hungary, May 11, 2009. Revised Selected
and 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 Invited
Papers, 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 International
Workshop, DALT 2005, Utrecht, The Netherlands, July 25, 2005, Selected and
Revised 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 Invited
Papers, volume 4897 of Lecture Notes in Computer Science. Springer.
178 / 200
Introduction AOP EOP OOP Conclusion Configuration
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 Invited
Papers, volume 5397 of Lecture Notes in Computer Science. Springer.
Behrens, T., Bordini, R., Braubach, L., Dastani, M., Dix, J., Hindriks, K.,
Hbner, J., and Pokahr, A. (2010).
An interface for agent-environment interaction.
In In Proceedings of International Workshop on Programming Multi-Agent
Systems (ProMAS-8).
Bernoux, P. (1985).
La sociologie des organisations.
Seuil, 3ème edition.
Bordini, R., Hübner, J., and Wooldridge, M. (2007a).
Programming Multi-Agent Systems in AgentSpeak Using Jason.
Wiley-Interscience.
179 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography III
Bordini, R. H., Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors
(2005a).
Multi-Agent Programming: Languages, Platforms and Applications, volume 15
of Multiagent Systems, Artificial Societies, and Simulated Organizations.
Springer.
Bordini, R. H., Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors
(2005b).
Programming Multi-Agent Systems, Second International Workshop ProMAS
2004, New York, NY, USA, July 20, 2004 Selected Revised and Invited Papers,
volume 3346 of Lecture Notes in Computer Science. Springer.
180 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography IV
Bordini, R. H., Dastani, M., Dix, J., and Fallah-Seghrouchni, A. E., editors
(2006b).
Programming Multi-Agent Systems, Third International Workshop, ProMAS
2005, 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
(2007b).
Programming Multi-Agent Systems, 4th International Workshop, ProMAS
2006, Hakodate, Japan, May 9, 2006, Revised and Invited Papers, volume 4411
of 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.
Bordini, R. H., Hübner, J. F., and Wooldridge, M. (2007c).
Programming Multi-Agent Systems in AgentSpeak Using Jason.
Wiley Series in Agent Technology. John Wiley & Sons.
181 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography V
Carabelea, C. (2007).
Reasoning about autonomy in open multi-agent systems - an approach based
on the social power theory.
in french, ENS Mines Saint-Etienne.
Dastani, M. (2008a).
2apl: a practical agent programming language.
Autonomous Agents and Multi-Agent Systems, 16(3):214–248.
Dastani, M. (2008b).
2APL: a practical agent programming language.
Autonomous Agent and Multi-Agent Systems, 16(3):214–248.
182 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography VI
183 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography VII
Dastani, M., Fallah-Seghrouchni, A. E., Ricci, A., and Winikoff, M., editors
(2008b).
Programming Multi-Agent Systems, 5th International Workshop, ProMAS
2007, Honolulu, HI, USA, May 15, 2007, Revised and Invited Papers, volume
4908 of Lecture Notes in Computer Science. Springer.
Dastani, M., Grossi, D., Meyer, J.-J., and Tinnemeier, N. (2009).
Normative multi-agent programs and their logics.
In Meyer, J.-J. and Broersen, J., editors, Knowledge Representation for Agents
and Multi-Agent Systems, volume 5605 of Lecture Notes in Computer Science,
pages 16–31. Springer Berlin / Heidelberg.
184 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography VIII
Fisher, M. (2005).
Metatem: The story so far.
In [Bordini et al., 2006b], pages 3–22.
185 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography IX
Gasser, L. (2001).
Organizations in multi-agent systems.
In Pre-Proceeding of the 10th European Worshop on Modeling Autonomous
Agents in a Multi-Agent World (MAAMAW’2001), Annecy.
186 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography X
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 1365
of Lecture Notes in Computer Science, pages 215–229. Springer.
Hindriks, K. V., Pokahr, A., and Sardiña, S., editors (2009).
Programming Multi-Agent Systems, 6th International Workshop, ProMAS
2008, Estoril, Portugal, May 13, 2008. Revised Invited and Selected Papers,
volume 5442 of Lecture Notes in Computer Science. Springer.
187 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XI
188 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XII
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 Invited
Papers, volume 2990 of Lecture Notes in Computer Science. Springer.
Leite, J. A., Omicini, A., Torroni, P., and Yolum, P., editors (2005).
Declarative Agent Languages and Technologies II, Second International
Workshop, DALT 2004, New York, NY, USA, July 19, 2004, Revised Selected
Papers, volume 3476 of Lecture Notes in Computer Science. Springer.
189 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XIII
Malone, T. W. (1999).
Tools for inventing organizations: Toward a handbook of organizational
process.
Management Science, 45(3):425–443.
190 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XIV
Omicini, A., Ricci, A., Viroli, M., Castelfranchi, C., and Tummolini, L. (2004).
Coordination artifacts: Environment-based coordination for intelligent agents.
In Proc. of the 3rd Int. Joint Conf. on Autonomous Agents and Multi-Agent
Systems (AAMAS’04), volume 1, pages 286–293, New York, USA. ACM.
Ossowski, S. (1999).
Co-ordination in Artificial Agent Societies: Social Structures and Its
Implications for Autonomous Problem-Solving Agents, volume 1535 of LNAI.
Springer.
191 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XV
192 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XVI
Platon, E., Mamei, M., Sabouret, N., Honiden, S., and Parunak, H. V. (2007).
Mechanisms for environments in multi-agent systems: Survey and
opportunities.
Autonomous Agents and Multi-Agent Systems, 14(1):31–47.
193 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XVII
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 of
Lecture Notes in Computer Science, pages 42–55. Springer.
Ricci, A., Denti, E., and Piunti, M. (2010a).
A platform for developing SOA/WS applications as open and heterogeneous
multi-agent systems.
Multiagent and Grid Systems International Journal (MAGS), Special Issue
about “Agents, Web Services and Ontologies: Integrated Methodologies”.
To Appear.
Ricci, A., Omicini, A., Viroli, M., Gardelli, L., and Oliva, E. (2007a).
Cognitive stigmergy: Towards a framework based on agents and artifacts.
In Weyns, D., Parunak, H. V. D., and Michel, F., editors, Environments for
MultiAgent Systems III, volume 4389 of LNAI, pages 124–140. Springer.
194 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XVIII
Ricci, A., Piunti, M., Acay, L. D., Bordini, R., Hübner, J., and Dastani, M.
(2008).
Integrating artifact-based environments with heterogeneous agent-programming
platforms.
In Proceedings of 7th International Conference on Agents and Multi Agents
Systems (AAMAS08).
195 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XIX
196 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XX
197 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XXI
Shoham, Y. (1993).
Agent-oriented programming.
Artif. Intell., 60(1):51–92.
Tambe, M. (1997).
Towards flexible teamwork.
Journal of Artificial Intelligence Reseearch, 7:83–124.
Viroli, M., Holvoet, T., Ricci, A., Schelfthout, K., and Zambonelli, F. (2007).
Infrastructures for the environment of multiagent systems.
Autonomous Agents and Multi-Agent Systems, 14(1):49–60.
198 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XXII
Winikoff, M. (2005).
Jack intelligent agents: An industrial strength platform.
In [Bordini et al., 2005a], pages 175–193.
199 / 200
Introduction AOP EOP OOP Conclusion Configuration
Bibliography XXIII
Wooldridge, M. (2002).
An Introduction to Multi-Agent Systems.
John Wiley & Sons, Ltd.
200 / 200