Multi-Agent Oriented ProgrammingA short and practical introduction to the JaCaMo platform
O. Boissier1 R.H. Bordini2, J.F. Hübner3, A. Ricci4
1Univ. Lyon, IMT Mines Saint-Etienne, LaHC UMR CNRS 5516,France
2 Pontificia Universidade Catolica do Rio Grande do Sul (PUCRS),Porto Alegre, Brazil
3 Federal University of Santa Catarina (UFSC), Florianópolis, Brazil4 University of Bologna (UNIBO), Bologna, Italy
PRIMA Conference — October, 29, 2019
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo platform
2
Multi-Agent Oriented Programming
BELIEFSGOALSPLANS
INTERNALEVENTS
ACTIONSPERCEPTIONS
AGENTS
MISSIONS
ROLES
DEONTIC RELATIONS
GROUPS
NORMS
SANCTIONSREWARDS
ORGANISATIONS
RESOURCES
SERVICES OBJECTS
ENVIRONMENTS
COMMUNICATIONLANGUAGES
INTERACTIONPROCOLS
SPEECH ACTS
INTERACTIONS
TOPOLOGY
TOOLSMAOP
Multi-Agent Oriented Programming (MAOP) aims at programmingsystems:I as organisation of autonomous agents in interaction with each
other within a shared environment,I 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.; Going beyond each of the A/E/I/O oriented programming approaches
3
Key featuresMulti-Agent Oriented Programming
I AbstractionI keeping the concepts alive from design to execution, e.g. no agents
sharing and calling OO objectsI effective programming models for controllable and observable
computational entitiesI Modularity
I away from the monolithic and centralised viewI Orthogonality
I wrt models, architectures, platformsI support for heterogeneous systems
I Dynamic extensibilityI dynamic construction, replacement, extension of the entities
participating to the systemI support for open systems
I ReusabilityI reuse of the entities participating to the system for different kinds
of applications
4
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMoJaCaMo meta-model overviewEnvironment dimensionOrganisation dimensionAgent dimensionIntegrated dimensionsSynthesis
JaCaMo platform
5
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMoJaCaMo meta-model overviewEnvironment dimensionOrganisation dimensionAgent dimensionIntegrated dimensionsSynthesis
JaCaMo platform
6
JaCaMo meta-model overview
WHITEBOARDartifact
ARCHIVEartifact
COM. CHANNELartifact
TASK SCHEDULERartifact
RESOURCE artifact
CLOCKartifact
BAKERY
workspace
agents can joindynamically the workspace
GROUPcake
GROUPschedule
ORGANISATIONbakery
7
Seamless integrated conceptual dimensionsJaCaMo meta-model overview
dynamic relation
Agent
Organisation
Dimension
Environment
Interaction
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
8
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMoJaCaMo meta-model overviewEnvironment dimensionOrganisation dimensionAgent dimensionIntegrated dimensionsSynthesis
JaCaMo platform
9
Environment dimension – Basic conceptsEnvironment dimension
composition
Concept
Dimension
Environment
Workspace
Operation
Environment
Artifact
Observableproperty*
*
*
*
Environment
Workspace
Operation
Environment
Artifact
Observableproperty*
*
*
*
Simplified conceptual view (A&A meta-model [Omicini et al., 2008])
Simple artifactprogram:
10
Environment dimension – DynamicsEnvironment dimension
Environment life-cycleI Creation/Deletion of Workspaces
Workspace life-cycle:I Creation/Deletion of ArtifactsI Creation/Deletion & Entry/Exit of Agents
Artifact life-cycle:I Atomic execution, Success/Failure, Activation/Deactivation of an
operationI Creation/Deletion/Update of Observable PropertiesI Linking/Unlinking with other artifacts
11
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMoJaCaMo meta-model overviewEnvironment dimensionOrganisation dimensionAgent dimensionIntegrated dimensionsSynthesis
JaCaMo platform
12
Organisation dimension – Basic conceptsOrganisation dimension
composition
Concept
Dimension
Organisation
Group Scheme
Role Goal
Organisation
Norm
***
**
Simplified Conceptual View (Moise meta-model [Hübner et al., 2009])
Excerpts from organisation program:
Structural spec. Functional spec.
Normative spec.
program in NPL 13
Organisation dimension – DynamicsOrganisation dimension
Organisation life-cycleI Creation/Deletion of an
Organisation from anOrganisation specification
I Entrance/Exit of an agentI Change of Organisation
specification
Organisation structure life-cycleI Creation/Deletion of a groupI Adoption/Leave of a role
Coordination activity life-cycleI Creation/End of a schemaI Commitment/Release of a
missionI Change of goal state
Normative Regulation activitylife-cycleI Activation/De-activation of
normsI Fulfillment/Violation of normsI Enforcement of norms
14
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMoJaCaMo meta-model overviewEnvironment dimensionOrganisation dimensionAgent dimensionIntegrated dimensionsSynthesis
JaCaMo platform
15
Agent dimension – Basic conceptsAgent dimension
compositionAgent
Agent
GoalBelief
Action
Concept
Dimension
Agent
Agent
GoalBelief
Action
*
*
*
Plan*
*
Simplified Conceptual View (Jason meta-model [Bordini et al., 2007]):
Simple Agent Program:
example bob.asl example carl.asl
16
Agent dimension – DynamicsAgent dimension
1. Perceive the environment and update belief base
2. Process new messages
3. Select event
4. Select relevant plans5. Select applicable plans
6. Create/update intention
7. Select intention to execute
8. Execute one step of the selected intention
17
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMoJaCaMo meta-model overviewEnvironment dimensionOrganisation dimensionAgent dimensionIntegrated dimensionsSynthesis
JaCaMo platform
18
Seamless integrated dimensionsIntegrated dimensions
dynamic relation
Agent
Organisation
Dimension
Environment
Interaction
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
Integrating A & A dimensions – Interacting agentsIntegrated dimensions – Integrated dimensions
dynamic relation
composition
Agent
Agent
GoalBelief
Action
Concept DimensionInteraction
communicate
Agent
Agent
GoalBelief
Action
*
*
*
Plan*
*
based on KQML or Jade/FIPA ACL
example alice.asl example bob.asl
20
Integrating A & E dimensions – Interacting agentsIntegrated dimensions – Integrated dimensions
dynamic relation
composition
Agent
Agent
GoalBelief
Action
Concept Dimension
Environment
Workspace
Operation
Environment
Artifact
Observableproperty
Interaction
act
communicate
perceive
Environment
Workspace
Operation
Environment
Artifact
Observableproperty*
*
*
*
Agent
Agent
GoalBelief
Action
*
*
*
Plan*
*
based on JaCa bridge
example alice.asl example bob.asl
21
Integrating A & O dimensionsIntegrated dimensions – Integrated dimensions
dynamic relation
composition
participate
Agent
Agent
GoalBelief
Action
Organisation
Group Scheme
Role Goal
Organisation
Norm
regulate
Concept
Dimension
coordinate
Interaction
Organisation
Group Scheme
Role Goal
Organisation
Norm
***
**
Agent
Agent
GoalBelief
Action
*
*
*
Plan*
*
based on ORA4MAS [Hübner et al., 2009]
22
Integrating O & E dimensionsIntegrated dimensions – Integrated dimensions
dynamic relation
composition
Organisation
Group Scheme
Role Goal
Organisation
Norm
coun
t-as
empo
wer
Concept
Dimension
Environment
Workspace
Operation
Environment
Artifact
Observableproperty
Interaction
*
*
*
*
Organisation
Group Scheme
Role Goal
Organisation
Norm
***
**
Environment
Workspace
Operation
Environment
Artifact
Observableproperty*
*
*
*
based on Situated Artificial Institution [de Brito et al., 2015]
23
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMoJaCaMo meta-model overviewEnvironment dimensionOrganisation dimensionAgent dimensionIntegrated dimensionsSynthesis
JaCaMo platform
24
SynthesisSynthesis
dynamic relation
composition
Agent
Agent
GoalBelief
Action
Organisation
Group Scheme
Role Goal
Organisation
Norm
Concept
Dimension
Environment
Workspace
Operation
Environment
Artifact
Observableproperty
Interaction
*
*
*
*
***
**
Environment
Workspace
Operation
Environment
Artifact
Observableproperty*
*
*
*
Agent
Agent
GoalBelief
Action
*
*
*
Plan*
*
25
Synthesis: MAO Dynamics
roleorganisation
mission
scheme
workspace
artifact
agentAgent Control
CycleAgent-AgentInteraction
Cycle
Organisation-AgentCycle
Environment-AgentCycle
26
Multi-Agent Oriented ProgrammingThe JaCaMo platform
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo platformJaCaMo multi-agent platformJaCaMo multi-agent system development
28
Outline
Multi-Agent Oriented Programming
Multi-Agent Oriented Programming with JaCaMo
JaCaMo platformJaCaMo multi-agent platformJaCaMo multi-agent system development
29
JaCaMo multi-agent platform
I Multi-agent technologies currently integrated:I Agent dimension: Jason agents [Bordini et al., 2007]I Environment dimension: CArtAgO platform [Ricci et al., 2009]I Organisation dimension: Moise framework [Hübner et al., 2009]
I Dedicated bridges integrate each of the dimensions altogether:I Agent – Environment integration: c4Jason, c4Jadex
[Ricci et al., 2009]I Environment – Organisation integration: count-as/enact rules
[Piunti et al., 2009] [de Brito et al., 2015]I Agent – Organisation integration: artifacts dedicated to
organisation management [Hübner et al., 2009]
; http://jacamo.sourceforge.net,https://github.com/jacamo-lang/jacamo/
Open to integrate other multi-agent technologies
30
Execution ArchitectureJaCaMo multi-agent platform
JaCaMo Node(CArtAgO, Jason, NOPL Engines + bridges)
Applicative WorkspaceApplicative Workspace
JaCaMo Node(CArtAgO, Jason, NOPL Engines +
bridges)
Platform level
Jade, Janus, Java Platforms
Execution level
[email protected]@ufsc.br
Workspace ora4masOrg.
Spec.NOPL
oplink op
SchemeBoard
\\\
oplink op
SchemeBoard
\\\
oplink op
SchemeBoard
\\\oplink op
GroupBoard
\\\
oplink op
GroupBoard
\\\
oplink op
GroupBoard
\\\oplink op
OrgBoard
\\\
oplink op
WorkspaceArtifact
\\\
oplink op
NodeArtifact
\\\
oplink op
NodeArtifact
\\\
oplink op
WorkspaceArtifact
\\\
oplink op
ApplicativeArtifact
\\\
oplink op
ApplicativeArtifact
\\\
oplink op
ApplicativeArtifact
\\\
oplink op
ApplicativeArtifact
\\\
oplink op
ApplicativeArtifact
\\\
oplink op
ApplicativeArtifact
\\\
oplink op
ApplicativeArtifact
\\\
oplink op
ApplicativeArtifact
\\\
oplink op
NormativeBoard
\\\
oplink op
WorkspaceArtifact
\\\
Conceptuallevel
Agent
Agent
GoalBelief
Action
*
*
*
Plan*
*
Environment
Workspace
Operation
Environment
Artifact
Observableproperty*
*
*
*
Organisation
Group Scheme
Role Goal
Organisation
Norm
Organisation
Group Scheme
Role Goal
Organisation
Norm
Organisation
Group Scheme
Role Goal
Organisation
Norm
***
**
31
Integration with other technologiesJaCaMo multi-agent platform
I Web 2.0 – http://jaca-web.sourceforge.netI implementing Web 2.0 applications
I Android Platforms – http://jaca-android.sourceforge.netI implementing mobile computing applications on top of the Android
platformI Web Services – http://cartagows.sourceforge.net
I building SOA/Web Services applicationsI Arduino Platforms – http://jacamo.sourceforge.netI JaCaMo with hypermedia environment – (see next slides)I Jason-ROS: modular interface between Jason, CArtAgO, and ROS –
https://github.com/lsa-pucrs/jason-ros-releases/releasesI Semantic Technologies
I JaSA: Semantically Aware AgentsI JASDL: Combining agent-oriented programming and semantic web
technologiesI 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 platformJaCaMo multi-agent platformJaCaMo multi-agent system development
33
JaCaMo multi-agent system development
I Available at:
I http://jacamo.sourceforge.net/I https://github.com/jacamo-lang/jacamo
I Documentation:
I Getting started guides, tutorials, FAQ,I Reference documentation on “JaCaMo project files”, on debugging
in JaCaMo, on Agent Programming Language, on OrganisationProgramming Language (most of the JaCaMo documentation isavailable in the doc folder of the distribution)
All the documentation is available at: http://jacamo.sourceforge.net/
I Examples of codes, of demos
I Configuration of the platform (.jacamo file in the home directory):
I to be done after each installation of the platform
34
JaCaMo multi-agent system developmentJaCaMo multi-agent system development
I Structure of a JaCaMo project:
I src groups all the source code of the projectI agt groups all the agents’ code (.asl)I env groups all the artifacts’ code (.java)I org groups all the organisations’ code (.xml, .npl)
I one or several JaCaMo project file (.jcm)I logging.properties is the log configuration file
I Development environment:
I Use of shell commands:I jacamo-new-project projectName: new project creation,I jacamo projecName: project execution,I jacamo-jar fileName: create a jar with all resources to run the
application calling java)I Use of eclipse IDE (JaCaMo plugin for eclipse)I Use of GradleI Use of Docker
35
Eclipse JaCaMo pluginJaCaMo multi-agent system development
36
Agent’s inspectorJaCaMo multi-agent system development
Runs also as an http server
37
Environment’s inspectorJaCaMo multi-agent system development
Runs also as an http server
38
Organization structure’s inspectorJaCaMo multi-agent system development
Runs also as an http server
39
Organization functioning’s inspectorJaCaMo multi-agent system development
Runs also as an http server
40
Bibliography IBoissier, 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 andAgents.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.
41
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 andIntelligent 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.
42