Social Computing with 2COMM4JASON Matteo Baldoni 1 joint work with - - PowerPoint PPT Presentation

social computing with 2comm4jason
SMART_READER_LITE
LIVE PREVIEW

Social Computing with 2COMM4JASON Matteo Baldoni 1 joint work with - - PowerPoint PPT Presentation

Social Computing with 2COMM4JASON Matteo Baldoni 1 joint work with C. Baroglio, F. Capuzzimati, and R. Micalizio 1 Dipartimento di Informatica, Universit` a degli Studi di Torino http://www.di.unito.it/~baldoni Dagstuhl, March 23-27, 2015 BBC


slide-1
SLIDE 1

Social Computing with 2COMM4JASON

Matteo Baldoni1 joint work with C. Baroglio, F. Capuzzimati, and R. Micalizio

1Dipartimento di Informatica, Universit`

a degli Studi di Torino http://www.di.unito.it/~baldoni

Dagstuhl, March 23-27, 2015

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 1 / 16

slide-2
SLIDE 2

Social Computing

Social relationships connect the interacting indipendent parties Social relationships usually have a normative value, in that they allow agents to have expectations on one another Social relationships can be verified based just on the observable behavior of the parties Social engagments (personal or business relationships) that foreseen collaboration specified by social protocols [Singh, 2014]

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 2 / 16

slide-3
SLIDE 3

Social Computing and Software Engeenering

The advantages of explicitly representing the social state is to allow the realization of systems with A high degree of decoupling, modularity, and reuse A separation of concerns between agent programming and the programming of agent coordination Anticipation of change, generality, incremental development principles

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 3 / 16

slide-4
SLIDE 4

2COMM [Baldoni et al., 2014]

An agent framework explicitly represents the social state through the social relationships and the rules that cause it to evolve along the interaction Agents and social states are first-class entities that interact in a bi-directional manner:

◮ Social relationships are created by the execution of interaction protocols and provide expectations on the agents’ behavior ◮ Social relationships affect the decisions and the behaviors of the agents they involve

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 4 / 16

slide-5
SLIDE 5

2COMM [Baldoni et al., 2014]

An explicit representation of interaction rules and social state in form

  • f resources that are available to system components

◮ We exploit the Agent&Artifact (A&A) meta-model [Omicini et al., 2008]

Social relationships among agents represented as commitments, interaction ruled/espressed similarly to commitment-based interaction protocols

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 5 / 16

slide-6
SLIDE 6

Commitment

Commitment

C(x, y, r, p) represents the engagement from x to y, to bring about the consequent condition p when the antecedent condition r holds. Commitments have a normative nature: agents are liable for the violation of the commitments they have taken Commitment protocols allow for flexible behaviours: x is free to choose its actions The agent’s compliance can be verified by observing the interaction Life cycle: created, satisfied, violated, conditional, detached, expired, pending, terminated

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 6 / 16

slide-7
SLIDE 7

2COMM4Jade and 2COMM4Jason

Jade + 2COMM4Jade: a set of library built on the top of Jade [Bellifemine et al., 2005] and CArtAgO [Ricci et al., 2011]. It has been implemented a bridge between the above framework as well JaCaMo + 2COMM4Jason: built on the top of JaCaMo [Boissier et al., 2013], i.e. Jason + CArtAgO + Moise

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 7 / 16

slide-8
SLIDE 8

Representing social relationships: commitments

cc(debtor, creditor, antecedent, consequent, status) Commitments can be used in contexts and in plans as: test goals: ?cc(debtor, creditor, antecedent, consequent, status) achievement goal: !cc(debtor, creditor, antecedent, consequent, status) Possible to specify plans whose triggering events involve commitments:

+!cc(debtor, creditor, antecedent, consequent, status) : context ← body −!cc(debtor, creditor, antecedent, consequent, status) : context ← body +cc(debtor, creditor, antecedent, consequent, status) : context ← body −cc(debtor, creditor, antecedent, consequent, status) : context ← body

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 8 / 16

slide-9
SLIDE 9

Commiment achievement goals

+!cc(debtor, creditor, antecedent, consequent, status) : context ← body. after the execution of the plan the commitment C(debtor, creditor, antecedent, consequent) will hold in the social state likely the body contains the execution of an action/artifact operation that creates the commitment C(debtor, creditor, antecedent, consequent) in the social state

Example

1 +!cc ( My Role Id , I n i t i a t o r R o l e I d , "accept" , "(done OR failure)" , " CONDITIONAL " ) 2 : enactment id ( R o l e I d ) & task ( Task , I n i t i a t o r R o l e I d ) 3 < − ! p r e p a r e p r o p o s a l ( Task , Prop , Cost ) ; 4 propose ( Prop , Cost , I n i t i a t o r R o l e I d ) ; 5 +my proposal ( Prop , Cost , I n i t i a t o r R o l e I d ) . BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 9 / 16

slide-10
SLIDE 10

Triggering commitments status change

+cc(debtor, creditor, antecedent, consequent, status) : context ← body. plan associated with the presence of a certain commitment in the social state the plan may achieve a change of the status of the commitment (e.g.: the debtor will satisfy the consequent, the creditor will satisfy the antecedent) or simply doing something as a reaction (e.g. collecting information)

Example

1 +cc ( My Role Id , I n i t i a t o r R o l e I d , "true" , "(done OR failure)" , "DETACHED" ) 2 : enactment id ( My Id ) & accept ( My Role Id ) 3 < − ! cc ( My Role Id , I n i t i a t o r R o l e I d , "true" , "(done OR failure)" , "SATISFIED" ) . BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 10 / 16

slide-11
SLIDE 11

JaCaMo + 2COMM4Jason

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 11 / 16

slide-12
SLIDE 12

The Dining Philosophers: JaCaMo+

1 +! s t a r t : true 2 < − focusWhenAvailable ( " philoArtifact " ) ; enact ( " philosopher " ) . 3 +enacted ( Id , " philosopher " , R o l e I d ) 4 < − +enactment id ( R o l e I d ) ; . my name (Me) ; 5 i n ( " philo_init" , Me, Left , Right ) ; 6 +m y l e f t f o r k ( L e f t ) ; +m y r i g h t f o r k ( Right ) ; 7 ! ! l i v i n g . 8 +! l i v i n g : counter (C) 9 < − ! t h i n k i n g ; ! e a t i n g . 10 +! e a t i n g : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) & counter (C) 11 < − . my name (Me) ; ? enactment id ( R o l e I d ) ; 12 askForks ( Left , Right , C ) . 13 +cc ( My Role Id , " philosopher " , a v a i l a b l e ( Left , Right , C) , 14 r e t u r n F o r k s ( Left , Right , C) , "DETACHED" ) 15 : enactment id ( My Role Id ) & m y l e f t f o r k ( L e f t ) & 16 m y r i g h t f o r k ( Right ) & counter (C) 17 < − ! eat ( Left , Right , C ) ; 18 r e t u r n F o r k s ( Left , Right , C ) . 19 +cc ( My Role Id , " philosopher " , a v a i l a b l e ( Left , Right , C) , 20 r e t u r n F o r k s ( Left , Right , C) , "SATISFIED" ) 21 : enactment id ( My Role Id ) & m y l e f t f o r k ( L e f t ) 22 < − ? counter (C ) ; −+counter (C+1); ! l i v i n g . 23 +! eat ( Left , Right , C ) : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) 24 & a v a i l a b l e ( Left , Right , C) & counter (C) 25 < − . my name (Me) ; ? enactment id ( R o l e I d ) . 26 p r i n t l n (Me, " " , Role Id , " eating" ) . 27 +! t h i n k i n g : counter (C) 28 < − . my name (Me) ; ? enactment id ( R o l e I d ) ; 29 p r i n t l n (Me, " " , Role Id , " thinking , time " ,C ) . BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 12 / 16

slide-13
SLIDE 13

The Dining Philosophers: JaCaMo+

1 +! s t a r t : true 2 < − focusWhenAvailable ( " philoArtifact " ) ; enact ( " philosopher " ) . 3 +enacted ( Id , " philosopher " , R o l e I d ) 4 < − +enactment id ( R o l e I d ) ; . my name (Me) ; 5 i n ( " philo_init" , Me, Left , Right ) ; 6 +m y l e f t f o r k ( L e f t ) ; +m y r i g h t f o r k ( Right ) ; 7 ! ! l i v i n g . 8 +! l i v i n g : counter (C) 9 < − ! t h i n k i n g ; ! e a t i n g . 10 +! e a t i n g : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) & counter (C) 11 < − . my name (Me) ; ? enactment id ( R o l e I d ) ; 12 askForks ( Left , Right , C ) . 13 +cc ( My Role Id , " philosopher " , a v a i l a b l e ( Left , Right , C) , 14 r e t u r n F o r k s ( Left , Right , C) , "DETACHED" ) 15 : enactment id ( My Role Id ) & m y l e f t f o r k ( L e f t ) & 16 m y r i g h t f o r k ( Right ) & counter (C) 17 < − ! eat ( Left , Right , C ) ; 18 r e t u r n F o r k s ( Left , Right , C ) . 19 +cc ( My Role Id , " philosopher " , a v a i l a b l e ( Left , Right , C) , 20 r e t u r n F o r k s ( Left , Right , C) , "SATISFIED" ) 21 : enactment id ( My Role Id ) & m y l e f t f o r k ( L e f t ) 22 < − ? counter (C ) ; −+counter (C+1); ! l i v i n g . 23 +! eat ( Left , Right , C ) : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) 24 & a v a i l a b l e ( Left , Right , C) & counter (C) 25 < − . my name (Me) ; ? enactment id ( R o l e I d ) . 26 p r i n t l n (Me, " " , Role Id , " eating" ) . 27 +! t h i n k i n g : counter (C) 28 < − . my name (Me) ; ? enactment id ( R o l e I d ) ; 29 p r i n t l n (Me, " " , Role Id , " thinking , time " ,C ) .

This creates the commitments cc(My Role Id, "philosopher", available(Left, Right, C), returnForks(Left, Right, C), "CONDITIONAL") in the social state.

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 12 / 16

slide-14
SLIDE 14

The Dining Philosophers: JaCaMo+

1 +! s t a r t : true 2 < − focusWhenAvailable ( " philoArtifact " ) ; enact ( " philosopher " ) . 3 +enacted ( Id , " philosopher " , R o l e I d ) 4 < − +enactment id ( R o l e I d ) ; . my name (Me) ; 5 i n ( " philo_init" , Me, Left , Right ) ; 6 +m y l e f t f o r k ( L e f t ) ; +m y r i g h t f o r k ( Right ) ; 7 ! ! l i v i n g . 8 +! l i v i n g : counter (C) 9 < − ! t h i n k i n g ; ! e a t i n g . 10 +! e a t i n g : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) & counter (C) 11 < − . my name (Me) ; ? enactment id ( R o l e I d ) ; 12 askForks ( Left , Right , C ) . 13 +cc ( My Role Id , " philosopher " , a v a i l a b l e ( Left , Right , C) , 14 r e t u r n F o r k s ( Left , Right , C) , "DETACHED" ) 15 : enactment id ( My Role Id ) & m y l e f t f o r k ( L e f t ) & 16 m y r i g h t f o r k ( Right ) & counter (C) 17 < − ! eat ( Left , Right , C ) ; 18 r e t u r n F o r k s ( Left , Right , C ) . 19 +cc ( My Role Id , " philosopher " , a v a i l a b l e ( Left , Right , C) , 20 r e t u r n F o r k s ( Left , Right , C) , "SATISFIED" ) 21 : enactment id ( My Role Id ) & m y l e f t f o r k ( L e f t ) 22 < − ? counter (C ) ; −+counter (C+1); ! l i v i n g . 23 +! eat ( Left , Right , C ) : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) 24 & a v a i l a b l e ( Left , Right , C) & counter (C) 25 < − . my name (Me) ; ? enactment id ( R o l e I d ) . 26 p r i n t l n (Me, " " , Role Id , " eating" ) . 27 +! t h i n k i n g : counter (C) 28 < − . my name (Me) ; ? enactment id ( R o l e I d ) ; 29 p r i n t l n (Me, " " , Role Id , " thinking , time " ,C ) .

Management of the commitment lifecycle.

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 12 / 16

slide-15
SLIDE 15

The Dining Philosophers: JaCaMo+

1 +! s t a r t : true 2 < − focusWhenAvailable ( " philoArtifact " ) ; enact ( " philosopher " ) . 3 +enacted ( Id , " philosopher " , R o l e I d ) 4 < − +enactment id ( R o l e I d ) ; . my name (Me) ; 5 i n ( " philo_init" , Me, Left , Right ) ; 6 +m y l e f t f o r k ( L e f t ) ; +m y r i g h t f o r k ( Right ) ; 7 ! ! l i v i n g . 8 +! l i v i n g : counter (C) 9 < − ! t h i n k i n g ; ! e a t i n g . 10 +! e a t i n g : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) & counter (C) 11 < − . my name (Me) ; ? enactment id ( R o l e I d ) ; 12 askForks ( Left , Right , C ) . 13 +cc ( My Role Id , " philosopher " , a v a i l a b l e ( Left , Right , C) , 14 r e t u r n F o r k s ( Left , Right , C) , "DETACHED" ) 15 : enactment id ( My Role Id ) & m y l e f t f o r k ( L e f t ) & 16 m y r i g h t f o r k ( Right ) & counter (C) 17 < − ! eat ( Left , Right , C ) ; 18 r e t u r n F o r k s ( Left , Right , C ) . 19 +cc ( My Role Id , " philosopher " , a v a i l a b l e ( Left , Right , C) , 20 r e t u r n F o r k s ( Left , Right , C) , "SATISFIED" ) 21 : enactment id ( My Role Id ) & m y l e f t f o r k ( L e f t ) 22 < − ? counter (C ) ; −+counter (C+1); ! l i v i n g . 23 +! eat ( Left , Right , C ) : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) 24 & a v a i l a b l e ( Left , Right , C) & counter (C) 25 < − . my name (Me) ; ? enactment id ( R o l e I d ) . 26 p r i n t l n (Me, " " , Role Id , " eating" ) . 27 +! t h i n k i n g : counter (C) 28 < − . my name (Me) ; ? enactment id ( R o l e I d ) ; 29 p r i n t l n (Me, " " , Role Id , " thinking , time " ,C ) .

”There is a causal path from the establish- ment of a commitment to prior communica- tions by the debtor

  • f that commitment”

[Singh, 2011]

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 12 / 16

slide-16
SLIDE 16

The Dining Philosophers: JaCa [Ricci et al., 2011]

1 +! s t a r t < − . my name (Me) ; 2 i n ( " philo_init" ,Me, Left , Right ) ; 3 +m y l e f t f o r k ( L e f t ) ; +m y r i g h t f o r k ( Right ) ; 4 ! l i v i n g . 5 +! l i v i n g < − ! t h i n k i n g ; 6 ! e a t i n g ; 7 ! ! l i v i n g . 8 +! e a t i n g < − ! ac quireRes ; ! eat ; ! r e l e a s e R e s . 9 +! acqu ireRes : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) 10 < − i n ( "ticket" ) ; 11 i n ( "fork" , L e f t ) ; i n ( "fork" , Right ) . 12 +! r e l e a s e R e s : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) 13 < −

  • ut ( "fork" , L e f t ) ;
  • ut ( "fork" , Right ) ;

14

  • ut ( "ticket" ) .

15 +! t h i n k i n g < − . my name (Me) ; p r i n t l n (Me, " thinking" ) . 16 +! eat < − . my name (Me) ; p r i n t l n (Me, " eating" ) . 1 +! e a t i n g : m y l e f t f o r k ( L e f t ) & m y r i g h t f o r k ( Right ) 2 < − askForks ( Left , Right ) . 3 +a v a i l a b l e F o r k s ( Left , Right ) 4 < − ! eat ; 5 r e t u r n F o r k s ( Left , Right ) .

Lack a clear and evident causal relationship among availableForks and returnForks askForks is a service and does not create a social engagements No separation of concerns between agent programming and the programming

  • f agent

coordination: signal vs semantics

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 13 / 16

slide-17
SLIDE 17

JaCaMo vs JaCaMo+: obligation vs commitments

In [Zatelli and H¨ ubner, 2014] an interaction component is inroduced as a further first-class entity Protocols specify how component may interact (Undirected) Obligations are used ”to shape” the protocols across the agents Agents ”follow the instructions” given in form of obligations

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 14 / 16

slide-18
SLIDE 18

JaCaMo vs JaCaMo+: obligation vs commitments

Again, a causal path between a previous communication and the activation of a commitment Agents deliberate the commitments

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 15 / 16

slide-19
SLIDE 19

Final remark: CoSE Methodology

JacaMo+: Empowering Agent Coordination with Social Engagements CoSE: Coordination by Social Engagement Methodology (work in progress)

◮ Commitment-driven methodology for programming agents ◮ Agent-to-Agent Decoupling ◮ Agent-Logic-to-Coordination-Logic Decoupling

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 16 / 16

slide-20
SLIDE 20

Baldoni, M., Baroglio, C., and Capuzzimati, F. (2014). A Commitment-based Infrastructure for Programming Socio-Technical Systems. ACM Transactions on Internet Technology, Special Issue on Foundations of Social Computing, 14(4):23:1–23:23. Bellifemine, F., Bergenti, F., Caire, G., and Poggi, A. (2005). JADE - A Java Agent Development Framework. In Multi-Agent Programming: Languages, Platforms and Applications, volume 15 of Multiagent Systems, Artificial Societies, and Simulated Organizations, pages 125–147. Springer. Boissier, O., Bordini, R. H., H¨ ubner, J. F., Ricci, A., and Santi, A. (2013). Multi-agent oriented programming with JaCaMo. Science of Computer Programming, 78(6):747 – 761. 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.

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 16 / 16

slide-21
SLIDE 21

Ricci, A., Piunti, M., and Viroli, M. (2011). Environment programming in multi-agent systems: an artifact-based perspective. Autonomous Agents and Multi-Agent Systems, 23(2):158–192. Singh, M. P. (2011). Commitments in multiagent systems. Some history, some confusions, some controversies, some prospects. In Paglieri, F., Tummolini, L., Falcone, R., and Miceli, M., editors, The Goals of Cognition. Essays in Honor of Cristiano Castelfranchi, chapter 31, pages 601–626. College Publications, London. Singh, M. P. (2014). Social computing: Principles, methods, and technologies. Invited talk at the First Int. Workshop on Multiagent Foundations of Social Computing. Zatelli, M. R. and H¨ ubner, J. F. (2014). The Interaction as an Integration Component for the JaCaMo Platform.

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 16 / 16

slide-22
SLIDE 22

In Proc. of EMAS.

BBC (UniTO) NorMAS 2015 Dagstuhl, March 23-27, 2015 16 / 16