Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS...

21
Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS [email protected] http://www-poleia.lip6.fr/~elfallah
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    224
  • download

    0

Transcript of Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS...

Page 1: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Programming Principles for Multi-Agent Systems

Amal El Fallah SeghrouchniLIP6 and CNRS

[email protected]://www-poleia.lip6.fr/~elfallah

Page 2: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Talk outline

Classes of problems addressed with MAS

Techniques

AdaptationsFrom A.I. to D.A.I.

MAS & Distributed Systems

MAS & Software Engineering

Some comments

Page 3: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

What do we implement using / as agent(s) ?

Software Engineering Artificial Intelligence

Distributed Systems

Internet

LIP6

Page 4: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Classes of scientific problems [AS, CNRS]

SoftwareEngineering

Distributed Problem Solving

Simulation and

Modelling

MAS Simulation Individual-Based Modelling Interactions Environment

Cooperative problem solving Cognitive/Top-Down(multi-experts) Reactive/emergence(ex : eco-systems)

Agent-Oriented Software Engineering Flexible Cooperative

Page 5: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

MAS space

MAS

Artificial intelligenceAutonomyGoal-drivenPro-activityDecision makingKnowledge/reasoning

Concurrency

Communication protocols Organisational models

Intelligent skills

Protocols of cooperation, coordination

Interaction

From agent (individual)

to MAS (collective)

behaviours

Formalisms, Middleware, Distributed algorithms, mobile code, etc..

Alessandro’s talk

Gregory’s talk

Anna’s talk

Page 6: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

MAS: which techniques?

SoftwareEngineering

Distributed Problem Solving

Simulation and

Modelling

Object MethodsDistributed Systems

PlanningDecision makingReasoning…

Knowledge representation Game theoryOperational researchPlethora of logics…

Evolutionary theoryBio-inspired approachesArtificial life…

Page 7: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Reuse, extension, or else ?

From A.I. to D.A.I. How to shift from single-agent to multi-agent behaviour, e.g.

Multi-agent planning,

Collective learning,

Distributed decision making (cooperative versus self interested agents),

Mutual, distributed or common knowledge for reasoning

Collective B, D, I ???

Etc.

Autonomy

MAS added-value (if any) and how to make it effective ?consequences at all the stages of the software designi.e. Reification at the implementation level

Anna’s talk

Page 8: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

MAS & Distributed Systems

Distributed Systems as support for MAS implementation and deployment

Models of calculus ( e.g. true concurrency versus interleaving semantics)

Distributed observation (for debugging, explanation, learning..)

Distributed algorithms (group communication, consensus, ..)

Fault-tolerance mechanisms (robustness)

Load balancing and resource sharing (efficiency, fairness),

Mobile code, migration and security techniques (encryption, …)

Reuse of conventional technologies (Middleware, CORBA..)

Page 9: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

MAS & Distributed Systems

But .. A compromise between autonomy and coherent collective behaviour “Verifiable” behaviour e.g.

Dynamic: on-the-fly mechanismsInteraction and processes (e.g. bissimulation) Event driven models (e.g. reachability graphs, invariant calculus, ..)Rafael’s talk (Model checking and theorem proving)

Real-time aspects Open protocols Suitable formalisms (i.e. replace processes by intelligent agents)

Page 10: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Example: the issue of protocol engineering in MAS

Specification, verification, performance analysis, implementation and test

Main questionsAnalysis and specification

how to obtain formal specification of protocols from informal (or semi-formal) ones?

Verification What are the relevant properties of protocols?When to validate them: downstream, on-line or upstream the interaction process?

Performance analysisHow to evaluate the protocols in practice?

Agents’ autonomyWhich compromise between local autonomy of agents and the protocols as global rules of behaviour ?

GENERIC

MAS

Page 11: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Engineering of open protocol in MAS

Methodology based on 2 phases [AAMAS 2002]1. Conception and design phase: help the designer to build and to

validate the interaction protocols

2. Execution and evaluation phase: debugging the protocols [IJCA’98]

Execution

Observation

Recognition

Evaluation

Specification of CPN

Validation

Analysis

Specification ofprotocols' diagrams

AUML C

PN(R)

1. Conception-design PhaseSE

2. Execution-evaluation PhaseDS

Page 12: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Execution-Evaluation Phase

1 : Distributed MAS execution On-line distributed observation [IJCA’01] Local traces of sending/receiving messages

3 : Recognition of interaction protocols based on CPN unfolding [MAAMAW’99] (McMillan and Esparza)

Protocol patterns

Recognition Algorithm

I1(A,B)

I2 (B,C)I3(A,B,C)

4 : Analysis and explanation of agents ’ behaviours during interaction

e1 e2

e 3

e 5e4

2 : Build the global causal graph of allevents inherent to agents’ interactions

(vectorial clocks of Fidge and Mattern)

A

B

C

Page 13: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Distributed observation of interactionsStudy the dynamic of the conversations between agents

Knowledge about the evolution of the agents,

tracking and detecting inconsistencies,

performance and concurrency measurements, ...

Use causality to order observed eventsrelevant events = Communicative acts (sending and receiving events) + local significant actions of the agents,

use logical vectorial clocks [Fidge and Mattern, 88] to capture causality between events,

build local traces on each agent,

merge the traces into global trace,

exploit the global trace to build a causal graph of the overall events of interactions.

Page 14: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

How to distinguish between the two protocols at the execution level ?

e4

T1

T2

T3

T4

P1

P0

P4

P3

P2

e1

e2 : Sending a request to the agent <Y>

e3 : Reception of a response from agent <Y>< S - X >

< S - X >

< X >< Y >

< X >

< Y >

< Y >

< Y >

P5

(b) Protocol 2

T1

T2

T3

T4

P1

P0

P4

P3

P2

e1

e2 : Sending a request to the agent <Y>

e3 : Reception of a response from agent <Y>< S - X >

< S - X >

< X >< Y >

< X >

< Y >

< Y >

< Y >e4

(a) Protocol 1

S = {A,B,C} ; X = {A} ; Y = {B,C}

e1(A)

e2(B)

e2(C) e2(C)

e4(A)

e3(B)

(c) Causal graph

True-Concurrency Semantics

Page 15: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Some responses to modelling requirements

Analysis and specificationHow to obtain formal specification of protocols from informal (or semi-formal) ones?Translate Protocol Diagrams into CPNCPN is a suitable formalism for design, analysis and verification of complex interactions

allows to build robust interaction offers several operations on elementary protocols (composition, sequencing, and parallelisation)

Agents’ autonomyWhich compromise between the local autonomy of agents and the protocols as global rules of behaviour ?

A new formalism to design Open Protocols: RCPN A set of consistent protocols to deal with complex protocols involving groups of agents (election, vote, etc.) Extension of CPN with abstraction at modelling level, and refinement at execution level

Page 16: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Some responses to validation requirements

Verification: What are the relevant properties of protocols?Structural liveness: from an initial state, for any accessible state, at least one transition is fired

Consistency: there is a control that guarantees to come back to some desirable state, or to a homestate

Boundedness: the number of messages remains bounded

Accessibility: guarantees the control of a protocol ; e.g. to reach some desirable state

Liveness: stronger than the absence of deadlock. It means that for any initial state, all the operations can always be executed (in our semantics, different ending transitions are added to the model)

++ Behavioural properties !!! Qualitative criteria !!!

When: downstream, on-line or upstream the interaction process?

A priori: structural validation, during the interaction process: observation and unfolding techniques and a posteriori: after debugging phase (Design/CPN)

Page 17: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

MAS & SE: Duality

MAS uses key techniques from SE like abstraction, inheritance, modularity, overloading, information hiding, error handling, generic programming, compositionality, and separation of concerns (Objects, Components, Patterns)

SE inspires MASAnalysis: Methodological aspects (Aalaadin, Gaia, Tropos…)Specification: Modelling (UML extension, e.g. AUML, MAS-ML)

Design:Design patterns ([Kendall 95], [Honiden 00], [Sauvage 04]…)

Advanced techniques (Aspect-Oriented Programming [Garcia 04],…)

Architectures, Platforms, Standards (FIPA), etc.

SE uses key concepts of MAS to introduce flexibility, autonomy, adaptation, etc.

Page 18: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Programming perspective

Level of abstraction

Action selection(binding + or - late)

Decoupling

bits

Data structures

objects, messages

models, anthologies

agents, intentions, plans

Procedure call

Methodcall

Actionselection

Fortran

modules

objects

actors/asynchronous

components

agents

Interview Les Gasser, IEEE Concurrency 1998• concept of persistent action

A programme that tries repetitively to perform an action

• mission and initiatives to perform actions

Page 19: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Another view [Odell, 99]

non modular modular modular modular

external external internal internal

externalexternal

(call)

external

(message)

Internal

(rules, goals)

Monolithic Modular Objects Agents

Behaviour

State

Invocation(and choice)

Programming

Page 20: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

Conclusion: some comments

Few open sources: Mostly platforms

Very few languagesMostly based on logics (Jason, 3-APL, …) Joao’s talk

Most are implemented using JAVA (Agent-Factory) Gregory’s talk

Not much are based on process algebra (ViP, CLAIM)

Public implementations of MAS Open sources: Madkit, Dima, Jade, Jadex, Agent-Factory…

Desire (?), MobileSpace (?)

Jack (Commercial product)

Both Agent and MAS levels are concerned

Page 21: Programming Principles for Multi-Agent Systems Amal El Fallah Seghrouchni LIP6 and CNRS Amal.Elfallah@lip6.fr elfallah.

ProMAS 2003LNAI, vol. 3067

ProMAS 2004LNAI, vol. 3346

ProMAS 2005Not to be missed !!

Series of ProMAS Workshops

Thanks