game engines to model mas: a research roadmap

34
Game Engines to Model MAS A Research Roadmap Stefano Mariani Andrea Omicini {s.mariani, andrea.omicini}@unibo.it Dipartimento di Informatica – Scienza e Ingegneria (DISI) Alma Mater Studiorum – Universit` a di Bologna XVII Workshop “From Objects to Agents” (WOA 2016) Catania, Italy, 30 July 2016 Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 1 / 34

Upload: andrea-omicini

Post on 23-Jan-2018

182 views

Category:

Science


2 download

TRANSCRIPT

Game Engines to Model MASA Research Roadmap

Stefano Mariani Andrea Omicini{s.mariani, andrea.omicini}@unibo.it

Dipartimento di Informatica – Scienza e Ingegneria (DISI)Alma Mater Studiorum – Universita di Bologna

XVII Workshop “From Objects to Agents” (WOA 2016)Catania, Italy, 30 July 2016

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 1 / 34

Outline

1 Motivation & Goal

2 Research Landscape

3 GE & MAS

4 Discussion & Roadmap

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 2 / 34

Motivation & Goal

Outline

1 Motivation & Goal

2 Research Landscape

3 GE & MAS

4 Discussion & Roadmap

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 3 / 34

Motivation & Goal

Motivation & Goal I

huge gap in technological advancement reached by Game Engines(GE) w.r.t. technological level of agent-oriented technologies—e.g.multi-agent systems (MAS)

billionaire industrymillions testers (gamers too are testers!)stability, performance, usability of software products pushed tounprecedented and incomparable quality

⇒ improve overall quality of MAS technologies

huge gap in conceptual and design abstractions provided by GE w.r.t.agent-oriented software engineering

poor agenthood notionpoor notion of sociality

⇒ improve level of abstraction of GE

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 4 / 34

Motivation & Goal

Motivation & Goal II

other reasons to devote research efforts

3 provide new / improved solutions to, e.g., virtual / mixed / augmentedreality systems

3 widen the reach of state-of-art integration efforts, focussed on specifictechnology-level goals—no general-purpose game-based agent-orientedmodel

Goal

Outline a viable research roadmap to follow towards bridging theconceptual and technical gap between MAS and GE

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 5 / 34

Research Landscape

Outline

1 Motivation & Goal

2 Research Landscape

3 GE & MAS

4 Discussion & Roadmap

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 6 / 34

Research Landscape

State-of-art: Achievements

QuizMASter links MAS agents to game engines characters for educationallearning [BL11]

CIGA models both agents and environment for general-purposevirtual agents in virtual environments [vOVD12]

GameBots provides a development framework and runtime for testingmulti-agent systems in virtual environments [KVS+02]

UTSAF focusses on environment modelling for distributedsimulations in the military domain [PMHL04]

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 7 / 34

Research Landscape

State-of-art: Shortcomings

! except for CIGA, other approaches consider the technological levelsolely while pursuing integration—no model, no architecture, etc.

! integration is domain- and goal-specific

! most approaches provide

rich abstractions to deal with the environmentvery weak notions of agencybasically nothing for sociality

Remark

Agent-oriented technology are quite strong on the agency side, mixedfeelings for the social & environment sides—maybe exception made forTuCSoN [OZ99], CArtAgO [RVO07] & friends

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 8 / 34

Research Landscape

GE: Analysis

Rationale

We examine some among most popular GE—Unity3D and Unreal Engine

detect abstractions and mechanisms likely to have a counterpart inMAS—or providing some support in re-formulating MAS abstractions

highlight opportunities for closing conceptual / technical gapshindering integration

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 9 / 34

Research Landscape Looking at GE through MAS Eyes

Unity3D I

Main abstractions (sort of)

game object only first-class citizen, everything a scene contains is a gameobject—a human player, a Non-Player Character (NPC), anenvironmental item, etc.

script piece of code defining the behaviour to be attached to agame object

executed by the unique control loopeach script executed sequentiallyno concurrency, all scripts must be executed once within eachframe rendering step

co-routine sort of workaround to sequentiality imposed by scripts,enables partition and distribute a computation over multipleframe rendering steps

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 10 / 34

Research Landscape Looking at GE through MAS Eyes

Unity3D II

gap w.r.t. MAS

7 no first-class agenthood abstraction provided7 societal abstraction missing3 environment modelling, control, and interaction far superior w.r.t.

average MAS technology1

⇒ e.g. many forms of agent-environment interaction such as shapingmovement pathways, handling obstacle avoidance and collisiondetection, etc.

opportunities

combine a behavioural script with a co-routine for injecting (somedegree of) autonomy into game objects—towards agenthoodsome forms of message passing among game objects may enableprimitive message-based coordination

1JADE [BCG07], Jason [BHW07], RETSINA [SPVVG03], TuCSoN [OZ99],CArtAgO [RPV11]

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 11 / 34

Research Landscape Looking at GE through MAS Eyes

Unreal Engine I

Main abstractions (sort of)

game object similar to Unity3D game objects

actor any component which can be rendered and whose behaviour isenacted by a controller—characters are actors with humanoidresemblance and capabilities (e.g. walking)

blueprint similar to Unity3D script, the code specifying the behaviour of anactor

direct blueprint communication enables blueprints to communicate one-to-one

event dispatcher producer in a publish/subscribe architecture

blueprints are consumersevents are game-related happenings (e.g. level started,damage taken, shots fired, etc.) triggering execution ofblueprints code

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 12 / 34

Research Landscape Looking at GE through MAS Eyes

Unreal Engine II

gap w.r.t. MAS

? agenthood through controllers?

? societies through event-groups?

3 environment modelling, control, and interaction superior w.r.t. averageMAS technology, similarly to Unity3D

opportunities

agenthood can be reconstructed based on actors and blueprints

social interaction may be engineered on top of event dispatchers anddirect blueprint communications

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 13 / 34

GE & MAS

Outline

1 Motivation & Goal

2 Research Landscape

3 GE & MAS

4 Discussion & Roadmap

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 14 / 34

GE & MAS

The Mirror Worlds Approach

mirror worlds (MW) are virtual representations of the “real” world[RCBV15]—which, as in our case, may be virtual too

the MW model may help integrating GE and MAS

⇒ MAS agents may have GE avatars if they need a virtualrepresentation—e.g. for interaction-related reasons

⇒ MAS agents rely on GE to represent the physical / virtual environmentthey are immersed in—thus, situatedness-related issues

⇒ the social dimension might be kept within the MAS world if directcommunication between agents is needed . . .

⇒ . . . or expanded to the GE virtual world if communication mediated bythe environment is needed

! nevertheless, the virtual world (GE) may influence social interaction inthe MAS world—e.g. by either facilitating or hindering discovery

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 15 / 34

GE & MAS Case Study: Dining Philosophers with Unity3D

Situated Dining Philosophers: Scenario I

A well-known coordination problem, tackled in a shared-space setting whileextended towards situatedness

5 philosophers share 1 table with 1 spaghetti bowl, 5 smaller bowls, 5chopsticks, and 5 chairs

! philosophers need 2 chopsticks each to eat

a table object plays the role of the tuplespace, chopstick objects areshared tuples, and chair objects decouple and mediate interaction,while enabling situated coordination

! philosopher ⇐⇒ chopsticks assignment dynamically based onposition (chair) at the table

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 16 / 34

GE & MAS Case Study: Dining Philosophers with Unity3D

Situated Dining Philosophers: Scenario II

Figure: Gray philosophers are thinking; green chairs are free

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 17 / 34

GE & MAS Case Study: Dining Philosophers with Unity3D

Situated Dining Philosophers: GE-based Solution I

tuple space =⇒ table game object decorated with

a tupleSet (list of strings) representing the tuple spacea inputQueue tracking requests for tuples (Unity3D messages)a pendingQueue tracking yet unsatisfied requeststhe script implementing tuple space API

request types supported: out, in, rd

operationally, at every frame rendering step1 pendingQueue is considered first, checking request type

if out, pendingQueue is checked looking for matching requests,which are served (if any), or tuple is put into tupleSet (if none)if in, when satisfiable, matching tuple is returned and removed fromtupleSet—same for rd except removal

2 inputQueue is considered then3 in case requests cannot be satisfied, they are either moved from

inputQueue to pendingQueue, or kept in the latter

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 18 / 34

GE & MAS Case Study: Dining Philosophers with Unity3D

Situated Dining Philosophers: GE-based Solution II

agents =⇒ humanoid game objects requesting coordinationprimitives synchronously through co-routines

agents wait for reply by suspending executioncheck reply in next frame

mediators (e.g., ACC [Omi02]) =⇒ chair game objects decouplinginteraction while supporting (spatial) situatedness, by enablingphilosophers to acquire chopsticks based on seat

philosopher agents ask for chopsticks to the chair they are sit on,rather than directly to table

! philosophers do not explicitly refer chopsticks—not by name, neither byaddress, etc.

! chairs knows which chopsticks to consider through raytracing, enablinggame objects to discover other objectschairs ask table for the right chopsticks on behalf of the philosophersitting on them

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 19 / 34

GE & MAS Case Study: Dining Philosophers with Unity3D

Situated Dining Philosophers: Execution I

1 philosophers think until hungry

2 when hungry, they seek for a free chair—through raytracing3 when found, philosopher goes there and sits, waiting to acquire

chopsticks

3 routing and collision avoidance—free lunch thanks to GE

4 when occupied, chairs understand which chopsticks to acquire basedon position w.r.t. table—through raytracing

3 spatial situatedness—free lunch thanks to GE

5 if chopsticks requests satisfied, the philosopher starts eating

6 if at least one request is not satisfied, the philosopher waits

! all interactions happen through Unity3D messaging facilities

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 20 / 34

GE & MAS Case Study: Dining Philosophers with Unity3D

Situated Dining Philosophers: Execution II

Figure: Video available at https://youtu.be/tLFaDkcxsE8

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 21 / 34

Discussion & Roadmap

Outline

1 Motivation & Goal

2 Research Landscape

3 GE & MAS

4 Discussion & Roadmap

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 22 / 34

Discussion & Roadmap

Lessons Learnt I

! flow of control is in GE hands no matter what, because fluidity ofrendering is the foremost concern

7 clash with definition of autonomy as encapsulation of both control flowand criteria to handle it

⇒ co-routines in Unity3D and actors in Unreal Engine may help withagenthood

! environmental resources modelling and situated interaction arefirst-class citizens in any GE

3 MAS likely to benefit of some free lunches—e.g. movement pathwayscomputation, objects discovery, collision avoidance, etc.

! GE support to sociality depending on nature of interaction

? direct interaction =⇒ basic message-passing facilities—is this enough?3 (environment) mediated interaction =⇒ situatedness-related features

such as discovery, routing, etc.

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 23 / 34

Discussion & Roadmap

Lessons Learnt II

Viable path to follow

Integration is likely to happen, at least at first, through environmentalabstractions, since they are the best represented ones in GE world

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 24 / 34

Discussion & Roadmap

Now What? I

Mirror worlds-like approaches seem appropriate

! leave autonomy to MAS, do not abuse GE to re-build agenthood

⇒ goal-directed / oriented behaviour stays within MAS. . .3 . . . but takes advantage of GE features for, e.g., situated planning to

estimate effects of practical situated actions

! exploit GE environmental abstractions as a bridge between GE andMAS world

⇒ e.g. through the notion of artefact [RPV11] as defined in A&Ameta-model [ORV08]. . .

3 . . . directly supporting situated (inter)action required by agenthood andsociality

! (re)shape sociality around environment of GE-based MAS

⇒ direct communication stays within MAS. . .3 . . . but accessory facilities might be delegated to GE—e.g. discovery of

recipients based on spatial proximity

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 25 / 34

Discussion & Roadmap

Now What? II

The goal to pursue

A GE-based MAS infrastructure could then be designed by

integrating mechanisms and paradigms around environmentalabstractions

avoiding to abuse either technology to take in charge responsibilitiesit is not meant to deal with

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 26 / 34

Acknowledgements

Thanks

Thanks to . . .

Mattia Cerbara and Nicola Poli for the case study

the anonymous referees for their challenging questions and thoughtfulremarks which helped us improving the paper

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 27 / 34

Outline

1 Motivation & Goal

2 Research LandscapeLooking at GE through MAS Eyes

3 GE & MASCase Study: Dining Philosophers with Unity3D

4 Discussion & Roadmap

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 28 / 34

References

References I

Fabio Luigi Bellifemine, Giovanni Caire, and Dominic Greenwood.Developing Multi-Agent Systems with JADE.Wiley, February 2007.

Rafael H. Bordini, Jomi F. Hubner, and Michael J. Wooldridge.Programming Multi-Agent Systems in AgentSpeak using Jason.John Wiley & Sons, Ltd, October 2007.

Jeanne Blair and Fuhua Lin.An approach for integrating 3D virtual worlds with multiagent systems.In Advanced Information Networking and Applications (WAINA), 2011 IEEE Workshops ofInternational Conference on, pages 580–585, March 2011.

Gal A. Kaminka, Manuela M. Veloso, Steve Schaffer, Chris Sollitto, Rogelio Adobbati,Andrew N. Marshall, Andrew Scholer, and Sheila Tejada.GameBots: A flexible test bed for multiagent team research.Communications of the ACM, 45(1):43–45, January 2002.

Andrea Omicini.Towards a notion of agent coordination context.In Dan C. Marinescu and Craig Lee, editors, Process Coordination and UbiquitousComputing, chapter 12, pages 187–200. CRC Press, Boca Raton, FL, USA, October 2002.

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 29 / 34

References

References II

Andrea Omicini, Alessandro Ricci, and Mirko Viroli.Artifacts in the A&A meta-model for multi-agent systems.Autonomous Agents and Multi-Agent Systems, 17(3):432–456, December 2008.Special Issue on Foundations, Advanced Topics and Industrial Perspectives of Multi-AgentSystems.

Andrea Omicini and Franco Zambonelli.Coordination for Internet application development.Autonomous Agents and Multi-Agent Systems, 2(3):251–269, September 1999.Special Issue: Coordination Mechanisms for Web Agents.

Phongsak Prasithsangaree, Joseph Manojlovich, Stephen Hughes, and Mike Lewis.UTSAF: A multi-agent-based software bridge for interoperability between distributedmilitary and commercial gaming simulation.Simulation, 80(12):647–, 2004.

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 30 / 34

References

References III

Alessandro Ricci, Angelo Croatti, Pietro Brunetti, and Mirko Viroli.Programming mirror worlds: An agent-oriented programming perspective.In Matteo Baldoni, Luciano Baresi, and Mehdi Dastani, editors, Engineering Multi-AgentSystems, volume 9318 of Lecture Notes in Computer Science, pages 191–211. Springer,2015.3rd International Workshop, EMAS 2015, Istanbul, Turkey, May 5, 2015, Revised,Selected, and Invited Papers.

Alessandro Ricci, Michele Piunti, and Mirko Viroli.Environment programming in multi-agent systems – an artifact-based perspective.Autonomous Agents and Multi-Agent Systems, 23(2):158–192, September 2011.Special Issue: Multi-Agent Programming.

Alessandro Ricci, Mirko Viroli, and Andrea Omicini.CArtAgO: A framework for prototyping artifact-based environments in MAS.In Danny Weyns, H. Van Dyke Parunak, and Fabien Michel, editors, Environments forMultiAgent Systems III, volume 4389 of LNAI, pages 67–86. Springer, May 2007.

Katia Sycara, Massimo Paolucci, Martin Van Velsen, and Joseph Giampapa.The RETSINA MAS infrastructure.Autonomous Agents and Multi-Agent Systems, 7(1):29–48, 2003.

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 31 / 34

References

References IV

Joost van Oijen, Loıs Vanhee, and Frank Dignum.CIGA: A middleware for intelligent agents in virtual environments.In Martin Beer, Cyril Brom, Frank Dignum, and Von-Wun Soo, editors, Agents forEducational Games and Simulations: International Workshop, AEGS 2011, Taipei, Taiwan,May 2, 2011. Revised Papers, pages 22–37. Springer, Berlin, Heidelberg, 2012.

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 32 / 34

Extras

URLs

Slides

on APICe

→ http://apice.unibo.it/xwiki/bin/view/Talks/GamemasWoa2016

on SlideShare→ http://www.slideshare.net/andreaomicini/

game-engines-to-model-mas

Paper

on APICe

→ http://apice.unibo.it/xwiki/bin/view/Publications/GamemasWoa2016

on CEUR

→ http://ceur-ws.org/Vol-????/paper ?.pdf

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 33 / 34

Game Engines to Model MASA Research Roadmap

Stefano Mariani Andrea Omicini{s.mariani, andrea.omicini}@unibo.it

Dipartimento di Informatica – Scienza e Ingegneria (DISI)Alma Mater Studiorum – Universita di Bologna

XVII Workshop “From Objects to Agents” (WOA 2016)Catania, Italy, 30 July 2016

Mariani & Omicini (UniBo) Game Engines to Model MAS WOA 2016, 30/07/2016 34 / 34