A Programming Language for Normative Multi

A Programming Language for Normative Multi-Agent
Systems
Mehdi Dastani
MAP 2012
M. Dastani (MAP 2012)
NMPL
MAP, 2012
1 / 17
Background (1)
Multi-agent systems as promising candidate to construct software systems
that:
are open and consist of individual autonomous and heterogenous
Open: agents dynamically enter and exit the system
Autonomy: each agent pursues its own objective.
Heterogeneity: internal state and operations of an agent is not known
to external entities.
The overall objective of multi-agent systems can be achieved by
coordinating (regulating) the observable/external behavior of the
involved agents.
norms (e.g. obligations, prohibitions) are a popular candidate
norms are rules that dictate the ideal behavior that should be exhibited
In order to implement multi-agent systems, one needs to be able to
program individual agents as well as their coordination mechanism.
M. Dastani (MAP 2012)
NMPL
MAP, 2012
2 / 17
Background (2)
Programming languages that support the implementation of individual
agents.
Some are declarative (e.g., MetateM, IMPACT), some are imperative
(e.g., JACK, JADE), and others are a combination of both (e.g.,
2APL, Jason, Jadex).
Most agent-oriented programming languages provide constructs to
implement individual BDI (Belief, Desire, Intention) agents (e.g.,
Jadex, Jack, IMPACT).
Some provide few programming constructs to implement multi-agent
system issues such as declaring resources and the agents’ access
relation to these resources (e.g., 2APL, Jason, CLAIM).
M. Dastani (MAP 2012)
NMPL
MAP, 2012
3 / 17
Background (3)
Programming languages and execution models that support the
implementation of coordination mechanisms.
Artifacts and languages that are defined in terms of coordination
concepts such as synchronization, shared-space, channels, sensing,
e.g., CARTAGO, ReSpecT, REO, Linda.
Organizational models, normative systems, and electronic institutions
that are defined in terms of social and organizational concepts, e.g.,
Moise+ , ISLANDER/AMELI, and PowerJava.
M. Dastani (MAP 2012)
NMPL
MAP, 2012
4 / 17
Characterisation of a MAS (e.g. Gaia)
(-:
agent organization 1
(-:
agent
interactions
(-:
(-:
(-:
agent organization 2
sphere of influence
and visibility
environment
M. Dastani (MAP 2012)
NMPL
MAP, 2012
5 / 17
Agents and Organizational Artifacts
(:
agent organization 1
(:
agent
interactions
(:
(:
(:
(:
agent organization 2
interactions
interface
organizational
organizational
organizational
artifact 1
artifact 2
artifact 3
M. Dastani (MAP 2012)
NMPL
MAP, 2012
6 / 17
Organizational Artifacts
Brute facts model the domain
specific state;
sanctioning rules
counts-as rules
Agents modify brute facts by
performing actions;
Brute state is normatively assessed
by counts-as rules;
Counts-as rules link brute state to
institutional facts;
coordination
cycle
brute facts
Normative judgment and role
enactment stored by institutional
facts;
institutional facts
Judgment might lead to sanctions
(punishments and rewards);
Coordination cycle determines order
in which constructs are applied.
M. Dastani (MAP 2012)
NMPL
MAP, 2012
7 / 17
Motivation
Design and develop a programming language that support the
implementation of coordination mechanisms in terms of social and
organizational concepts.
A logic that can be used to specify and verify programs that
implement such a coordination mechanism.
M. Dastani (MAP 2012)
NMPL
MAP, 2012
8 / 17
Multi-Agent Systems: Operational Semantics (1)
Multi-Agent System Configuration: hA1 , . . . , An , σi
Ai is the state of individual agent
σ is the state of the environment
We assume transition rules for an individual agent’s action through
which we can derive (individual agent) state transitions, i.e.,
α!
Ai −→ A0i .
We assume transition rules for the realization of action effects through
α?
which we can derive environment state transitions, i.e., σ −→ σ 0
Multi-Agent System Transitions can then be derived by the following
transition rule:
α!
α?
Ai −→ A0i
σ −→ σ 0
hA1 , . . . , Ai , . . . , An , σi −→ hA1 , . . . , A0i , . . . , An , σ 0 i
M. Dastani (MAP 2012)
NMPL
MAP, 2012
9 / 17
Multi-Agent Systems: Operational Semantics (2)
Transition rules for communication actions are based on synchronized
massage exchange, i.e.,
φ!
Ai −→ A0i
φ?
Aj −→ A0j
hA1 , . . . , Ai , . . . , Aj , . . . , An , σi −→ hA1 , . . . , A0i , . . . , A0j , . . . , An , σi
M. Dastani (MAP 2012)
NMPL
MAP, 2012
10 / 17
Normative Multi-Agent Organisation: An Example
To program an artifact is to specify the roles that can be played, the initial
brute state and the effect actions have on the brute facts, e.g. a simplified
implementation of a conference management system:
Roles:
chair, reviewer, author
Brute Facts:
phase(closed)
Effect Rules:
{rea(C,chair), phase(closed)}
open(C)
{not phase(closed), phase(abstracts)}
..
.
{rea(R,reviewer), phase(review), assigned(R,P)}
uploadReview(R,P)
{review(R,P)}
M. Dastani (MAP 2012)
NMPL
MAP, 2012
11 / 17
Normative Multi-Agent Organisation: An Example (cont’d)
Counts-as rules normatively judge the brute state. Sanctioning rules specify
the consequences for the brute state of a particular normative assessment.
Consider the following counts-as and sanctioning rule for the conference
management system example:
Counts-As Rules:
{paper(A,PId), pages(PId) > 15}
=>
{viol(pagelimit,PId)}
Sanctioning Rules:
{viol(pagelimit,PId)}
=>
{rejected(PId)}
M. Dastani (MAP 2012)
NMPL
MAP, 2012
12 / 17
Normative Multi-Agent Organisation: An Example (cont’d)
Roles: chair, reviewer, author
Brute Facts: phase(closed)
Effect Rules:
{rea(C,chair), phase(closed)}
open(C)
{not phase(closed), phase(abstracts)}
..
.
{rea(R,reviewer), phase(review), assigned(R,P)}
uploadReview(R,P)
{review(R,P)}
Counts-As Rules:
{paper(A,PId), pages(PId) > 15}
=>
{viol(pagelimit,PId)}
Sanctioning Rules:
{viol(pagelimit,PId)}
=>
{rejected(PId)}
M. Dastani (MAP 2012)
NMPL
MAP, 2012
13 / 17
Normative Multi-Agent Systems: Operational Semantics (1)
Pb and Pn are disjoint sets of literals denoting brute and normative
facts, respectively.
Normative Multi-Agent System Configuration: h{A1 , . . . , An }, σb , σn i,
where σb ⊆ Pb and σn ⊆ Pn .
We assume transition rules for an individual agent’s action through
which we can derive state transitions, i.e.,
α(i)
Ai −→ A0i : agent i can perform external action α.
M. Dastani (MAP 2012)
NMPL
MAP, 2012
14 / 17
Normative Multi-Agent Systems: Operational Semantics (2)
Given a set R of rules and a set X of literals, we define the set of
applicable rules in X as ApplR (X ) = {Φ ⇒ Ψ | X |= Φ}.
R
R
ClR (X ) = ClR
m+1 (X ) iff Clm+1 (X ) = Clm (X ), where
S
B: ClR
0 (X ) = X ∪ ( l∈ApplR (X ) consl )
S
R
S: ClR
consl )
n+1 (X ) = Cln (X ) ∪ ( l∈ApplR (ClR
n (X ))
The effect of an agent’s action α(i) in the (brute) environment is
determined based on the specification of the action (Φ α(i) Φ0 ), i.e.,
up(α(i), σb ) = (σb ∪ Φ0 ) \ ({p | −p ∈ Φ0 } ∪ {−p | p ∈ Φ0 })
M. Dastani (MAP 2012)
NMPL
MAP, 2012
15 / 17
Normative Multi-Agent Systems: Operational Semantics (3)
Let action α(i) be specified as follows: (Φ α(i)Φ0 ).
Ai ∈ A
α(i)
Ai → A0i
σn0 = ClRc (σb0 ) \ σb0
σb |= Φ
σn0 6|= viol⊥
σb0 = up(α(i), σb )
S = ClRs (σn0 ) \ σn0
σb0 ∪ S 6|= ⊥
hA, σb , σn i −→ hA0 , σb0 ∪ S, σn0 i
where A0 = (A \ {Ai }) ∪ {A0i } and viol⊥ is the designated literal for
regimentation.
M. Dastani (MAP 2012)
NMPL
MAP, 2012
16 / 17
Conclusion and Future Works
A Programming language to implement multi-agent system
organization.
Adding more social constructs such as roles, relations between roles,
and contracts.
More expressive language for norms and sanctions, e.g., use temporal,
deontic operators.
Facilitating tools for norm aware agents.
M. Dastani (MAP 2012)
NMPL
MAP, 2012
17 / 17