Organisation and Environment
               Oriented Programming
                                                                                                     Outline of the course
                                                                                         Introduction
                Olivier Boissier1 , Rafael H. Bordini2 ,                                 EOP
                Jomi F. H¨bner3 , Alessandro Ricci4
                           u                                                                 About Environment Oriented Programming
                     1 EMSE,                     2 PUC-RS,
                                                                                             A&A and CArtAgO
                             France                       Brazil
                Olivier.Boissier@emse.fr       R.Bordini@pucrs.br                        OOP
                   3 DAS-UFSC,  Brazil     4 University
                                                      of Bologna, Italy                      About Organisation Oriented Programming
                    jomi@das.ufsc.br            a.ricci@unibo.it
                                                                                             Moise
                                                                                         Conclusions
            European Agent Systems Summer School                                         Practical Exercise: a hands-on lab session!
                 May, 2012 — Valencia, Spain




                                                                                            Introduction EOP OOP Conclusion

                                                                                    Abstractions in Multi-Agent Systems
                                                                                                                      schema



                                                                                                                                      mission
                                                                                                                               role             ORGAMISATION
                                                                                               org
                                                                                                                                                LEVEL




                    Introduction                                                                              agent


                                                                                                                                                AGENT
                                                                                                                                                LEVEL




                                                                                                         artifact                               ENDOGENOUS
                                                                                                                                                ENVIRONMENT
                                                                                                                wsp
                                                                                                                                                LEVEL



                                                                                                                                                EXOGENOUS
                                                                                                                                                ENVIRONMENT
                                                                                                                                                               4 / 165
                                                                                                 network node




        Introduction EOP OOP Conclusion                                                     Introduction EOP OOP Conclusion

Abstractions in Multi-Agent Systems                                                 Agent Oriented Programming

     Individual Agent Level: autonomy, situatedness
         Cognitive Concepts: beliefs, desires, goals, intentions, plans
                                                                                         Proposed by Shoham [Shoham, 1993]
         Reasoning Cycle: sense/reason/act, reactive/pro-active                          Use of mentalistic notions and a societal view of
         behaviour                                                                       computation (anthropomorphism)
     Environment Level: resources and services that agents can                           Levels of abstraction: Agents – Organisations – Environment
     access and control; sensing and acting in an environment                            Programming languages for agents have developed a lot
     Social and Organisation Level: cooperation, coordination,                           since then, but still not a mature paradigm
     regulation patterns                                                                 Programming languages/platforms for organisation and
         Roles: rights, responsibilities, ...                                            environment are also being developed
         Organisational Rules: constraints on roles and their
         interactions, norms, deadlines, ...                                             Some agent development platforms have a formal basis
         Organisational Structures: topology of interaction patterns                     Many influenced by the BDI agent architecture
         and relations over activity control


                                                                          5 / 165                                                                              6 / 165
Introduction EOP OOP Conclusion                                                     Introduction EOP OOP Conclusion

BDI Architecture                                                                     Programming Languages for Cognitive Agents


                                                                                               Programming Languages for Multi-Agent Systems
                                                                                        E.g., Jason, Jadex, JACK, 2APL, GOAL, Brahms, JIAC, Agent
      Intentional Stance (Dennett)
                                                                                                     Factory, MetateM, Golog variants, ...
      Practical Reasoning (Bratman)
      IRMA (Bratman, Isreal, Pollack)                                                      Architecture to represent an agent mental state:
      PRS (George↵, Lansky)                                                                    Beliefs: information available to agent (e.g., about the
      dMARS (Kinny)                                                                            environment or other agents)
                                                                                               Goals: states of a↵airs that the agent wants to achieve
      BDI Logics and Agent Architecture (Rao, George↵)
                                                                                               Events: changes in agents beliefs or goals
      Wooldridge, Singh, ...                                                                   Capabilities: reusable modules of activities that the agent
                                                                                               can perform
                                                                                               Plans: reasoning about courses of action to achieve goals
                                                                                               Rules: reasoning about beliefs


                                                                           7 / 165                                                                            8 / 165




          Introduction EOP OOP Conclusion                                                     Introduction EOP OOP Conclusion

Programming Languages for Cognitive Agents                                           Programming Languages/Platforms for Organisations


                                                                                           Concepts used to specify the state of an organisation:
      Some steps of a Reasoning Cycle:                                                         Agents, Roles, Groups
           Determining Relevant Plans for Handling Events                                      Norms, Obligations, Prohibitions, Permissions, Violations
           Select a Plan for Execution                                                         Dependency, Power, Delegation, Information flow relations
           Execute Part of an Intended Plans                                                   Deadlines, Sanctions, Rewards
           Handle Plan Failures                                                            Management Infrastructure to control and coordinate
                                                                                           agent behaviour at run-time:
    Agent Interpreter is an infinite loop of such reasoning cycles.                             Endogenous: The control is a part of the agent program
    The architecture and reasoning cycle together with the agent                               Exogenous: The control is performed by an external system
   program (specially plans) determine the behaviour of the agent.                                   Monitoring Agent Behaviour
                                                                                                     Enforcing Organisational Rules
                                                                                                     Regimenting Organisational Rules




                                                                           9 / 165                                                                           10 / 165




          Introduction EOP OOP Conclusion                                                     Introduction EOP OOP Conclusion

Programming Languages/Platforms for Environments                                     Hands-on Part of this Course


                                                                                           We will use JaCaMo
      Artifacts to represent the state of the environment                                  First fully operational, unified platform covering the 3 main
           Access to Databases/Services/etc., Coordination, Interaction                    levels of abstractions for multi-agent oriented programming
           Environment “objects”, i.e., non-proactive entities                             JaCaMo = Jason + CArtAgO + Moise
      Processing Operations on Artifacts                                                   http://jacamo.sourceforge.net
           Realising the e↵ects of environments actions                                        http://jason.sourceforge.net
           Providing events related to sensing the environment                                 http://cartago.sourceforge.net
           Synchronising agent actions                                                         http://moise.sourceforge.net
      At the right level of abstraction for a multi-agent system                           More than the sum of 3 successful platforms
                                                                                           Revealing the full potential of Multi-Agent Oriented
                                                                                           Programming



                                                                          11 / 165                                                                           12 / 165
Outline
         Environment Oriented                                                                    2   Environment Programming
                                                                                                       Why Environment Programming in MAS
             Programming                                                                               Basic Level
                                                                                                       Advanced Level
              — EOP —                                                                                  A&A and CArtAgO
                                                                                                       Conclusions and Wrap-up




        Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                    Introduction EOP OOP Conclusion               Introduction Basic Advanced CArtAgO Wrap-up

Back to the Notion of Environment in MAS                                                       Single Agent Perspective

                                                                                                                                                  sensors




     The notion of environment is intrinsically related to the                                                                      db
                                                                                                                                      ack




                                                                                                                                                                   pe
                                                                                                                                 fee                                          PERCEPTION




                                                                                                                                                                   rce
     notion of agent and multi-agent system




                                                                                                                                                                        pts
                                                                                                                ENVIRONMENT


         “An agent is a computer system that is situated in some                                                                                                              DECISION
                                                                                                                                   acti
                                                                                                                                                                        do
         environment and that is capable of autonomous action in                                                                       ons
                                                                                                                                                              tion
                                                                                                                                                                   to
                                                                                                                                                            ac                ACTION
         this environment in order to meet its design
         objective” [Wooldridge, 2002]                                                                                                       effectors / actuators
         “An agent is anything that can be viewed as perceiving
         its environment through sensors and acting upon the
         environment through e↵ectors.                                                                Perception
         ” [Russell and Norvig, 2003]                                                                     process inside agent inside of attaining awareness or
     Including both physical and software environments                                                    understanding sensory information, creating percepts
                                                                                                          perceived form of external stimuli or their absence
                                                                                                      Actions
                                                                                                          the means to a↵ect, change or inspect the environment
                                                                                    15 / 165                                                                                                     16 / 165




        Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                    Introduction EOP OOP Conclusion               Introduction Basic Advanced CArtAgO Wrap-up

Multi-Agent Perspective                                                                        Why Environment Programming

                                                                                                      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
     In evidence                                                                                                endogenous environments (vs. exogenous ones)
                                                                                                                programmable environments
         overlapping spheres of visibility and influence
         ..which means: interaction
                                                                                    17 / 165                                                                                                     18 / 165
Introduction EOP OOP Conclusion                   Introduction Basic Advanced CArtAgO Wrap-up                                             Introduction EOP OOP Conclusion                      Introduction Basic Advanced CArtAgO Wrap-up

Environment Programming: General Issues                                                                                                   Basic Level Overview

                                                                                                                                             MAS                                            MAS ENVIRONMENT

                                                                                                                                                                    actions
          Defining the interface                                                                                                                                                           SIMULATED                                      REAL WORLD
                                                                                                                                                                                                                     mimicking
                 actions, perceptions                                                                                                                                                       WORLD                                         (PHYSICAL OR
                                                                                                                                                                                                                                         COMPUTATIONAL)
                 data-model
                                                                                                                                                                                                 OR
          Defining the environment computational model &
          architecture
                 how the environment works                                                                                                                                                INTERFACE                                        EXTERNAL
                                                                                                                                                                                                                                            WORLD
                 structure, behaviour, topology                                                                                                                                                                                           (PHYSICAL OR
                 core aspects to face: concurrency, distribution                                                                                                                                                                         COMPUTATIONAL)
                                                                                                                                                                                                 OR
          Defining the environment programming model
                 how to program the environment                                                                                                                                         WRAPPER TO
                                                                                                                                                                                          EXISTING                                         Example:
                                                                                                                                                                  percepts                                                                   JAVA
                                                                                                                                                                                        TECHNOLOGY
                                                                                                                                              AGENTS                                                                                      PLATFORM


                                                                                                                               19 / 165                                                                                                                                  20 / 165




                Introduction EOP OOP Conclusion                   Introduction Basic Advanced CArtAgO Wrap-up                                             Introduction EOP OOP Conclusion                      Introduction Basic Advanced CArtAgO Wrap-up

Basic Level: Features                                                                                                                     An Example: Jason [Bordini et al., 2007]
                                                                                                                                                   Flexible Java-based Environment API
          Environment conceptually conceived as a single monolitic                                                                                           Environment base class to be specialised
          block                                                                                                                                                      executeAction method to specify action semantics
                                                                                                                                                                     addPercept to generate percepts
                 providing actions, generating percepts
          Environment API                                                                                                                                         Environment                                                 User                           Agent
                                                                                                                                             -globalPercepts: List<Literal>                                                Environment                    Architecture
                 to define the set of actions and program actions                                                                             -agPercepts: Map<String,List<Literal>>
                                                                                                                                             +init(String[] args)
                 computational behaviour                                                                                                     +stop()
                                                                                                                                                                                                                                          getPercepts
                          which include the generation of percepts                                                                           +getPercepts(String agName): List<Literal>
                                                                                                                                             +executeAction(String agName, Structure action): boolean
                 typically implemented using as single object/class in OO such                                                               +addPercept(String agName, Literal p)
                 as Java                                                                                                                     +removePercept(String agName, Literal p)
                                                                                                                                             ...
                          method to execute actions                                                                                                                                                                                       executeAction
                          fields to store the environment state                                                                                                   UserEnvironment
                 available in many agent programming languages/frameworks                                                                     +init(String[] args)
                                                                                                                                                                                                                      change
                                                                                                                                              +executeAction(String agName, Structure action): boolean
                          e.g., Jason, 2APL, GOAL, JADEX                                                                                                                                                              percepts




                                                                                                                               21 / 165                                                                                                                                  22 / 165




                Introduction EOP OOP Conclusion                   Introduction Basic Advanced CArtAgO Wrap-up                                             Introduction EOP OOP Conclusion                      Introduction Basic Advanced CArtAgO Wrap-up

MARS Environment in Jason                                                                                                                 Jason Agents Playing on Mars

                                                                                                                                            // mars robot 1
  public class MarsEnv extends Environment {                          ...
    private MarsModel model;                                                                                                                                                                             ...
    private MarsView view;                                              /* creates the agents perception                                    /* Initial beliefs */
                                                                         * based on the MarsModel */                                                                                                     +!take(S,L) : true
    public void init(String[] args) {                                 void updatePercepts() {                                               at(P) :- pos(P,X,Y) & pos(r1,X,Y).                              <- !ensure_pick(S);
          model = new MarsModel();                                                                                                                                                                             !at(L);
          view = new MarsView(model);                                     clearPercepts();                                                  /* Initial goal */                                                 drop(S).
          model.setView(view);
          updatePercepts();                                               Location r1Loc = model.getAgPos(0);                               !check(slots).                                               +!ensure_pick(S) : garbage(r1)
    }                                                                     Location r2Loc = model.getAgPos(1);                                                                                               <- pick(garb);
                                                                                                                                            /* Plans */                                                        !ensure_pick(S).
    public boolean executeAction(String ag, Structure action) {           Literal pos1 = Literal.parseLiteral                                                                                            +!ensure_pick(_).
      String func = action.getFunctor();                                      ("pos(r1," + r1Loc.x + "," + r1Loc.y + ")");                  +!check(slots) : not garbage(r1)
      if (func.equals("next")) {                                          Literal pos2 = Literal.parseLiteral
                                                                                                                                               <- next(slot);                                            +!at(L) : at(L).
        model.nextSlot();                                                     ("pos(r2," + r2Loc.x + "," + r2Loc.y + ")");
                                                                                                                                                  !!check(slots).                                        +!at(L) <- ?pos(L,X,Y);
      } else if (func.equals("move_towards")) {
        int x = (int)((NumberTerm)action.getTerm(0)).solve();             addPercept(pos1);
                                                                                                                                            +!check(slots).                                                         move_towards(X,Y);
        int y = (int)((NumberTerm)action.getTerm(1)).solve();             addPercept(pos2);                                                                                                                         !at(L).
        model.moveTowards(x,y);                                                                                                             +garbage(r1) : not .desire(carry_to(r2))
      } else if (func.equals("pick")) {                                   if (model.hasGarbage(r1Loc)) {                                       <- !carry_to(r2).
        model.pickGarb();                                                   addPercept(Literal.parseLiteral("garbage(r1)"));
      } else if (func.equals("drop")) {                                   }                                                                 +!carry_to(R)
        model.dropGarb();                                                                                                                      <- // remember where to go back
      } else if (func.equals("burn")) {                                   if (model.hasGarbage(r2Loc)) {                                          ?pos(r1,X,Y);
        model.burnGarb();                                                   addPercept(Literal.parseLiteral("garbage(r2)"));                      -+pos(last,X,Y);
      } else {                                                            }
        return false;                                                 }                                                                           // carry garbage to r2
      }                                                                                                                                           !take(garb,R);
                                                                      class MarsModel extends GridWorldModel { ... }
      updatePercepts();
                                                                                                                                                  // goes back and continue to check
      return true;                                                    class MarsView extends GridWorldView { ... }
                                                                                                                                                  !at(last);
    }                                                             }
    ...                                                                                                                                           !!check(slots).
                                                                                                                                            ...




                                                                                                                               23 / 165                                                                                                                                  24 / 165
Introduction EOP OOP Conclusion           Introduction Basic Advanced CArtAgO Wrap-up                                Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Another Example: 2APL [Dastani, 2008]                                                                                 Example: Block-world Environment in 2APL


                                                                                                                         package blockworld;
        2APL                                                                                                             public class Env extends apapl.Environment {
               BDI-based agent-oriented programming language integrating
               declarative programming constructs (beliefs, goals) and
                                                                                                                             public void enter(String agent, Term x, Term y, Term c){...}
               imperative style programming constructs (events, plans)
        Java-based Environment API                                                                                           public Term sensePosition(String agent){...}

               Environment base class                                                                                        public Term pickup(String agent){...}
               implementing actions as methods
                                                                                                                             public void north(String agent){...}
                      inside action methods external events can be generated to be
                      perceived by agents as percepts                                                                        ...

                                                                                                                         }




                                                                                                           25 / 165                                                                                            26 / 165




              Introduction EOP OOP Conclusion           Introduction Basic Advanced CArtAgO Wrap-up                                Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

2APL Agents in the block-world                                                                                        Environment Interface Stardard – EIS Initiative
                                                                                                                              Recent initiative supported by main APL research
  BeliefUpdates:                                                ...
    { bomb(X,Y) }         RemoveBomb(X,Y){   not bomb(X,Y) }                                                                  groups [Behrens et al., 2010]
    { true }              AddBomb(X,Y)   {   bomb(X,Y) }        PC-rules:
    { carry(bomb) }
    { not carry(bomb) }
                          Drop( )
                          PickUp( )
                                         {
                                         {
                                             not carry(bomb)}
                                             carry(bomb) }
                                                                  goto( X, Y ) <- true |
                                                                  {
                                                                                                                                    GOAL, 2APL, GOAL, JADEX, JASON
                                                                    @blockworld( sensePosition(), POS );
  Beliefs:                                                          B(POS = [A,B]);                                           Goal of the initiative
    start(0,1).                                                     if B(A > X) then
    bomb(3,3).
    clean( blockWorld ) :-
                                                                    { @blockworld( west(), L );
                                                                      goto( X, Y )
                                                                                                                                    design and develop a generic environment interface standard
       not bomb(X,Y) , not carry(bomb).                             }
                                                                    else if B(A < X) then
                                                                                                                                          a standard to connect agents to environments
  Plans:
    B(start(X,Y)) ;
                                                                    { @blockworld( east(), L );
                                                                      goto( X, Y )
                                                                                                                                          ... environments such as agent testbeds, commercial
    @blockworld( enter( X, Y, blue ), L )                           }                                                                     applications, video games..
                                                                    else if B(B > Y) then
  Goals:                                                            { @blockworld( north(), L );
    clean( blockWorld )                                               goto( X, Y )                                            Principles
                                                                    }
  PG-rules:
    clean( blockWorld ) <- bomb( X, Y ) |
                                                                    else if B(B < Y) then
                                                                    { @blockworld( south(), L );
                                                                                                                                    wrapping already existing environments
    {
      goto( X, Y );                                                 }
                                                                      goto( X, Y )                                                  creating new environments by connecting already existing
      @blockworld( pickup( ), L1 );
      PickUp( );
                                                                  }                                                                 apps
      RemoveBomb( X, Y );
      goto( 0, 0 );
                                                                  ...
                                                                                                                                    creating new environments from scratch
      @blockworld( drop( ), L2 );

    }
      Drop( )                                                                                                                 Requirements
  ...
                                                                                                                                    generic
                                                                                                                                    reuse
                                                                                                           27 / 165                                                                                            28 / 165




              Introduction EOP OOP Conclusion           Introduction Basic Advanced CArtAgO Wrap-up                                Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

EIS Meta-Model                                                                                                        Environment Interface Features


                                                                                                                              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
        By means of the Env. Interface agents perform actions and                                                             Interface Intermediate language
        collect percepts                                                                                                            to facilitate data-exchange
               actually actions/percepts are issued to controllable entities in                                                     encoding percepts, actions, events
               environment model
               represent the agent bodies, with e↵ectors and sensors


                                                                                                           29 / 165                                                                                            30 / 165
Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                    Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Advanced Level Overview                                                                        Three Support Levels [Weyns et al., 2007]


     Vision: environment as a first-class abstraction in
     MAS [Weyns et al., 2007, Ricci et al., 2010b]
         application or endogenous environments, i.e. that
         environment which is an explicit part of the MAS                                            Basic interface support
         providing an exploitable design & programming abstraction                                   Abstraction support level
         to build MAS applications
                                                                                                     Interaction-mediation support level
     Outcome
         distinguishing clearly between the responsibilities of agent and
         environment
               separation of concerns
         improving the engineering practice




                                                                                    31 / 165                                                                                         32 / 165




        Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                    Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Basic Interface Support                                                                        Abstraction Support

                                                                                                     Bridges the conceptual gap between the agent abstraction
     The environment enables agents to access the deployment                                         and low-level details of the deployment context
     context                                                                                              shields low-level details of the deployment context
         i.e. the hardware and software and external resources with
         which the MAS interacts




                                                                                    33 / 165                                                                                         34 / 165




        Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                    Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Interaction-Mediation Support                                                                  Environment Definition Revised

     Regulate the access to shared resources
     Mediate interaction between agents


                                                                                                 Environment definition revised [Weyns et al., 2007]
                                                                                                 The environment is a first-class abstraction that provides the
                                                                                                 surrounding conditions for agents to exist and that mediates both
                                                                                                 the interaction among agents and the access to resources




                                                                                    35 / 165                                                                                         36 / 165
Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                  Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Research on Environments for MAS                                                               Environment Programming


                                                                                                    Environment as first-class programming
     Environments for Multi-Agent Systems research field /                                           abstraction [Ricci et al., 2010b]
     E4MAS workshop series [Weyns et al., 2005]
                                                                                                        software designers and engineers perspective
         di↵erent themes and issues (see JAAMAS Special
                                                                                                        endogenous environments (vs. exogenous one)
         Issue [Weyns and Parunak, 2007] for a good survey)
                                                                                                        programming MAS =
               mechanisms, architectures, infrastructures,
                                                                                                        programming Agents + programming Environment
               applications [Platon et al., 2007, Weyns and Holvoet, 2007,
               Weyns and Holvoet, 2004, Viroli et al., 2007]                                                  ..but this will be extended to include OOP in next part

         the main perspective is (agent-oriented) software engineering                              Environment as first-class runtime abstraction for agents
     Focus of this tutorial: the role of the environment                                                agent perspective
     abstraction in MAS programming                                                                     to be observed, used, adapted, constructed, ...
         environment programming                                                                    Defining computational and programming
                                                                                                    frameworks/models also for the environment part



                                                                                    37 / 165                                                                                       38 / 165




        Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                  Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Computational Frameworks for Environment                                                       Programming Models for the Environment: Desiderata
Programming: Issues

                                                                                                    Abstraction
                                                                                                        keeping the agent abstraction level e.g. no agents sharing and
     Defining the environment interface
                                                                                                        calling OO objects
         actions, percepts, data model                                                                  e↵ective programming models for controllable and observable
         contract concept, as defined in software engineering contexts                                   computational entities
         (Design by Contract)
                                                                                                    Modularity
     Defining the environment computational model
                                                                                                        away from the monolithic and centralised view
         environment structure, behaviour
                                                                                                    Orthogonality
     Defining the environment distribution model
                                                                                                        wrt agent models, architectures, platforms
         topology                                                                                       support for heterogeneous systems




                                                                                    39 / 165                                                                                       40 / 165




        Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                  Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Programming Models for the Environment: Desiderata                                             Existing Computational Frameworks
                                                                                                    AGRE / AGREEN / MASQ [Stratulat et al., 2009]
                                                                                                        AGRE – integrating the AGR (Agent-Group-Role)
                                                                                                        organisation model with a notion of environment
                                                                                                              Environment used to represent both the physical and social
                                                                                                              part of interaction
     Dynamic extensibility
                                                                                                        AGREEN / MASQ – extending AGRE towards a unified
         dynamic construction, replacement, extension of environment                                    representation for physical, social and institutional
         parts                                                                                          environments
         support for open systems                                                                       Based on MadKit platform [Gutknecht and Ferber, 2000a]
     Reusability                                                                                    GOLEM [Bromuri and Stathis, 2008]
         reuse of environment parts for di↵erent kinds of applications                                  Logic-based framework to represent environments for situated
                                                                                                        cognitive agents
                                                                                                        composite structure containing the interaction between
                                                                                                        cognitive agents and objects
                                                                                                    A&A and CArtAgO [Ricci et al., 2010b]
                                                                                                        introducing a computational notion of artifact to design and
                                                                                                        implement agent environments
                                                                                    41 / 165                                                                                       42 / 165
Introduction EOP OOP Conclusion                 Introduction Basic Advanced CArtAgO Wrap-up

                                                                                                        Agents and Artifacts (A&A) Conceptual Model:
                                                                                                        Background Human Metaphor

                                                                                                                                 CLOCK
                                                                                                                                                        WHITEBOARD
                                                                                                                                                                                         BAKERY
                                                                                                                                 artifact
                                                                                                                                                           artifact                     workspace

                                                                                                                                                                                     agents can join
                                                                                                                                                                                dynamically the workspace


                 A&A and CArtAgO
                                                                                                                                                                                           ARCHIVE
                                                                                                                                                                                            artifact




                                                                                                                                                                                            COM. CHANNEL
                                                                                                                                                                                               artifact
                                                                                                                    RESOURCE
                                                                                                                      artifact


                                                                                                                                                    TASK SCHEDULER
                                                                                                                                                         artifact




                                                                                                                                                                                                            44 / 165




        Introduction EOP OOP Conclusion            Introduction Basic Advanced CArtAgO Wrap-up                  Introduction EOP OOP Conclusion                 Introduction Basic Advanced CArtAgO Wrap-up

A&A Basic Concepts [Omicini et al., 2008]                                                               A&A Programming Model Features [Ricci et al., 2007b]


     Agents
                                                                                                             Abstraction
         autonomous, goal-oriented pro-active entities
         create and co-use artifacts for supporting their activities                                             artifacts as first-class resources and tools for agents
                 besides direct communication                                                                Modularisation
     Artifacts                                                                                                   artifacts as modules encapsulating functionalities, organized
         non-autonomous, function-oriented, stateful entities                                                    in workspaces
                 controllable and observable                                                                 Extensibility and openness
         modelling the tools and resources used by agents                                                        artifacts can be created and destroyed at runtime by agents
                 designed by MAS programmers                                                                 Reusability
     Workspaces                                                                                                  artifacts (types) as reusable entities, for setting up di↵erent
         grouping agents & artifacts                                                                             kinds of environments
         defining the topology of the computational environment



                                                                                             45 / 165                                                                                                       46 / 165




        Introduction EOP OOP Conclusion            Introduction Basic Advanced CArtAgO Wrap-up                  Introduction EOP OOP Conclusion                 Introduction Basic Advanced CArtAgO Wrap-up

A&A Meta-Model in More Detail [Ricci et al., 2010b]                                                     Artifact Abstract Representation


                             Manual                                 consult
                                                                                                                   SIGNALS
                               has
                                                                                                                                            ObsPropName(Args)
                                                               create                                                                                                              OBSERVABLE
          Workspace          Artifact                         dispose                                                                                     ...                      PROPERTIES
                                                                link
                                                                                                               USAGE
                                 link
                                                                                                               INTERFACE                      OperationX(Params)
                                Operation               use                   Agent
         Environment                                                                                                                          ...
                                        generate                                                                                                                                  OPERATIONS
                              update     Observable               perceive
                                           Event                                                                                              OperationY(Params)
                       Observable
                                                              perceive                                                                        ...
                        Property
                                                              observe                                          LINK
                             join                                                                              INTERFACE
                             quit




                                                                                             47 / 165                                                                                                       48 / 165
Introduction EOP OOP Conclusion                             Introduction Basic Advanced CArtAgO Wrap-up                               Introduction EOP OOP Conclusion                 Introduction Basic Advanced CArtAgO Wrap-up

A World of Artifacts                                                                                                                    A Simple Taxonomy

                                                                                                                                             Individual or personal artifacts
                                                                                                                                                  designed to provide functionalities for a single agent use
                                                           state       available
                                                                                                    n_records         1001                              e.g. an agenda for managing deadlines, a library...
          count     5                                                                               table_names        ...
                                                               wsdl       ...
              inc
                                 state true                                                               ...          ...
                                                                                                                                             Social artifacts
              reset                switch                        GetLastTradePrice                     createTable
                                                                 ...                                   addRecord
                                                                                                       query
                                                                                                                                                  designed to provide functionalities for structuring and
                                  a flag
          a counter
                                                       a Stock Quote Web Service
                                                                                                       ...                                        managing the interaction in a MAS
                                                                                                       a data-base                                coordination artifacts [Omicini et al., 2004], organisation
                                                                                                                                                  artifacts, ...
          n_items        0           next_todo      check_plant

          max_items     100             last_todo        ...                       clearEvents                  out                                     e.g. a blackboard, a game-board,...
                                                                                   postEvent                    in
              put                         setTodo
              get                         cancelTodo
                                                                                   registerForEvs               rd
                                                                                                                                             Boundary artifacts
         a bounded buffer                     an agenda                         an event service          a tuple space                           to represent external resources/services
                                                                                                                                                        e.g. a printer, a Web Service
                                                                                                                                                  to represent devices enabling I/O with users
                                                                                                                                                        e.g GUI, console, etc.


                                                                                                                             49 / 165                                                                                                      50 / 165




           Introduction EOP OOP Conclusion                             Introduction Basic Advanced CArtAgO Wrap-up                               Introduction EOP OOP Conclusion                 Introduction Basic Advanced CArtAgO Wrap-up

Actions and Percepts in Artifact-Based Environments                                                                                     Interaction Model: Use
      Explicit semantics defined by the (endogenous)
      environment [Ricci et al., 2010c]
            success/failure semantics, execution semantics
            defining the contract (in the SE acceptation) provided by the                                                                                                                    PropName Value
                                                                                                                                                                                            PropName Value
            environment                                                                                                                                                                                ...
                                                                                                                                                                           op(parms)       ...


                                                                                                                                                                             action
  actions ! artifacts’ operation                                                                                                                                                                   op(Params)
                                                                                                                                                                  AGENT
  the action repertoire is given by the dynamic set of operations
  provided by the overall set of artifacts available in the workspace
  can be changed by creating/disposing artifacts
      action success/failure semantics is defined by operation
      semantics                                                                                                                              Performing an action corresponds to triggering the execution
                                                                                                                                             of an operation
  percepts ! artifacts’ observable properties + signals                                                                                           acting on artifact’s usage interface
  properties represent percepts about the state of the environment
  signals represent percepts concerning events signalled by the
  environment
                                                                                                                             51 / 165                                                                                                      52 / 165




           Introduction EOP OOP Conclusion                             Introduction Basic Advanced CArtAgO Wrap-up                               Introduction EOP OOP Conclusion                 Introduction Basic Advanced CArtAgO Wrap-up

Interaction Model: Operation execution                                                                                                  Interaction Model: Observation

                              SIGNALS
                                              PropName Value                    OBS PROPERTIES
                                                                                CHANGE
                                                           Value
                                                           ...
                         op(parms)            ...
                                                                                                                                                                PropName(Value).
                           action                                                                                                                               PropName(Value).
                                                    op(Params)                                                                                                  ...
                                                                                                                                                                                                   PropName Value
              AGENT                                                                OPERATION EXECUTION
                                                                                                                                                                                                   PropName Value
                                                                                                                                                             Belief base                                     ...

                                                                                             action completion
                                                                                                                                                             (or alike)            focus
                                                                                            - with success or failure -

                                                                                                                                                                       AGENT
                                                                                                                                                                      OBSERVER



      a process structured in one or multiple transactional steps
      asynchronous with respect to agent
            ...which can proceed possibly reacting to percepts and                                                                           Agents can dynamically select which artifacts to observe
            executing actions of other plans/activities
                                                                                                                                                  predefined focus/stopFocus actions
      operation completion causes action completion
            action completion events with success or failure, possibly with
            action feedbacks
                                                                                                                             53 / 165                                                                                                      54 / 165
Introduction EOP OOP Conclusion         Introduction Basic Advanced CArtAgO Wrap-up                   Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Interaction Model: Observation                                                                       Artifact Linkability


                   PropName(Value).
                   PropName(Value).
                   ...
                                          PropName Value
                                          PropName Value
                Belief base                        ...
                (or alike)
                                                            use                                                                                              linkedOp

                               AGENT
                              OBSERVER

                                                                                                                                  WSP-X             WSP-Y




     By focussing an artifact                                                                              Basic mechanism to enable inter-artifact interaction
         observable properties are mapped into agent dynamic                                                   linking artifacts through interfaces (link interfaces)
         knowledge about the state of the world, as percepts                                                         operations triggered by an artifact over an other artifact
               e.g. belief base                                                                                Useful to design & program distributed environments
         signals are mapped as percepts related to observable events                                                 realised by set of artifacts linked together
                                                                                                                     possibly hosted in di↵erent workspaces

                                                                                          55 / 165                                                                                        56 / 165




        Introduction EOP OOP Conclusion         Introduction Basic Advanced CArtAgO Wrap-up                   Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Artifact Manual                                                                                      CArtAgO

                                                                                                           Common ARtifact infrastructure for AGent Open
     Agent-readable description of artifact’s...
                                                                                                           environment (CArtAgO) [Ricci et al., 2009b]
         ...functionality
               what functions/services artifacts of that type provide                                      Computational framework / infrastructure to implement and
         ...operating instructions                                                                         run artifact-based environment [Ricci et al., 2007c]
               how to use artifacts of that type                                                               Java-based programming model for defining artifacts
                                                                                                               set of basic API for agent platforms to work within
     Towards advanced use of artifacts by intelligent
                                                                                                               artifact-based environment
     agents [Piunti et al., 2008]
         dynamically choosing which artifacts to use to accomplish
                                                                                                           Distributed and open MAS
         their tasks and how to use them                                                                       workspaces distributed on Internet nodes
         strong link with Semantic Web research issues                                                               agents can join and work in multiple workspace at a time

     Work in progress                                                                                          Role-Based Access Control (RBAC) security model
         defining ontologies and languages for describing the manuals                                       Open-source technology
                                                                                                               available at http://cartago.sourceforge.net


                                                                                          57 / 165                                                                                        58 / 165




        Introduction EOP OOP Conclusion         Introduction Basic Advanced CArtAgO Wrap-up                   Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up

Integration with Agent Languages and Platforms                                                       JaCa Platform


                                                                                                           Integration of CArtAgO with Jason language/platform
                                                                                                               a JaCa program is a dynamic set of Jason agents working
     Integration with existing agent platforms [Ricci et al., 2008]
                                                                                                               together in one or multiple CArtAgO workspaces
         by means of bridges creating an action/perception interface
         and doing data binding
                                                                                                           Mapping
                                                                                                               actions
     Outcome
                                                                                                                     Jason agent external actions are mapped onto artifacts’
         developing open and heterogenous MAS                                                                        operations
         introducing a further perspective on interoperability besides                                         percepts
         the ACL’s one
                                                                                                                     artifacts’ observable properties are mapped onto agent beliefs
               sharing and working in a common work environment                                                      artifacts’ signals are mapped as percepts related to
               common object-oriented data-model                                                                     observable events
                                                                                                               data-model
                                                                                                                     Jason data-model is extended to manage also (Java) objects



                                                                                          59 / 165                                                                                        60 / 165
Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                         Introduction EOP OOP Conclusion               Introduction Basic Advanced CArtAgO Wrap-up

Example 1: A Simple Counter Artifact                                                               Example 1: User and Observer Agents

   class Counter extends Artifact {                                                                   USER(S)                                                   OBSERVER(S)

       void init(){
         defineObsProp("count",0);                                   count       5                    !create_and_use.                                         !observe.
       }
                                                                                                      +!create_and_use : true                                  +!observe : true
       @OPERATION void inc(){                                                                           <- !setupTool(Id);                                       <- ?myTool(C);       // discover the tool
                                                                                                           // use                                                   focus(C).
         ObsProperty p = getObsProperty("count");                         inc                              inc;
         p.updateValue(p.intValue() + 1);                                                                  // second use specifying the Id                     +count(V)
         signal("tick");                                                                                   inc [artifact_id(Id)].                                <- println(“observed new value: “,V).
       }
   }                                                                                                  // create the tool                                       +tick [artifact_name(Id,”c0”)]
                                                                                                      +!setupTool(C): true                                       <- println(“perceived a tick”).
                                                                                                        <- makeArtifact("c0","Counter",C).
                                                                                                                                                               +?myTool(CounterId): true
                                                                                                                                                                 <- lookupArtifact(“c0”,CounterId).

        Some API spots                                                                                                                                         -?myTool(CounterId): true
                                                                                                                                                                 <- .wait(10);
             Artifact base class                                                                                                                                    ?myTool(CounterId).

             @OPERATION annotation to mark artifact?s operations
             set of primitives to work define/update/.. observable
             properties
             signal primitive to generate signals                                                        Working with the shared counter
                                                                                        61 / 165                                                                                                             62 / 165




            Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                         Introduction EOP OOP Conclusion               Introduction Basic Advanced CArtAgO Wrap-up

Pre-defined Artifacts                                                                               Example 2: Coordination Artifacts – A Bounded Bu↵er

        Each workspace contains by default a predefined set of                                             public class BoundedBuffer extends Artifact {
                                                                                                            private LinkedList<Item> items;
                                                                                                            private int nmax;
        artifacts                                                                                             void init(int nmax){
                                                                                                                items = new LinkedList<Item>();
             providing core and auxiliary functionalities                                                       defineObsProperty("n_items",0);
                                                                                                                this.nmax = nmax;
             i.e. a pre-defined repertoire of actions available to agents...                                   }
                                                                                                                                                                                          n_items   5
                                                                                                              @OPERATION void put(Item obj){
        Among the others                                                                                        await("bufferNotFull");
                                                                                                                items.add(obj);
                                                                                                                getObsProperty("n_items").updateValue(items.size());                          put
             workspace, type: cartago.WorkspaceArtifact                                                       }
                                                                                                                                                                                              get
                    functionalities to manage the workspace, including security                               @OPERATION void get(OpFeedbackParam<Item> res) {
                                                                                                                await("itemAvailable");
                                                                                                                Item item = items.removeFirst();
                    operations: makeArtifact, lookupArtifact, focus,...                                         res.set(item);
                                                                                                                getObsProperty("n_items").updateValue(items.size());
             node, type: cartago.NodeArtifact                                                                 }

                                                                                                              @GUARD boolean itemAvailable(){ return items.size() > 0; }
                    core functionalities related to a node
                                                                                                              @GUARD boolean bufferNotFull(Item obj){ return items.size() < nmax; }
                    operations: createWorkspace, joinWorkspace, ...                                       }


             console, type cartago.tools.Console
                    operations: println,...
                                                                                                         Basic operation features
             blackboard, type cartago.tools.TupleSpace                                                             output parameters to represent action feedbacks
                    operations: out, in, rd, ...                                                                   long-term operations, with a high-level support for
             ....                                                                                                  synchronization (await primitive, guards)
                                                                                        63 / 165                                                                                                             64 / 165




            Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                         Introduction EOP OOP Conclusion               Introduction Basic Advanced CArtAgO Wrap-up

Example 2: Producers and Consumers                                                                 Remarks

   PRODUCERS                                       CONSUMERS


   item_to_produce(0).                             !consume.
   !produce.
                                                   +!consume: true
   +!produce: true                                   <- ?bufferReady;
     <- !setupTools(Buffer);                            !consumeItems.                                   Process-based operation execution semantics
        !produceItems.
                                                   +!consumeItems: true                                            action/operation execution can be long-term
   +!produceItems : true                             <- get(Item);
     <- ?nextItemToProduce(Item);                       !consumeItem(Item);                                        action/operation execution can overlap
        put(Item);                                      !!consumeItems.
        !!produceItems.                                                                                            key feature for implementing coordination functionalities
                                                   +!consumeItem(Item) : true
   +?nextItemToProduce(N) : true                     <- .my_name(Me);                                    Operation with output parameters as action feedbacks
     <- -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).




                                                                                        65 / 165                                                                                                             66 / 165
Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                     Introduction EOP OOP Conclusion                          Introduction Basic Advanced CArtAgO Wrap-up

Action Execution & Blocking Behaviour                                                           Example 3: Internal Processes – A Clock

                                                                                                           CLOCK                                                   CLOCK USER AGENT
                                                                                                           public class Clock extends Artifact {                   !test_clock.


     Given the action/operation map, by executing an action the                                                boolean working;
                                                                                                               final static long TICK_TIME = 100;
                                                                                                                                                                   +!test_clock
                                                                                                                                                                     <- makeArtifac("myClock","Clock",[],Id);
                                                                                                                                                                        focus(Id);
     intention/activity is suspended until the corresponding                                                   void init(){ working = false; }                          +n_ticks(0);
                                                                                                                                                                        start;

     operation has completed or failed                                                                         @OPERATION void start(){
                                                                                                                 if (!working){
                                                                                                                   working = true;
                                                                                                                                                                        println("clock started.").

                                                                                                                                                                   @plan1

          action completion events generated by the environment and                                                execInternalOp("work");
                                                                                                                 } else {
                                                                                                                                                                   +tick: n_ticks(10)
                                                                                                                                                                     <- stop;
                                                                                                                   failed("already_working");                           println("clock stopped.").
          automatically processed by the agent/environment platform                                            }
                                                                                                                 }
                                                                                                                                                                   @plan2 [atomic]

          bridge                                                                                               @OPERATION void stop(){ working = false; }
                                                                                                                                                                   +tick: n_ticks(N)
                                                                                                                                                                     <- -+n_ticks(N+1);
                                                                                                                                                                        println("tick perceived!").
          no need of explicit observation and reasoning by agents to                                           @INTERNAL_OPERATION void work(){
                                                                                                                 while (working){

          know if an action succeeded                                                                              signal("tick");
                                                                                                                   await_time(TICK_TIME);
                                                                                                                 }

     However the agent execution cycle is not blocked!                                                     }
                                                                                                               }



          the agent can continue to process percepts and possibly
          execute actions of other intentions
                                                                                                     Internal operations
                                                                                                               execution of operations triggered by other operations
                                                                                                               implementing controllable processes
                                                                                     67 / 165                                                                                                                         68 / 165




         Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                     Introduction EOP OOP Conclusion                          Introduction Basic Advanced CArtAgO Wrap-up

Example 4: Artifacts for User I/O – GUI Artifacts                                               Example 4: Agent and User Interaction

                                                                                                           GUI ARTIFACT                                                  USER ASSISTANT AGENT


                                                                                                           public class MySimpleGUI extends GUIArtifact {                !test_gui.
                                                                                                             private MyFrame frame;
                                                                                                                                                                         +!test_gui
                                                                                                               public void setup() {                                       <- makeArtifact("gui","MySimpleGUI",Id);
                                                                                                                 frame = new MyFrame();                                        focus(Id).

                                                                                                                   linkActionEventToOp(frame.okButton,"ok");             +value(V)
                                                                                                                   linkKeyStrokeToOp(frame.text,"ENTER","updateText");     <- println("Value updated: ",V).
                                           value   16.0      ok                                                    linkWindowClosingEventToOp(frame, "closed");
                                                                                                                   defineObsProperty("value",getValue());                +ok : value(V)
                                                                                                                   frame.setVisible(true);                                 <- setValue(V+1).
                                                                                                               }
                                              setValue      closed                                                                                                       +closed
                                                                                                               @INTERNAL_OPERATION void ok(ActionEvent ev){                <- .my_name(Me);
        user                                                                                                     signal("ok");                                                 .kill_agent(Me).
                                                                                                               }
                                                                       agent
                                                                                                               @OPERATION void setValue(double value){
                                                                                                                 frame.setText(""+value);
                                                                                                                 updateObsProperty("value",value);
                                                                                                               }
                                                                                                               ...


     Exploiting artifacts to enable interaction between human                                                  @INTERNAL_OPERATION
                                                                                                               void updateText(ActionEvent ev){
                                                                                                                 updateObsProperty("value",getValue());

     users and agents                                                                                          }

                                                                                                               private int getValue(){
                                                                                                                 return Integer.parseInt(frame.getText());
                                                                                                               }

                                                                                                               class MyFrame extends JFrame {...}
                                                                                                           }




                                                                                     69 / 165                                                                                                                         70 / 165




         Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                     Introduction EOP OOP Conclusion                          Introduction Basic Advanced CArtAgO Wrap-up

Other Features                                                                                  A&A and CArtAgO: Some Research Explorations
                                                                                                     Designing and implementing artifact-based organisation
     Other CArtAgO features not discussed in this lecture                                            Infrastructures
          linkability                                                                                          JaCaMo model and platform (which is the evolution of the
                executing chains of operations across multiple artifacts                                       ORA4MAS infrastructure [H¨bner et al., 2009c])
                                                                                                                                        u
          multiple workspaces                                                                        Cognitive stigmergy based on artifact
                agents can join and work in multiple workspaces, concurrently                        environments [Ricci et al., 2007a]
                including remote workspaces                                                                    cognitive artifacts for knowledge representation and
          RBAC security model                                                                                  coordination [Piunti and Ricci, 2009]
                workspace artifact provides operations to set/change the                             Artifact-based environments for
                access control policies of the workspace, depending on the
                                                                                                     argumentation [Oliva et al., 2010]
                agent role
                ruling agents’ access and use of artifacts of the workspace                          Including A&A in AOSE methodology [Molesini et al., 2005]
          ...                                                                                        Defining a Semantic (OWL-based) description of artifact
     See CArtAgO papers and manuals for more information                                             environments ( CArtAgO-DL)
                                                                                                               JaSa project = JASDL + CArtAgO-DL
                                                                                                     ...
                                                                                     71 / 165                                                                                                                         72 / 165
Introduction EOP OOP Conclusion   Introduction Basic Advanced CArtAgO Wrap-up                    Introduction EOP OOP Conclusion           Introduction Basic Advanced CArtAgO Wrap-up

Applying CArtAgO and JaCa                                                                        Wrap-up

                                                                                                      Environment programming
       Using CArtAgO/JaCa for building real-world applications and                                          environment as a programmable part of the MAS
       infrastructures                                                                                      encapsulating and modularising functionalities useful for
       Some examples                                                                                        agents’ work
           JaCa-Android                                                                               Artifact-based environments
                 implementing mobile computing applications on top of the                                   artifacts as first-class abstraction to design and program
                 Android platform using JaCa [Santi et al., 2011]                                           complex software environments
                 http://jaca-android.sourceforge.net                                                                usage interface, observable properties / events, linkability
           JaCa-WS / CArtAgO-WS                                                                             artifacts as first-order entities for agents
                 building SOA/Web Services applications using                                                       interaction based on use and observation
                 JaCa [Ricci et al., 2010a]                                                                         agents dynamically co-constructing, evolving, adapting their
                 http://cartagows.sourceforge.net                                                                   world
           JaCa-Web                                                                                   CArtAgO computational framework
                 implementing Web 2.0 applications using JaCa
                                                                                                            programming and executing artifact-based environments
                 http://jaca-web.sourceforge.net
                                                                                                            integration with heterogeneous agent platforms
                                                                                                            JaCa case
                                                                                      73 / 165                                                                                                 74 / 165




                                                                                                           Introduction EOP OOP Conclusion           Introduction Motivations OOP Moise

                                                                                                 Abstractions in Multi-Agent Systems
                                                                                                                                     schema



                                                                                                                                                             mission
                                                                                                                                              role                            ORGAMISATION
                                                                                                              org
                                                                                                                                                                              LEVEL


           Organisation Oriented                                                                                             agent



              Programming                                                                                                                                                    AGENT
                                                                                                                                                                             LEVEL


               — OOP —
                                                                                                                        artifact                                              ENDOGENOUS
                                                                                                                                                                              ENVIRONMENT
                                                                                                                               wsp
                                                                                                                                                                              LEVEL



                                                                                                                                                                             EXOGENOUS
                                                                                                                                                                             ENVIRONMENT
                                                                                                                                                                                               76 / 165
                                                                                                                network node




                                                                                                           Introduction EOP OOP Conclusion           Introduction Motivations OOP Moise

                                                                                                 Organisation in MAS – a definition

                                 Outline
  3   Organisation Oriented Programming (OOP)                                                         What is an organisation?
        Fundamentals
        Motivations
        Some OOP approaches
        Focus on the Moise framework
          Moise Organisation Modelling Language (OML)
          Moise Organisation Management Infrastructure (OMI)
          Moise integration with agents & environment




                                                                                                                                                                                               78 / 165
Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                   Introduction EOP OOP Conclusion        Introduction Motivations OOP Moise

Organisation in MAS – a definition                                                                           Introduction: Some definitions

                                                                                                                   Organisations are structured, patterned systems of activity,
                                                                                                                   knowledge, culture, memory, history, and capabilities that are
                                                                                                                   distinct from any single agent [Gasser, 2001]
       What is an organisation?                                                                                       Organisations are supra-individual phenomena
                                                                                                                   A decision and communication schema which is applied to a set of
       Pattern of agent cooperation                                                                                actors that together fulfill a set of tasks in order to satisfy goals
             with a purpose                                                                                        while guarantying a global coherent state [Malone, 1999]
             supra-agent                                                                                              definition by the designer, or by actors, to achieve a purpose
             emergent or                                                                                           An organisation is characterised by: a division of tasks, a
             predefined (by designer or agents)                                                                     distribution of roles, authority systems, communication systems,
                                                                                                                   contribution-retribution systems [Bernoux, 1985]
                                                                                                                      pattern of predefined cooperation
                                                                                                                   An arrangement of relationships between components, which
                                                                                                                   results into an entity, a system, that has unknown skills at the level
                                                                                                                   of the individuals [Morin, 1977]
                                                                                                                      pattern of emergent cooperation
                                                                                                 78 / 165                                                                                                    79 / 165




           Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                   Introduction EOP OOP Conclusion        Introduction Motivations OOP Moise

Perspective on organisations                        from EASSS’05 Tutorial (Sichman, Boissier)              Perspective on organisations                        from EASSS’05 Tutorial (Sichman, Boissier)




                                             Agent Centred                                                                                               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               Agents don’t know                                                                 Agents know
  about organisation                                                                about organisation        about organisation                                                                about organisation

                                                                                                                  AOSE                                                       TAEMS, STEAM, AGR
                                                                                                                  MASE, GAIA, MESSAGE, …                                     MOISE+, OPERA, …
                                                                                                                    Organisation is
                                                                                                                                                                            Organisation-Oriented
                                                                                                                    a design model.
                                                                                                                                                                            Programming of MAS
                                                                                                                    It is hard-coded
                                                                                                                    in Agents
                                Organisation Centred                                                                                          Organisation Centred
        Organisation Specification                                    Designer / Observer                           Organisation Specification                                    Designer / Observer
        Organisation Entity              Observed Organisation         Bottom-up      Top-down                      Organisation Entity              Observed Organisation         Bottom-up      Top-down


                                                                                                 80 / 165                                                                                                    81 / 165




           Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                   Introduction EOP OOP Conclusion        Introduction Motivations OOP Moise

Organisation Oriented Programming (OOP)                                                                     Organisation Oriented Programming (OOP)


                                                                Programming outside
                                                                the agents
                           Agent                                                                                                        Agent
                                                                Using organisational
                                                                concepts
                                     Agent                      To define a cooperative                                                           Agent                 First approach
  Organisation                                                                                                Organisation
  Specification                                                  pattern                                       Specification                                                  Agents read the program
                                                                                                                                                                            and follow it
                            Agent                               Program = Specification                                                   Agent

                                                                By changing the
                         Organisation                           specification, we can                                                   Organisation
                            Entity                              change the MAS overall                                                    Entity
                                                                behaviour


                                                                                                 82 / 165                                                                                                    82 / 165
Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                        Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Organisation Oriented Programming (OOP)                                                     Organisation Oriented Programming (OOP)



                          Agent                                                                                       Agent
                                                    Second approach                                                                             Second approach
                               Agent
                                                       Agents are forced to                                                Agent
                                                                                                                                                   Agents are forced to
  Organisation                                         follow the program                     Organisation                                         follow the program
  Specification                                                                                Specification
                                                                                                                                                   Agents are rewarded if
                          Agent                                                                                       Agent                        they follow the program
                                                                                                                                                   ...
                       Organisation                                                                                Organisation
                          Entity                                                                                      Entity




                                                                                 82 / 165                                                                                    82 / 165




          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                        Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Organisation Oriented Programming (OOP)                                                     Components of OOP:
                                                                                            Organisation Modelling Language (OML)


                          Agent                                                                   Declarative specification of the organisation(s)
                                                     Components
                                                                                                  Specific constraints, norms and cooperation patterns
                                                       Programming language                       imposed on the agents
                               Agent                   (OML)
  Organisation                                                                                    Based on an organisational model
  Specification                                         Platform (OMI)                             e.g. AGR [Ferber and Gutknecht, 1998],
                                                       Integration to agent                            TeamCore [Tambe, 1997],
                          Agent
                                                       architectures and                               Islander [Esteva et al., 2001],
                                                       environment                                     Moise+ [H¨bner et al., 2002],
                                                                                                                   u
                       Organisation                                                                    Opera [Dignum and Aldewereld, 2010],
                          Entity                                                                       2OPL [Dastani et al., 2009a],
                                                                                                       ...



                                                                                 82 / 165                                                                                    83 / 165




          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                        Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Components of OOP:                                                                          Components of OOP:
Organisation Management Infrastructure (OMI)                                                Integration mechanisms
                                                                                                  Agent integration mechanisms
                                                                                                  allow agents to be aware of and to deliberate on:
      Coordination mechanisms, i.e. support infrastructure                                             entering/exiting the organisation
      e.g. MadKit [Gutknecht and Ferber, 2000b],                                                       modification of the organisation
           Karma [Pynadath and Tambe, 2003],                                                           obedience/violation of norms
           ...                                                                                         sanctioning/rewarding other agents
      Regulation mechanisms, i.e. governance infrastructure                                       e.g. J -Moise+ [H¨bner et al., 2007], Autonomy based
                                                                                                                     u
      e.g. Ameli [Esteva et al., 2004],                                                                reasoning [Carabelea, 2007], ProsA2 Agent-based reasoning
           S-Moise+ [H¨bner et al., 2006],
                        u                                                                              on norms [Ossowski, 1999], ...
           ORA4MAS [H¨bner et al., 2009b],
                         u                                                                        Environment integration mechanisms
           ...                                                                                    transform organisation into embodied organisation so that:
      Adaptation mechanisms, i.e. reorganisation infrastructure                                        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]
                                                                                 84 / 165                                                                                    85 / 165
Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Motivations for OOP:                                                                        Motivations for OOP:
Applications point of view                                                                  Constitutive point of view

      Current applications show an increase in                                                    Organisation helps the agents to cooperate with other
           Number of agents                                                                       agents by defining common cooperation schemes
           Duration and repetitiveness of agent activities                                               global tasks
           Heterogeneity of the agents                                                                   protocols
           Number of designers of agents                                                                 groups, responsibilities
           Agent ability to act and decide
                                                                                              e.g. ‘to bid’ for a product on eBay is an institutional action only
           Openness, scalability, dynamism
                                                                                                   possible because eBay defines rules for that very action
      More and more applications require the integration of human                                        the bid protocol is a constraint but it also creates the action
      communities and technological communities (ubiquitous and
      pervasive computing), building connected communities                                    e.g. when a soccer team wants to play match, the organisation
      (ICities) in which agents act on behalf of users                                             helps the members of the team to synchronise actions, to
           Trust, security, ..., flexibility, adaptation                                            share information, etc


                                                                                 86 / 165                                                                                      87 / 165




          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Motivations for OOP:                                                                        Motivations for OOP:
Normative point of view                                                                     Agents point of view
      MAS have two properties which seem contradictory:
           a global purpose
           autonomous agents                                                                  An organisational specification is required to enable agents to
           While the autonomy of the agents is essential, it may cause                        “reason” about the organisation:
           loss in the global coherence of the system and achievement of                          to decide to enter into/leave from the organisation during
           the global purpose                                                                     execution
      Embedding norms within the organisation of an MAS is a                                             Organisation is no more closed
      way to constrain the agents’ behaviour towards the global                                   to change/adapt the current organisation
      purposes of the organisation, while explicitly addressing the
                                                                                                         Organisation is no more static
      autonomy of the agents within the organisation
           Normative organisation
                                                                                                  to obey/disobey the organisation
      e.g. when an agent adopts a role, it adopts a set of behavioural                                   Organisation is no more a regimentation
           constraints that support the global purpose of the
           organisation.
           It may decide to obey or disobey these constraints
                                                                                 88 / 165                                                                                      89 / 165




          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Motivations for OOP:                                                                        Some OOP approaches
Organisation point of view

  An organisational specification is required to enable the
  organisation to “reason” about itself and about the agents in                                   AGR/Madkit [Ferber and Gutknecht, 1998]
  order to ensure the achievement of its global purpose:                                          STEAM/Teamcore [Tambe, 1997]
       to decide to let agents enter into/leave from the                                          ISLANDER/AMELI [Esteva et al., 2004]
       organisation during execution
                                                                                                  Opera/Operetta [Dignum and Aldewereld, 2010]
           Organisation is no more closed
      to decide to let agents change/adapt the current                                            PopOrg [Rocha Costa and Dimuro, 2009]
      organisation                                                                                2OPL [Dastani et al., 2009a]
           Organisation is no more static and blind                                               ...
      to govern agents behaviour in the organisation (i.e. monitor,
      enforce, regiment)
           Organisation is no more a regimentation


                                                                                 90 / 165                                                                                      91 / 165
Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                   Introduction EOP OOP Conclusion                 Introduction Motivations OOP Moise

AGR [Ferber and Gutknecht, 1998]                                                                             AGR OML

                                                                                                                                  is member of
                                                                                                                                                 *   Agent                      *
       Agent Group Role (previously known as AALAADIN)                                                                                                                                        plays
                                                                                                                          1..*
                Agent: Active entity that plays roles within groups. An agent
                                                                                                                    Group                                                                                     Agent
                may have several roles and may belong to several groups                                                                                                                                       level
                Group: set of agents sharing common characteristics, i.e.                                                   1
                context for a set of activities. Two agents cant communicate
                                                                                                                                 described by                                                               Organization
                with each other if they dont belong to the same group                                                       1
                                                                                                                                                                                       1..*
                                                                                                                                            1        contains                                               level
                Role: Abstract representation of the status, position,                                                                                                   1..*                            participant
                                                                                                                    Group structure                                             Role
                                                                                                                                                                                                         1..*
                function of an agent within a group                                                                                                                  1                           1 initiator
                                                                                                                                                                         source 1 1 target
       OMI: the Madkit platform
                                                                                                                                            *                                    1 1              *
                                                                                                                                                                                              Interaction
                                                                                                                                 Role properties                Role dependency
                                                                                                                                                                                              protocol             *



                                                                                                  92 / 165                                                                                                                 93 / 165




             Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                   Introduction EOP OOP Conclusion                 Introduction Motivations OOP Moise

AGR OML Modelling Dimensions                                                                                 STEAM [Tambe, 1997]

                                              Environment                                                           Shell for TEAMwork is a general framework to enable agents
                                                                                                                    to participate in teamwork
                                                             P                                                              Di↵erent applications: Attack, Transport, Robocup soccer
                                                 E
                                                                                                                            Based on an enhanced SOAR architecture and 300 domain
                                         OS
                                                                                                                            independent SOAR rules
                                                                                                                    Principles:
                                                                                                                            Team synchronisation: Establish joint intentions, Monitor
                                                                                                                            team progress and repair, Individual may fail or succeed in
     Structural
     Specification                   B                                                                                      own role
                                                                                                                            Reorganise if there is a critical role failure
  B: agents’ possible behaviors                                                                                             Reassign critical roles based on joint intentions
  P: agents’ behaviors that lead to global purpose                                                                          Decision theoretic communication
  E: agents’ possible behaviors constrained by the environment
  OS: agents’ possible behaviors structurally constrained by the organization                                       Supported by the TEAMCORE OMI


                                                                                                  94 / 165                                                                                                                 95 / 165




             Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                   Introduction EOP OOP Conclusion                 Introduction Motivations OOP Moise

STEAM OML [Tambe, 1997]                                                                                      STEAM OML Modelling Dimensions


                  TASK FORCE
                                                       EVACUATE                                                                                              Environment
                                                      [TASK FORCE]


                                                                                                                                                                                P
                                                    PROCESS
                                                    ORDERS
                                                                    EXECUTE      LANDING
                                                                                 ZONE
                                                                                                                                                                 E
   ORDERS   SAFETY INFO FLIGHT     ROUTE                            MISSION
                                                  [TASK FORCE]    [TASK FORCE]   MANEUVERS
   OBTAINER OBTAINER    TEAM       PLANNER
                                                                                 [TASK FORCE]

                                                                                                                                                     OS
                ESCORT TRANSPORT
                                                      OBTAIN    FLY-FLIGHT MASK
                                                                                      PICKUP
                                                      ORDERS    PLAN        OBSERVE [TRANSPORT]
                                                     [ORDERS   [TASK FORCE] [ESCORT]
                                                     OBTAINER]                                                      Structural                                            OF                          Functional
        HELO1    HELO2     HELO1 HELO2
                                                                                                                    Specification                B                                                    Specification
                                                                 FLY-CONTROL
                                                                 ROUTE
                                                                  [TASK FORCE]                                 B: agents’ possible behaviors
  Organization: hierarchy of roles that
                                                                                                               P: agents’ behaviors that lead to global purpose
  may be filled by agents or groups of         Team Plan:
                                                                                                               E: agents’ possible behaviors constrained by the environment
  agents.                                      •  initial conditions,
                                                                                                               OS: agents’ possible behaviors structurally constrained by the organization
                                               •  term. cond. : achievability, irrelevance,
                                                                                                               OF: agents’ possible behaviors functionally constrained by the organization
                                               unachievability
                                               •  team-level actions.



                                                                                                  96 / 165                                                                                                                 97 / 165
Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                    Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

ISLANDER                                                                                                         ISLANDER OML: IDL [Esteva et al., 2001]

                                                                                                                             (define-institution
                                                                                                                                      soccer-server as
        Based on di↵erent influences: economics, norms, dialogues,                                                                     dialogic-framework = soccer-df
        coordination                                                                                                                  performative-structure = soccer-pf
                                                                                                                                      norms = ( free-kick coach-messages … )
        electronic institutions                                                                                              )
        Combining di↵erent alternative views: dialogical, normative,
        coordination
        Institution Description Language:
               Performative structure (Network of protocols)
               Scene (multi-agent protocol)
               Roles
               Norms
        Ameli as OMI
                                                                                                                                                                   Performative Structure



                                                                                                      98 / 165                                                                                        99 / 165




             Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                    Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

ISLANDER OML Modelling Dimensions                                                                                2OPL                                                                      slides from Dastani




                                            Environment
                                                                                                                   The aim is to design and develop a programming language to
                                                          P
                                                E                                                                  support the implementation of coordination mechanisms in terms
                                                                                                                   of normative concepts.
                                      OS
                                                                                                                   An organisation
                                              OI                                                                        determines e↵ect of external actions
        Structural                                                           Dialogical
        Specification             B                                          Specification                              normatively assesses e↵ect of agents’ actions (monitoring)
  B: agents’ possible behaviors
                                                                                                                        sanctions agents’ wrongdoings (enforcement)
  P: agents’ behaviors that lead to global purpose                                                                      prevents ending up in really bad states (regimentation)
  E: agents’ possible behaviors constrained by the environment
  OS: agents’ possible/permitted/obliged behaviors structurally constrained by the organisation
  OI: agents’ possible/permitted/obliged behaviors interactionally constrained by the organisation




                                                                                                     100 / 165                                                                                       101 / 165




             Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise                                    Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Programming Language for Organisations                                                                           2OPL Modelling Dimension

  Example (Train Station)
       Facts:
           – -at˙platform , -in˙train , -ticket ˝

       Effects:
           – -at˙platform ˝    enter            – at˙platform ˝,
           – -ticket ˝         buy˙ticket       – ticket ˝,
           – at˙platform , -in˙train ˝
                               embark
                                   – -at˙platform, in˙train ˝
       Counts˙as rules:
           – at˙platform , -ticket ˝ =¿ – viol˙ticket ˝,
           – in˙train , -ticket ˝     =¿ – viol˙—˙ ˝

       Sanction˙rules:
           – viol˙ticket ˝ =¿ – fined˙10 ˝


                                                                                                     102 / 165                                                                                       103 / 165
Introduction EOP OOP Conclusion                    Introduction Motivations OOP Moise

Summary




     Several models
     Several dimensions on modelling organisation                                                                                          The Moise Framework
          Structural (roles, groups, ...)
          Functional (global plans, ....)
          Dialogical (scenes, protocols, ...)
          Normative (norms)




                                                                                                               104 / 165




        Introduction EOP OOP Conclusion                    Introduction Motivations OOP Moise                                          Introduction EOP OOP Conclusion          Introduction Motivations OOP Moise

Moise Framework                                                                                                            Moise Modelling Dimensions

     OML (language)
                                                                                                                                                                        Environment
          Tag-based language
          (issued from Moise [Hannoun et al., 2000],
                                                                                                                                                                                       P
          Moise+ [H¨bner et al., 2002],
                     u                                                                                                                                                      E
          MoiseInst [Gˆteau et al., 2005])
                       a
     OMI (infrastructure)                                                                                                                                          OS

          developed as an artifact-based working environment
          (ORA4MAS [H¨bner et al., 2009b] based on CArtAgO
                          u
          nodes, refactoring of S-Moise+ [H¨bner et al., 2006] and
                                            u                                                                                      Structural                                     OF                      Functional
                                                                                                                                   Specification               B                                          Specification
          Synai [Gˆteau et al., 2005])
                   a
     Integrations                                                                                                            Groups, links, roles                                           Global goals, plans,
                                                                                                                             Compatibilities, multiplicities                                Missions, schemas,
          Agents and Environment (c4Jason, c4Jadex                                                                                                                 Normative Specification preferences
                                                                                                                             inheritance
          [Ricci et al., 2009c])                                                                                                                                   Permissions, Obligations
          Environment and Organisation ([Piunti et al., 2009a])                                                                                                    Allows agents autonomy!
          Agents and Organisation (J -Moise+ [H¨bner et al., 2007])
                                                 u

                                                                                                               106 / 165                                                                                                  107 / 165




        Introduction EOP OOP Conclusion                    Introduction Motivations OOP Moise                                          Introduction EOP OOP Conclusion          Introduction Motivations OOP Moise

Moise OML meta-model (partial view)                                                                                        Moise OML


                                                Agent                             Goal                                            OML for defining organisation specification and organisation
                                                                                                                                  entity
               Structural
              Specification
                                                                     create
                                                                     delete
                                                                                                                                  Three independent dimensions [H¨bner et al., 2007]
                                                                                                                                                                  u
         create
         delete
                                                                                                                                  ( well adapted for the reorganisation concerns):
                                        Normative              Social Scheme
                                       Specification                                                                                     Structural: Roles, Groups
      Group                                                                                          achieve
                                                           Functional
                                                          Specification           Goal                                                   Functional: Goals, Missions, Schemes
                         adopt
                         leave                                                                                                           Normative: Norms (obligations, permissions, interdictions)
                                                                                                     commit

                  Role                          Norm
                                                                                 Mission
                                                                                                      leave
                                                                                                                                  Abstract description of the organisation for
                                                                                                                                         the designers
                                                                                                                                         the agents
                                          composition                              agent's actions                                             J -Moise+ [H¨bner et al., 2007]
                                                                                                                                                           u
                                          association                             concept mapping
                                                                                                                                         the Organisation Management Infrastructure
                                 Cardinalities are not represented
                                                                                                                                               ORA4MAS [H¨bner et al., 2009b]
                                                                                                                                                         u



                                                                                                               108 / 165                                                                                                  109 / 165
Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                           Introduction EOP OOP Conclusion              Introduction Motivations OOP Moise

Moise OML Structural Specification                                                           Structural Specification Example


     Specifies the structure of an MAS along three levels:
          Individual with Role
          Social with Link
          Collective with Group
     Components:
          Role: label used to assign rights and constraints on the
          behavior of agents playing it
          Link: relation between roles that directly constrains the
          agents in their interaction with the other agents playing the
          corresponding roles
          Group: set of links, roles, compatibility relations used to
          define a shared context for agents playing roles in it


                                                                                                   Graphical representation of structural specification of 3-5-2 Joj Team
                                                                                110 / 165                                                                                                       111 / 165




         Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                           Introduction EOP OOP Conclusion              Introduction Motivations OOP Moise

Moise OML Functional Specification                                                           Functional Specification Example
     Specifies the expected behaviour of an MAS in terms of
     goals along two levels:                                                                                                                             m1, m2, m3
                                                                                                                                          score a goal
          Collective with Scheme
          Individual with Mission
                                                                                                        m1                                                                                      m3
     Components:                                                                                         get the ball                                                shot at the opponent’s goal
          Goals:
                                                                                              m1                                                                                                m2
                  Achievement goal (default type). Goals of this type should                   go towards the opponent field                                         kick the ball to the goal area
                  be declared as satisfied by the agents committed to them,                         m2                                                                                          m2
                                                                                                    be placed in the middle field                               go to the opponent back line
                  when achieved
                                                                                                                                                                                                    m1
                  Maintenance goal. Goals of this type are not satisfied at a                       m3
                                                                                                                                                     kick the ball to (agent committed to m2)
                  precise moment but are pursued while the scheme is running.                       be placed in the opponent goal area
                  The agents committed to them do not need to declare that                                                         Key                                    Organizational Entity
                  they are satisfied                                                                          Scheme                                                           Lucio       m1
          Scheme: global goal decomposition tree assigned to a group                                            missions
                                                                                                                                                                              Cafu        m2
                                                                                                             goal
                                                                                                                               sequence     choice     parallelism
                  Any scheme has a root goal that is decomposed into subgoals                                   success rate
                                                                                                                                                                              Rivaldo     m3
          Missions: set of coherent goals assigned to roles within
                                                                                                   Graphical representation of social scheme “side attack” for joj team
          norms
                                                                                112 / 165                                                                                                       113 / 165




         Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                           Introduction EOP OOP Conclusion              Introduction Motivations OOP Moise

Goal States                                                                                 Moise OML Normative Specification


        waiting                                enabled



                                                                                                    Explicit relation between the functional and structural
                                                                                                    specifications
                                  impossible                       satisfied
                                                                                                    Permissions and obligations to commit to missions in the
                                                                                                    context of a role
                                                                                                    Makes explicit the normative dimension of a role

      waiting initial state
      enabled goal pre-conditions are satisfied &
              scheme is well-formed
     satisfied agents committed to the goal have achieved it
   impossible the goal is impossible to be satisfied
                                                                                114 / 165                                                                                                       115 / 165
Introduction EOP OOP Conclusion                 Introduction Motivations OOP Moise                              Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise

Norm Specification – example                                                                                           Organisational Entity


                                                                                                                                      structural          norrmative    functional
                                                                                                                                     groups                            schemas                 Organisation
                                                                                                                                        links                norms
                                                                                                                                                  roles                      missions          specification
           role            deontic          mission                                             TTF
        back               obliged              m1         get the ball, go ...               1 minute                                                     purpose
         left              obliged              m2         be placed at ..., kick ...         3 minute
        right              obliged              m2                                              1 day
      attacker             obliged              m3         kick to the goal, ...             30 seconds                            group                         schema
                                                                                                                                   instances        role         instances
                                                                                                                                                                                mission        Organisation
                                                                                                                                                    player                      player         Entity

                                                                                                                                                          agents




                                                                                                          116 / 165                                                                                               117 / 165




                     Introduction EOP OOP Conclusion                 Introduction Motivations OOP Moise                              Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise

Organisation Entity Dynamics                                                                                          Organisation management infrastructure (OMI)
                                                                                                                        Responsibility
      1      Organisation is created (by the agents)                                                                        Managing – coordination, regulation – the agents’ execution
                      instances of groups                                                                                   within organisation defined in an organisational specification
                      instances of schemes
      2      Agents enter into groups adopting roles
      3      Groups become responsible for schemes
                                                                                                                                                   Agent             Agent           Agent             Agent
                      Agents from the group are then obliged to commit to
                      missions in the scheme
      4      Agents commit to missions
      5      Agents fulfil mission’s goals                                                                                         Organisation                                 OMI
                                                                                                                                  Specification
      6      Agents leave schemes and groups
      7      Schemes and groups instances are destroyed

                                                                                                                                                 (e.g. MadKit, AMELI, S-Moise+ , ...)

                                                                                                          118 / 165                                                                                               119 / 165




                     Introduction EOP OOP Conclusion                 Introduction Motivations OOP Moise                              Introduction EOP OOP Conclusion         Introduction Motivations OOP Moise

Organisational artifacts in ORA4MAS                                                                                   ORA4MAS – GroupBoard artifact
 System
                                                                                                                                                  GroupBoard
                                                                                based on A&A and
                  Agent
                                                                                Moise                                   Specification                                         Observable Properties:
                                    Agent
                                                                                agents create and handle                Players                                                    specification: the
                                                                                organisational artifacts                                                                           specification of the group in
          Agent
                                                             Agent                                                      Schemes                                                    the OS (an object of class
                             Group                                              artifacts in charge of
                             Artifact                                                                                   Formation status                                           moise.os.ss.Group)
                                                                                regimentations,
                                                                                detection and evaluation                                                                           players: a list of agents
                                                      Scheme
                                                                                of norms compliance                                                                                playing roles in the group.
                                                      Artifact                                                                            adoptRole
                                                                                                                                                                                   Each element of the list is a
                                                                                agents are in charge of
                                                                                                                                          leaveRole                                pair (agent x role)
     Scheme                             Agent
                                                                                decisions about
     Artifact
                          Agent                                                 sanctions                                                addScheme
                                                                                                                                                                                   schemes: a list of scheme
                                                                                                                                                                                   identifiers that the group is
                                                                                distributed solution                                   removeScheme                                responsible for


                                                                                                          120 / 165                                                                                               121 / 165
Introduction EOP OOP Conclusion      Introduction Motivations OOP Moise                                Introduction EOP OOP Conclusion     Introduction Motivations OOP Moise

ORA4MAS – GroupBoard artifact                                                                          ORA4MAS – SchemeBoard artifact

                          GroupBoard                                                                                         SchemeBoard                    Observable Properties:

  Specification                                        Operations:                                        Specification
                                                                                                                                                                   specification: the
                                                                                                                                                                   specification of the scheme
                                                            adoptRole(role): the agent                   Groups
  Players                                                                                                                                                          in the OS
                                                            executing this operation
  Schemes                                                   tries to adopt a role in the
                                                                                                         Players                                                   groups: a list of groups
                                                            group                                        Goals                                                     responsible for the scheme
  Formation status
                                                            leaveRole(role)                              Obligations
                                                                                                                                                                   players: a list of agents
                                                                                                                                                                   committed to the scheme.
                                                            addScheme(schid): the
                     adoptRole                                                                                                                                     Each element of the list is a
                                                            group starts to be                                          commitMission
                                                                                                                                                                   pair (agent, mission)
                     leaveRole                              responsible for the scheme
                                                                                                                         leaveMission                              goals: a list with the
                                                            managed by the
                    addScheme                                                                                           goalAchieved                               current state of the goals
                                                            SchemeBoard schId
                  removeScheme                              removeScheme(schid)                                        setGoalArgument                             obligations: list of
                                                                                                                                                                   obligations currently active
                                                                                                                                                                   in the scheme
                                                                                           122 / 165                                                                                                      123 / 165




                 Introduction EOP OOP Conclusion      Introduction Motivations OOP Moise                                Introduction EOP OOP Conclusion     Introduction Motivations OOP Moise

ORA4MAS – SchemeBoard artifact                                                                         Organisational Artifact Architecture
                      SchemeBoard                                                                                                                             Organisation
                                                      Operations:                                                                             Group
                                                                                                                                              State
                                                                                                                                                                   Artifact
  Specification
                                                            commitMission(mission)
  Groups                                                                                                                                                  NPL Interpreter
                                                            and leaveMission:                                                                  NPL
                                                                                                                                              Engine
  Players                                                   operations to “enter” and                                                                          NOPL           translates   Organisation
                                                                                                                                                              Program                      Specificatoin
  Goals
                                                            “leave” the scheme
                                                                                                                                           Obligations
                                                            goalAchieved(goal): defines                                                       State
  Obligations
                                                            that some goal is achieved
                                                            by the agent performing the
                 commitMission
                                                            operation                                    Signals (o = obligation(to whom, reason, what, deadline)):
                  leaveMission                              setGoalArgument(goal,                            obl created(o): the obligation o is created
                 goalAchieved                               argument, value): defines                         obl fulfilled(o): the obligation o is fulfilled
                                                            the value of some goal’s                         obl unfulfilled(o): the obligation o is unfulfilled
                setGoalArgument
                                                            argument                                         obl inactive(o): the obligation o is inactive
                                                                                                             norm failure(f ): the failure f has happened
                                                                                           124 / 165                                                                                                      125 / 165




                 Introduction EOP OOP Conclusion      Introduction Motivations OOP Moise                                Introduction EOP OOP Conclusion     Introduction Motivations OOP Moise

Environment integration                                                                                Environment integration: constitutive rules
                                                                                                         Count-As rule
          Organisational Artifacts enable organisation and environment
                                                                                                         An event occurring on an artifact, in a particular context, may
          integration
                                                                                                         count-as an institutional event
          Embodied organisation [Piunti et al., 2009a]
                                                                                                                 transforms the events created in the working environment
                                                                                                                 into activation of an organisational operation
                                                                         count-as                                indirect automatic updating of the organisation

                                                     count-as                                            Enact rule
                                  Env. Artifact                   Org. Artifact
                                                                                                         An event produced on an organisational artifact, in a specific
                                                                                                         institutional context, may “enact” change and updating of the
                                                                                                         working environment (i.e., to promote equilibrium, avoid
                                                   enact
                                                                                                         undesiderable states)
                                                                                                                 Installing automated control on the working environment
                                                                                                                 Even without the intervention of organisational/sta↵ agents
  status: ongoing work
                                                                                                                 (regimenting actions on physical artifacts, enforcing
                                                                                           126 / 165             sanctions, ...)                                             127 / 165
Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                            Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Agent integration                                                                            J -Moise: Jason + Moise


      Agents can interact with organisational artifacts as with
                                                                                                   Agents are programmed with Jason
      ordinary artifacts by perception and action
                                                                                                   BDI agents (reactive planning) – suitable abstraction level
      Any Agent Programming Language integrated with
      CArtAgO can use organisational artifacts                                                     The programmer has the possibility to express sophisticated
                                                                                                   recipes for adopting roles, committing to missions,
                                                                                                   fulfilling/violating norms, ...
  Agent integration provides some “internal” tools for the agents
                                                                                                   Organisational information is made accessible in the mental
  to simplify their interaction with the organisation:
                                                                                                   state of the agent as beliefs
      maintenance of a local copy of the organisational state
                                                                                                   Integration is totally independent of the
      production of organisational events                                                          distribution/communication layer
      provision of organisational actions



                                                                                 128 / 165                                                                                       129 / 165




          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                            Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

J -Moise: Jason + Moise– General view                                                        Organisational actions in Jason I

                                                                                               Example (GroupBoard)
                                                                                               ...
                           Jason-CArtAgo Agent
                                                                                               joinWorkspace(”ora4mas”,O4MWsp);
                                                                                               makeArtifact(
                 Belief                 Plan                                                       ”auction”,
                                                          Intentions
                 Base                  Library
                                                                                                   ”ora4mas.nopl.GroupBoard”,
                                                                                                   [”auction-os.xml”, auctionGroup, false, true ],
                                                                                                   GrArtId);
                                     J-Moise+                                                  adoptRole(auctioneer);
                                                                                               focus(GrArtId);
                                                                                               ...


               Organisational Workspace (CArtAgO)


                                                                                 130 / 165                                                                                       131 / 165




          Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                            Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise

Organisational actions in Jason II                                                           Organisational perception
  Example (SchemeBoard)
  ...
  makeArtifact(                                                                                When an agent focus on an Organisational Artifact, the
      ”sch1”,                                                                                  observable properties (Java objects) are translated to beliefs with
      ”ora4mas.nopl.SchemeBoard”,                                                              the following predicates:
      [”auction-os.xml”, doAuction, false, true ],
                                                                                                   specification
      SchArtId);
  focus(SchArtId);                                                                                 play(agent, role, group)
  addScheme(Sch);                                                                                  commitment(agent, mission, scheme)
  commitMission(mAuctioneer)[artifact˙id(SchArtId)];                                               goalState(scheme, goal, list of committed agents, list of
  ...                                                                                              agent that achieved the goal, state of the goal)
                                                                                                   obligation(agent,norm,goal,dead line)
                                                                                                   ....



                                                                                 132 / 165                                                                                       133 / 165
Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                         Introduction EOP OOP Conclusion           Introduction Motivations OOP Moise

Organisational perception – example                                                            Handling organisational events in Jason

                                                                                                 Whenever something changes in the organisation, the agent
                                                                                                 architecture updates the agent belief base accordingly producing
                                                                                                 events (belief update from perception)
                                                                                                 Example (new agent entered the group)
                                                                                                 +play(Ag,boss,GId) ¡- .send(Ag,tell,hello).

                                                                                                 Example (change in goal state)
                                                                                                 +goalState(Scheme,wsecs,˙,˙,satisfied)
                                                                                                     : .my˙name(Me) & commitment(Me,mCol,Scheme)
                                                                                                    ¡- leaveMission(mColaborator,Scheme).

                                                                                                 Example (signals)
                                                                                                 +normFailure(N) ¡- .print(”norm failure event: ”, N).

                                                                                   134 / 165                                                                                             135 / 165




            Introduction EOP OOP Conclusion   Introduction Motivations OOP Moise                         Introduction EOP OOP Conclusion           Introduction Motivations OOP Moise

Typical plans for obligations                                                                  Summary – Moise

  Example
                                                                                                     Ensures that the agents follow some of the constraints
  +obligation(Ag,Norm,committed(Ag,Mission,Scheme),DeadLine)
      : .my˙name(Ag)                                                                                 specified for the organisation
     ¡- .print(”I am obliged to commit to ”,Mission);                                                Helps the agents to work together
        commit˙mission(Mission,Scheme).                                                              The organisation is interpreted at runtime, it is not
                                                                                                     hardwired in the agents code
  +obligation(Ag,Norm,achieved(Sch,Goal,Ag),DeadLine)
      : .my˙name(Ag)                                                                                 The agents ‘handle’ the organisation (i.e. their artifacts)
     ¡- .print(”I am obliged to achieve goal ”,Goal);                                                It is suitable for open systems as no specific agent
        !Goal[scheme(Sch)];                                                                          architecture is required
        goal˙achieved(Goal,Sch).

  +obligation(Ag,Norm,What,DeadLine)
                                                                                                     All available as open source at
     : .my˙name(Ag)
     ¡- .print(”I am obliged to ”,What,                                                                                  http://moise.souceforge.net
               ”, but I don’t know what to do!”).

                                                                                   136 / 165                                                                                             137 / 165




                                                                                                         Introduction EOP OOP Conclusion

                                                                                               Putting the Pieces Together


                                                                                                                             INTERNAL
                                                                                                           BELIEFS                                        GROUPS         ROLES
                                                                                                                              EVENTS
                                                                                                                     GOALS                                                 SANCTIONS
                                                                                                                     PLANS                                    MISSIONS      REWARDS

                                                                                                                             ACTIONS                          DEONTIC RELATIONS


                          Conclusions
                                                                                                          PERCEPTIONS
                                                                                                                                                                                NORMS
                                                                                                                                          JASON       MOISE




                                                                                                                                            ?
                                                                                                          AGENTS                                            ORGANISATIONS
                                                                                                                                        Agent Prog. Framework
                                                                                                                                         Language

                                                                                                                                        CarTaGO     JADE
                                                                                                                                        Platform   Platform   SPEECH     COMMUNICATION
                                                                                                          RESOURCES                                            ACTS        LANGUAGES
                                                                                                                     LEGACY
                                                                                                                                                              INTERACTION
                                                                                                           SERVICES      OBJECTS                                PROCOLS

                                                                                                         ENVIRONMENTS                                         INTERACTIONS




                                                                                                                                                                                         139 / 165
Introduction EOP OOP Conclusion                                                       Introduction EOP OOP Conclusion

Exploiting Orthogonality                                                              Beyond Orthogonality: Synergetic Integration

     Treating AOP & EOP & OOP as orthogonal dimensions
         improving separation of concerns
               using the best abstraction level and tools to tackle the
                                                                                           Exploiting one dimension to e↵ectively design and program
               specific dimensions, avoiding design pitfalls, such as using
               agents to implement either non-autonomous entities (e.g., a                 also aspects related to the other dimensions
               blackboard agent) or a collection of autonomous entities                        for instance, using the environment to design, implement and
               (group agent)                                                                   represent at runtime the organisation infrastructure
         promoting openness and heterogeneity                                              Designing and implementing MAS behaviours that are based
               E.g., heterogeneous agents working in the same organisation,                on explicit bindings between the di↵erent dimensions
               heterogeneous agents working in the same environment, the
                                                                                               for instance, exploiting events occurring in the environment to
               same agent working in di↵erent and heterogeneous
                                                                                               represent events that have an e↵ect at the institutional or
               organisations, the same agent working in di↵erent
               heterogeneous environments                                                      social level
     Outcome from a programming point of view
         code more clean and understandable
         improving modularity, extensibility, reusability

                                                                          140 / 165                                                                          141 / 165




        Introduction EOP OOP Conclusion                                                       Introduction EOP OOP Conclusion

Exploiting Synergy between the A/E Dimensions                                         Exploiting Synergy on A/O Integration


                                                                                           Normative deliberative agents
     Mapping                                                                                   possibility to define mechanisms for agents to evolve within
         agent actions into environment operations (e.g. CArtAgO)                              an organisation/several organisations
         environment observable state/events into agent beliefs                                possibility to define proper mechanisms for deliberating on the
     Outcome                                                                                   internalisation/adoption/violation of norms
         agents with dynamic action repertoire                                             Reorganisation, adaptation of the organisation
         uniformly implementing any mechanisms (e.g. coordination                              possibility to define proper mechanisms for
         mechanism) in terms of actions/percepts                                               diagnosing/evaluating/refining/defining organisations
               no need to extend agents with special purpose primitives
                                                                                           “Deliberative” Organisations
         exploiting a new type of agent modularity, based on
                                                                                               possibility to define dedicated organisational strategies for the
         externalization [Ricci et al., 2009a]
                                                                                               regulation/adaptation of the organisation behaviour
                                                                                               (organisational agents)



                                                                          142 / 165                                                                          143 / 165




        Introduction EOP OOP Conclusion                                                       Introduction EOP OOP Conclusion

Exploiting Synergy between the E/O Dimensions                                         E/O Synergy Example: Implementing Regimentation

     Grounding the organisation infrastructure
         implemented using environment abstractions                                        Exploiting the environment role of enabler and mediator of
         ... that agents perceive then as first-class entities of their                     agent interaction
         world                                                                                 by providing actions and generating percepts
     Mapping                                                                                ! natural place where to embed and enforce
         organisational state reified by the environment computational                      organisational rules and norms
         state                                                                                 a↵ecting action execution behaviour and percepts generation
         organisational actions/perceptions reified by actions/percepts                     Examples
         on the environment state                                                              simple: a game-board artifact in an artifact-based
         organisational functionalities encapsulated by suitably                               environment
         designed environment abstractions                                                            providing agents actions to make moves
     Outcome                                                                                          encapsulating and enforcing the rules of the game
         “the power is back to agents” [H¨bner et al., 2009c]
                                          u                                                    complex: fully-fledged institutions
         by perceiving and acting upon that environment, agents can                                   reified into properly programmed environments
         reason and dynamically adapt the organisation infrastructure

                                                                          144 / 165                                                                          145 / 165
Introduction EOP OOP Conclusion                                                           Introduction EOP OOP Conclusion

E/O Synergy Example: Implementing Constitutive Rules                              A proposal: JaCaMo
                                                                                     Environment
                                                                                                                                  Manual                               consult               External Action                   Internal Action
                                                                                       dimension

     Exploiting the environment to create, represent, and manage                                                                    has
                                                                                                                                                               create
     dependencies and rules that are meaningful at the                                        Workspace                           Artifact                    dispose
                                                                                                                                                                link
                                                                                                                                                                                                                  Action               Agent
                                                                                    join                                                                                                                                           dimension
     organisational level                                                           quit



     A main example: implementing constitutive                                             Work Environment                   Operation                       use                   Agent                          Plan



     rules [Searle, 1997]                                                                         Observable Property
                                                                                                                         update            generate

                                                                                                                                                    Observable Event                                           Trigger event

         events occurring in concrete environments conveyed as social                                                                                                                                             Belief
         and institutional events                                                                   perceive

                                                                                                                                                                                                                   Goal
         typically represented in the form X counts as Y in C                                                                                                                       create
                                                                                                                              create                                                delete
         an example: reaching the environment state S counts as                                                               delete

                                                                                                                                                                                 Social Scheme
         achieving the organisational goal G                                                                              Group
                                                                                                                                                                                                                   Goal                 commit
                                                                                                                                                 adopt
     The integration E/O allows for naturally design and                                                                                         leave
                                                                                                                                                                                                                                         leave



     implementation of these kinds of rules                                          Organisation
                                                                                       dimension
                                                                                                                                          Role                           Norm
                                                                                                                                                                                                                 Mission



         without adding any further concepts wrt the ones belonging
         to the E/O dimensions                                                                                                                             composition                             agent's actions




                                                                                                                Legend
                                                                                                                                                           association                             dimension border
                                                                                                                                                           dependency                              concept mapping



                                                                      146 / 165                                                                                                                                                                  147 / 165




        Introduction EOP OOP Conclusion

Ongoing and Related Research



     Unifying agents, environments and organisation perspectives
         Volcano platform [Ricordel and Demazeau, 2002]
         MASK platform [Occello et al., 2004]
         MASQ [Stratulat et al., 2009], extending AGRE and
         AGREEN
         Embodied organisations [Piunti, 2010]
         Situated E-Institutions [Campos et al., 2009]
     Normative programming and
     infrastructures [H¨bner et al., 2009a,
                       u
     Tinnemeier et al., 2009, Dastani et al., 2009b]




                                                                      148 / 165
References                                                                         [H¨ bner et al., 2009a] H¨ bner, J. F., Boissier, O., and Bordini, R. H.
                                                                                     u                      u
                                                                                     (2009a). Normative programming for organisation management infras-
[Behrens et al., 2010] Behrens, T., Bordini, R., Braubach, L., Dastani, M.,          tructures. In MALLOW Workshop on Coordination, Organization,
  Dix, J., Hindriks, K., Hbner, J., and Pokahr, A. (2010). An interface              Institutions and Norms in Agent Systems in Online Communities
  for agent-environment interaction. In In Proceedings of International              (COIN-MALLOW 2009).
  Workshop on Programming Multi-Agent Systems (ProMAS-8).
                                                                                   [H¨ bner et al., 2009b] H¨ bner, J. F., Boissier, O., Kitio, R., and Ricci, A.
                                                                                     u                      u
[Bernoux, 1985] Bernoux, P. (1985).      La sociologie des organisations.            (2009b). Instrumenting multi-agent organisations with organisational
  Seuil, 3`me edition.
          e                                                                          artifacts and agents: “Giving the organisational power back to the
                                                                                     agents”. Autonomous Agents and Multi-Agent Systems. DOI-URL:
[Bordini et al., 2007] Bordini, R., H¨ bner, J., and Wooldridge, M. (2007).
                                     u                                               http://dx.doi.org/10.1007/s10458-009-9084-y.
  Programming Multi-Agent Systems in AgentSpeak Using Jason. Wiley-
  Interscience.                                                                    [H¨ bner et al., 2009c] H¨ bner, J. F., Boissier, O., Kitio, R., and Ricci, A.
                                                                                     u                      u
                                                                                     (2009c). Instrumenting Multi-Agent Organisations with Organisational
[Bromuri and Stathis, 2008] Bromuri, S. and Stathis, K. (2008). Situating            Artifacts and Agents. Journal of Autonomous Agents and Multi-Agent
   Cognitive Agents in GOLEM. In Weyns, D., Brueckner, S., and De-                   Systems.
   mazeau, Y., editors, Engineering Environment-Mediated Multi-Agent
                                                                                   [H¨ bner et al., 2002] H¨ bner, J. F., Sichman, J. S., and Boissier, O.
                                                                                     u                     u
   Systems, volume 5049 of LNCS, pages 115–134. Springer Berlin / Hei-
                                                                                     (2002). A model for the structural, functional, and deontic specifica-
   delberg.
                                                                                     tion of organizations in multiagent systems. In Bittencourt, G. and Ra-
                                                                                     malho, G. L., editors, Proceedings of the 16th Brazilian Symposium on
[Campos et al., 2009] Campos, J., L´pez-S´nchez, M., Rodriguez-Aguilar,
                                     o      a                                        Artificial Intelligence (SBIA’02), volume 2507 of LNAI, pages 118–128,
  J. A., and Esteva, M. (2009). Formalising situatedness and adaptation              Berlin. Springer.
  in electronic institutions. In Coordination, Organizations, Institutions
  and Norms in Agent Systems IV, volume 5428/2009 of LNCS. Springer                [H¨ bner et al., 2006] H¨ bner, J. F., Sichman, J. S., and Boissier, O.
                                                                                     u                     u
  Berlin / Heidelberg.                                                               (2006). S-MOISE+: A middleware for developing organised multi-agent
                                                                                     systems. In Boissier, O., Dignum, V., Matson, E., and Sichman, J. S., ed-
[Carabelea, 2007] Carabelea, C. (2007). Reasoning about autonomy in                  itors, Coordination, Organizations, Institutions, and Norms in Multi-
  open multi-agent systems - an approach based on the social power the-              Agent Systems, volume 3913 of LNCS, pages 64–78. Springer.
  ory. in french, ENS Mines Saint-Etienne.
                                                                                   [H¨ bner et al., 2007] H¨ bner, J. F., Sichman, J. S., and Boissier, O.
                                                                                     u                     u
[Dastani, 2008] Dastani, M. (2008). 2APL: a practical agent programming              (2007). Developing Organised Multi-Agent Systems Using the MOISE+
  language. Autonomous Agent and Multi-Agent Systems, 16(3):214–248.                 Model: Programming Issues at the System and Agent Levels. Agent-
                                                                                     Oriented Software Engineering, 1(3/4):370–395.
[Dastani et al., 2009] Dastani, M., Tinnemeier, N., and Meyer, J.-J. C.
  (2009). A programming language for normative multi-agent systems.                [Malone, 1999] Malone, T. W. (1999). Tools for inventing organizations:
  In Multi-Agent Systems: Semantics and Dynamics of Organizational                   Toward a handbook of organizational process. Management Science,
  Models. IGI-Global.                                                                45(3):425–443.

[Dignum and Aldewereld, 2010] Dignum, V. and Aldewereld, H. (2010).                [Molesini et al., 2005] Molesini, A., Omicini, A., Denti, E., and Ricci, A.
   Operetta: Organization-oriented development environment. In Proceed-              (2005). SODA: A roadmap to artefacts. In Dikenelli, O., Gleizes, M.-
   ings of LADS @ MALLOW 2010, pages 14–20.                                          P., and Ricci, A., editors, 6th International Workshop “Engineering
                                                                                     Societies in the Agents World” (ESAW’05), pages 239–252, Ku¸adası,s
                                                                                     Aydın, Turkey. Ege University.
[Esteva et al., 2001] Esteva, M., Rodriguez-Aguiar, J. A., Sierra, C., Gar-
   cia, P., and Arcos, J. L. (2001). On the formal specification of elec-           [Morin, 1977] Morin, E. (1977). La m´thode (1) : la nature de la nature.
                                                                                                                       e
   tronic institutions. In Dignum, F. and Sierra, C., editors, Proceedings           Points Seuil.
   of the Agent-mediated Electronic Commerce, LNAI 1191, pages 126–
   147, Berlin. Springer.                                                          [Occello et al., 2004] Occello, M., Baeijs, C., Demazeau, Y., and Koning,
                                                                                     J.-L. (2004). MASK: An AEIO toolbox to design and build multi-agent
[Esteva et al., 2004] Esteva, M., Rodr´ıguez-Aguilar, J. A., Rosell, B., and         systems. In et al., C., editor, Knowledge Engineering and Agent Tech-
   L., J. (2004). AMELI: An agent-based middleware for electronic insti-             nology, IOS Series on Frontiers in AI and Applications. IOS press, Am-
   tutions. In Jennings, N. R., Sierra, C., Sonenberg, L., and Tambe, M.,            sterdam.
   editors, Proc. of the 3rd Int. Joint Conf. on Autonomous Agents and
   Multi-Agent Systems (AAMAS’04), pages 236–243, New York, USA.                   [Okuyama et al., 2008] Okuyama,     F. Y.,     Bordini,  R. H.,     and
   ACM.                                                                              da Rocha Costa, A. C. (2008).        A distributed normative infras-
                                                                                     tructure for situated multi-agent organisations. In Baldoni, M., Son,
[Ferber and Gutknecht, 1998] Ferber, J. and Gutknecht, O. (1998). A                  T. C., van Riemsdijk, M. B., and Winiko , M., editors, DALT, volume
   meta-model for the analysis and design of organizations in multi-agents           5397 of Lecture Notes in Computer Science, pages 29–46. Springer.
   systems. In Demazeau, Y., editor, Proceedings of the 3rd Interna-
   tional Conference on Multi-Agent Systems (ICMAS’98), pages 128–                 [Oliva et al., 2010] Oliva, E., McBurney, P., Omicini, A., and Viroli, M.
   135. IEEE Press.                                                                  (2010). Argumentation and artifacts for negotiation support. Interna-
                                                                                     tional Journal of Artificial Intelligence, 4(S10):90–117. Special Issue
[Gasser, 2001] Gasser, L. (2001). Organizations in multi-agent systems.              on Negotiation and Argumentation in Artificial Intelligence.
  In Pre-Proceeding of the 10th European Worshop on Modeling Au-
  tonomous Agents in a Multi-Agent World (MAAMAW’2001), Annecy.                    [Omicini et al., 2008] Omicini, A., Ricci, A., and Viroli, M. (2008). Ar-
                                                                                     tifacts in the A&A meta-model for multi-agent systems. Autonomous
[Gˆteau et al., 2005] Gˆteau, B., Boissier, O., Khadraoui, D., and Dubois,
  a                    a                                                             Agents and Multi-Agent Systems, 17(3):432–456.
  E. (2005). Moiseinst: An organizational model for specifying rights and
  duties of autonomous agents. In Third European Workshop on Multi-                [Omicini et al., 2004] Omicini, A., Ricci, A., Viroli, M., Castelfranchi, C.,
  Agent Systems (EUMAS 2005), pages 484–485, Brussels Belgium.                       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), vol-
[Gutknecht and Ferber, 2000a] Gutknecht, O. and Ferber, J. (2000a). The
                                                                                     ume 1, pages 286–293, New York, USA. ACM.
  MADKIT agent platform architecture. In Agents Workshop on Infras-
  tructure for Multi-Agent Systems, pages 48–55.                                   [Ossowski, 1999] Ossowski, S. (1999). Co-ordination in Artificial Agent
                                                                                     Societies: Social Structures and Its Implications for Autonomous
[Gutknecht and Ferber, 2000b] Gutknecht, O. and Ferber, J. (2000b). The              Problem-Solving Agents, volume 1535 of LNAI. Springer.
  MadKit agent platform architecture. In Agents Workshop on Infras-
  tructure for Multi-Agent Systems, pages 48–55.                                   [Piunti, 2010] Piunti, M. (2010). Embodied organizations: a unifying per-
                                                                                      spective in programming agents, organizations and environments. PhD
[Hannoun et al., 2000] Hannoun, M., Boissier, O., Sichman, J. S., and                 thesis.
  Sayettat, C. (2000). Moise: An organizational model for multi-agent
  systems. In Monard, M. C. and Sichman, J. S., editors, Proceedings of            [Piunti and Ricci, 2009] Piunti, M. and Ricci, A. (2009). Cognitive ar-
  the International Joint Conference, 7th Ibero-American Conference on                tifacts for intelligent agents in mas: Exploiting relevant information
  AI, 15th Brazilian Symposium on AI (IBERAMIA/SBIA’2000), At-                        residing in environments. In Knowledge Representation for Agents
  ibaia, SP, Brazil, November 2000, LNAI 1952, pages 152–161, Berlin.                 and Multi-Agent Systems (KRAMAS 2008), volume 5605 of LNAI.
  Springer.                                                                           Springer.



                                                                               1
[Piunti et al., 2009a] Piunti, M., Ricci, A., Boissier, O., and Hubner, J.           [Ricordel and Demazeau, 2002] Ricordel, P. and Demazeau, Y. (2002).
   (2009a). Embodying organisations in multi-agent work environments. In                VOLCANO: a vowels-oriented multi-agent platform. In Dunin-Keplicz
   IEEE/WIC/ACM International Conference on Web Intelligence and                        and Nawarecki, editors, Proceedings of the International Conference
   Intelligent Agent Technology (WI-IAT 2009), Milan, Italy.                            of Central Eastern Europe on Multi-Agent Systems (CEEMAS’01),
                                                                                        volume 2296 of LNAI, pages 252–262. Springer Verlag.
[Piunti et al., 2009b] Piunti, M., Ricci, A., Boissier, O., and H¨ bner, J. F.
                                                                 u
   (2009b). Embodied organisations in mas environments. In Braubach,                 [Rocha Costa and Dimuro, 2009] Rocha Costa, A. C. d. and Dimuro, G.
   L., van der Hoek, W., Petta, P., and Pokahr, A., editors, Proceedings of            (2009). A minimal dynamical organization model. In Dignum, V., edi-
   7th German conference on Multi-Agent System Technologies (MATES                     tor, Multi-Agent Systems: Semantics and Dynamics of Organizational
   09), Hamburg, Germany, September 9-11, volume 5774 of LNCS, pages                   Models, chapter XVII, pages 419–445. IGI Global.
   115–127. Springer.
                                                                                     [Russell and Norvig, 2003] Russell, S. and Norvig, P. (2003).       Artificial
[Piunti et al., 2008] Piunti, M., Ricci, A., Braubach, L., and Pokahr,                 Intelligence, A Modern Approach (2nd ed.). Prentice Hall.
   A. (2008). Goal-directed interactions in artifact-based mas: Jadex
   agents playing in CARTAGO environments. In Proc. of the 2008                      [Santi et al., 2011] Santi, A., Guidi, M., and Ricci, A. (2011). Jaca-
   IEEE/WIC/ACM Int. Conf. on Web Intelligence and Intelligent                          android: An agent-based platform for building smart mobile applica-
   Agent Technology (IAT’08), volume 2. IEEE Computer Society.                          tions. In Languages, Methodologies and Development Tools for Multi-
                                                                                        agent systems, volume 6822 of LNAI. Springer Verlag.
[Platon et al., 2007] Platon, E., Mamei, M., Sabouret, N., Honiden, S.,              [Searle, 1997] Searle, J. R. (1997). The Construction of Social Reality.
   and Parunak, H. V. (2007). Mechanisms for environments in multi-agent                Free Press.
   systems: Survey and opportunities. Autonomous Agents and Multi-
   Agent Systems, 14(1):31–47.                                                       [Shoham, 1993] Shoham, Y. (1993). Agent-oriented programming. Artif.
                                                                                        Intell., 60(1):51–92.
[Pynadath and Tambe, 2003] Pynadath, D. V. and Tambe, M. (2003). An
  automated teamwork infrastructure for heterogeneous software agents                [Stratulat et al., 2009] Stratulat, T., Ferber, J., and Tranier, J. (2009).
  and humans. Autonomous Agents and Multi-Agent Systems, 7(1-2):71–                     MASQ: towards an integral approach to interaction. In AAMAS (2),
  100.                                                                                  pages 813–820.

[Ricci et al., 2010a] Ricci, A., Denti, E., and Piunti, M. (2010a). A plat-          [Tambe, 1997] Tambe, M. (1997). Towards flexible teamwork. Journal of
   form for developing SOA/WS applications as open and heterogeneous                    Artificial Intelligence Reseearch, 7:83–124.
   multi-agent systems. Multiagent and Grid Systems International Jour-
   nal (MAGS), Special Issue about “Agents, Web Services and Ontolo-                 [Tinnemeier et al., 2009] Tinnemeier, N., Dastani, M., Meyer, J.-J., and
   gies: Integrated Methodologies”. To Appear.                                          van der Torre, L. (2009). Programming normative artifacts with declar-
                                                                                        ative obligations and prohibitions. In IEEE/WIC/ACM International
[Ricci et al., 2007a] Ricci, A., Omicini, A., Viroli, M., Gardelli, L., and             Joint Conference on Web Intelligence and Intelligent Agent Technol-
   Oliva, E. (2007a). Cognitive stigmergy: Towards a framework based                    ogy (WI-IAT 2009).
   on agents and artifacts. In Weyns, D., Parunak, H. V. D., and Michel,
   F., editors, Environments for MultiAgent Systems III, volume 4389 of              [Viroli et al., 2007] Viroli, M., Holvoet, T., Ricci, A., Schelfthout, K., and
   LNAI, pages 124–140. Springer.                                                       Zambonelli, F. (2007). Infrastructures for the environment of multiagent
                                                                                        systems. Autonomous Agents and Multi-Agent Systems, 14(1):49–60.
[Ricci et al., 2008] Ricci, A., Piunti, M., Acay, L. D., Bordini, R., H¨ bner,
                                                                       u
   J., and Dastani, M. (2008). Integrating artifact-based environments               [Weyns and Holvoet, 2004] Weyns, D. and Holvoet, T. (2004). A formal
   with heterogeneous agent-programming platforms. In Proceedings of                   model for situated multi-agent systems. Fundamenta Informaticae,
   7th International Conference on Agents and Multi Agents Systems                     63(2-3):125–158.
   (AAMAS08).
                                                                                     [Weyns and Holvoet, 2007] Weyns, D. and Holvoet, T. (2007). A reference
                                                                                       architecture for situated multiagent systems. In Environments for Mul-
[Ricci et al., 2009a] Ricci, A., Piunti, M., and Viroli, M. (2009a). Ex-
                                                                                       tiagent Systems III, volume 4389 of LNCS, pages 1–40. Springer Berlin
   ternalisation and internalization: A new perspective on agent modu-
                                                                                       / Heidelberg.
   larisation in multi-agent system programming. In Dastani, M., Fallah-
   Seghrouchni, A. E., Leite, J., and Torroni, P., editors, LADS, volume
                                                                                     [Weyns et al., 2007] Weyns, D., Omicini, A., and Odell, J. J. (2007). Envi-
   6039 of Lecture Notes in Computer Science, pages 35–54. Springer.
                                                                                       ronment as a first-class abstraction in multi-agent systems. Autonomous
                                                                                       Agents and Multi-Agent Systems, 14(1):5–30.
[Ricci et al., 2010b] Ricci, A., Piunti, M., and Viroli, M. (2010b). Environ-
   ment programming in multi-agent systems – an artifact-based perspec-              [Weyns and Parunak, 2007] Weyns, D. and Parunak, H. V. D., editors
   tive. Autonomous Agents and Multi-Agent Systems. Published Online                   (2007). Special Issue on Environments for Multi-Agent Systems, vol-
   with ISSN 1573-7454 (will appear with ISSN 1387-2532).                              ume 14 (1) of Autonomous Agents and Multi-Agent Systems. Springer
                                                                                       Netherlands.
[Ricci et al., 2009b] Ricci, A., Piunti, M., Viroli, M., and Omicini, A.
   (2009b). Environment programming in CArtAgO. In Bordini, R. H., Das-              [Weyns et al., 2005] Weyns, D., Parunak, H. V. D., Michel, F., Holvoet,
   tani, M., Dix, J., and El Fallah-Seghrouchni, A., editors, Multi-Agent              T., and Ferber, J. (2005). Environments for multiagent systems: State-
   Programming: Languages, Platforms and Applications, Vol. 2, pages                   of-the-art and research challenges. In Weyns, D., Parunak, H. V. D.,
   259–288. Springer Berlin / Heidelberg.                                              Michel, F., Holvoet, T., and Ferber, J., editors, Environment for Multi-
                                                                                       Agent Systems, volume 3374, pages 1–47. Springer Berlin / Heidelberg.
[Ricci et al., 2009c] Ricci, A., Piunti, M., Viroli, M., and Omicini, A.
   (2009c). Environment programming in CArtAgO. In Multi-Agent Pro-                  [Wooldridge, 2002] Wooldridge, M. (2002).       An Introduction to Multi-
   gramming: Languages,Platforms and Applications,Vol.2. Springer.                     Agent Systems. John Wiley & Sons, Ltd.

[Ricci et al., 2010c] Ricci, A., Santi, A., and Piunti, M. (2010c). Action
   and perception in multi-agent programming languages: From exogenous
   to endogenous environments. In In Proceedings of International Work-
   shop on Programming Multi-Agent Systems (ProMAS-8).

[Ricci et al., 2007b] Ricci, A., Viroli, M., and Omicini, A. (2007b). The
   A&A programming model & technology for developing agent environ-
   ments in MAS. In Dastani, M., El Fallah Seghrouchni, A., Ricci, A.,
   and Winiko , M., editors, Programming Multi-Agent Systems, volume
   4908 of LNAI, pages 91–109. Springer Berlin / Heidelberg.

[Ricci et al., 2007c] Ricci, A., Viroli, M., and Omicini, A. (2007c).
   CArtAgO: A framework for prototyping artifact-based environments in
   MAS. In Weyns, D., Parunak, H. V. D., and Michel, F., editors, En-
   vironments for MultiAgent Systems III, volume 4389 of LNAI, pages
   67–86. Springer. 3rd International Workshop (E4MAS 2006), Hakodate,
   Japan, 8 May 2006. Selected Revised and Invited Papers.



                                                                                 2

T2. Organization and Environment oriented programming

  • 1.
    Organisation and Environment Oriented Programming Outline of the course Introduction Olivier Boissier1 , Rafael H. Bordini2 , EOP Jomi F. H¨bner3 , Alessandro Ricci4 u About Environment Oriented Programming 1 EMSE, 2 PUC-RS, A&A and CArtAgO France Brazil Olivier.Boissier@emse.fr R.Bordini@pucrs.br OOP 3 DAS-UFSC, Brazil 4 University of Bologna, Italy About Organisation Oriented Programming jomi@das.ufsc.br a.ricci@unibo.it Moise Conclusions European Agent Systems Summer School Practical Exercise: a hands-on lab session! May, 2012 — Valencia, Spain Introduction EOP OOP Conclusion Abstractions in Multi-Agent Systems schema mission role ORGAMISATION org LEVEL Introduction agent AGENT LEVEL artifact ENDOGENOUS ENVIRONMENT wsp LEVEL EXOGENOUS ENVIRONMENT 4 / 165 network node Introduction EOP OOP Conclusion Introduction EOP OOP Conclusion Abstractions in Multi-Agent Systems Agent Oriented Programming Individual Agent Level: autonomy, situatedness Cognitive Concepts: beliefs, desires, goals, intentions, plans Proposed by Shoham [Shoham, 1993] Reasoning Cycle: sense/reason/act, reactive/pro-active Use of mentalistic notions and a societal view of behaviour computation (anthropomorphism) Environment Level: resources and services that agents can Levels of abstraction: Agents – Organisations – Environment access and control; sensing and acting in an environment Programming languages for agents have developed a lot Social and Organisation Level: cooperation, coordination, since then, but still not a mature paradigm regulation patterns Programming languages/platforms for organisation and Roles: rights, responsibilities, ... environment are also being developed Organisational Rules: constraints on roles and their interactions, norms, deadlines, ... Some agent development platforms have a formal basis Organisational Structures: topology of interaction patterns Many influenced by the BDI agent architecture and relations over activity control 5 / 165 6 / 165
  • 2.
    Introduction EOP OOPConclusion Introduction EOP OOP Conclusion BDI Architecture Programming Languages for Cognitive Agents Programming Languages for Multi-Agent Systems E.g., Jason, Jadex, JACK, 2APL, GOAL, Brahms, JIAC, Agent Intentional Stance (Dennett) Factory, MetateM, Golog variants, ... Practical Reasoning (Bratman) IRMA (Bratman, Isreal, Pollack) Architecture to represent an agent mental state: PRS (George↵, Lansky) Beliefs: information available to agent (e.g., about the dMARS (Kinny) environment or other agents) Goals: states of a↵airs that the agent wants to achieve BDI Logics and Agent Architecture (Rao, George↵) Events: changes in agents beliefs or goals Wooldridge, Singh, ... Capabilities: reusable modules of activities that the agent can perform Plans: reasoning about courses of action to achieve goals Rules: reasoning about beliefs 7 / 165 8 / 165 Introduction EOP OOP Conclusion Introduction EOP OOP Conclusion Programming Languages for Cognitive Agents Programming Languages/Platforms for Organisations Concepts used to specify the state of an organisation: Some steps of a Reasoning Cycle: Agents, Roles, Groups Determining Relevant Plans for Handling Events Norms, Obligations, Prohibitions, Permissions, Violations Select a Plan for Execution Dependency, Power, Delegation, Information flow relations Execute Part of an Intended Plans Deadlines, Sanctions, Rewards Handle Plan Failures Management Infrastructure to control and coordinate agent behaviour at run-time: Agent Interpreter is an infinite loop of such reasoning cycles. Endogenous: The control is a part of the agent program The architecture and reasoning cycle together with the agent Exogenous: The control is performed by an external system program (specially plans) determine the behaviour of the agent. Monitoring Agent Behaviour Enforcing Organisational Rules Regimenting Organisational Rules 9 / 165 10 / 165 Introduction EOP OOP Conclusion Introduction EOP OOP Conclusion Programming Languages/Platforms for Environments Hands-on Part of this Course We will use JaCaMo Artifacts to represent the state of the environment First fully operational, unified platform covering the 3 main Access to Databases/Services/etc., Coordination, Interaction levels of abstractions for multi-agent oriented programming Environment “objects”, i.e., non-proactive entities JaCaMo = Jason + CArtAgO + Moise Processing Operations on Artifacts http://jacamo.sourceforge.net Realising the e↵ects of environments actions http://jason.sourceforge.net Providing events related to sensing the environment http://cartago.sourceforge.net Synchronising agent actions http://moise.sourceforge.net At the right level of abstraction for a multi-agent system More than the sum of 3 successful platforms Revealing the full potential of Multi-Agent Oriented Programming 11 / 165 12 / 165
  • 3.
    Outline Environment Oriented 2 Environment Programming Why Environment Programming in MAS Programming Basic Level Advanced Level — EOP — A&A and CArtAgO Conclusions and Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Back to the Notion of Environment in MAS Single Agent Perspective sensors The notion of environment is intrinsically related to the db ack pe fee PERCEPTION rce notion of agent and multi-agent system pts ENVIRONMENT “An agent is a computer system that is situated in some DECISION acti do environment and that is capable of autonomous action in ons tion to ac ACTION this environment in order to meet its design objective” [Wooldridge, 2002] effectors / actuators “An agent is anything that can be viewed as perceiving its environment through sensors and acting upon the environment through e↵ectors. Perception ” [Russell and Norvig, 2003] process inside agent inside of attaining awareness or Including both physical and software environments understanding sensory information, creating percepts perceived form of external stimuli or their absence Actions the means to a↵ect, change or inspect the environment 15 / 165 16 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Multi-Agent Perspective Why Environment Programming 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 In evidence endogenous environments (vs. exogenous ones) programmable environments overlapping spheres of visibility and influence ..which means: interaction 17 / 165 18 / 165
  • 4.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Environment Programming: General Issues Basic Level Overview MAS MAS ENVIRONMENT actions Defining the interface SIMULATED REAL WORLD mimicking actions, perceptions WORLD (PHYSICAL OR COMPUTATIONAL) data-model OR Defining the environment computational model & architecture how the environment works INTERFACE EXTERNAL WORLD structure, behaviour, topology (PHYSICAL OR core aspects to face: concurrency, distribution COMPUTATIONAL) OR Defining the environment programming model how to program the environment WRAPPER TO EXISTING Example: percepts JAVA TECHNOLOGY AGENTS PLATFORM 19 / 165 20 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Basic Level: Features An Example: Jason [Bordini et al., 2007] Flexible Java-based Environment API Environment conceptually conceived as a single monolitic Environment base class to be specialised block executeAction method to specify action semantics addPercept to generate percepts providing actions, generating percepts Environment API Environment User Agent -globalPercepts: List<Literal> Environment Architecture to define the set of actions and program actions -agPercepts: Map<String,List<Literal>> +init(String[] args) computational behaviour +stop() getPercepts which include the generation of percepts +getPercepts(String agName): List<Literal> +executeAction(String agName, Structure action): boolean typically implemented using as single object/class in OO such +addPercept(String agName, Literal p) as Java +removePercept(String agName, Literal p) ... method to execute actions executeAction fields to store the environment state UserEnvironment available in many agent programming languages/frameworks +init(String[] args) change +executeAction(String agName, Structure action): boolean e.g., Jason, 2APL, GOAL, JADEX percepts 21 / 165 22 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up MARS Environment in Jason Jason Agents Playing on Mars // mars robot 1 public class MarsEnv extends Environment { ... private MarsModel model; ... private MarsView view; /* creates the agents perception /* Initial beliefs */ * based on the MarsModel */ +!take(S,L) : true public void init(String[] args) { void updatePercepts() { at(P) :- pos(P,X,Y) & pos(r1,X,Y). <- !ensure_pick(S); model = new MarsModel(); !at(L); view = new MarsView(model); clearPercepts(); /* Initial goal */ drop(S). model.setView(view); updatePercepts(); Location r1Loc = model.getAgPos(0); !check(slots). +!ensure_pick(S) : garbage(r1) } Location r2Loc = model.getAgPos(1); <- pick(garb); /* Plans */ !ensure_pick(S). public boolean executeAction(String ag, Structure action) { Literal pos1 = Literal.parseLiteral +!ensure_pick(_). String func = action.getFunctor(); ("pos(r1," + r1Loc.x + "," + r1Loc.y + ")"); +!check(slots) : not garbage(r1) if (func.equals("next")) { Literal pos2 = Literal.parseLiteral <- next(slot); +!at(L) : at(L). model.nextSlot(); ("pos(r2," + r2Loc.x + "," + r2Loc.y + ")"); !!check(slots). +!at(L) <- ?pos(L,X,Y); } else if (func.equals("move_towards")) { int x = (int)((NumberTerm)action.getTerm(0)).solve(); addPercept(pos1); +!check(slots). move_towards(X,Y); int y = (int)((NumberTerm)action.getTerm(1)).solve(); addPercept(pos2); !at(L). model.moveTowards(x,y); +garbage(r1) : not .desire(carry_to(r2)) } else if (func.equals("pick")) { if (model.hasGarbage(r1Loc)) { <- !carry_to(r2). model.pickGarb(); addPercept(Literal.parseLiteral("garbage(r1)")); } else if (func.equals("drop")) { } +!carry_to(R) model.dropGarb(); <- // remember where to go back } else if (func.equals("burn")) { if (model.hasGarbage(r2Loc)) { ?pos(r1,X,Y); model.burnGarb(); addPercept(Literal.parseLiteral("garbage(r2)")); -+pos(last,X,Y); } else { } return false; } // carry garbage to r2 } !take(garb,R); class MarsModel extends GridWorldModel { ... } updatePercepts(); // goes back and continue to check return true; class MarsView extends GridWorldView { ... } !at(last); } } ... !!check(slots). ... 23 / 165 24 / 165
  • 5.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Another Example: 2APL [Dastani, 2008] Example: Block-world Environment in 2APL package blockworld; 2APL public class Env extends apapl.Environment { BDI-based agent-oriented programming language integrating declarative programming constructs (beliefs, goals) and public void enter(String agent, Term x, Term y, Term c){...} imperative style programming constructs (events, plans) Java-based Environment API public Term sensePosition(String agent){...} Environment base class public Term pickup(String agent){...} implementing actions as methods public void north(String agent){...} inside action methods external events can be generated to be perceived by agents as percepts ... } 25 / 165 26 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up 2APL Agents in the block-world Environment Interface Stardard – EIS Initiative Recent initiative supported by main APL research BeliefUpdates: ... { bomb(X,Y) } RemoveBomb(X,Y){ not bomb(X,Y) } groups [Behrens et al., 2010] { true } AddBomb(X,Y) { bomb(X,Y) } PC-rules: { carry(bomb) } { not carry(bomb) } Drop( ) PickUp( ) { { not carry(bomb)} carry(bomb) } goto( X, Y ) <- true | { GOAL, 2APL, GOAL, JADEX, JASON @blockworld( sensePosition(), POS ); Beliefs: B(POS = [A,B]); Goal of the initiative start(0,1). if B(A > X) then bomb(3,3). clean( blockWorld ) :- { @blockworld( west(), L ); goto( X, Y ) design and develop a generic environment interface standard not bomb(X,Y) , not carry(bomb). } else if B(A < X) then a standard to connect agents to environments Plans: B(start(X,Y)) ; { @blockworld( east(), L ); goto( X, Y ) ... environments such as agent testbeds, commercial @blockworld( enter( X, Y, blue ), L ) } applications, video games.. else if B(B > Y) then Goals: { @blockworld( north(), L ); clean( blockWorld ) goto( X, Y ) Principles } PG-rules: clean( blockWorld ) <- bomb( X, Y ) | else if B(B < Y) then { @blockworld( south(), L ); wrapping already existing environments { goto( X, Y ); } goto( X, Y ) creating new environments by connecting already existing @blockworld( pickup( ), L1 ); PickUp( ); } apps RemoveBomb( X, Y ); goto( 0, 0 ); ... creating new environments from scratch @blockworld( drop( ), L2 ); } Drop( ) Requirements ... generic reuse 27 / 165 28 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up EIS Meta-Model Environment Interface Features 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 By means of the Env. Interface agents perform actions and Interface Intermediate language collect percepts to facilitate data-exchange actually actions/percepts are issued to controllable entities in encoding percepts, actions, events environment model represent the agent bodies, with e↵ectors and sensors 29 / 165 30 / 165
  • 6.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Advanced Level Overview Three Support Levels [Weyns et al., 2007] Vision: environment as a first-class abstraction in MAS [Weyns et al., 2007, Ricci et al., 2010b] application or endogenous environments, i.e. that environment which is an explicit part of the MAS Basic interface support providing an exploitable design & programming abstraction Abstraction support level to build MAS applications Interaction-mediation support level Outcome distinguishing clearly between the responsibilities of agent and environment separation of concerns improving the engineering practice 31 / 165 32 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Basic Interface Support Abstraction Support Bridges the conceptual gap between the agent abstraction The environment enables agents to access the deployment and low-level details of the deployment context context shields low-level details of the deployment context i.e. the hardware and software and external resources with which the MAS interacts 33 / 165 34 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Interaction-Mediation Support Environment Definition Revised Regulate the access to shared resources Mediate interaction between agents Environment definition revised [Weyns et al., 2007] The environment is a first-class abstraction that provides the surrounding conditions for agents to exist and that mediates both the interaction among agents and the access to resources 35 / 165 36 / 165
  • 7.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Research on Environments for MAS Environment Programming Environment as first-class programming Environments for Multi-Agent Systems research field / abstraction [Ricci et al., 2010b] E4MAS workshop series [Weyns et al., 2005] software designers and engineers perspective di↵erent themes and issues (see JAAMAS Special endogenous environments (vs. exogenous one) Issue [Weyns and Parunak, 2007] for a good survey) programming MAS = mechanisms, architectures, infrastructures, programming Agents + programming Environment applications [Platon et al., 2007, Weyns and Holvoet, 2007, Weyns and Holvoet, 2004, Viroli et al., 2007] ..but this will be extended to include OOP in next part the main perspective is (agent-oriented) software engineering Environment as first-class runtime abstraction for agents Focus of this tutorial: the role of the environment agent perspective abstraction in MAS programming to be observed, used, adapted, constructed, ... environment programming Defining computational and programming frameworks/models also for the environment part 37 / 165 38 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Computational Frameworks for Environment Programming Models for the Environment: Desiderata Programming: Issues Abstraction keeping the agent abstraction level e.g. no agents sharing and Defining the environment interface calling OO objects actions, percepts, data model e↵ective programming models for controllable and observable contract concept, as defined in software engineering contexts computational entities (Design by Contract) Modularity Defining the environment computational model away from the monolithic and centralised view environment structure, behaviour Orthogonality Defining the environment distribution model wrt agent models, architectures, platforms topology support for heterogeneous systems 39 / 165 40 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Programming Models for the Environment: Desiderata Existing Computational Frameworks AGRE / AGREEN / MASQ [Stratulat et al., 2009] AGRE – integrating the AGR (Agent-Group-Role) organisation model with a notion of environment Environment used to represent both the physical and social part of interaction Dynamic extensibility AGREEN / MASQ – extending AGRE towards a unified dynamic construction, replacement, extension of environment representation for physical, social and institutional parts environments support for open systems Based on MadKit platform [Gutknecht and Ferber, 2000a] Reusability GOLEM [Bromuri and Stathis, 2008] reuse of environment parts for di↵erent kinds of applications Logic-based framework to represent environments for situated cognitive agents composite structure containing the interaction between cognitive agents and objects A&A and CArtAgO [Ricci et al., 2010b] introducing a computational notion of artifact to design and implement agent environments 41 / 165 42 / 165
  • 8.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Agents and Artifacts (A&A) Conceptual Model: Background Human Metaphor CLOCK WHITEBOARD BAKERY artifact artifact workspace agents can join dynamically the workspace A&A and CArtAgO ARCHIVE artifact COM. CHANNEL artifact RESOURCE artifact TASK SCHEDULER artifact 44 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up A&A Basic Concepts [Omicini et al., 2008] A&A Programming Model Features [Ricci et al., 2007b] Agents Abstraction autonomous, goal-oriented pro-active entities create and co-use artifacts for supporting their activities artifacts as first-class resources and tools for agents besides direct communication Modularisation Artifacts artifacts as modules encapsulating functionalities, organized non-autonomous, function-oriented, stateful entities in workspaces controllable and observable Extensibility and openness modelling the tools and resources used by agents artifacts can be created and destroyed at runtime by agents designed by MAS programmers Reusability Workspaces artifacts (types) as reusable entities, for setting up di↵erent grouping agents & artifacts kinds of environments defining the topology of the computational environment 45 / 165 46 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up A&A Meta-Model in More Detail [Ricci et al., 2010b] Artifact Abstract Representation Manual consult SIGNALS has ObsPropName(Args) create OBSERVABLE Workspace Artifact dispose ... PROPERTIES link USAGE link INTERFACE OperationX(Params) Operation use Agent Environment ... generate OPERATIONS update Observable perceive Event OperationY(Params) Observable perceive ... Property observe LINK join INTERFACE quit 47 / 165 48 / 165
  • 9.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up A World of Artifacts A Simple Taxonomy Individual or personal artifacts designed to provide functionalities for a single agent use state available n_records 1001 e.g. an agenda for managing deadlines, a library... count 5 table_names ... wsdl ... inc state true ... ... Social artifacts reset switch GetLastTradePrice createTable ... addRecord query designed to provide functionalities for structuring and a flag a counter a Stock Quote Web Service ... managing the interaction in a MAS a data-base coordination artifacts [Omicini et al., 2004], organisation artifacts, ... n_items 0 next_todo check_plant max_items 100 last_todo ... clearEvents out e.g. a blackboard, a game-board,... postEvent in put setTodo get cancelTodo registerForEvs rd Boundary artifacts a bounded buffer an agenda an event service a tuple space to represent external resources/services e.g. a printer, a Web Service to represent devices enabling I/O with users e.g GUI, console, etc. 49 / 165 50 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Actions and Percepts in Artifact-Based Environments Interaction Model: Use Explicit semantics defined by the (endogenous) environment [Ricci et al., 2010c] success/failure semantics, execution semantics defining the contract (in the SE acceptation) provided by the PropName Value PropName Value environment ... op(parms) ... action actions ! artifacts’ operation op(Params) AGENT the action repertoire is given by the dynamic set of operations provided by the overall set of artifacts available in the workspace can be changed by creating/disposing artifacts action success/failure semantics is defined by operation semantics Performing an action corresponds to triggering the execution of an operation percepts ! artifacts’ observable properties + signals acting on artifact’s usage interface properties represent percepts about the state of the environment signals represent percepts concerning events signalled by the environment 51 / 165 52 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Interaction Model: Operation execution Interaction Model: Observation SIGNALS PropName Value OBS PROPERTIES CHANGE Value ... op(parms) ... PropName(Value). action PropName(Value). op(Params) ... PropName Value AGENT OPERATION EXECUTION PropName Value Belief base ... action completion (or alike) focus - with success or failure - AGENT OBSERVER a process structured in one or multiple transactional steps asynchronous with respect to agent ...which can proceed possibly reacting to percepts and Agents can dynamically select which artifacts to observe executing actions of other plans/activities predefined focus/stopFocus actions operation completion causes action completion action completion events with success or failure, possibly with action feedbacks 53 / 165 54 / 165
  • 10.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Interaction Model: Observation Artifact Linkability PropName(Value). PropName(Value). ... PropName Value PropName Value Belief base ... (or alike) use linkedOp AGENT OBSERVER WSP-X WSP-Y By focussing an artifact Basic mechanism to enable inter-artifact interaction observable properties are mapped into agent dynamic linking artifacts through interfaces (link interfaces) knowledge about the state of the world, as percepts operations triggered by an artifact over an other artifact e.g. belief base Useful to design & program distributed environments signals are mapped as percepts related to observable events realised by set of artifacts linked together possibly hosted in di↵erent workspaces 55 / 165 56 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Artifact Manual CArtAgO Common ARtifact infrastructure for AGent Open Agent-readable description of artifact’s... environment (CArtAgO) [Ricci et al., 2009b] ...functionality what functions/services artifacts of that type provide Computational framework / infrastructure to implement and ...operating instructions run artifact-based environment [Ricci et al., 2007c] how to use artifacts of that type Java-based programming model for defining artifacts set of basic API for agent platforms to work within Towards advanced use of artifacts by intelligent artifact-based environment agents [Piunti et al., 2008] dynamically choosing which artifacts to use to accomplish Distributed and open MAS their tasks and how to use them workspaces distributed on Internet nodes strong link with Semantic Web research issues agents can join and work in multiple workspace at a time Work in progress Role-Based Access Control (RBAC) security model defining ontologies and languages for describing the manuals Open-source technology available at http://cartago.sourceforge.net 57 / 165 58 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Integration with Agent Languages and Platforms JaCa Platform Integration of CArtAgO with Jason language/platform a JaCa program is a dynamic set of Jason agents working Integration with existing agent platforms [Ricci et al., 2008] together in one or multiple CArtAgO workspaces by means of bridges creating an action/perception interface and doing data binding Mapping actions Outcome Jason agent external actions are mapped onto artifacts’ developing open and heterogenous MAS operations introducing a further perspective on interoperability besides percepts the ACL’s one artifacts’ observable properties are mapped onto agent beliefs sharing and working in a common work environment artifacts’ signals are mapped as percepts related to common object-oriented data-model observable events data-model Jason data-model is extended to manage also (Java) objects 59 / 165 60 / 165
  • 11.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Example 1: A Simple Counter Artifact Example 1: User and Observer Agents class Counter extends Artifact { USER(S) OBSERVER(S) void init(){ defineObsProp("count",0); count 5 !create_and_use. !observe. } +!create_and_use : true +!observe : true @OPERATION void inc(){ <- !setupTool(Id); <- ?myTool(C); // discover the tool // use focus(C). ObsProperty p = getObsProperty("count"); inc inc; p.updateValue(p.intValue() + 1); // second use specifying the Id +count(V) signal("tick"); inc [artifact_id(Id)]. <- println(“observed new value: “,V). } } // create the tool +tick [artifact_name(Id,”c0”)] +!setupTool(C): true <- println(“perceived a tick”). <- makeArtifact("c0","Counter",C). +?myTool(CounterId): true <- lookupArtifact(“c0”,CounterId). Some API spots -?myTool(CounterId): true <- .wait(10); Artifact base class ?myTool(CounterId). @OPERATION annotation to mark artifact?s operations set of primitives to work define/update/.. observable properties signal primitive to generate signals Working with the shared counter 61 / 165 62 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Pre-defined Artifacts Example 2: Coordination Artifacts – A Bounded Bu↵er Each workspace contains by default a predefined set of public class BoundedBuffer extends Artifact { private LinkedList<Item> items; private int nmax; artifacts void init(int nmax){ items = new LinkedList<Item>(); providing core and auxiliary functionalities defineObsProperty("n_items",0); this.nmax = nmax; i.e. a pre-defined repertoire of actions available to agents... } n_items 5 @OPERATION void put(Item obj){ Among the others await("bufferNotFull"); items.add(obj); getObsProperty("n_items").updateValue(items.size()); put workspace, type: cartago.WorkspaceArtifact } get functionalities to manage the workspace, including security @OPERATION void get(OpFeedbackParam<Item> res) { await("itemAvailable"); Item item = items.removeFirst(); operations: makeArtifact, lookupArtifact, focus,... res.set(item); getObsProperty("n_items").updateValue(items.size()); node, type: cartago.NodeArtifact } @GUARD boolean itemAvailable(){ return items.size() > 0; } core functionalities related to a node @GUARD boolean bufferNotFull(Item obj){ return items.size() < nmax; } operations: createWorkspace, joinWorkspace, ... } console, type cartago.tools.Console operations: println,... Basic operation features blackboard, type cartago.tools.TupleSpace output parameters to represent action feedbacks operations: out, in, rd, ... long-term operations, with a high-level support for .... synchronization (await primitive, guards) 63 / 165 64 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Example 2: Producers and Consumers Remarks PRODUCERS CONSUMERS item_to_produce(0). !consume. !produce. +!consume: true +!produce: true <- ?bufferReady; <- !setupTools(Buffer); !consumeItems. Process-based operation execution semantics !produceItems. +!consumeItems: true action/operation execution can be long-term +!produceItems : true <- get(Item); <- ?nextItemToProduce(Item); !consumeItem(Item); action/operation execution can overlap put(Item); !!consumeItems. !!produceItems. key feature for implementing coordination functionalities +!consumeItem(Item) : true +?nextItemToProduce(N) : true <- .my_name(Me); Operation with output parameters as action feedbacks <- -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). 65 / 165 66 / 165
  • 12.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Action Execution & Blocking Behaviour Example 3: Internal Processes – A Clock CLOCK CLOCK USER AGENT public class Clock extends Artifact { !test_clock. Given the action/operation map, by executing an action the boolean working; final static long TICK_TIME = 100; +!test_clock <- makeArtifac("myClock","Clock",[],Id); focus(Id); intention/activity is suspended until the corresponding void init(){ working = false; } +n_ticks(0); start; operation has completed or failed @OPERATION void start(){ if (!working){ working = true; println("clock started."). @plan1 action completion events generated by the environment and execInternalOp("work"); } else { +tick: n_ticks(10) <- stop; failed("already_working"); println("clock stopped."). automatically processed by the agent/environment platform } } @plan2 [atomic] bridge @OPERATION void stop(){ working = false; } +tick: n_ticks(N) <- -+n_ticks(N+1); println("tick perceived!"). no need of explicit observation and reasoning by agents to @INTERNAL_OPERATION void work(){ while (working){ know if an action succeeded signal("tick"); await_time(TICK_TIME); } However the agent execution cycle is not blocked! } } the agent can continue to process percepts and possibly execute actions of other intentions Internal operations execution of operations triggered by other operations implementing controllable processes 67 / 165 68 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Example 4: Artifacts for User I/O – GUI Artifacts Example 4: Agent and User Interaction GUI ARTIFACT USER ASSISTANT AGENT public class MySimpleGUI extends GUIArtifact { !test_gui. private MyFrame frame; +!test_gui public void setup() { <- makeArtifact("gui","MySimpleGUI",Id); frame = new MyFrame(); focus(Id). linkActionEventToOp(frame.okButton,"ok"); +value(V) linkKeyStrokeToOp(frame.text,"ENTER","updateText"); <- println("Value updated: ",V). value 16.0 ok linkWindowClosingEventToOp(frame, "closed"); defineObsProperty("value",getValue()); +ok : value(V) frame.setVisible(true); <- setValue(V+1). } setValue closed +closed @INTERNAL_OPERATION void ok(ActionEvent ev){ <- .my_name(Me); user signal("ok"); .kill_agent(Me). } agent @OPERATION void setValue(double value){ frame.setText(""+value); updateObsProperty("value",value); } ... Exploiting artifacts to enable interaction between human @INTERNAL_OPERATION void updateText(ActionEvent ev){ updateObsProperty("value",getValue()); users and agents } private int getValue(){ return Integer.parseInt(frame.getText()); } class MyFrame extends JFrame {...} } 69 / 165 70 / 165 Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Other Features A&A and CArtAgO: Some Research Explorations Designing and implementing artifact-based organisation Other CArtAgO features not discussed in this lecture Infrastructures linkability JaCaMo model and platform (which is the evolution of the executing chains of operations across multiple artifacts ORA4MAS infrastructure [H¨bner et al., 2009c]) u multiple workspaces Cognitive stigmergy based on artifact agents can join and work in multiple workspaces, concurrently environments [Ricci et al., 2007a] including remote workspaces cognitive artifacts for knowledge representation and RBAC security model coordination [Piunti and Ricci, 2009] workspace artifact provides operations to set/change the Artifact-based environments for access control policies of the workspace, depending on the argumentation [Oliva et al., 2010] agent role ruling agents’ access and use of artifacts of the workspace Including A&A in AOSE methodology [Molesini et al., 2005] ... Defining a Semantic (OWL-based) description of artifact See CArtAgO papers and manuals for more information environments ( CArtAgO-DL) JaSa project = JASDL + CArtAgO-DL ... 71 / 165 72 / 165
  • 13.
    Introduction EOP OOPConclusion Introduction Basic Advanced CArtAgO Wrap-up Introduction EOP OOP Conclusion Introduction Basic Advanced CArtAgO Wrap-up Applying CArtAgO and JaCa Wrap-up Environment programming Using CArtAgO/JaCa for building real-world applications and environment as a programmable part of the MAS infrastructures encapsulating and modularising functionalities useful for Some examples agents’ work JaCa-Android Artifact-based environments implementing mobile computing applications on top of the artifacts as first-class abstraction to design and program Android platform using JaCa [Santi et al., 2011] complex software environments http://jaca-android.sourceforge.net usage interface, observable properties / events, linkability JaCa-WS / CArtAgO-WS artifacts as first-order entities for agents building SOA/Web Services applications using interaction based on use and observation JaCa [Ricci et al., 2010a] agents dynamically co-constructing, evolving, adapting their http://cartagows.sourceforge.net world JaCa-Web CArtAgO computational framework implementing Web 2.0 applications using JaCa programming and executing artifact-based environments http://jaca-web.sourceforge.net integration with heterogeneous agent platforms JaCa case 73 / 165 74 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Abstractions in Multi-Agent Systems schema mission role ORGAMISATION org LEVEL Organisation Oriented agent Programming AGENT LEVEL — OOP — artifact ENDOGENOUS ENVIRONMENT wsp LEVEL EXOGENOUS ENVIRONMENT 76 / 165 network node Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisation in MAS – a definition Outline 3 Organisation Oriented Programming (OOP) What is an organisation? Fundamentals Motivations Some OOP approaches Focus on the Moise framework Moise Organisation Modelling Language (OML) Moise Organisation Management Infrastructure (OMI) Moise integration with agents & environment 78 / 165
  • 14.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisation in MAS – a definition Introduction: Some definitions Organisations are structured, patterned systems of activity, knowledge, culture, memory, history, and capabilities that are distinct from any single agent [Gasser, 2001] What is an organisation? Organisations are supra-individual phenomena A decision and communication schema which is applied to a set of Pattern of agent cooperation actors that together fulfill a set of tasks in order to satisfy goals with a purpose while guarantying a global coherent state [Malone, 1999] supra-agent definition by the designer, or by actors, to achieve a purpose emergent or An organisation is characterised by: a division of tasks, a predefined (by designer or agents) distribution of roles, authority systems, communication systems, contribution-retribution systems [Bernoux, 1985] pattern of predefined cooperation An arrangement of relationships between components, which results into an entity, a system, that has unknown skills at the level of the individuals [Morin, 1977] pattern of emergent cooperation 78 / 165 79 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Perspective on organisations from EASSS’05 Tutorial (Sichman, Boissier) Perspective on organisations from EASSS’05 Tutorial (Sichman, Boissier) Agent Centred 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 Agents don’t know Agents know about organisation about organisation about organisation about organisation AOSE TAEMS, STEAM, AGR MASE, GAIA, MESSAGE, … MOISE+, OPERA, … Organisation is Organisation-Oriented a design model. Programming of MAS It is hard-coded in Agents Organisation Centred Organisation Centred Organisation Specification Designer / Observer Organisation Specification Designer / Observer Organisation Entity Observed Organisation Bottom-up Top-down Organisation Entity Observed Organisation Bottom-up Top-down 80 / 165 81 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisation Oriented Programming (OOP) Organisation Oriented Programming (OOP) Programming outside the agents Agent Agent Using organisational concepts Agent To define a cooperative Agent First approach Organisation Organisation Specification pattern Specification Agents read the program and follow it Agent Program = Specification Agent By changing the Organisation specification, we can Organisation Entity change the MAS overall Entity behaviour 82 / 165 82 / 165
  • 15.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisation Oriented Programming (OOP) Organisation Oriented Programming (OOP) Agent Agent Second approach Second approach Agent Agents are forced to Agent Agents are forced to Organisation follow the program Organisation follow the program Specification Specification Agents are rewarded if Agent Agent they follow the program ... Organisation Organisation Entity Entity 82 / 165 82 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisation Oriented Programming (OOP) Components of OOP: Organisation Modelling Language (OML) Agent Declarative specification of the organisation(s) Components Specific constraints, norms and cooperation patterns Programming language imposed on the agents Agent (OML) Organisation Based on an organisational model Specification Platform (OMI) e.g. AGR [Ferber and Gutknecht, 1998], Integration to agent TeamCore [Tambe, 1997], Agent architectures and Islander [Esteva et al., 2001], environment Moise+ [H¨bner et al., 2002], u Organisation Opera [Dignum and Aldewereld, 2010], Entity 2OPL [Dastani et al., 2009a], ... 82 / 165 83 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Components of OOP: Components of OOP: Organisation Management Infrastructure (OMI) Integration mechanisms Agent integration mechanisms allow agents to be aware of and to deliberate on: Coordination mechanisms, i.e. support infrastructure entering/exiting the organisation e.g. MadKit [Gutknecht and Ferber, 2000b], modification of the organisation Karma [Pynadath and Tambe, 2003], obedience/violation of norms ... sanctioning/rewarding other agents Regulation mechanisms, i.e. governance infrastructure e.g. J -Moise+ [H¨bner et al., 2007], Autonomy based u e.g. Ameli [Esteva et al., 2004], reasoning [Carabelea, 2007], ProsA2 Agent-based reasoning S-Moise+ [H¨bner et al., 2006], u on norms [Ossowski, 1999], ... ORA4MAS [H¨bner et al., 2009b], u Environment integration mechanisms ... transform organisation into embodied organisation so that: Adaptation mechanisms, i.e. reorganisation infrastructure 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] 84 / 165 85 / 165
  • 16.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Motivations for OOP: Motivations for OOP: Applications point of view Constitutive point of view Current applications show an increase in Organisation helps the agents to cooperate with other Number of agents agents by defining common cooperation schemes Duration and repetitiveness of agent activities global tasks Heterogeneity of the agents protocols Number of designers of agents groups, responsibilities Agent ability to act and decide e.g. ‘to bid’ for a product on eBay is an institutional action only Openness, scalability, dynamism possible because eBay defines rules for that very action More and more applications require the integration of human the bid protocol is a constraint but it also creates the action communities and technological communities (ubiquitous and pervasive computing), building connected communities e.g. when a soccer team wants to play match, the organisation (ICities) in which agents act on behalf of users helps the members of the team to synchronise actions, to Trust, security, ..., flexibility, adaptation share information, etc 86 / 165 87 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Motivations for OOP: Motivations for OOP: Normative point of view Agents point of view MAS have two properties which seem contradictory: a global purpose autonomous agents An organisational specification is required to enable agents to While the autonomy of the agents is essential, it may cause “reason” about the organisation: loss in the global coherence of the system and achievement of to decide to enter into/leave from the organisation during the global purpose execution Embedding norms within the organisation of an MAS is a Organisation is no more closed way to constrain the agents’ behaviour towards the global to change/adapt the current organisation purposes of the organisation, while explicitly addressing the Organisation is no more static autonomy of the agents within the organisation Normative organisation to obey/disobey the organisation e.g. when an agent adopts a role, it adopts a set of behavioural Organisation is no more a regimentation constraints that support the global purpose of the organisation. It may decide to obey or disobey these constraints 88 / 165 89 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Motivations for OOP: Some OOP approaches Organisation point of view An organisational specification is required to enable the organisation to “reason” about itself and about the agents in AGR/Madkit [Ferber and Gutknecht, 1998] order to ensure the achievement of its global purpose: STEAM/Teamcore [Tambe, 1997] to decide to let agents enter into/leave from the ISLANDER/AMELI [Esteva et al., 2004] organisation during execution Opera/Operetta [Dignum and Aldewereld, 2010] Organisation is no more closed to decide to let agents change/adapt the current PopOrg [Rocha Costa and Dimuro, 2009] organisation 2OPL [Dastani et al., 2009a] Organisation is no more static and blind ... to govern agents behaviour in the organisation (i.e. monitor, enforce, regiment) Organisation is no more a regimentation 90 / 165 91 / 165
  • 17.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise AGR [Ferber and Gutknecht, 1998] AGR OML is member of * Agent * Agent Group Role (previously known as AALAADIN) plays 1..* Agent: Active entity that plays roles within groups. An agent Group Agent may have several roles and may belong to several groups level Group: set of agents sharing common characteristics, i.e. 1 context for a set of activities. Two agents cant communicate described by Organization with each other if they dont belong to the same group 1 1..* 1 contains level Role: Abstract representation of the status, position, 1..* participant Group structure Role 1..* function of an agent within a group 1 1 initiator source 1 1 target OMI: the Madkit platform * 1 1 * Interaction Role properties Role dependency protocol * 92 / 165 93 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise AGR OML Modelling Dimensions STEAM [Tambe, 1997] Environment Shell for TEAMwork is a general framework to enable agents to participate in teamwork P Di↵erent applications: Attack, Transport, Robocup soccer E Based on an enhanced SOAR architecture and 300 domain OS independent SOAR rules Principles: Team synchronisation: Establish joint intentions, Monitor team progress and repair, Individual may fail or succeed in Structural Specification B own role Reorganise if there is a critical role failure B: agents’ possible behaviors Reassign critical roles based on joint intentions P: agents’ behaviors that lead to global purpose Decision theoretic communication E: agents’ possible behaviors constrained by the environment OS: agents’ possible behaviors structurally constrained by the organization Supported by the TEAMCORE OMI 94 / 165 95 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise STEAM OML [Tambe, 1997] STEAM OML Modelling Dimensions TASK FORCE EVACUATE Environment [TASK FORCE] P PROCESS ORDERS EXECUTE LANDING ZONE E ORDERS SAFETY INFO FLIGHT ROUTE MISSION [TASK FORCE] [TASK FORCE] MANEUVERS OBTAINER OBTAINER TEAM PLANNER [TASK FORCE] OS ESCORT TRANSPORT OBTAIN FLY-FLIGHT MASK PICKUP ORDERS PLAN OBSERVE [TRANSPORT] [ORDERS [TASK FORCE] [ESCORT] OBTAINER] Structural OF Functional HELO1 HELO2 HELO1 HELO2 Specification B Specification FLY-CONTROL ROUTE [TASK FORCE] B: agents’ possible behaviors Organization: hierarchy of roles that P: agents’ behaviors that lead to global purpose may be filled by agents or groups of Team Plan: E: agents’ possible behaviors constrained by the environment agents. •  initial conditions, OS: agents’ possible behaviors structurally constrained by the organization •  term. cond. : achievability, irrelevance, OF: agents’ possible behaviors functionally constrained by the organization unachievability •  team-level actions. 96 / 165 97 / 165
  • 18.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise ISLANDER ISLANDER OML: IDL [Esteva et al., 2001] (define-institution soccer-server as Based on di↵erent influences: economics, norms, dialogues, dialogic-framework = soccer-df coordination performative-structure = soccer-pf norms = ( free-kick coach-messages … ) electronic institutions ) Combining di↵erent alternative views: dialogical, normative, coordination Institution Description Language: Performative structure (Network of protocols) Scene (multi-agent protocol) Roles Norms Ameli as OMI Performative Structure 98 / 165 99 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise ISLANDER OML Modelling Dimensions 2OPL slides from Dastani Environment The aim is to design and develop a programming language to P E support the implementation of coordination mechanisms in terms of normative concepts. OS An organisation OI determines e↵ect of external actions Structural Dialogical Specification B Specification normatively assesses e↵ect of agents’ actions (monitoring) B: agents’ possible behaviors sanctions agents’ wrongdoings (enforcement) P: agents’ behaviors that lead to global purpose prevents ending up in really bad states (regimentation) E: agents’ possible behaviors constrained by the environment OS: agents’ possible/permitted/obliged behaviors structurally constrained by the organisation OI: agents’ possible/permitted/obliged behaviors interactionally constrained by the organisation 100 / 165 101 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Programming Language for Organisations 2OPL Modelling Dimension Example (Train Station) Facts: – -at˙platform , -in˙train , -ticket ˝ Effects: – -at˙platform ˝ enter – at˙platform ˝, – -ticket ˝ buy˙ticket – ticket ˝, – at˙platform , -in˙train ˝ embark – -at˙platform, in˙train ˝ Counts˙as rules: – at˙platform , -ticket ˝ =¿ – viol˙ticket ˝, – in˙train , -ticket ˝ =¿ – viol˙—˙ ˝ Sanction˙rules: – viol˙ticket ˝ =¿ – fined˙10 ˝ 102 / 165 103 / 165
  • 19.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Summary Several models Several dimensions on modelling organisation The Moise Framework Structural (roles, groups, ...) Functional (global plans, ....) Dialogical (scenes, protocols, ...) Normative (norms) 104 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Moise Framework Moise Modelling Dimensions OML (language) Environment Tag-based language (issued from Moise [Hannoun et al., 2000], P Moise+ [H¨bner et al., 2002], u E MoiseInst [Gˆteau et al., 2005]) a OMI (infrastructure) OS developed as an artifact-based working environment (ORA4MAS [H¨bner et al., 2009b] based on CArtAgO u nodes, refactoring of S-Moise+ [H¨bner et al., 2006] and u Structural OF Functional Specification B Specification Synai [Gˆteau et al., 2005]) a Integrations Groups, links, roles Global goals, plans, Compatibilities, multiplicities Missions, schemas, Agents and Environment (c4Jason, c4Jadex Normative Specification preferences inheritance [Ricci et al., 2009c]) Permissions, Obligations Environment and Organisation ([Piunti et al., 2009a]) Allows agents autonomy! Agents and Organisation (J -Moise+ [H¨bner et al., 2007]) u 106 / 165 107 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Moise OML meta-model (partial view) Moise OML Agent Goal OML for defining organisation specification and organisation entity Structural Specification create delete Three independent dimensions [H¨bner et al., 2007] u create delete ( well adapted for the reorganisation concerns): Normative Social Scheme Specification Structural: Roles, Groups Group achieve Functional Specification Goal Functional: Goals, Missions, Schemes adopt leave Normative: Norms (obligations, permissions, interdictions) commit Role Norm Mission leave Abstract description of the organisation for the designers the agents composition agent's actions J -Moise+ [H¨bner et al., 2007] u association concept mapping the Organisation Management Infrastructure Cardinalities are not represented ORA4MAS [H¨bner et al., 2009b] u 108 / 165 109 / 165
  • 20.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Moise OML Structural Specification Structural Specification Example Specifies the structure of an MAS along three levels: Individual with Role Social with Link Collective with Group Components: Role: label used to assign rights and constraints on the behavior of agents playing it Link: relation between roles that directly constrains the agents in their interaction with the other agents playing the corresponding roles Group: set of links, roles, compatibility relations used to define a shared context for agents playing roles in it Graphical representation of structural specification of 3-5-2 Joj Team 110 / 165 111 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Moise OML Functional Specification Functional Specification Example Specifies the expected behaviour of an MAS in terms of goals along two levels: m1, m2, m3 score a goal Collective with Scheme Individual with Mission m1 m3 Components: get the ball shot at the opponent’s goal Goals: m1 m2 Achievement goal (default type). Goals of this type should go towards the opponent field kick the ball to the goal area be declared as satisfied by the agents committed to them, m2 m2 be placed in the middle field go to the opponent back line when achieved m1 Maintenance goal. Goals of this type are not satisfied at a m3 kick the ball to (agent committed to m2) precise moment but are pursued while the scheme is running. be placed in the opponent goal area The agents committed to them do not need to declare that Key Organizational Entity they are satisfied Scheme Lucio m1 Scheme: global goal decomposition tree assigned to a group missions Cafu m2 goal sequence choice parallelism Any scheme has a root goal that is decomposed into subgoals success rate Rivaldo m3 Missions: set of coherent goals assigned to roles within Graphical representation of social scheme “side attack” for joj team norms 112 / 165 113 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Goal States Moise OML Normative Specification waiting enabled Explicit relation between the functional and structural specifications impossible satisfied Permissions and obligations to commit to missions in the context of a role Makes explicit the normative dimension of a role waiting initial state enabled goal pre-conditions are satisfied & scheme is well-formed satisfied agents committed to the goal have achieved it impossible the goal is impossible to be satisfied 114 / 165 115 / 165
  • 21.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Norm Specification – example Organisational Entity structural norrmative functional groups schemas Organisation links norms roles missions specification role deontic mission TTF back obliged m1 get the ball, go ... 1 minute purpose left obliged m2 be placed at ..., kick ... 3 minute right obliged m2 1 day attacker obliged m3 kick to the goal, ... 30 seconds group schema instances role instances mission Organisation player player Entity agents 116 / 165 117 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisation Entity Dynamics Organisation management infrastructure (OMI) Responsibility 1 Organisation is created (by the agents) Managing – coordination, regulation – the agents’ execution instances of groups within organisation defined in an organisational specification instances of schemes 2 Agents enter into groups adopting roles 3 Groups become responsible for schemes Agent Agent Agent Agent Agents from the group are then obliged to commit to missions in the scheme 4 Agents commit to missions 5 Agents fulfil mission’s goals Organisation OMI Specification 6 Agents leave schemes and groups 7 Schemes and groups instances are destroyed (e.g. MadKit, AMELI, S-Moise+ , ...) 118 / 165 119 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisational artifacts in ORA4MAS ORA4MAS – GroupBoard artifact System GroupBoard based on A&A and Agent Moise Specification Observable Properties: Agent agents create and handle Players specification: the organisational artifacts specification of the group in Agent Agent Schemes the OS (an object of class Group artifacts in charge of Artifact Formation status moise.os.ss.Group) regimentations, detection and evaluation players: a list of agents Scheme of norms compliance playing roles in the group. Artifact adoptRole Each element of the list is a agents are in charge of leaveRole pair (agent x role) Scheme Agent decisions about Artifact Agent sanctions addScheme schemes: a list of scheme identifiers that the group is distributed solution removeScheme responsible for 120 / 165 121 / 165
  • 22.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise ORA4MAS – GroupBoard artifact ORA4MAS – SchemeBoard artifact GroupBoard SchemeBoard Observable Properties: Specification Operations: Specification specification: the specification of the scheme adoptRole(role): the agent Groups Players in the OS executing this operation Schemes tries to adopt a role in the Players groups: a list of groups group Goals responsible for the scheme Formation status leaveRole(role) Obligations players: a list of agents committed to the scheme. addScheme(schid): the adoptRole Each element of the list is a group starts to be commitMission pair (agent, mission) leaveRole responsible for the scheme leaveMission goals: a list with the managed by the addScheme goalAchieved current state of the goals SchemeBoard schId removeScheme removeScheme(schid) setGoalArgument obligations: list of obligations currently active in the scheme 122 / 165 123 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise ORA4MAS – SchemeBoard artifact Organisational Artifact Architecture SchemeBoard Organisation Operations: Group State Artifact Specification commitMission(mission) Groups NPL Interpreter and leaveMission: NPL Engine Players operations to “enter” and NOPL translates Organisation Program Specificatoin Goals “leave” the scheme Obligations goalAchieved(goal): defines State Obligations that some goal is achieved by the agent performing the commitMission operation Signals (o = obligation(to whom, reason, what, deadline)): leaveMission setGoalArgument(goal, obl created(o): the obligation o is created goalAchieved argument, value): defines obl fulfilled(o): the obligation o is fulfilled the value of some goal’s obl unfulfilled(o): the obligation o is unfulfilled setGoalArgument argument obl inactive(o): the obligation o is inactive norm failure(f ): the failure f has happened 124 / 165 125 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Environment integration Environment integration: constitutive rules Count-As rule Organisational Artifacts enable organisation and environment An event occurring on an artifact, in a particular context, may integration count-as an institutional event Embodied organisation [Piunti et al., 2009a] transforms the events created in the working environment into activation of an organisational operation count-as indirect automatic updating of the organisation count-as Enact rule Env. Artifact Org. Artifact An event produced on an organisational artifact, in a specific institutional context, may “enact” change and updating of the working environment (i.e., to promote equilibrium, avoid enact undesiderable states) Installing automated control on the working environment Even without the intervention of organisational/sta↵ agents status: ongoing work (regimenting actions on physical artifacts, enforcing 126 / 165 sanctions, ...) 127 / 165
  • 23.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Agent integration J -Moise: Jason + Moise Agents can interact with organisational artifacts as with Agents are programmed with Jason ordinary artifacts by perception and action BDI agents (reactive planning) – suitable abstraction level Any Agent Programming Language integrated with CArtAgO can use organisational artifacts The programmer has the possibility to express sophisticated recipes for adopting roles, committing to missions, fulfilling/violating norms, ... Agent integration provides some “internal” tools for the agents Organisational information is made accessible in the mental to simplify their interaction with the organisation: state of the agent as beliefs maintenance of a local copy of the organisational state Integration is totally independent of the production of organisational events distribution/communication layer provision of organisational actions 128 / 165 129 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise J -Moise: Jason + Moise– General view Organisational actions in Jason I Example (GroupBoard) ... Jason-CArtAgo Agent joinWorkspace(”ora4mas”,O4MWsp); makeArtifact( Belief Plan ”auction”, Intentions Base Library ”ora4mas.nopl.GroupBoard”, [”auction-os.xml”, auctionGroup, false, true ], GrArtId); J-Moise+ adoptRole(auctioneer); focus(GrArtId); ... Organisational Workspace (CArtAgO) 130 / 165 131 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisational actions in Jason II Organisational perception Example (SchemeBoard) ... makeArtifact( When an agent focus on an Organisational Artifact, the ”sch1”, observable properties (Java objects) are translated to beliefs with ”ora4mas.nopl.SchemeBoard”, the following predicates: [”auction-os.xml”, doAuction, false, true ], specification SchArtId); focus(SchArtId); play(agent, role, group) addScheme(Sch); commitment(agent, mission, scheme) commitMission(mAuctioneer)[artifact˙id(SchArtId)]; goalState(scheme, goal, list of committed agents, list of ... agent that achieved the goal, state of the goal) obligation(agent,norm,goal,dead line) .... 132 / 165 133 / 165
  • 24.
    Introduction EOP OOPConclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Organisational perception – example Handling organisational events in Jason Whenever something changes in the organisation, the agent architecture updates the agent belief base accordingly producing events (belief update from perception) Example (new agent entered the group) +play(Ag,boss,GId) ¡- .send(Ag,tell,hello). Example (change in goal state) +goalState(Scheme,wsecs,˙,˙,satisfied) : .my˙name(Me) & commitment(Me,mCol,Scheme) ¡- leaveMission(mColaborator,Scheme). Example (signals) +normFailure(N) ¡- .print(”norm failure event: ”, N). 134 / 165 135 / 165 Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Introduction EOP OOP Conclusion Introduction Motivations OOP Moise Typical plans for obligations Summary – Moise Example Ensures that the agents follow some of the constraints +obligation(Ag,Norm,committed(Ag,Mission,Scheme),DeadLine) : .my˙name(Ag) specified for the organisation ¡- .print(”I am obliged to commit to ”,Mission); Helps the agents to work together commit˙mission(Mission,Scheme). The organisation is interpreted at runtime, it is not hardwired in the agents code +obligation(Ag,Norm,achieved(Sch,Goal,Ag),DeadLine) : .my˙name(Ag) The agents ‘handle’ the organisation (i.e. their artifacts) ¡- .print(”I am obliged to achieve goal ”,Goal); It is suitable for open systems as no specific agent !Goal[scheme(Sch)]; architecture is required goal˙achieved(Goal,Sch). +obligation(Ag,Norm,What,DeadLine) All available as open source at : .my˙name(Ag) ¡- .print(”I am obliged to ”,What, http://moise.souceforge.net ”, but I don’t know what to do!”). 136 / 165 137 / 165 Introduction EOP OOP Conclusion Putting the Pieces Together INTERNAL BELIEFS GROUPS ROLES EVENTS GOALS SANCTIONS PLANS MISSIONS REWARDS ACTIONS DEONTIC RELATIONS Conclusions PERCEPTIONS NORMS JASON MOISE ? AGENTS ORGANISATIONS Agent Prog. Framework Language CarTaGO JADE Platform Platform SPEECH COMMUNICATION RESOURCES ACTS LANGUAGES LEGACY INTERACTION SERVICES OBJECTS PROCOLS ENVIRONMENTS INTERACTIONS 139 / 165
  • 25.
    Introduction EOP OOPConclusion Introduction EOP OOP Conclusion Exploiting Orthogonality Beyond Orthogonality: Synergetic Integration Treating AOP & EOP & OOP as orthogonal dimensions improving separation of concerns using the best abstraction level and tools to tackle the Exploiting one dimension to e↵ectively design and program specific dimensions, avoiding design pitfalls, such as using agents to implement either non-autonomous entities (e.g., a also aspects related to the other dimensions blackboard agent) or a collection of autonomous entities for instance, using the environment to design, implement and (group agent) represent at runtime the organisation infrastructure promoting openness and heterogeneity Designing and implementing MAS behaviours that are based E.g., heterogeneous agents working in the same organisation, on explicit bindings between the di↵erent dimensions heterogeneous agents working in the same environment, the for instance, exploiting events occurring in the environment to same agent working in di↵erent and heterogeneous represent events that have an e↵ect at the institutional or organisations, the same agent working in di↵erent heterogeneous environments social level Outcome from a programming point of view code more clean and understandable improving modularity, extensibility, reusability 140 / 165 141 / 165 Introduction EOP OOP Conclusion Introduction EOP OOP Conclusion Exploiting Synergy between the A/E Dimensions Exploiting Synergy on A/O Integration Normative deliberative agents Mapping possibility to define mechanisms for agents to evolve within agent actions into environment operations (e.g. CArtAgO) an organisation/several organisations environment observable state/events into agent beliefs possibility to define proper mechanisms for deliberating on the Outcome internalisation/adoption/violation of norms agents with dynamic action repertoire Reorganisation, adaptation of the organisation uniformly implementing any mechanisms (e.g. coordination possibility to define proper mechanisms for mechanism) in terms of actions/percepts diagnosing/evaluating/refining/defining organisations no need to extend agents with special purpose primitives “Deliberative” Organisations exploiting a new type of agent modularity, based on possibility to define dedicated organisational strategies for the externalization [Ricci et al., 2009a] regulation/adaptation of the organisation behaviour (organisational agents) 142 / 165 143 / 165 Introduction EOP OOP Conclusion Introduction EOP OOP Conclusion Exploiting Synergy between the E/O Dimensions E/O Synergy Example: Implementing Regimentation Grounding the organisation infrastructure implemented using environment abstractions Exploiting the environment role of enabler and mediator of ... that agents perceive then as first-class entities of their agent interaction world by providing actions and generating percepts Mapping ! natural place where to embed and enforce organisational state reified by the environment computational organisational rules and norms state a↵ecting action execution behaviour and percepts generation organisational actions/perceptions reified by actions/percepts Examples on the environment state simple: a game-board artifact in an artifact-based organisational functionalities encapsulated by suitably environment designed environment abstractions providing agents actions to make moves Outcome encapsulating and enforcing the rules of the game “the power is back to agents” [H¨bner et al., 2009c] u complex: fully-fledged institutions by perceiving and acting upon that environment, agents can reified into properly programmed environments reason and dynamically adapt the organisation infrastructure 144 / 165 145 / 165
  • 26.
    Introduction EOP OOPConclusion Introduction EOP OOP Conclusion E/O Synergy Example: Implementing Constitutive Rules A proposal: JaCaMo Environment Manual consult External Action Internal Action dimension Exploiting the environment to create, represent, and manage has create dependencies and rules that are meaningful at the Workspace Artifact dispose link Action Agent join dimension organisational level quit A main example: implementing constitutive Work Environment Operation use Agent Plan rules [Searle, 1997] Observable Property update generate Observable Event Trigger event events occurring in concrete environments conveyed as social Belief and institutional events perceive Goal typically represented in the form X counts as Y in C create create delete an example: reaching the environment state S counts as delete Social Scheme achieving the organisational goal G Group Goal commit adopt The integration E/O allows for naturally design and leave leave implementation of these kinds of rules Organisation dimension Role Norm Mission without adding any further concepts wrt the ones belonging to the E/O dimensions composition agent's actions Legend association dimension border dependency concept mapping 146 / 165 147 / 165 Introduction EOP OOP Conclusion Ongoing and Related Research Unifying agents, environments and organisation perspectives Volcano platform [Ricordel and Demazeau, 2002] MASK platform [Occello et al., 2004] MASQ [Stratulat et al., 2009], extending AGRE and AGREEN Embodied organisations [Piunti, 2010] Situated E-Institutions [Campos et al., 2009] Normative programming and infrastructures [H¨bner et al., 2009a, u Tinnemeier et al., 2009, Dastani et al., 2009b] 148 / 165
  • 27.
    References [H¨ bner et al., 2009a] H¨ bner, J. F., Boissier, O., and Bordini, R. H. u u (2009a). Normative programming for organisation management infras- [Behrens et al., 2010] Behrens, T., Bordini, R., Braubach, L., Dastani, M., tructures. In MALLOW Workshop on Coordination, Organization, Dix, J., Hindriks, K., Hbner, J., and Pokahr, A. (2010). An interface Institutions and Norms in Agent Systems in Online Communities for agent-environment interaction. In In Proceedings of International (COIN-MALLOW 2009). Workshop on Programming Multi-Agent Systems (ProMAS-8). [H¨ bner et al., 2009b] H¨ bner, J. F., Boissier, O., Kitio, R., and Ricci, A. u u [Bernoux, 1985] Bernoux, P. (1985). La sociologie des organisations. (2009b). Instrumenting multi-agent organisations with organisational Seuil, 3`me edition. e artifacts and agents: “Giving the organisational power back to the agents”. Autonomous Agents and Multi-Agent Systems. DOI-URL: [Bordini et al., 2007] Bordini, R., H¨ bner, J., and Wooldridge, M. (2007). u http://dx.doi.org/10.1007/s10458-009-9084-y. Programming Multi-Agent Systems in AgentSpeak Using Jason. Wiley- Interscience. [H¨ bner et al., 2009c] H¨ bner, J. F., Boissier, O., Kitio, R., and Ricci, A. u u (2009c). Instrumenting Multi-Agent Organisations with Organisational [Bromuri and Stathis, 2008] Bromuri, S. and Stathis, K. (2008). Situating Artifacts and Agents. Journal of Autonomous Agents and Multi-Agent Cognitive Agents in GOLEM. In Weyns, D., Brueckner, S., and De- Systems. mazeau, Y., editors, Engineering Environment-Mediated Multi-Agent [H¨ bner et al., 2002] H¨ bner, J. F., Sichman, J. S., and Boissier, O. u u Systems, volume 5049 of LNCS, pages 115–134. Springer Berlin / Hei- (2002). A model for the structural, functional, and deontic specifica- delberg. tion of organizations in multiagent systems. In Bittencourt, G. and Ra- malho, G. L., editors, Proceedings of the 16th Brazilian Symposium on [Campos et al., 2009] Campos, J., L´pez-S´nchez, M., Rodriguez-Aguilar, o a Artificial Intelligence (SBIA’02), volume 2507 of LNAI, pages 118–128, J. A., and Esteva, M. (2009). Formalising situatedness and adaptation Berlin. Springer. in electronic institutions. In Coordination, Organizations, Institutions and Norms in Agent Systems IV, volume 5428/2009 of LNCS. Springer [H¨ bner et al., 2006] H¨ bner, J. F., Sichman, J. S., and Boissier, O. u u Berlin / Heidelberg. (2006). S-MOISE+: A middleware for developing organised multi-agent systems. In Boissier, O., Dignum, V., Matson, E., and Sichman, J. S., ed- [Carabelea, 2007] Carabelea, C. (2007). Reasoning about autonomy in itors, Coordination, Organizations, Institutions, and Norms in Multi- open multi-agent systems - an approach based on the social power the- Agent Systems, volume 3913 of LNCS, pages 64–78. Springer. ory. in french, ENS Mines Saint-Etienne. [H¨ bner et al., 2007] H¨ bner, J. F., Sichman, J. S., and Boissier, O. u u [Dastani, 2008] Dastani, M. (2008). 2APL: a practical agent programming (2007). Developing Organised Multi-Agent Systems Using the MOISE+ language. Autonomous Agent and Multi-Agent Systems, 16(3):214–248. Model: Programming Issues at the System and Agent Levels. Agent- Oriented Software Engineering, 1(3/4):370–395. [Dastani et al., 2009] Dastani, M., Tinnemeier, N., and Meyer, J.-J. C. (2009). A programming language for normative multi-agent systems. [Malone, 1999] Malone, T. W. (1999). Tools for inventing organizations: In Multi-Agent Systems: Semantics and Dynamics of Organizational Toward a handbook of organizational process. Management Science, Models. IGI-Global. 45(3):425–443. [Dignum and Aldewereld, 2010] Dignum, V. and Aldewereld, H. (2010). [Molesini et al., 2005] Molesini, A., Omicini, A., Denti, E., and Ricci, A. Operetta: Organization-oriented development environment. In Proceed- (2005). SODA: A roadmap to artefacts. In Dikenelli, O., Gleizes, M.- ings of LADS @ MALLOW 2010, pages 14–20. P., and Ricci, A., editors, 6th International Workshop “Engineering Societies in the Agents World” (ESAW’05), pages 239–252, Ku¸adası,s Aydın, Turkey. Ege University. [Esteva et al., 2001] Esteva, M., Rodriguez-Aguiar, J. A., Sierra, C., Gar- cia, P., and Arcos, J. L. (2001). On the formal specification of elec- [Morin, 1977] Morin, E. (1977). La m´thode (1) : la nature de la nature. e tronic institutions. In Dignum, F. and Sierra, C., editors, Proceedings Points Seuil. of the Agent-mediated Electronic Commerce, LNAI 1191, pages 126– 147, Berlin. Springer. [Occello et al., 2004] Occello, M., Baeijs, C., Demazeau, Y., and Koning, J.-L. (2004). MASK: An AEIO toolbox to design and build multi-agent [Esteva et al., 2004] Esteva, M., Rodr´ıguez-Aguilar, J. A., Rosell, B., and systems. In et al., C., editor, Knowledge Engineering and Agent Tech- L., J. (2004). AMELI: An agent-based middleware for electronic insti- nology, IOS Series on Frontiers in AI and Applications. IOS press, Am- tutions. In Jennings, N. R., Sierra, C., Sonenberg, L., and Tambe, M., sterdam. editors, Proc. of the 3rd Int. Joint Conf. on Autonomous Agents and Multi-Agent Systems (AAMAS’04), pages 236–243, New York, USA. [Okuyama et al., 2008] Okuyama, F. Y., Bordini, R. H., and ACM. da Rocha Costa, A. C. (2008). A distributed normative infras- tructure for situated multi-agent organisations. In Baldoni, M., Son, [Ferber and Gutknecht, 1998] Ferber, J. and Gutknecht, O. (1998). A T. C., van Riemsdijk, M. B., and Winiko , M., editors, DALT, volume meta-model for the analysis and design of organizations in multi-agents 5397 of Lecture Notes in Computer Science, pages 29–46. Springer. systems. In Demazeau, Y., editor, Proceedings of the 3rd Interna- tional Conference on Multi-Agent Systems (ICMAS’98), pages 128– [Oliva et al., 2010] Oliva, E., McBurney, P., Omicini, A., and Viroli, M. 135. IEEE Press. (2010). Argumentation and artifacts for negotiation support. Interna- tional Journal of Artificial Intelligence, 4(S10):90–117. Special Issue [Gasser, 2001] Gasser, L. (2001). Organizations in multi-agent systems. on Negotiation and Argumentation in Artificial Intelligence. In Pre-Proceeding of the 10th European Worshop on Modeling Au- tonomous Agents in a Multi-Agent World (MAAMAW’2001), Annecy. [Omicini et al., 2008] Omicini, A., Ricci, A., and Viroli, M. (2008). Ar- tifacts in the A&A meta-model for multi-agent systems. Autonomous [Gˆteau et al., 2005] Gˆteau, B., Boissier, O., Khadraoui, D., and Dubois, a a Agents and Multi-Agent Systems, 17(3):432–456. E. (2005). Moiseinst: An organizational model for specifying rights and duties of autonomous agents. In Third European Workshop on Multi- [Omicini et al., 2004] Omicini, A., Ricci, A., Viroli, M., Castelfranchi, C., Agent Systems (EUMAS 2005), pages 484–485, Brussels Belgium. 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), vol- [Gutknecht and Ferber, 2000a] Gutknecht, O. and Ferber, J. (2000a). The ume 1, pages 286–293, New York, USA. ACM. MADKIT agent platform architecture. In Agents Workshop on Infras- tructure for Multi-Agent Systems, pages 48–55. [Ossowski, 1999] Ossowski, S. (1999). Co-ordination in Artificial Agent Societies: Social Structures and Its Implications for Autonomous [Gutknecht and Ferber, 2000b] Gutknecht, O. and Ferber, J. (2000b). The Problem-Solving Agents, volume 1535 of LNAI. Springer. MadKit agent platform architecture. In Agents Workshop on Infras- tructure for Multi-Agent Systems, pages 48–55. [Piunti, 2010] Piunti, M. (2010). Embodied organizations: a unifying per- spective in programming agents, organizations and environments. PhD [Hannoun et al., 2000] Hannoun, M., Boissier, O., Sichman, J. S., and thesis. Sayettat, C. (2000). Moise: An organizational model for multi-agent systems. In Monard, M. C. and Sichman, J. S., editors, Proceedings of [Piunti and Ricci, 2009] Piunti, M. and Ricci, A. (2009). Cognitive ar- the International Joint Conference, 7th Ibero-American Conference on tifacts for intelligent agents in mas: Exploiting relevant information AI, 15th Brazilian Symposium on AI (IBERAMIA/SBIA’2000), At- residing in environments. In Knowledge Representation for Agents ibaia, SP, Brazil, November 2000, LNAI 1952, pages 152–161, Berlin. and Multi-Agent Systems (KRAMAS 2008), volume 5605 of LNAI. Springer. Springer. 1
  • 28.
    [Piunti et al.,2009a] Piunti, M., Ricci, A., Boissier, O., and Hubner, J. [Ricordel and Demazeau, 2002] Ricordel, P. and Demazeau, Y. (2002). (2009a). Embodying organisations in multi-agent work environments. In VOLCANO: a vowels-oriented multi-agent platform. In Dunin-Keplicz IEEE/WIC/ACM International Conference on Web Intelligence and and Nawarecki, editors, Proceedings of the International Conference Intelligent Agent Technology (WI-IAT 2009), Milan, Italy. of Central Eastern Europe on Multi-Agent Systems (CEEMAS’01), volume 2296 of LNAI, pages 252–262. Springer Verlag. [Piunti et al., 2009b] Piunti, M., Ricci, A., Boissier, O., and H¨ bner, J. F. u (2009b). Embodied organisations in mas environments. In Braubach, [Rocha Costa and Dimuro, 2009] Rocha Costa, A. C. d. and Dimuro, G. L., van der Hoek, W., Petta, P., and Pokahr, A., editors, Proceedings of (2009). A minimal dynamical organization model. In Dignum, V., edi- 7th German conference on Multi-Agent System Technologies (MATES tor, Multi-Agent Systems: Semantics and Dynamics of Organizational 09), Hamburg, Germany, September 9-11, volume 5774 of LNCS, pages Models, chapter XVII, pages 419–445. IGI Global. 115–127. Springer. [Russell and Norvig, 2003] Russell, S. and Norvig, P. (2003). Artificial [Piunti et al., 2008] Piunti, M., Ricci, A., Braubach, L., and Pokahr, Intelligence, A Modern Approach (2nd ed.). Prentice Hall. A. (2008). Goal-directed interactions in artifact-based mas: Jadex agents playing in CARTAGO environments. In Proc. of the 2008 [Santi et al., 2011] Santi, A., Guidi, M., and Ricci, A. (2011). Jaca- IEEE/WIC/ACM Int. Conf. on Web Intelligence and Intelligent android: An agent-based platform for building smart mobile applica- Agent Technology (IAT’08), volume 2. IEEE Computer Society. tions. In Languages, Methodologies and Development Tools for Multi- agent systems, volume 6822 of LNAI. Springer Verlag. [Platon et al., 2007] Platon, E., Mamei, M., Sabouret, N., Honiden, S., [Searle, 1997] Searle, J. R. (1997). The Construction of Social Reality. and Parunak, H. V. (2007). Mechanisms for environments in multi-agent Free Press. systems: Survey and opportunities. Autonomous Agents and Multi- Agent Systems, 14(1):31–47. [Shoham, 1993] Shoham, Y. (1993). Agent-oriented programming. Artif. Intell., 60(1):51–92. [Pynadath and Tambe, 2003] Pynadath, D. V. and Tambe, M. (2003). An automated teamwork infrastructure for heterogeneous software agents [Stratulat et al., 2009] Stratulat, T., Ferber, J., and Tranier, J. (2009). and humans. Autonomous Agents and Multi-Agent Systems, 7(1-2):71– MASQ: towards an integral approach to interaction. In AAMAS (2), 100. pages 813–820. [Ricci et al., 2010a] Ricci, A., Denti, E., and Piunti, M. (2010a). A plat- [Tambe, 1997] Tambe, M. (1997). Towards flexible teamwork. Journal of form for developing SOA/WS applications as open and heterogeneous Artificial Intelligence Reseearch, 7:83–124. multi-agent systems. Multiagent and Grid Systems International Jour- nal (MAGS), Special Issue about “Agents, Web Services and Ontolo- [Tinnemeier et al., 2009] Tinnemeier, N., Dastani, M., Meyer, J.-J., and gies: Integrated Methodologies”. To Appear. van der Torre, L. (2009). Programming normative artifacts with declar- ative obligations and prohibitions. In IEEE/WIC/ACM International [Ricci et al., 2007a] Ricci, A., Omicini, A., Viroli, M., Gardelli, L., and Joint Conference on Web Intelligence and Intelligent Agent Technol- Oliva, E. (2007a). Cognitive stigmergy: Towards a framework based ogy (WI-IAT 2009). on agents and artifacts. In Weyns, D., Parunak, H. V. D., and Michel, F., editors, Environments for MultiAgent Systems III, volume 4389 of [Viroli et al., 2007] Viroli, M., Holvoet, T., Ricci, A., Schelfthout, K., and LNAI, pages 124–140. Springer. Zambonelli, F. (2007). Infrastructures for the environment of multiagent systems. Autonomous Agents and Multi-Agent Systems, 14(1):49–60. [Ricci et al., 2008] Ricci, A., Piunti, M., Acay, L. D., Bordini, R., H¨ bner, u J., and Dastani, M. (2008). Integrating artifact-based environments [Weyns and Holvoet, 2004] Weyns, D. and Holvoet, T. (2004). A formal with heterogeneous agent-programming platforms. In Proceedings of model for situated multi-agent systems. Fundamenta Informaticae, 7th International Conference on Agents and Multi Agents Systems 63(2-3):125–158. (AAMAS08). [Weyns and Holvoet, 2007] Weyns, D. and Holvoet, T. (2007). A reference architecture for situated multiagent systems. In Environments for Mul- [Ricci et al., 2009a] Ricci, A., Piunti, M., and Viroli, M. (2009a). Ex- tiagent Systems III, volume 4389 of LNCS, pages 1–40. Springer Berlin ternalisation and internalization: A new perspective on agent modu- / Heidelberg. larisation in multi-agent system programming. In Dastani, M., Fallah- Seghrouchni, A. E., Leite, J., and Torroni, P., editors, LADS, volume [Weyns et al., 2007] Weyns, D., Omicini, A., and Odell, J. J. (2007). Envi- 6039 of Lecture Notes in Computer Science, pages 35–54. Springer. ronment as a first-class abstraction in multi-agent systems. Autonomous Agents and Multi-Agent Systems, 14(1):5–30. [Ricci et al., 2010b] Ricci, A., Piunti, M., and Viroli, M. (2010b). Environ- ment programming in multi-agent systems – an artifact-based perspec- [Weyns and Parunak, 2007] Weyns, D. and Parunak, H. V. D., editors tive. Autonomous Agents and Multi-Agent Systems. Published Online (2007). Special Issue on Environments for Multi-Agent Systems, vol- with ISSN 1573-7454 (will appear with ISSN 1387-2532). ume 14 (1) of Autonomous Agents and Multi-Agent Systems. Springer Netherlands. [Ricci et al., 2009b] Ricci, A., Piunti, M., Viroli, M., and Omicini, A. (2009b). Environment programming in CArtAgO. In Bordini, R. H., Das- [Weyns et al., 2005] Weyns, D., Parunak, H. V. D., Michel, F., Holvoet, tani, M., Dix, J., and El Fallah-Seghrouchni, A., editors, Multi-Agent T., and Ferber, J. (2005). Environments for multiagent systems: State- Programming: Languages, Platforms and Applications, Vol. 2, pages of-the-art and research challenges. In Weyns, D., Parunak, H. V. D., 259–288. Springer Berlin / Heidelberg. Michel, F., Holvoet, T., and Ferber, J., editors, Environment for Multi- Agent Systems, volume 3374, pages 1–47. Springer Berlin / Heidelberg. [Ricci et al., 2009c] Ricci, A., Piunti, M., Viroli, M., and Omicini, A. (2009c). Environment programming in CArtAgO. In Multi-Agent Pro- [Wooldridge, 2002] Wooldridge, M. (2002). An Introduction to Multi- gramming: Languages,Platforms and Applications,Vol.2. Springer. Agent Systems. John Wiley & Sons, Ltd. [Ricci et al., 2010c] Ricci, A., Santi, A., and Piunti, M. (2010c). Action and perception in multi-agent programming languages: From exogenous to endogenous environments. In In Proceedings of International Work- shop on Programming Multi-Agent Systems (ProMAS-8). [Ricci et al., 2007b] Ricci, A., Viroli, M., and Omicini, A. (2007b). The A&A programming model & technology for developing agent environ- ments in MAS. In Dastani, M., El Fallah Seghrouchni, A., Ricci, A., and Winiko , M., editors, Programming Multi-Agent Systems, volume 4908 of LNAI, pages 91–109. Springer Berlin / Heidelberg. [Ricci et al., 2007c] Ricci, A., Viroli, M., and Omicini, A. (2007c). CArtAgO: A framework for prototyping artifact-based environments in MAS. In Weyns, D., Parunak, H. V. D., and Michel, F., editors, En- vironments for MultiAgent Systems III, volume 4389 of LNAI, pages 67–86. Springer. 3rd International Workshop (E4MAS 2006), Hakodate, Japan, 8 May 2006. Selected Revised and Invited Papers. 2