Integrating and Engineering
Intelligent Systems
– Introduction to Multi-Agent Oriented Programming –
O. Boissier
Univ. Lyon, IMT Mines Saint-Etienne, LaHC UMR CNRS 5516, France
UP AI Practices and Technologies DEFI IA – Winter 2020
UMR • CNRS • 5516 • SAINT-ETIENNEOutline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo platform
2
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming (MAOP) aims at programming
systems:
(cid:73) as organisation of autonomous agents in interaction with each
other within a shared environment,
(cid:73) by keeping alive from design to execution, concepts pertaining to
each of the A/E/I/O families as well as their control/life cycles.
(cid:59) Going beyond each of the A/E/I/O oriented programming approaches
3
BELIEFSGOALSPLANSINTERNALEVENTSACTIONSPERCEPTIONSAGENTSMISSIONSROLESDEONTIC RELATIONSGROUPSNORMSSANCTIONSREWARDSORGANISATIONSRESOURCESSERVICESOBJECTSENVIRONMENTSCOMMUNICATIONLANGUAGESINTERACTIONPROCOLSSPEECH ACTSINTERACTIONSTOPOLOGYTOOLSMAOPKey features
Multi-Agent Oriented Programming
(cid:73) Abstraction
(cid:73) keeping the concepts alive from design to execution, e.g. no agents
sharing and calling OO objects
(cid:73) effective programming models for controllable and observable
computational entities
(cid:73) Modularity
(cid:73) away from the monolithic and centralised view
(cid:73) Orthogonality
(cid:73) wrt models, architectures, platforms
(cid:73) support for heterogeneous systems
(cid:73) Dynamic extensibility
(cid:73) dynamic construction, replacement, extension of the entities
participating to the system
(cid:73) support for open systems
(cid:73) Reusability
(cid:73) reuse of the entities participating to the system for different kinds
of applications
4
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo meta-model overview
Environment dimension
Agent dimension
Organisation dimension
Integrated dimensions
Synthesis
JaCaMo platform
5
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo meta-model overview
Environment dimension
Agent dimension
Organisation dimension
Integrated dimensions
Synthesis
JaCaMo platform
6
JaCaMo meta-model overview
7
WHITEBOARDartifactARCHIVEartifactCOM. CHANNELartifactTASK SCHEDULERartifactRESOURCE artifactCLOCKartifactBAKERYworkspaceagents can joindynamically the workspaceGROUPcakeGROUPscheduleORGANISATIONbakerySeamless integrated conceptual dimensions
JaCaMo meta-model overview
Simplified view on JaCaMo meta-model [Boissier et al., 2011]
A seamless integration of three dimensions based on Jason [Bordini et al., 2007],
Cartago [Ricci et al., 2009], Moise [Hübner et al., 2009] meta-models
Forthcoming book in 2020 @ MIT Press
8
dynamic relationAgentOrganisationDimensionEnvironmentInteractionOutline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo meta-model overview
Environment dimension
Agent dimension
Organisation dimension
Integrated dimensions
Synthesis
JaCaMo platform
Publicité
9
Environment dimension – Basic concepts
Environment dimension
Simplified conceptual view (A&A meta-model [Omicini et al., 2008])
Simple artifact
program:
10
compositionConceptDimensionEnvironmentWorkspaceOperationEnvironmentArtifactObservableproperty*EnvironmentWorkspaceOperationEnvironmentArtifactObservableproperty*Environment dimension – Dynamics
Environment dimension
Environment life-cycle
(cid:73) Creation/Deletion of Workspaces
Workspace life-cycle:
(cid:73) Creation/Deletion of Artifacts
(cid:73) Creation/Deletion & Entry/Exit of Agents
Artifact life-cycle:
(cid:73) Atomic execution, Success/Failure, Activation/Deactivation of an
operation
(cid:73) Creation/Deletion/Update of Observable Properties
(cid:73) Linking/Unlinking with other artifacts
11
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo meta-model overview
Environment dimension
Agent dimension
Organisation dimension
Integrated dimensions
Synthesis
JaCaMo platform
12
Agent dimension – Basic concepts
Agent dimension
Simplified Conceptual View (Jason meta-model [Bordini et al., 2007]):
Simple Agent Program:
example bob.asl
example carl.asl
13
compositionAgentAgentGoalBeliefActionConceptDimensionAgentAgentGoalBeliefAction*PlanAgent dimension – Dynamics
Agent dimension
1. Perceive the environment and update belief base
2. Process new messages
3. Select event
4. Select relevant plans
5. Select applicable plans
6. Create/update intention
7. Select intention to execute
8. Execute one step of the selected intention
14
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo meta-model overview
Environment dimension
Agent dimension
Organisation dimension
Integrated dimensions
Synthesis
JaCaMo platform
15
Organisation dimension – Basic concepts
Organisation dimension
Simplified Conceptual View (Moise meta-model [Hübner et al., 2009])
Excerpts from organisation program:
Structural spec.
Functional spec.
Normative spec.
program in NPL
16
compositionConceptDimensionOrganisationGroupSchemeRoleGoalOrganisationNorm*Organisation dimension – Dynamics
Organisation dimension
Organisation life-cycle
(cid:73) Creation/Deletion of an
Organisation from an
Organisation specification
(cid:73) Entrance/Exit of an agent
(cid:73) Change of Organisation
specification
Organisation structure life-cycle
(cid:73) Creation/Deletion of a group
(cid:73) Adoption/Leave of a role
Publicité
Coordination activity life-cycle
(cid:73) Creation/End of a schema
(cid:73) Commitment/Release of a
mission
(cid:73) Change of goal state
Normative Regulation activity
life-cycle
(cid:73) Activation/De-activation of
norms
(cid:73) Fulfillment/Violation of norms
(cid:73) Enforcement of norms
17
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo meta-model overview
Environment dimension
Agent dimension
Organisation dimension
Integrated dimensions
Synthesis
JaCaMo platform
18
Seamless integrated dimensions
Integrated dimensions
Simplified view on JaCaMo meta-model [Boissier et al., 2011]
A seamless integration of three dimensions based on Jason [Bordini et al., 2007],
Cartago [Ricci et al., 2009], Moise [Hübner et al., 2009] meta-models
19
dynamic relationAgentOrganisationDimensionEnvironmentInteractionIntegrating A & A dimensions – Interacting agents
Integrated dimensions – Integrated dimensions
based on KQML or Jade/FIPA ACL
example alice.asl
example bob.asl
20
dynamic relationcompositionAgentAgentGoalBeliefActionConceptDimensionInteractioncommunicateAgentAgentGoalBeliefAction*PlanIntegrating A & E dimensions – Interacting agents
Integrated dimensions – Integrated dimensions
based on JaCa bridge
example alice.asl
example bob.asl
21
dynamic relationcompositionAgentAgentGoalBeliefActionConceptDimensionEnvironmentWorkspaceOperationEnvironmentArtifactObservablepropertyInteractionactcommunicateperceiveEnvironmentWorkspaceOperationEnvironmentArtifactObservableproperty*AgentAgentGoalBeliefActionPlan**Integrating A & O dimensions
Integrated dimensions – Integrated dimensions
based on ORA4MAS [Hübner et al., 2009]
22
dynamic relationcompositionparticipateAgentAgentGoalBeliefActionOrganisationGroupSchemeRoleGoalOrganisationNormregulateConceptDimensioncoordinateInteractionOrganisationGroupSchemeRoleGoalOrganisationNormAgentAgentGoalBeliefActionPlanIntegrating O & E dimensions
Integrated dimensions – Integrated dimensions
based on Situated Artificial Institution [de Brito et al., 2015]
23
dynamic relationcompositionOrganisationGroupSchemeRoleGoalOrganisationNormcount-asempowerConceptDimensionEnvironmentWorkspaceOperationEnvironmentArtifactObservablepropertyInteraction*OrganisationGroupSchemeRoleGoalOrganisationNormEnvironmentWorkspaceOperationEnvironmentArtifactObservableproperty**Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo meta-model overview
Environment dimension
Agent dimension
Organisation dimension
Integrated dimensions
Synthesis
JaCaMo platform
24
Synthesis
Synthesis
25
dynamic relationcompositionAgentAgentGoalBeliefActionOrganisationGroupSchemeRoleGoalOrganisationNormConceptDimensionEnvironmentWorkspaceOperationEnvironmentArtifactObservablepropertyInteractionEnvironmentWorkspaceOperationEnvironmentArtifactObservablepropertyAgentAgentGoalBeliefActionPlan**Synthesis: MAO Dynamics
26
roleorganisationmissionschemeworkspaceartifactagentAgent Control CycleAgent-AgentInteractionCycle Organisation-AgentCycle Environment-AgentCycle Multi-Agent Oriented Programming
The JaCaMo platform
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo platform
JaCaMo multi-agent platform
JaCaMo multi-agent system development
28
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo platform
JaCaMo multi-agent platform
JaCaMo multi-agent system development
29
Publicité
JaCaMo multi-agent platform
(cid:73) Multi-agent technologies currently integrated:
(cid:73) Agent dimension: Jason agents [Bordini et al., 2007]
(cid:73) Environment dimension: CArtAgO platform [Ricci et al., 2009]
(cid:73) Organisation dimension: Moise framework [Hübner et al., 2009]
(cid:73) Dedicated bridges integrate each of the dimensions altogether:
(cid:73) Agent – Environment integration: c4Jason, c4Jadex
[Ricci et al., 2009]
(cid:73) Environment – Organisation integration: count-as/enact rules
[Piunti et al., 2009] [de Brito et al., 2015]
(cid:73) Agent – Organisation integration: artifacts dedicated to
organisation management [Hübner et al., 2009]
(cid:59) http://jacamo.sourceforge.net,
https://github.com/jacamo-lang/jacamo/
Open to integrate other multi-agent technologies
30
Execution Architecture
JaCaMo multi-agent platform
31
JaCaMo Node(CArtAgO, Jason, NOPL Engines + bridges)Applicative WorkspaceApplicative WorkspaceJaCaMo Node(CArtAgO, Jason, NOPL Engines + bridges)Platform levelJade, Janus, Java PlatformsExecution [email protected]@ufsc.brWorkspace ora4masOrg. Spec.NOPLoplink opSchemeBoard\\\oplink opSchemeBoard\\\oplink opSchemeBoard\\\oplink opGroupBoard\\\oplink opGroupBoard\\\oplink opGroupBoard\\\oplink opOrgBoard\\\oplink opWorkspaceArtifact\\\oplink opNodeArtifact\\\oplink opNodeArtifact\\\oplink opWorkspaceArtifact\\\oplink opApplicativeArtifact\\\oplink opApplicativeArtifact\\\oplink opApplicativeArtifact\\\oplink opApplicativeArtifact\\\oplink opApplicativeArtifact\\\oplink opApplicativeArtifact\\\oplink opApplicativeArtifact\\\oplink opApplicativeArtifact\\\oplink opNormativeBoard\\\oplink opWorkspaceArtifact\\\ConceptuallevelAgentAgentGoalBeliefActionPlanEnvironmentWorkspaceOperationEnvironmentArtifactObservablepropertyOrganisationGroupSchemeRoleGoalOrganisationNormOrganisationGroupSchemeRoleGoalOrganisationNormOrganisationGroupSchemeRoleGoalOrganisationNorm**Integration with other technologies
JaCaMo multi-agent platform
(cid:73) Web 2.0 – http://jaca-web.sourceforge.net
(cid:73) implementing Web 2.0 applications
(cid:73) Android Platforms – http://jaca-android.sourceforge.net
(cid:73) implementing mobile computing applications on top of the Android
platform
(cid:73) Web Services – http://cartagows.sourceforge.net
(cid:73) building SOA/Web Services applications
(cid:73) Arduino Platforms – http://jacamo.sourceforge.net
(cid:73) JaCaMo with hypermedia environment – (see next slides)
(cid:73) Jason-ROS: modular interface between Jason, CArtAgO, and ROS –
https://github.com/lsa-pucrs/jason-ros-releases/releases
(cid:73) Semantic Technologies
(cid:73) JaSA: Semantically Aware Agents
(cid:73) JASDL: Combining agent-oriented programming and semantic web
technologies
(cid:73) JaCaDDM: Distributed Data Mining system founded on the Agents and
Artifacts paradigm – https://sourceforge.net/projects/jacaddm/
32
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo platform
JaCaMo multi-agent platform
JaCaMo multi-agent system development
33
JaCaMo multi-agent system development
(cid:73) Available at:
(cid:73) http://jacamo.sourceforge.net/
(cid:73) https://github.com/jacamo-lang/jacamo
(cid:73) Documentation:
(cid:73) Getting started guides, tutorials, FAQ,
(cid:73) Reference documentation on “JaCaMo project files”, on debugging
in JaCaMo, on Agent Programming Language, on Organisation
Programming Language (most of the JaCaMo documentation is
available in the doc folder of the distribution)
All the documentation is available at: http://jacamo.sourceforge.net/
(cid:73) Examples of codes, of demos
(cid:73) Configuration of the platform (.jacamo file in the home directory):
(cid:73) to be done after each installation of the platform
34
JaCaMo multi-agent system development
JaCaMo multi-agent system development
(cid:73) Structure of a JaCaMo project:
(cid:73) src groups all the source code of the project
(cid:73) agt groups all the agents’ code (.asl)
(cid:73) env groups all the artifacts’ code (.java)
(cid:73) org groups all the organisations’ code (.xml, .npl)
(cid:73) one or several JaCaMo project file (.jcm)
(cid:73) logging.properties is the log configuration file
(cid:73) Development environment:
(cid:73) Use of shell commands:
(cid:73) jacamo-new-project projectName: new project creation,
(cid:73) jacamo projecName: project execution,
(cid:73) jacamo-jar fileName: create a jar with all resources to run the
application calling java)
(cid:73) Use of eclipse IDE (JaCaMo plugin for eclipse)
(cid:73) Use of Gradle
(cid:73) Use of Docker
35
Eclipse JaCaMo plugin
Publicité
JaCaMo multi-agent system development
36
Agent’s inspector
JaCaMo multi-agent system development
Runs also as an http server
37
Environment’s inspector
JaCaMo multi-agent system development
Runs also as an http server
38
Organization structure’s inspector
JaCaMo multi-agent system development
Runs also as an http server
39
Organization functioning’s inspector
JaCaMo multi-agent system development
Runs also as an http server
40
Work on MAOP and JaCaMo
in tight collaboration with
R.H. Bordini,
Pontificia Universidade Catolica do Rio Grande do Sul (PUCRS), Porto
Alegre, Brazil
J.F. Hübner,
Federal University of Santa Catarina (UFSC), Florianópolis, Brazil
A. Ricci
University of Bologna (UNIBO), Bologna, Italy
41
42
Acknowledgements
(cid:73) Tutorials
(cid:73) @European Summer Schools (EASSS’10, EASSS’11, EASSS’12)
(cid:73) @Brazilian Agent School (WESAAC’11, WESAAC’12,
WESAAC’13, WESAAC’14)
(cid:73) @AAMAS (2015), @IJCAI (2015)
(cid:73) @Agreement Technology Summer School (2017)
(cid:73) Gratuate Programs (@ EMSE, @ UFSC, @PUCRS, @ Bologna
University)
(cid:73) Dagstuhl Seminars:
(cid:73) #12342 (2012), #08361 (2008), #06261 (2006)
(cid:73) Bilateral Projects:
(cid:73) USP-COFECUB 98-04
(cid:73) CMIRA Rhône-Alpes Region 2010
(cid:73) French National Project:
(cid:73) FORTRUST Project ANR 06-10
(cid:73) ETHICAA Project ANR 14-18
43
Bibliography I
Boissier, O., Bordini, R. H., Hübner, J. F., Ricci, A., and Santi, A. (2011).
Multi-agent oriented programming with jacamo.
Science of Computer Programming, pages –.
Bordini, R. H., Hübner, J. F., and Wooldrige, M. (2007).
Programming Multi-Agent Systems in AgentSpeak using Jason.
Wiley Series in Agent Technology. John Wiley & Sons.
de Brito, M., Hübner, J. F., and Boissier, O. (2015).
Bringing constitutive dynamics to situated artificial institutions.
In Proc. of 17th Portuguese Conference on Artificial Intelligence (EPIA 2015),
volume 9273 of LNCS, pages 624–637. Springer.
Hübner, J. F., Boissier, O., Kitio, R., and Ricci, A. (2009).
Instrumenting Multi-Agent Organisations with Organisational Artifacts and
Agents.
Journal of Autonomous Agents and Multi-Agent Systems.
Omicini, A., Ricci, A., and Viroli, M. (2008).
Artifacts in the A&A meta-model for multi-agent systems.
Autonomous Agents and Multi-Agent Systems, 17(3):432–456.
44
Bibliography II
Piunti, M., Ricci, A., Boissier, O., and Hubner, J. (2009).
Embodying organisations in multi-agent work environments.
In IEEE/WIC/ACM International Conference on Web Intelligence and
Intelligent Agent Technology (WI-IAT 2009), Milan, Italy.
Ricci, A., Piunti, M., Viroli, M., and Omicini, A. (2009).
Environment programming in CArtAgO.
In Multi-Agent Programming: Languages,Platforms and Applications,Vol.2.
Springer.
45