scieee Open visual document viewer

MASSIS: Multi-agent system simulation of indoor scenarios

Pax Sánchez, Rafael

Abstract

Testing applications for smart environments is a difficult task. It requires the installation of sensors and actuators, the communications and the software for the control system, and the participation of people playing different scenarios. This is costly, both in economic sense as well as in time. Also, there are some situations that cannot be tested for practical reasons (such as emergencies). The use of simulation tools that provide some support for the development of smart environment applications is interesting, at least for these reasons. One of the most relevant aspects to be considered in this kind of tests is the human and social behavior of individuals when simulating how people interact with their environment, including other individuals. If the simulation framework has to be used for different purposes and by other developers, it should have a clear agent model, with some support for the design at a higher level of abstraction that can be easily translated to an implementation. This is the main purpose of MASSIS (Multi-agent system simulation of InDoor Scenarios), an efficient framework for modeling and simulation of the decision-making process of agents in multiple situations in indoor scenarios domain. It extends the SweetHome3D environment with plugins for linking agent’s behavior in the simulation. Other functionality provided by MASSIS is the ability to visualize the simulation in 2D and 3D, and a rich log capability, which can be the basis for further analysis of the scenarios.

Full text

MASSIS – Mul i-Agen Sys em Simula ion o Indoo Scena ios– Ra ael Pax [email p o ec ed] G ado en Ingenie ía en In o má ica Facul ad de In o má ica T abajo de Fin de G ado Di ec o : Juan Pa ón Mes as [email p o ec ed] Mad id, Junio 2015 Au ho iza ion Fo Dissemina ion And Use Au o izo a la Uni e sidad Complu ense de Mad id a di undi y u iliza con ines académicos, no come ciales y mencionando exp esamen e a su au- o , an o la p opia memo ia, como el código, la documen ación y/o el so - wa e desa ollado. Ra ael Pax G acias po ayuda me con us consejos, po o alece me con u apoyo, po le an a me con us ánimos, po con ia en mí. G acias po aleg a me con us isas, po enamo a me con u mi ada, po con agia me u locu a, po hace me eliz. G acias po se ma a illosa, Pila . Acknowledgemen s This wo k has been been suppo ed by he Go e nmen o he Region o Mad id h ough he esea ch p og amme MOSI-AGIL-CM (g an P2013/ICE-3019, co- unded by EU S uc u al Funds FSE and FEDER), and by he Spanish Minis y o Economy and Compe i i eness, wi h he p ojec Social Ambien Assis ing Li ing - Me hods (SociAAL) (g an TIN2011- 28335-C02-01). Resumen Las p uebas de aplicaciones pa a en o nos in eligen es son una a ea di í- cil. Requie en de la ins alación de senso es y ac uado es, los sis emas de co- municación, so wa e de con ol y la pa icipación de pe sonas ep esen ando di e en es oles. Es o es cos oso, an o en iempo como en sen ido económi- co. Además, exis en muchas si uaciones que, po azones p ác icas, esul an bas an e complicadas de p oba (si uaciones de eme gencia, po ejemplo). Las he amien as de simulación pueden se i de conside able ayuda pa a el desa ollo de en o nos in eligen es. Uno de los aspec os más ele an es a e- ne en cuen a en es e ipo de p uebas es el compo amien o humano y social de los indi iduos, cuando se simula la o ma de cómo las pe sonas in e ac ú- an con su en o no, incluyendo o os indi iduos. Si se u iliza un amewo k de simulación mul iagen e pa a es os p opósi os, debe cons a de un modelo cla o de agen e, cuyos mé odos de azonamien o puedan se diseñados desde un ni el de abs acción más al o, que pueda ans o ma se en una imple- men ación de o ma sencilla. És e es uno de los p opósi os p incipales de MASSIS (Mul i-agen sys em simula ion o InDoo Scena ios), un amewo k de simulación mul iagen e e icien e que pe mi e el modelado y la simulación de los p ocesos de oma de decisiones de los agen es en múl iples si uaciones en el dominio de espacios in e io es. Ex iende las capacidades de Swee Home3D con cie os plugins que pe mi an de ini el compo amien o de los agen es en el en o no de la si- mulación. O as uncionalidades que o ece MASSIS son las isualizaciones 2D y 3D de la simulación, la capacidad de gua da las simulaciones pa a su pos e io ep oducción y análisis. Palab as cla e •Modelado basado en agen es •Modelo de decisión de agen es •Simulación de mul i udes •Escena ios de in e io es •En o nos in eligen es •F amewo k de simulación Abs ac Tes ing applica ions o sma en i onmen s is a di icul ask. I equi es he ins alla ion o senso s and ac ua o s, he communica ions and he so - wa e o he con ol sys em, and he pa icipa ion o people playing di e en scena ios. This is cos ly, bo h in economic sense as well as in ime. Also, he e a e some si ua ions ha canno be es ed o p ac ical easons (such as eme gencies). The use o simula ion ools ha p o ide some suppo o he de elop- men o sma en i onmen applica ions is in e es ing, a leas o hese ea- sons. One o he mos ele an aspec s o be conside ed in his kind o es s is he human and social beha io o indi iduals when simula ing how peo- ple in e ac wi h hei en i onmen , including o he indi iduals. I he simu- la ion amewo k has o be used o di e en pu poses and by o he de elop- e s, i should ha e a clea agen model, wi h some suppo o he design a a highe le el o abs ac ion ha can be easily ansla ed o an implemen a- ion. This is he main pu pose o MASSIS (Mul i-agen sys em simula ion o InDoo Scena ios), an e icien amewo k o modeling and simula ion o he decision-making p ocess o agen s in mul iple si ua ions in indoo scena ios domain. I ex ends he Swee Home3D en i onmen wi h plugins o linking agen ’s beha io in he simula ion. O he unc ionali y p o ided by MASSIS is he abili y o isualize he simula ion in 2D and 3D, and a ich log capa- bili y, which can be he basis o u he analysis o he scena ios. Keywo ds •Agen -based modeling •Agen decision model •C owd simula ion •Indoo scena ios •Ambien In elligence •Simula ion F amewo k Table o Con en s 1 INTRODUCTION.......................................................................1 1.1 MOTIVATION OF THE WORK......................................................................................1 1.2 OBJECTIVES...........................................................................................................3 1.3 METHODOLOGICAL APPROACH..................................................................................4 1.3.1 Concep ion Phase............................................................................4 1.3.2 Agile De elopmen ...........................................................................4 Two E-mails pe day, mee ing whene e possible...................................................................4 Fas sp in s and sho i e a ions.............................................................................................5 1.4 DOCUMENT ORGANIZATION......................................................................................7 2 SIMULATION OF SMART ENVIRONMENTS.........................8 2.1 AGENT-BASED MODELING AND SIMULATION TOOLS........................................................9 2.2 SIMULATION OF INDOOR SCENARIOS.........................................................................11 2.3 CONCLUSIONS.......................................................................................................11 3 MASSIS OVERVIEW................................................................13 3.1 FRAMEWORK........................................................................................................14 3.1.1 Swee Home3D................................................................................14 3.1.2 MASON........................................................................................17 MASON Model.....................................................................................................................17 MASON Visualiza ion..........................................................................................................18 MASON U ili ies..................................................................................................................18 3.1.3 Pogamu 's POSH Engine................................................................19 3.1.4 Sa ing & Loading Simula ions.........................................................20 3.1.5 Visualiza ion..................................................................................21 3.1.6 S aigh Edge..................................................................................22 3.2 BUILDING REPRESENTATION....................................................................................23 3.3 PATH FINDING.....................................................................................................25 3.3.1 Visibili y G aph..............................................................................25 Obs acle me ging..................................................................................................................26 Obs acle la ening...............................................................................................................27 Using Swee Home3D ooms as sea ch a eas.........................................................................28 3.4 ELEMENTS LOCALIZATION......................................................................................29 3.4.1 Hyb id da a s uc u e: : A PR QuadT ee...........................................30 3.4.2 Bo om-Up P opaga ion QuadT ee Implemen a ion.............................32 Pa en nodes.........................................................................................................................32 Child nodes..........................................................................................................................33 Elemen – Lis node map.....................................................................................................33 Inse ing...............................................................................................................................34 Range Que ying...................................................................................................................34 VII 3.5 STEERING BEHAVIORS............................................................................................35 3.6 AGENT DECISION MODEL......................................................................................39 3.6.1 MASSIS' GOAP Beha io Model p o o ype.......................................40 Ac ion-Condi ion-E ec blocks.............................................................................................41 Beha io ...............................................................................................................................43 Beha io s ack......................................................................................................................43 Case s udy o his decision model : Kille – P ey................................................................44 3.6.2 MASSIS' beha io model: POSH Plans.............................................45 A lib a y o Beha io modules..............................................................................................46 POSH Dynamic ac ion selec ion sc ip s................................................................................48 D i e collec ions..............................................................................................................48 Compe ences...................................................................................................................49 Ac ion Pa e ns...............................................................................................................49 Case S udy o his decision model : Eme gency Simula ion................................................50 3.7 SAVING & LOADING SIMULATIONS...........................................................................53 3.7.1 Sa ing he simula ion.....................................................................54 Using SQLi e........................................................................................................................54 Using Plain Tex ..................................................................................................................54 Sa ing Disk Space................................................................................................................55 ZIP comp ession..............................................................................................................55 S ing subs i u ion...........................................................................................................55 Using concu ency o speeding up he p ocess....................................................................56 3.7.2 Simula ion Playback.......................................................................57 3.8 VISUALIZATION.....................................................................................................58 3.8.1 3D Visualiza ion............................................................................58 3.8.2 2D Visualiza ion............................................................................59 Laye -Based Display.............................................................................................................59 MASSIS' buil -in laye s........................................................................................................60 4 GETTING STARTED WITH MASSIS.....................................61 4.1 INSTALLATION.......................................................................................................61 4.1.1 Downloading MASSIS.....................................................................61 Windows...............................................................................................................................62 MAC OS X...........................................................................................................................62 Linux & Unix.......................................................................................................................62 4.2 ENVIRONMENT CREATION........................................................................................62 4.2.1 Launching he en i onmen edi o ....................................................62 4.2.2 Designing he en i onmen ..............................................................62 C ea ing & Edi ing walls......................................................................................................62 Adding doo s, windows & u ni u e......................................................................................63 Impo ing 3D objec s...........................................................................................................64 D awing ooms.....................................................................................................................64 Adding le els........................................................................................................................64 4.2.3 Me ada a Edi o .............................................................................65 4.2.4 Telepo Linking.............................................................................65 VIII 4.2.5 O he MASSIS' Design U ili ies.......................................................66 Designe ools.......................................................................................................................66 Name Gene a ion.................................................................................................................67 4.2.6 Final no es....................................................................................67 4.3 SPECIFYING BEHAVIORS WITH REACTIVE PLANS..........................................................68 4.3.1 Ins alling Ne beans and Pogamu 's yaPOSH edi o .............................68 Downloading & ins alling Ne beans......................................................................................68 YaPOSH edi o .....................................................................................................................68 4.3.2 POSH Plan c ea ion.......................................................................69 Basic Beha io s Design.........................................................................................................69 4.3.3 Linking wi h Swee Home 3D & MASSIS...........................................69 4.4 SIMULATION.........................................................................................................69 4.4.1 Running a new simula ion...............................................................69 4.4.2 Loading a sa ed simula ion..............................................................70 4.4.3 Help..............................................................................................70 5 CONCLUDING REMARKS.....................................................71 5.1 CONCLUSION........................................................................................................71 5.2 FUTURE WORK....................................................................................................72 In eg a ion o exis ing analysis ools....................................................................................72 Di e en AI beha io models................................................................................................72 Using a mo e powe ul 3D engine.........................................................................................72 Dis ibu ed Compu ing........................................................................................................72 6 REFERENCES..........................................................................73 7 APPENDICES.............................................................................I IX 1 . In oduc ion 1.3 Me hodological App oach A and science ha e hei mee ing poin in me hod. Edwa d G. Bulwe -Ly on Fo he de elopmen o his p ojec , Agile so wa e de elopmen p inciples we e ollowed. Due o he small size o he eam (1 pe - son), and he na u e o his p ojec , an adap a ion o hese p inci- ples was needed. 1.3.1 Concep ion Phase The p ojec s a ed wi h an analysis phase. This phase was nec- essa y because he eam had no domain-speci ic knowledge. A basic unde s anding o he domain was needed in o de o be capable o de e mine po en ial p oblems and needs. In his phase a e y sim- ple p ocess was ollowed: •Mee ing wi h he ad iso once a week. •De ini ion o he goals ha should be accomplished o he nex week. •W i ing down new ideas, and de ining p ojec objec i es. 1.3.2 Agile De elopmen The de elopmen o he p ojec s a ed on Oc obe , 2014. I was decided o use a simpli ied agile me hodology, adap ed o ake in o accoun ha he e we e only wo main pa icipan s: he s uden and he ad iso . In o de o acili a e high in e ac ion be ween hem, wo communica ion mechanisms we e used: emails and mee - ings. Two E-mails pe day, mee ing whene e possible In o de o keep cons an communica ion be ween he s uden and he ad iso , and moni o ing o p ojec p og ess, e e y day in he mo ning, an e-mail was w i en o he ad iso , explaining he expec ed goals o be accomplished ha day. A he end o he day, 4 1 . In oduc ion an email con aining a b ie summa y o he achie emen s o he day, he p oblems aced, and occasionally, a new idea o conside . Face- o- ace communica ion is one o he pilla s o agile de elop- men . Whene e he eam and he ad iso ound ime o mee , hey me . The e was no a ixed day, bu usually was once a week. Fas sp in s and sho i e a ions Following Agile P inciples equi e equen deli e ies o p o o- ypes o use ul p oduc s. Bu one o he main p oblems o a one man eam is ha ew asks can be done in pa allel. Focusing on a single sp in a a ime, and limi ing he amoun o wo k-in-p og ess p o ides a be e p ojec de elopmen . Fo ha eason, he i e a- ions we e composed o di e en sp in ypes, each one las ing one week. Di e en ypes o sp in s we e designed: •Li e a u e e iew sp in s: These sp in s we e in ended o lea ning abou new amewo ks, eading and summa izing e- sea ch pape s, in o de o make he eam capable o making mo e di icul asks. Du ing his sp in s, i was e y common he eme gence o new ideas. These new ideas we e classi ied wi h a p io i y. These ypes o sp in s we e made only i he esul s o he p e ious sp in s we e sa is ac o y. •Implemen a ion sp in s: These sp in s ocused on he imple- men a ion o he highes p io i y ea u e o implemen a he momen . They we e ocused p ima ily on implemen ing he asks de ined be o e. •Tes ing sp in s: They we e ocused on es ing he unc ional- i y o he sys em, bug ixing and pe o mance analysis. •Sys em a chi ec u e e iew sp in s: A e implemen a ion and es ing o he new ea u e/goal, he o e all sys em a chi- ec u e is e isi ed, in o de o main ain cohe ence. The sys- em a chi ec u e e iew sp in s had a leas one ace- o- ace mee ing wi h he ad iso . Figu e 1 shows he de elopmen wo k low o he i e a ions. 5 1 . In oduc ion 6 Figu e 1: De elopmen me hodology A e he asks o accomplishing he goal known? Highes p io i y goal chosen Conside lea ing i as "Fu u e wo k" Is i he cos wo hwhile? Upda e Goals & p io i ies P o o ype Is he pe o mance o he new ea u e an issue? YES NO YES Resea ch & Es ima ion Li e a u e e iew Di ide goal in o sub- asks Has been de eloped a lib a y/ ool al eady? Is i Open sou ce? Es ima e In eg a ion s implemen a ion om sc a ch cos Es ima e implemen a ion om sc a ch cos W i e down new ideas o discussing wi h he ad iso NO YES YES NO NO Implemen a ion YES Tes ing Func ionali y es ing pe o mance analysis Sys em a chi ec u e e iew pe o mance analysis 1 . In oduc ion 1.4 Documen O ganiza ion The es o he documen is o ganized as ollows: •Sec ion 2 e iews he s a e o he a , whe e he mos ele- an aspec s, bo h heo e ical and echnological a e dis- cussed. In i s i s sec ion, he main ools a e e iewed, along wi h hei di e en cha ac e is ics. The second del es in o he simula ion o indoo scena ios, highligh ing he mos im- po an p oblems. Finally, he po en ial o mul i-agen ools is shown, and he need o a ool like MASSIS is explained. •Sec ion 3 In oduces he MASSIS (Mul i-agen Sys em Sim- ula ion o InDoo Scena ios) a chi ec u e and componen s. Special a en ion is gi en o he de ini ion o he beha io o humans unde di e en si u- a ions, which includes he p ocess o decision making o he agen s. O he ele an aspec s o model a e in e ac ions among agen s and wi h hei en i onmen , he e en s on he en i onmen , and he p ecise ep esen a ion o he building, logging capabili ies and isualiza ion. •Sec ion 4 Explains how o ge s a ed wi h MASSIS, he in- s alla ion, en i onmen c ea ion, beha io modeling and sim- ula ion. •Sec ion 5 P esen s he conclusions and u u e wo k 7 2 . Simula ion O Sma En i onmen s 2 Simula ion O Sma En i onmen s The business o a is o e eal he ela ion be ween man and his en i onmen . D. H. Law ence Sma En i onmen s[2] can be de ined as “a egion o he eal wo ld ha is ex ensi ely equipped wi h senso s, ac ua o s and com- pu ing componen s” [3]. Tha is, a sma en i onmen is awa e o wha occu s wi hin i and i s su oundings, adap ing how i be- ha es o achie e ce ain objec i es (e.g. making easie he li es o he inhabi an s o a building). P e ious wo ks [4] ha e p oposed he app oach o iewing sma homes as in elligen agen s, ha pe - cei e hei en i onmen h ough he use o senso s, and can ac upon he en i onmen h ough he use o ac ua o s, agen s ha cons an ly adap hei beha io o he beha io o he en i onmen i sel . Besides o he sma en i onmen design, one o he main p ob- lems ha a ises du ing he de elopmen o hese kind o en i on- men s is hei he e ogenei y: he en i ies which inhabi he en i on- men may be e y di e en o each o he , no known a p io i and dynamic: may change o e ime. Al hough he e ha e been se e al esea ches on his opic, such as [5]–[7], es ing applica ions o sma en i onmen s con inues be- ing a di icul ask. I equi es he ins alla ion o senso s and ac ua- o s, he communica ions and he so wa e o he con ol sys em, and he pa icipa ion o people who ha e o play he di e en sce- na ios. This is cos ly, bo h in economic sense as well as in ime. Also, he e a e some si ua ions ha canno be es ed o p ac ical easons (e.g., a i e, people acciden s). 8 2 . Simula ion O Sma En i onmen s Fu he mo e, om he poin o iew o he de elope s, who a e used o i e a i e p ocesses, i is di icul o epea he es s i hey ha e o pe o m hese wi h pe sons. A leas o hese easons is in- e es ing o use simula ion ools ha p o ide some suppo o he de elopmen o sma en i onmen applica ions. A ele an aspec o be conside ed in his kind o es s is he modeling o he beha - io o humans unde di e en si ua ions. The beha io o hese sce- na ios equi es a leas he ollowing: in e ac ions among agen s, wi h he en i onmen , and he p ocess o decision making. Al hough many agen -based modeling and simula ion ools exis , amewo k, no speci ically o ien ed o sma en i onmen s. 2.1 Agen -based Modeling And Simula ion Tools Nowadays, he e a e many so wa e ools o implemen ing agen - based models. Al hough many o hem a e o gene al pu pose, he selec ion o one o ano he depends on many ac o s, such as he scope and objec i e o he model o de elop, he execu ion pla - o m, documen a ion and ease o use, o he eusabili y o he code. One o he mos in luen ial so wa e packages, which has se ed as inspi a ion o cu en pla o ms is Swa m [8], which began in 1994. The mos widely used pla o ms a e based on he Swa m phi- losophy, which is o ien ed owa ds o he amewo k and lib a y pa adigm. A amewo k ha de ines he concep s o agen -based modeling, including also he lib a ies needed o implemen ing he concep s p oposed acco ding o he amewo k. In gene al, simula ion pla o ms ollow he OO pa adigm, whe e he amewo k de ines he objec in cha ge o building and con ol- ling he simula ion, as well as he objec s esponsible o he g aphic elemen s managemen and he ep esen a ion o he execu- ion esul s, along wi h he schedule sys em, which con ols he ex- ecu ion o he e en s ha igge he me hods de ining he beha io o he agen s. 9 2 . Simula ion O Sma En i onmen s Repas [9] has been one o he Swa m based amewo ks has been mo e success ul. I s a ed a he Uni e si y o Chicago, being o i- en ed o he social sciences domain. The i s e sions o Repas a- cili a ed he designing o models o use s wi hou an ex ensi e knowledge o so wa e de elopmen , bu he undamen als o objec - o ien ed p og amming, and knowledge abou he Ja a p og amming language we e equi ed. Today, Repas con inues i s de elopmen a A gonne Na ional Labo a o y. The la es e sion, Repas Sym- phony [10], has e ol ed signi ican ly. MASON[11], de eloped a Geo ge Mason Uni e si y, appea ed sho ly a e Repas , as a compu a ionally e icien al e na i e. Al- hough MASON is also based on he Swa m model, i sha es wi h Repas many o aspec s men ioned be o e. MASON inc eases he independence o he applica ion domain o he models and enhances subs an ially hose cha ac e is ics necessa y in e y demanding compu e models, such as ha dwa e independence, independence in- e aces display and se ializa ion. Ne logo [12] is ano he one o he mos widesp ead pla o ms. I was de eloped a No hwes e n Uni e si y. Unlike Repas o MA- SON, i is based on i s own high-le el language (based on Logo, a Lisp dialec ). One o he di e ences ha Ne logo has o e o he li- b a ies is ha Ne logo is well documen ed and i s lib a y has many examples. Also, he p og amming s yle o Ne logo, which p o ides many p imi i es and simple cons uc ion o g aphical in e aces, makes easie he lea ning p ocess o he pla o m, especially o use s wi hou deep aining in so wa e de elopmen . Al hough i does no p esen he ad an ages o modula i y and euse o code ha pla o ms based on mo e gene al-pu pose languages, he ease o use and he abili y o gene a e and sha e he models as exe- cu able apple s in any b owse ha Ne logo has, has made i one o he ools mos used o simple models. 10 2 . Simula ion O Sma En i onmen s 2.2 Simula ion O Indoo Scena ios Se e al ools o simula ion and design o how people beha e in indoo scena ios exis (many o hem comme cial), such as [13]–[18], among many o he s. They ocus on scalabili y issues de i ed om he managemen o a la ge numbe o agen s in eal ime, specially when conside ing hei isualiza ion o he way he agen s ind hei way while a oiding obs acles and o he agen s [19]. Specially in he las yea s, ocus has been on e y la ge numbe s o agen s. Di e en echniques ha e been p oposed o cope wi h he scalabili y issues, by elying on speci ic assump ions o he p oblem unde s udy. This has an e ec on limi a ion o he lexibili y o agen s' beha io , which is qui e homogeneous in mos o he cases. Al hough hey a e app op ia e o simula e speci ic scena ios, i is impo an o conside he human and social beha io o indi iduals when simula ing how people in e ac wi h hei en i onmen , in- cluding o he indi iduals. O he wo ks ha e be e add essed he speci ica ion o he agen beha io , such as [1], [20]–[25]. Howe e , hey ha e no su icien ly aken in o accoun he me hodological aspec s o a design p ocess when de eloping he agen s' beha io . This is ele an when he simula ion amewo k has o be used o di e en pu poses and by o he de elope s. In hose cases, he e is a need o a clea e agen model, wi h some suppo o he design a a highe le el o abs ac ion ha can be easily ansla ed o an implemen a ion. 2.3 Conclusions Agen -based modeling p o ides many ad an ages o e o he modeling pa adigms. In gene al, he p ocess o abs ac ing he de- ails o he a ge sys em and implemen ing hem unambiguously on a compu e is much mo e di ec han o he me hods o abs ac- 11 2 . Simula ion O Sma En i onmen s ion. The e o e, he model is mo e anspa en , which acili a es he unde s anding o he hypo heses assumed and he inclusion o knowledge o domain expe s. The esul o his ease o abs ac ion is e lec ed in many ways. Fo example, he a ie y in beha io o agen s is eno mous. Agen - based modeling allows o conside he e ec o agen s ha ing lim- i ed a ionali y, o agen s wi h abili y o lea n; om classic p oba- bilis ic mechanisms (such as ein o cemen lea ning), o complex models om cogni i e psychology (e.g endo semen sys ems). O e en one s ep u he : The agen s could c ea e hei own models o he wo ld hey pe cei e. The op ions a e almos limi less. The e- laxa ion o he assump ions o ep esen a i e agen s, ha ing he abili y o in e ac wi h he en i e popula ion, and an op imized be- ha io o a u ili y unc ion ( e y common in many social sciences) is done almos di ec ly using his pa adigm. As ha e been s a ed in sec ions 2.1 and 2.2, he e is a gap be- ween gene al pu pose lib a ies and specialized ools: Some a e oo open, while o he s a e oo specialized, o hey do no ully in eg a e design, modeling and simula ion. Taking his in o accoun , his wo k p oposes an agen -based model o indoo scena ios whe e bo h pe o mance and lexibili y in he beha io o he en i ies a e sough . Agen s a e speci ied and managed indi idually, bu he e - ec s o he c owd a e aken in o accoun by se e al me hods ha ake ad an age o cha ac e is ics o he indoo domain in o de o cope wi h he e iciency and scalabili y issues in he p ocessing o hei mo emen s and hei isualiza ion. A he same ime, some al- e na i e easoning mechanisms a e p o ided o each agen in o - de o allow modeling o ich and he e ogeneous beha io s. Ou app oach has been o adop an agen -based modeling ame- wo k, Mason, and p o ide on his se e al componen s as a kind o plugins ha acili a e he modeling and simula ion o indoo sce- na ios. Mason has been chosen because i can be easily in eg a ed as a Ja a lib a y, i clea ly decouples model om iews, i is ligh and has an e icien schedule . The componen -based a chi ec u e o Mason is shown in he nex chap e . 12 3 . MASSIS O e iew 3 MASSIS O e iew A complex sys em ha wo ks is in a iably ound o ha e e ol ed om a simple sys em ha wo ked. John Gall MASSIS is a simula ion amewo k o scena ios in indoo en i- onmen s, allowing o design spaces, and speci ying he beha io o he elemen s and people in hem. These beha io s speci ica ions may a y subs an ially: F om a simple p esence de ec o o human beha io . I is capable o suppo ing housands o agen s, each one wi h an speci ic beha io . The beha io speci ica ion is done ou side he simula ion pla o m. Al hough cu en ly MASSIS p o ides only one beha io model ( he POSH model, see sec ion 3.1.3), o he s can be in eg a ed, bu his is le o u he s udy. The simula ion p og ess can be isualized in 3D, om di e en pe spec i es, o in 2D. The 2D isualiza ion lib a y is based on lay- e s ( he elemen s o each laye a e d awn on op o he p e ious laye ), making easie he de elopmen o a new ype o isualiza ion o speci ic pu poses. Also, i allows o sa e he simula ion changes, eco ding each agen s a e in e e y s ep o he simula ion. These changes a e sa ed in an open and independen o ma (JSON), al- lowing he analysis o he esul s om any o he pla o m and lan- guage. Bo h MASSIS and i s componen s a e open sou ce, allowing he ex ension o i s unc ionali y by hi d pa ies. 13 3 . MASSIS O e iew In addi ion o his, he se o plugins o Ne beans de eloped by he Pogamu eam include a POSH plan edi o (Fig. 9). This plan edi o helps wi h he AI de elopmen , allowing he pa allel de elop- men o a highe -le el abs ac ion AI and p og am code. 3.1.4 Sa ing & Loading Simula ions Also, he simula ion e en s can be logged in JSON o ma , as a single zipped ile o in a SQLi e da abase o u he analysis. Once a simula ion is pe o med, he expo ed da a can be used o playback all e en s ha ha e occu ed du ing he execu ion o he simula ion, i.e., he agen s will beha e in he same way hey did du ing he simula ion. 20 Figu e 9: In eg a ed POSH Plan edi o in Ne beans { " eloci y": { "x": 32,"y": 58}, " isionRadio": 300, "max o ce": 10,"maxspeed": 15, "p ope ies": {"s ee ing.sepa a ion": 70,...}, "loca ionS a e":{ "angle": 0.7853982," loo Id": 8, "cen e X": 4975.2285,"cen e Y": 4108.2695,...}, "id": 3673 } Lis ing 1: Example o an agen 's sa ed s a e 3 . MASSIS O e iew This is in e es ing o allow he use s o e iew he simula ion when analyzing wha has happened. 3.1.5 Visualiza ion All he changes made in he en i onmen a e e lec ed in eal ime by 3D (Figu e 10 ) and 2D displays (Figu e 11). Al hough 3D display is mo e ealis ic, he 2D iew is use ul o analysis and debugging. Also, he 2D isualiza ion API allows he c ea ion o use -de ined laye s in o de o il e he di e en ele- men s in ol ed in he simula ion. 21 Figu e 10: Simula ion 3D iew Figu e 11: Simula ion 2D iew example : C owd Densi y 3 . MASSIS O e iew 3.1.6 S aigh Edge O he open sou ce lib a ies ha a e used in MASSIS, S aigh - Edge[32] dese es an special men ion. I is a powe ul polygon li- b a y, ha p o ides g ea unc ionali y o MASSIS engine. I p o ides se e al geome ic u ili ies, pa h- inding , ield o i- sion and u ili y classes o con e ing S aigh Edge polygons o Ja a Topology Sui e (JTS)[33] polygons, allowing o pe o m mo e complex geome ic ope a ions, such as polygon la ening and sh inking, in e sec ions and unions. Se e al modules o S aigh Edge we e ex ended in o de o im- p o e hei e iciency (Pa h inding) o o add new unc ionali ies (e.g. ec o ope a ions o Swee Home3D polygon ans o ma ions). 22 3 . MASSIS O e iew 3.2 Building Rep esen a ion E e ybody a he pa y is a many sided polygon. Nonagon, They Migh Be Gian s. How he en i onmen is ep esen ed is one o he key elemen s in any simula ion amewo k, because his ep esen a ion is he basis o all he simula ion sys em. I is e y impo an o choose an ap- p op ia e way o model he en i onmen depending on he domain. Fo example, an en i onmen can be modeled as a con inuous space, a g id, o a g aph. O e en a combina ion o hese. The un- de lying s uc u es chosen o model he en i onmen s depend on he le el o desi ed in he applica ion. I is e y common in he indoo scena io domain ha elemen s a e e y close om each o he . Agen s a e no he only ones consid- e ed he e; ables, chai s, cabine s, sinks, e en lowe po s o adia- o s. The e o e, MASSIS op s o a ep esen a ion o he building in which he space is no disc e ized in cells ha a e occupied by one 23 Figu e 12: In MASSIS, almos e e y elemen is a polygon. 3 . MASSIS O e iew elemen o ano he . Ins ead, each elemen has a posi ion in h ee dimensions: (x, y, building- loo ), and a polygon ha ep esen s i . This can be seen in Figu e 12 , whe e e e y hing is ep esen ed in a polygonal way: agen s (g een a ows enclosed by ci cles), doo s ( hin g een ec angles), walls (black ec angles), ooms (g ay a eas), s ai s,(con iguous ed and g een ec angles), ision a eas,e c. An example ha illus a es his need o a model o his ype a e doo s. The wid h o he doo s is a c ucial ac o in de e mining se - e al aspec s o he model, such as c owd conges ion o pa h inding. The disc e iza ion le el necessa y o achie e he same esul s using uni o m g ids in a building wi h se e al loo s wi h housands o agen s is somewha p ohibi i e. As i will be explained in subsequen sec ions, he use o poin s wi h pa icula da a s uc u es o manage hem e icien ly, a he han uni o m g ids has many ad an ages. One o hem is shown in Figu es 13 and 14 . 24 Figu e 13: Mo emen in a con inuous space model Figu e 14: Mo emen in a low- esolu ion g id In indoo scena ios, he use o a low- esolu ion g id may cause s ange beha io s X 3 . MASSIS O e iew 3.3 Pa h Finding I you ind a pa h wi h no obs acles, i p obably doesn' lead anywhe e. F ank A. Cla k Pa h inding is one o he issues ha has mo e impac when simu- la ing c owd beha io s. Some models ea he c owd as a single en- i y o a g oup in o de o simpli y he numbe o calcula ions, such as in [34]–[36]. Howe e , MASSIS, as i has been s a ed in he in- oduc ion, has as objec i e o suppo lexibili y in agen beha io , he e o e he pa h inding model is implemen ed indi idually o each agen , bu aking ad an ages o some assump ions om he p oblem domain in o de o gain in e iciency. As i is explained in p e ious sec ions, he building model is ep- esen ed on a con inuous space. The e o e, i makes sense o ollow his kind o design when de eloping a pa h inding module. I obs a- cles a e ep esen ed as polygons, building a pa h h ough a isibil- i y g aph is a good app oach. 3.3.1 Visibili y G aph A Visibili y G aph is a g aph whose nodes co espond o geome - ic componen s, such as e ices o edges, and he nodes o his g aph a e connec ed only i he e is no any obs acle in e sec ing he segmen be ween hose wo poin s. Each edge o his g aph ep- esen s a isible connec ion be ween hose wo poin s (They can see each o he ). In Figu e 26 shows an example o a isibili y g aph. 25 3 . MASSIS O e iew As all he elemen s p esen in he simula ion ha e a polygon as- socia ed o hem, his ep esen a ion o he elemen s is e y handy o he obs acles p ep ocessing s ep. This p ep ocessing s ep is done be o e he simula ion s a s, in o de o gain compu a ional speed du ing he simula ion. The main eason o his p ep ocessing s ep is ha some compo- nen s o he building, such as walls, o s ai s, a e ne e going o mo e, so he e's no eason o ecompu e he isibili y g aph o he building e e y ime a pa h is eques ed. The p ep ocessing s ep consis s basically o he ollowing pa s: Obs acle me ging As MASSIS is in ended o indoo scena ios simula ions, some cha ac e is ics o his domain a e exploi ed, such as he high e- quency o wall in e sec ion. Usually he end o a wall is connec ed wi h ano he . In Swee - Home 3D ep esen a ions, each wall is conside ed as an indi idual polygon. This is e y use ul o he building design s age, bu when he numbe o polygons becomes impo an , i could become a p oblem. The way he walls in e sec makes possible he educ ion o he numbe o edges. (See Fig.16 ) 26 Figu e 15: Visibili y g aph 3 . MASSIS O e iew Obs acle la ening The geome y o he obs acles is expanded by an amoun p opo - ional o he bounding adius o he agen s. This p ocess is done in o de o make gene a ed pa hs mo e ealis ic, because he pa h is gene a ed wi h he e ices o he expanded obs acle, no om he obs acle i sel , so he pa h ha he agen ies o ollow is sligh ly sepa a ed om he obs acles e ices and edges. Fig. 17, shows an example o how an agen (blue smiley) should ollow he gene a ed pa h. Also, his ope a ion helps o ob ain as e he isible edges om any poin , as will be shown in subsequen sec ions. 27 Figu e 16: Reduc ion o numbe o edges. Figu e 17: Expanded obs acle polygon 3 . MASSIS O e iew Using Swee Home3D ooms as sea ch a eas One o he mos basic pa s o he building designing wi h Swee Home3D is oom c ea ion. The p og am p o ides a simple way o naming a eas and colo ing he loo . MASSIS akes ad an- age o his way ha Swee Home3D has o ep esen ing he build- ing o speeding up he algo i hm. Assuming simple s a emen s, such as: 1. The agen is always inside a oom. 2. The a ge (goal) is always inside a oom. 3. A pa h om Room A o Room B (being A and B di e en ) mus c oss a leas a doo . Al hough hese assump ions seem qui e ob ious, hey make a g ea imp o emen in he execu ion speed o he algo i hm. As he obs a- cle polygons a e in la ed, hei accessible e ices om he inside lie now in he in e io o he oom shape. The mos expensi e ope a ion in e ms o compu a ion ime is he inding o he isible nodes ( e ices) om he s a and he goal o he pa h, because he es o he isible connec ions be ween e - ices is p ecalcula ed in ad ance, and he pa h inding be ween wo nodes in a p ecompu ed g aph is done e y quickly. Fo inc easing he algo i hm execu ion speed, he only nodes o be aken in o accoun as s a ing / ending nodes a e he ones inside he oom bounda ies con aining he s a poin and he end poin . In his way, mos o he nodes and line segmen s a e disca ded, boos ing he algo i hm speed. 28 3 . MASSIS O e iew 3.4 Elemen s Localiza ion The e's nowhe e you can be ha isn' whe e you' e mean o be John Lennon. People, senso s and ac ua o s need eal ime in o ma ion abou he elemen s ha su ound hem. This implies ha , du ing simula- ion, lo s o que y anges mus be pe o med. I is ob ious ha i e - a ing o e e e y elemen on a loo checking dis ances and in e sec- ions is no a good idea. So, he e is a need o a da a s uc u e ca- pable o holding he simula ion elemen s, being somewha e icien in da a inse ion, and e ie al. An in ui i e way o s o ing he loca ions o he elemen s in- ol ed du ing he simula ion is using uni o m g ids. Howe e , hese ypes o da a s uc u es a e use ul when he spa ial da a is dis ib- u ed in an homogeneous way, which is a ely seen in MASSIS' sim- ula ions. Also, depending on he equi ed accu acy, hey can con- sume oo many esou ces. Using uni o m g ids wi h an app op ia e cell size can be a good app oach o he p oblem. Bu de e mining he cell size is no an easy ask, and i depends on many ac o s. I hey a e small, he e will be only a ew elemen s pe cell bu many cells o check. The opposi e case is analogous. I he cell size is la ge, ew cells mus be checked bu he e would be many elemen s pe cell. Ano he solu ion could be using QuadT ees [37]. QuadT ees a e a iable esolu ion da a s uc u es ha could be used o e ie e he agen 's neighbo s wi hin a adius in an e icien manne . This da a s uc u e is use ul o que ying anges, bu i does no pe o m as well as a uni o m g id when inse ing and dele ing elemen s. Fig- u e 18 shows an example o space pa i ion using a QuadT ee (Only hal o i is shown). Gi en hese ac s, he ques ion o which o he wo da a s uc- u es is bes o MASSIS a ises. Bo h o hem ha e hei espec i e ad an ages and disad an ages. Uni o m g ids a e c ea ed once, 29 3 . MASSIS O e iew Fig 23 illus a es hese de ini ions wi h some examples (Seek and Flee, obs acle a oidance and Pa h Following). MASSIS p o ides a lexible implemen a ion o se e al beha io s o his ype(e.g. seek, a i al, sepa a ion, collision a oidance, wall con ainmen , and pa h ollowing), ha can be g ouped in o mo e complex beha io s (like locking o queuing, o example). Al hough he e a e se e al s ee ing beha io s implemen ed in MASSIS, o il- lus a ion pu poses, one a ian o he collision a oidance be ween agen s used in MASSIS will be desc ibed. In his example, he ini ial posi ions o wo agen s, a and b a e de ined by hei x,y coo dina es; (xa1, ya1) and (xb1, yb1) . I he e is a collision, he poin whe e each agen collides wi h he o he one is de ined by (xa2, ya2) and (xb2, yb2) (See Fig. 24). The e exis s a ela ion be ween hem, de ined by: 36 Figu e 23: Some s ee ing beha io s: Seek and Flee, obs acle a oidance and Pa h Following Figu e 24: Collision a oidance be ween wo mo ing agen s 3 . MASSIS O e iew Whe e is he ime ha mus pass be o e he collision occu s. The dis ance be ween hem should be g ea e han he sum o hei adius. In he ime , he dis ance be ween he wo elemen s will be Sol ing o , in he abo e equa ions, wo alues a e ob ained: 1 and 2 ( 2 is analogous o 1 ): The lowes alue o should be chosen, in o de o ob ain he nea - es poin o he u u e collision. An special case mus be conside ed: i he alue o 1 o 2 is nega i e, mus be disca ded (The agen s a e always mo ing o wa d). This is illus a ed in Figu e 25. The pseudo-code o his algo i hm is shown in Lis ing 2. 37 3 . MASSIS O e iew 38 Figu e 25: Region di ision done by he wo solu ions o unc ion collisionA oidance e u ns epulsionVec o minT = In ini y; o Agen o he in ge Agen sInRange(agen ) dis ance = dis ance(o he ,agen ) d = agen . adius + o he . adius = ge TimeToCollision(agen , o he , d); i > 0 and < minT minT = u u eA = u u eLoca ion(agen , ) u u eO = u u eLoca ion(o he , ) epulsionVec o = no malize( u u eA – u u eO) Lis ing 2: MASSIS' Collision A oidance pseudo code 3 . MASSIS O e iew 3.6 Agen Decision Model Desi es dic a e ou p io i ies, p io i ies shape ou choices, and choices de e mine ou ac ions. Dallin H. Oaks The aspec s o human beha io ha a e o in e es o modeling indoo scena ios in he MASSIS amewo k a e he mechanisms ha humans use o deal wi h p oblems easoning om con ex , making use o collec i e in elligence, and how his in elligence is used in p oblem sol ing. Fo ha eason, each agen in MASSIS mus ha e i s own beha - io , compu ed by some high-le el decision model and execu ed by a low low le el module (speed, posi ion, angles, e c.). Modeling human beha io wi h agen s ha e o conside wo main aspec s: hose ela ed wi h hei pe cep ion and he in e ac ion wi h he en i onmen , and hose dealing wi h he easoning on he con ex and he decision making. They a e implemen ed as low- le el and high-le el beha io componen s, espec i ely. When he high le el componen decides wha o do nex , he ac ion is exe- cu ed by he low-le el componen , which pe o ms all he necessa y ope a ions. The ela ionship be ween hese componen s is illus- a ed in Fig. 26. 39 Figu e 26: Rela ionship be ween high-le el and low-le el modules HIGH LEVEL Reac i e Plans P imi i es (Ac ions, Senses) LOW LEVEL Posi ion, line o sigh , speed, angle, o ce, mass S ee ingPa h inding Pe cep ion Mo ionLocomo ion Pa h ollowing, alignmen , queuing,sepa a ion, collision a oidance... 3 . MASSIS O e iew Bo h high-le el and low-le el beha io s should be a ec ed by he s a e o he agen , al e ing he decision making p ocess (e.g. a sca ed agen may choose a di e en ou e o each a a ge , p oba- bly a longe one). Du ing he de elopmen o MASSIS, se e al ways o implemen - ing agen 's high-le el beha io we e conside ed, and some p o o- ypes we e made in o de o es which o he di e en easoning me hods would i be e in his p ojec . I is ob ious ha he e is no clea winne in his a ea, so MASSIS in as uc u e was designed in o de o allow an easy in eg a ion o di e en ypes o AI mod- ules. Due o ime cons ain s, only one AI module has been ully im- plemen ed, bu a ious p o o ypes based on di e en echniques we e de eloped, such as Goal O ien ed Ac ion Planning. This las one dese es o be explained; i mo e ime and esou ces we e a ail- able, i would ha e been eleased wi h he MASSIS inal e sion. 3.6.1 MASSIS' GOAP Beha io Model p o o ype GOAP (Goal O ien ed Ac ion Planning)[39], [40] p oposes a way o ac ion planning in eal ime o NPCs (Non-Playe Cha ac e s) in ideogames. I was used i s ly in F.E.A.R[41], an AAA i s pe - son shoo e eleased o PC in 2005. The planning sys em i 's based pa ially on he STRIPS Plan- ning [42], consis ing on goals and ac ions. Goals desc ibe some de- si ed s a e o he wo ld, and ac ions a e de ined in e ms o p econ- di ions and e ec s. The ac ions only can be execu ed i all i s p econdi ions ha e been me , and e e y ac ion changes he wo ld in one way o an- o he . The way o linking p econdi ions, ac ions and e ec s is done us- ing A*, whe e he wo ld s a es a e he nodes o he g aph and edges a e he ac ions o each hem. The MASSIS GOAP P o o ype was based in his idea. The main concep s a e he ollowing: 40 3 . MASSIS O e iew 1. (P e)Condi ion: Ci cums ance necessa y and indispensable o an ac ion o be ca ied ou . 2. Ac ion: “Do some hing”. I equi es ce ain p econdi ions o be execu ed, and causes e ec s. 3. E ec : Impac o consequence o an ac ion. I Adds o changes he eal o pe cei ed wo ld. 4. Wo ld: The building. 5. Pe cep ion (Sense): In o ma ion managed by he agen , in ela ion wi h i s en i onmen . The e a e wo ypes o Senses: Real / Ex e nal senses and In e nal senses. ◦Real / Ex e nal senses: They a e he eal wo ld ac s pe cei ed om he agen . Fo example: ▪“The e a e 5 i ems on ha able” ▪“The e is a i e on his oom” ▪“Somebody is looking a me” ◦In e nal senses: They a e he hings pe cei ed om he in e nal wo ld o he agen . In e nal senses a e he esul o p ocessing he Ex e nal senses in o some hing ha exis s only in he agen 's mind. Fo example: ▪“The e a e a lo o i ems on ha able” ▪“I am no com o able in his oom” ▪“Tha pe son makes me ne ous” The p econdi ions a e igh ly coupled wi h pe cep ions, being in mos cases he same. Ac ion-Condi ion-E ec blocks Di e en ac ions can p o oke he same e ec (s), bu di e en p econdi ions. Fo example, i he goal is o ha e a com o able chai , di e en ac ions can achie e his goal: Ac ion: Buy a chai (we omi he going- o-Ikea pa ) Condi ion: Ha e money. E ec s: Ha e a com o able chai . Ha e less money Ac ion: Buy ools o making chai s. 41 3 . MASSIS O e iew Condi ion: Ha e money. E ec : Ha e ools o making chai s. Ha e less money. Ac ion: Bo ow ools o making chai s om a iend. Condi ion: Ha e iends wi h ools o his ype. E ec : Ha e ools o making chai s. And much mo e o hese Ac ion-Condi ion-E ec blocks should be necessa y o gi ing he agen he abili y o making a decen plan. Depending on he agen 's pe cep ion o he wo ld, his blocks a e linked oge he dynamically, and a g aph sea ch is pe o med on he 42 Figu e 27: Joined Ac ion-Condi ion-E ec blocks Ha e a a he wi h lo s o money. Ha e low mo al s anda ds AND Be a no -so-good pe son Ask Dad o money Ha e Money AND S eal o he people Buy wood Ha e Wood C ea e a chai Ha e a saw AND Ha e a chai Ha e iends owning wood-wo king ools Ask a iend o wood-wo king ools Buy wood-wo king ools Be willing o wo k AND Ha e a job wo k ha d Pe sonal sa is ac ion Buy a chai 3 . MASSIS O e iew Ac ion-Condi ion-E ec g aph. Figu e 27 shows a simple example o joining he p econdi ions wi h he ac ions and e ec s. Beha io In his con ex , a beha io is a se o ac ions ha mus be pe - o med (o de ed o no ) in o de o each a goal. Basically, i con- sis s on some condi ions, which “ i e” i s ac i a ion and o he con- di ions which in alida es hem. Beha io s a e o de ed by p io i ies: Some e en s in he wo ld change he way we beha e: Fo mos people, seeing a dinosau com- ing changes hei sho - e m p io i ies. An example o beha io p i- o i ies is illus a ed in Figu e 28. Beha io s ack When a beha io becomes in alida ed by some e en , he agen mus con inue doing wha e e i was doing. Tha is he eason why e en s in he en i onmen do no eplace he cu en beha io , hey add i o a beha io s ack. The agen always has on he bo om o i s beha io s ack he lowes - p io i y beha io . When an e en o ces he agen o change i , a new beha io is added on he op o he s ack. I a i ing condi- ion o a lowe le el beha io is sa is ied, ha beha io is no added o he s ack; i has a lowe p io i y and shouldn' be aken in o ac- coun . Figu e 29 illus a es an example o he managemen o a be- ha io s ack depending in he en i onmen . 43 Figu e 28: Beha io p io i ies in MASSIS' GOAP Va ian Flee om i e beha io See i e Be sa e Flee om i e Plan execu ion o each main goal Ge ou o he building beha io Being sa e Be ee Ge ou o he building Plan execu ion o each main goal Escape om dinosau beha io See a dinosau Be sa e Flee om dinosau Plan execu ion o each main goal P io i y #1P io i y #2P io i y #3 3 . MASSIS O e iew Case s udy o his decision model : Kille – P ey Fo es ing his decision model, a Kille – P ey scena io was modeled. In his scena io, h ee oles we e p esen : 1. Kille : Wan s o kill e e y agen ma ked as P ey, bu o killing a p ey a Kni e is needed. I i does no see any p ey agen , wande s a ound. 2. P ey: Wande s a ound un il i sees a Kille . When a Kille i s seen by a P ey, his las one lees as as as possible. 3. Kni e: A simple kni e. Can be aken by a Kille , and hey a e dis ibu ed h ough he building. Fo making he simula- ion mo e in e es ing, a kni e can be used only once. 44 Figu e 29: Beha io s ack changes due o e en s in he en i onmen Beha io s ack Ge ou o he building Fi e appea s Beha io s ack INSERT [Escape om i e] Ge ou o he building A dinosau is seen Beha io s ack INSERT [Flee om dinosau ] Escape om i e Ge ou o he building Dinosau slips and alls om a window Beha io s ack INVALIDATE [Flee om dinosau ] Escape om i e Ge ou o he building Beha io s ack Escape om i e Ge ou o he building Suppose ha he "Escape om i e" beha io does some hing o ex inguish he i e Beha io s ack INVALIDATE[Escape om i e] Ge ou o he building Figu e 30: Kille – P ey P o o ype sc eensho 3 . MASSIS O e iew Lis ing 3 shows pa o he ace o he simula ion, and Figu e 30 shows an sc eensho o i . The ed agen is he kille , he yellow ones he p eys, and he blue do s a e kni es. 3.6.2 MASSIS' beha io model: POSH Plans While he me hod desc ibed abo e looks p omising, he de elop- men and es ing o i would ha e aken oo much ime. The e o e, i was decided o use a mo e ma u e beha io model, well known and es ed: POSH[43] (Pa allel- oo ed, O de ed Slip-s ack Hie a - chical) dynamic plans. The a chi ec u e o his beha io ollows he BOD (Beha io O i- en ed Design) me hod[43], [44]. This me hod o building agen s combines he ad an ages o Beha io Based AI[45], [46] and objec - o ien ed design app oaches. In MASSIS his is applied o acili a e he design o agen s ha a e capable o unning in pa allel and o gene a ing a beha io ha can sa is y mul iple objec i es ha may con lic wi h each o he . One o he main issues while designing an au onomous agen is ha many o he goals ha he agen wan s o be accomplished 45 ============Begin Planning============ Ini ial s a e : {isP eyKilled=0.0, Numbe O KilledPeople=0.0, Numbe O Kni esVisible=0.0, isP eyVisible=0.0, Numbe O P eysVisible=0.0, isKni eVisible=0.0, isAli e=1.0, isPe son=1.0} A ailable Ac ions : [TakeKni e, Wande A ound, KillP eyAc ion, Sea chKni e, Sea chP ey] Planning o goal [Wande Finished:==1.0] -------------------------------------- Ac ions : [Wande A ound] ============End Planning============ [STATE]Execu ing Ac ion The pe cei ed en i onmen has changed, o cing a change on he agen beha iou . Fi ing condi ion: [isP eyVisible:==1.0] /* A p ey was seen */ Cu en beha iou : Beha iou [Kill P ey Beha iou ] Beha iou s ack: [Beha iou [Wande a ound], Beha iou [Kill P ey Beha iou ]] /* Beha io added o he s ack */ [STATE]idle - Replanning nex goal ============Begin Planning============ Ini ial s a e : {isP eyKilled=0.0, Numbe O KilledPeople=0.0, Numbe O Kni esVisible=0.0, isP eyVisible=1.0, Numbe O P eysVisible=1.0, isKni eVisible=0.0, isAli e=1.0, isPe son=1.0} A ailable Ac ions : [TakeKni e, Wande A ound, KillP eyAc ion, Sea chKni e, Sea chP ey] Planning o goal [isP eyKilled:==1.0] -------------------------------------- Ac ions : [Sea chKni e, TakeKni e, Sea chP ey, KillP eyAc ion] ============End Planning============ [STATE]Execu ing Ac ion Ac ion Sea chKni e Finished. Wo ldS a e : {isP eyKilled=0.0, Numbe O KilledPeople=0.0, Numbe O Kni esVisible=1.0, isP eyVisible=1.0, Numbe O P eysVisible=3.0, isKni eVisible=1.0, isAli e=1.0, isPe son=1.0} [STATE]Execu ing Ac ion Ac ion Sea chKni e Finished [STATE]Execu ing Ac ion [STATE]Execu ing Ac ion Ac ion TakeKni e Finished Ac ion Sea chP ey Finished. Wo ldS a e : {isP eyKilled=0.0, Numbe O KilledPeople=0.0, HasKni e=1.0, Numbe O Kni esVisible=1.0, isP eyVisible=1.0, Numbe O P eysVisible=1.0, isKni eVisible=1.0, isAli e=1.0, isPe son=1.0} [STATE]Execu ing Ac ion Ac ion Sea chP ey Finished [STATE]Execu ing Ac ion /* P ey was s abbed */ The pe cei ed en i onmen has changed making he ac ual beha iou (Beha iou [Kill P ey Beha iou ]) in alid. /*P ey is now dead and he e is no any o he isible*/ [STATE]idle - Replanning nex goal Lis ing 3: MASSIS' GOAP Case s udy ace 3 . MASSIS O e iew 52 Figu e 36: Teache going o he doo Figu e 38: Teache going o ake he nea es chai Figu e 39: The s uden s ollow he eache o escaping om he building. Figu e 37: The s uden s p oceeding o close he windows. 3 . MASSIS O e iew 3.7 Sa ing & Loading Simula ions I hink you can lea n om his o y. Chuck No is Al hough MASON p o ides a way o sa ing simula ion s a es, i does no p o ide a way o s o ing some kind o eco d o he en i e simula ion. Tha 's he eason why a new module o sa ing and loading he simula ion esul s was de eloped. Two ways o sa ing simula ions we e conside ed when de eloping MASSIS: Ja a Se ial- iza ion o ma and a plain- ex o ma . •Ja a se ializa ion: ◦Good poin s: ▪Easy implemen a ion ▪I i is done ca e ully, he disk space used is ela i ely small. ◦Bad poin s: ▪I has high dependence om he codebase ▪Makes e y di icul analyzing he simula ion esul s om o he pla o m/language. •Plain ex : ◦Good poin s: ▪I can be pa sed by any pla o m and language ▪I is human- eadable ◦Bad poin s: ▪Can use high amoun s o disk space ▪A cus om pa se is needed, and also an speci ica ion o he ile o ma . ▪Making changes in he codebase may imply ew i ing oo much code, i e e y hing is done “by hand”. 53 3 . MASSIS O e iew Balancing he ad an ages and disad an ages o hese wo ways o s o ing he simula ion imeline, he second app oach (Plain – Tex ) was chosen, bu using JSON (Ja aSc ip Simple Objec No a- ion)[47] as ile o ma . JSON is a well known ex o ma , sui able o s o ing objec de ini ions. Fo logging he simula ion s a e o his o ma , an ex ension o he well-known Gson [48] lib a y, Gson on Fi e [49] was used. I se ializes he objec a ibu es in o JSON o ma , and also p o ides se e al u ili ies o sol ing ypical issues when doing hese hings (e.g. ci cula e e ences). 3.7.1 Sa ing he simula ion The simula ion changes can be sa ed di ec ly in a (zipped) ex ile, o in a SQLi e [50] da abase. Using SQLi e SQLi e was chosen because is a e y po able da abase o ma . The da abase con ains only 3 ields: <objec -id>,<s ep-id>,<ob- jec -s a e>. <objec -id> i 's he simula ion objec unique id, <s ep-id> he ime-s ep o he simula ion and <objec -s a e> is he ac ual s a e o he simula ion objec . The main ad an age o his way o s o ing he simula ion esul s is ha making a simple selec s a emen , all he changes ha he agen made du ing simu- la ion can be e ie ed (See Lis ing 7). Al hough his is no a bad app oach, he numbe o eco ds in he able g ows e y quickly, and i s ile size has an ex a o e head ega ding he pu e-plain- ex app oach. Using Plain Tex Much mo e simple han he SQLi e op ion: one line pe s ep, con aining he elemen s ha changed in ha s ep. Ve y as o 54 selec simula ion_objec _id, max(s ep_id), simula ion_objec _s a e om simula ion_log whe e s ep_id < DESIRED_STEP g oup by simula ion_objec _id Lis ing 7: SQLi e que y o e ie e he changes made by an elemen o he simula ion. 3 . MASSIS O e iew w i e and o playback o wa d (bu no backwa ds, ha op ion is be e wi h he SQLi e app oach). Sa ing Disk Space JSON is a compac ex o ma (compa ed wi h XML). The ile size can be educed conside ably, i some me hods a e applied. ZIP comp ession Applying ZIP comp ession o he simula ion esul s educes no- o iously i s ile size: up o 75%. I he simula ion esul s a e sa ed in o a SQLi e da abase, he da abase mus be comp essed a e , bu i hey a e sa ed di ec ly in o a ile, he s eam can be comp essed “on he ly” (Tha is, less space consumed o e all). S ing subs i u ion Al hough he ZIP comp ession achie es good esul s, some op i- miza ions can be made in o de o dec ease e en mo e he ile size. Lis ing 8 shows an example o an agen s a e in a conc e e simula- ion s ep. Blue s ings a e epea ed wi h a e y high equency ( hey a e objec a ibu es, o class names). A ibu es like “ eloci y” a e common o e e y mo emen -capable agen , e.g. a pe son. I he 8 55 { " eloci y": { "x": 1, "y": 1 }, " isionRadio": 300, "max o ce": 10, "maxspeed": 15, "p ope ies": { "s ee ing.alignmen ": 5, "isP ey": 1, "s ee ing.sepa a ion": 70, "s ee ing. ollowpa h": 25, //... }, "loca ionS a e": { "angle": 0.7853982, " loo Id": 8, "cen e X": 4975.2285, "cen e Y": 4108.2695, " ype": "SimLoca ionS a e" }, "id": 3673, " ype": "Agen ClassNameS a e" } Lis ing 8: Un-comp essed agen s a e in JSON o ma . 3 . MASSIS O e iew cha ac e s ha “ eloci y” has can be subs i u ed by some hing sho e , he o e all size o he simula ion esul s ile would be con- side ably smalle . The keys ( ep esen ing objec a ibu es), and equen s ing alues (such as class names) can be eplaced by a sho e s ing, some hing like a numbe p eceded by an special cha ac e ha se es as indica o , like “@”. Bu , why a numbe ? Ins ead o a num- be can be an alphanume ic cha ac e , so, ins ead o wo king in base 10, we a e wo king in base 62. Lis ing 9 shows how he agen s a e is ep esen ed a e his “ educ ion” p ocess. I is ob ious ha some kind o ex a in o ma ion mus be s o ed in o de o be capable o e e ing he p ocess. So, a mapping a ay mus be sa ed oge he wi h he simula ion esul s. An example o his mapping a ay is shown in Lis ing 10. Using concu ency o speeding up he p ocess I/O ope a ions a e cos ly. As e e y simula ion s ep implies w i - ing o disk (i sa ing is enabled), he execu ion speed o he simula- ion can be educed signi ican ly. MASSIS uses an ex a h ead o w i ing his in o ma ion. A synch onized queue is used as w i ing bu e . E e y s ep, he in o - 56 { "@D": { "x": 1, "y": 1 }, "@E": 300, "@F": 10, "@G": 15, "@H": { "@6": 5,"@7": 1,"@8": 70,"@9": 2, "@A": 25,...}, "@I": { "@0": 0.7853982, "@1": 8, "@2": 4975.2285, "@3": 4108.2695, "@5": "@4" }, "id": 3673, "@5": "@J" } Lis ing 9: S ing subs i u ion in an agen 's sa ed s a e. [ ["@0","angle"],["@1"," loo Id"], ["@2","cen e X"],["@3","cen e Y"], … ] Lis ing 10: A ay mapping key alias wi h ac ual keys 3 . MASSIS O e iew ma ion abou he changes is pushed in o he queue. The w i ing h ead is con inuously aking elemen s om he queue and w i ing ha in o ma ion o disk. In his way way, he impac o I/O ope a- ions is lowe . 3.7.2 Simula ion Playback A simula ion playback is he e e se p ocess men ioned abo e: The da a is loaded om he ile, and applied o he simula ion ob- jec s. The way o doing his is ai ly simple: I he simula ion is s a ed in Playback mode, he p ope s ep() me hod o he agen is no called. Ins ead, he in o ma ion e ie ed om he simula ion ile is loaded in o he agen , changing i s p ope ies di ec ly. 57 3 . MASSIS O e iew 3.8 Visualiza ion You mus see i s be o e you can belie e. Raymond Holliwell The isualiza ion o wha 's happening du ing he simula ion is one o he mos impo an pa s o any simula ion amewo k. Al- hough MASON p o ides good suppo o his, i is mo e o ien ed o g id-based models, and adap ing he MASON display modules o mee he equi emen s o MASSIS en ailed mo e wo k han c ea - ing a new display sys em. MASSIS isualiza ion is composed in wo pa s: 3D isualiza ion and 2D isualiza ion. The 3D isual in e - ace is mo e sui able o ha ing a ealis ic iew o he building, and wha is happening inside, bu he 2D display is mo e use ul o es ing and debugging he model. Also, i is easie o he p og am- me o ex end and manage. 3.8.1 3D Visualiza ion The 3D iew is based on Swee Home 3D in eg a ed iew. I shows he building and he elemen s inside i in he same way ha Swee Home 3D does, bu some modi ica ions mus ha e been made in o de o make i as e o displaying he model in eal- ime. Tha is because Swee Home3D is in ended o being used as a home-design p og am, no as a simula ion model display. Swee - Home 3D i has been designed using a MVC pa e n, and has lo s o e en lis ene s ha a e execu ed when an elemen o he building is changed. 58 3 . MASSIS O e iew Al hough ha 's a good way o s uc u ing an applica ion like his, i 's no needed o MASSIS. In addi ion, i is no h ead sa e. The e en s lis ene s we e emo ed, and also some in e media e lay- e s, in o de o gain execu ion speed. MASSIS a chi ec u e accesses s aigh o wa d o he 3D modules, a oiding in e media e calcula- ions. Figu e 40 shows an example o MASSIS' 3D isualiza ion. 3.8.2 2D Visualiza ion Laye -Based Display MASSIS' 2D display is based on laye s. Each laye can be de- signed independen ly, and i is in ended o displaying he simula- ion in an schema ic iew. 59 Figu e 40: MASSIS' Real-Time 3D Visualiza ion Figu e 41: MASSIS' Laye Selec o 3 . MASSIS O e iew Laye s a e d awn one on op o each o he , ollowing an o de . They can be o de ed, enabled and disabled. Lis ing 11 shows he code needed o one o he mos basic laye s: Walls. Figu e 41 shows how he laye s can be enabled o disabled di ec ly om he GUI, om an use - iendly checkbox lis . MASSIS' buil -in laye s MASSIS comes wi h se e al basic buil -in laye s, o showing ooms, doo s, agen s, adios, pa hs, pa h inding u ili ies...e c. Fig- u e 42 shows a combina ion be ween he obs acle laye , agen s laye , agen 's adius laye , pa h inde laye ,walls laye , ooms laye and doo s laye . Howe e , new laye s can be designed wi hou modi ying he sim- ula ion engine. 60 public class WallLaye ex ends Floo MapLaye { public WallLaye (boolean enabled) { supe (enabled); } @O e ide p o ec ed oid d aw(Floo loo , G aphics2D g) { g.se Colo (Colo .GREEN); o (SimWall wall : loo .ge Walls()) g. ill(wall.ge Polygon()); } @O e ide public S ing ge Name() { e u n "Walls"; } } Lis ing 11: Example o one o he mos basic MASSIS' laye s: Wall Laye . Figu e 42: Laye combina ion example 4 . Ge ing s a ed wi h MASSIS 4 Ge ing S a ed Wi h MASSIS The sec e o ge ing ahead is ge ing s a ed. Ma k Twain 4.1 Ins alla ion 4.1.1 Downloading MASSIS MASSIS can be downloaded om i s main eposi o y, h ps://gi hub.com/ pax/MASSIS. The dependencies o he p ojec ha e been managed wi h Ma en, making easie he dependency manage- men . Fo ge ing MASSIS and all i s dependencies: 1. Download ma en (h ps://ma en.apache.o g/download.cgi) 2. Clone MASSIS eposi o y (o download i as a zip ile) 3. gene a e MASSIS execu able using Ma en: m n clean ins all 4. This should gene a e a zip ile (MASSIS.zip) con aining he execu able ja ile and all i s dependencies. Some o he dependencies o he p ojec a en' in any public ma en eposi o y (such as Swee Home3D). To sol e his issue, a e- lease ag has been c ea ed, con aining hese equi ed lib a ies and MASSIS' plugins ja ile. The con en s o libs.zip mus be placed unde he olde pax. g. The u l o his ag is h ps://gi hub.com/ pax/MASSIS/ eleases/ ag/ 1.0 The ins alla ion p ocess o MASSIS is minimal. In ac , i he en- i onmen designe is no needed, i does no equi e ins alla ion a all. Fo using MASSIS' Swee Home3D plugins, he MASSIS plugin ile ( pax. g.sh3d.plugins.me ada a.MASSISMe ada aPlugin.ja ) mus be 61 4 . Ge ing s a ed wi h MASSIS 4.3 Speci ying Beha io s Wi h Reac i e Plans 4.3.1 Ins alling Ne beans and Pogamu 's yaPOSH edi o Al hough POSH eac i e plans can be designed by hand, i is much easie o do i g aphically. Pogamu 's plugins o Ne beans help o his ask, in eg a ing in he IDE a g aphical plan edi o . No e: This is only a sugges ion o a as e de elopmen o POSH Reac i e plans, i is no necessa y o unning o ex ending MASSIS. Downloading & ins alling Ne beans The Pogamu 's plugin in e es ing o MASSIS is he POSH plans g aphical designe (yaPOSH edi o ). I is de eloped o he Ne - beans pla o m (so y, eclipse lo e s!), so a ecen copy o Ne beans (7.3+) should be ob ained. This can be done h ough Ne beans download page [51]. Also, Ja a JDK 1.6+ is also needed (I can be downloaded bundled wi h Ne beans, check he op ions in he down- load page). YaPOSH edi o The Pogamu 's yaPOSH edi o comes wi h he Pogamu UT2004 ins alle . This ins alle can be downloaded om Pogamu download page [52]. The la es s able e sion is ecommended (Fig 53). The ins alla ion is ai ly simple, bu in case o any ouble he Poga- mu 's download page has de ailed in o ma ion abou he ins alla- ion s eps. 68 4 . Ge ing s a ed wi h MASSIS 4.3.2 POSH Plan c ea ion Basic Beha io s Design A good u o ial abou how o c ea e SPOSH plans wi h Pogamu can be ound a : h p://pogamu .cuni.cz/pogamu _ iles/la es /doc/ u o ials/ch14s03.h ml 4.3.3 Linking wi h Swee Home 3D & MASSIS Using MASSIS me ada a edi o , he beha io o each agen can be speci ied in he ields plan ile and classname. Figu e 48 can se e as an example. The alue o he plan ile ield mus be ela- i e, ne e absolu e (As will be explained la e , he loca ion o he esou ces olde is a pa ame e o MASSIS launche ). 4.4 Simula ion 4.4.1 Running a new simula ion Fo unning a simula ion, he pa ame e un-as mus ha e as alue SIMULATOR. In addi ion, as e e y simula ion (despi e he ype o i ) meeds a building ile, his should be p o ided also. The pa ame e build- 69 Figu e 53: Pogamu Pla o m download page 4 . Ge ing s a ed wi h MASSIS ing-pa h, ells MASSIS whe e is he building. The numbe o s eps desi ed can be p o ided. I hey a e no , he simula ion uns in an in ini e loop. The pa ame e simula ion-mode should be SIMULATION. Fo logging he simula ion esul s in o a ile, he pa ame e sa e-simula ion- o (op ional) should con ain a alid pa h o dumping he simula ion imeline. ja a -ja MASSIS.ja -- un-as=SIMULATOR –building-pa h <BUILDING_PATH> -- un- o <STEPS> --simula ion-mode SIMULA- TION --sa e-simula ion- o <SIMULATION_RESULTS_FILE> The desi ed way o displaying he simula ion p og ess (g aphi- cally o by console) should be speci ied wi h he display pa ame- e (GUI o CONSOLE). 4.4.2 Loading a sa ed simula ion Fo playing a p e ious sa ed simula ion, he alue o he pa ame- e simula ion-mode mus be PLAYBACK and also, he pa ame e load-simula ion- om should be p o ided. ja a -ja MASSIS.ja -- un-as=SIMULATOR –building-pa h <BUILDING_PATH> -- un- o <STEPS> --simula ion-mode PLAYBACK --load-simula ion- om <SIMULATION_RESULTS_FILE> 4.4.3 Help The MASSIS launche con ains a help wi h a b ie explana ion o hese pa ame e s men ioned be o e. Calling MASSIS wi h he a gu- men -help shows all he pa ame e s a ailable and hei explana- ion. 70 5 . Concluding ema ks 5 Concluding Rema ks I 's mo e un o a i e a conclusion han o jus i y i . Malcolm Fo bes 5.1 Conclusion This wo k has p esen ed MASSIS, a mul iagen -based simula ion amewo k ha suppo s he decision making p ocess o humans when sol ing p oblems. This is achie ed by simula ing each agen indi idually, bu wi h he suppo o se e al me hods and e icien da a s uc u es ha ake ad an age o pa icula i ies o he indoo domain. The c ea ion o he en i onmen s is done by Swee Home 3D, wi h some ex ensions o linking agen 's beha io in he simula ion. Agen beha io is s uc u ed in low-le el and high-le el beha io componen s, ex ending Pogamu ’s POSH implemen a ion model, wi h he addi ion o ea u es ha acili a e he sepa a ion o deci- sion making p ocess and low le el ac ions. MASSIS p o ides a ich se o low-le el beha io componen s o he simula ion o indoo scena ios. This has equi ed o MASSIS he ex ension o he Swee Home3D en i onmen wi h plugins o linking agen ’s beha io in he simula ion. In o de o apply MAS- SIS o o he kind o scena ios (e.g., a ci y), new low-le el beha io componen s should be implemen ed and in eg a ed wi h ano he g aphical design package ha suppo s he de ini ion o he new en- i onmen . In his sense, MASSIS can be easily ex ended. MASSIS p o ides as well a ich log capabili y, which can be he basis o u he anal- 71 5 . Concluding ema ks ysis o he scena ios. The ex ensibili y o he MASSIS pla o m is well suppo ed h ough i s componen based a chi ec u e. Fo in- s ance, di e en isualiza ions can be managed du ing he simula- ion, new algo i hms and agen a ibu es can be suppo ed and moni o ed. 5.2 Fu u e Wo k MASSIS amewo k is only in i s beginning, and we belie e has huge po en ial. In he nex e sion o he amewo k, he e will be many upda es o he amewo k. The mos ele an a e shown be- low. In eg a ion o exis ing analysis ools One o he mos ele an issues in he nex e sion o MASSIS will be he in eg a ion o exis ing analysis ools, in o de o make his amewo k mo e independen and use ul. Di e en AI beha io models I is in e es ing o add new, di e en easoning models, in o de o es di e en app oaches. Using a mo e powe ul 3D engine Al hough Swee Home3D is good o his ini ial e sion o MAS- SIS, he e a e be e al e na i es (such as Jmonkey Engine [53]), wi h which mo e ealis ic esul s can be ob ained. Dis ibu ed Compu ing Ano he ea u e ha is being conside ed is making MASSIS ca- pable o un o e clus e and cloud-compu ing a chi ec u es. Since MASSIS uns o e MASON, and he e is a e sion o MASON de- signed o un in pa allel (D-MASON [54]), i would be ela i ely easy o implemen i , and i would add mo e alue o MASSIS. 72 6 . Re e ences 6 Re e ences [1] E. Se ano and J. Bo ia, “Valida ing ambien in elligence based ubiqui ous compu ing sys ems by means o a i icial socie ies,” In o ma ion Sciences, ol. 222, no. 0, pp. 3 – 24, 2013. [2] D. Cook and S. Das, Sma en i onmen s: Technology, p o ocols and applica ions, ol. 43. John Wiley & Sons, 2004. [3] P. Nixon, S. Dobson, and G. Lacey, “Managing Sma En i onmen s,” in P oceedings o he Wo kshop on So wa e Enginee ing o Wea able and Pe asi e Compu ing, 2000. [4] D. J. Cook, M. Youngblood, E. O. Heie man III, K. Gopal a nam, S. Rao, A. Li in, and F. Khawaja, “Ma Home: An agen -based sma home,” in 2013 IEEE in e na ional con e ence on pe asi e compu ing and communica ions (Pe Com), 2003, pp. 521–521. [5] J. C. Augus o and C. D. Nugen , Designing sma homes: he ole o a i icial in elligence, ol. 4008. Sp inge Science & Business Media, 2006. [6] S. K. Das and D. J. Cook, “Designing sma en i onmen s: A pa adigm based on lea ning and p edic ion,” in Pa e n Recogni ion and Machine In elligence, Sp inge , 2005, pp. 80–90. [7] A. Omicini, A. Ricci, and G. Vizza i, “Building sma en i onmen s as agen wo kspaces,” in Enabling Technologies: In as uc u e o Collabo a i e En e p ises, 2007. WETICE 2007. 16 h IEEE In e na ional Wo kshops on, 2007, pp. 92–97. [8] D. Hiebele , “The swa m simula ion sys em and indi idual-based modeling,” 1994. [9] N. Collie , “Repas : An ex ensible amewo k o agen simula ion,” The Uni e si y o Chicago’s Social Science Resea ch, ol. 36, p. 2003, 2003. [10]M. J. No h, N. T. Collie , J. Ozik, E. R. Ta a a, C. M. Macal, M. B agen, and P. Sydelko, “Complex adap i e sys ems modeling wi h epas simphony,” Complex Adap i e Sys ems Modeling, ol. 1, no. 1, pp. 1–26, 2013. [11]S. Luke, C. Cio i-Re illa, L. Panai , K. Sulli an, and G. Balan, “Mason: A mul iagen simula ion en i onmen ,” Simula ion, ol. 81, no. 7, pp. 517–527, 2005. 73 6 . Re e ences [12]U. Wilensky, “NETLOGO i sel : Ne Logo,” Cen e o Connec ed Lea ning and Compu e -Based Modeling, No hwes e n Uni e si y, E ans on, h p://ccl. no hwes e n. edu/ne logo, 1999. [13]Legion, “Science in Mo ion.” [Online]. A ailable: h p://www.legion.com. [14]M. Owen, E. R. Galea, and P. J. Law ence, “The EXODUS e acua ion model applied o building e acua ion scena ios,” Jou nal o Fi e P o ec ion Enginee ing, ol. 8, no. 2, pp. 65–84, 1996. [15]PedGo, “T a Go HT.,” 2006. [Online]. A ailable: h p://www. a go- h .com/de/pedes ians/p oduc s/pedgo/index.h ml. [16]M. MacDonald, “STEPS,” 2009. [Online]. A ailable: h p://www.s eps.mo mac.com/. [17]Thunde head Enginee ing, “Pa h inde ,” 2006. [Online]. A ailable: h p://www. hunde headeng.com/pa h inde /. [18]Golaem, “Golaem C owd: A is -D i en C owd Simula ion,” 2011. [Online]. A ailable: h p://www. hunde headeng.com/pa h inde /. [19]M. Schue man, S. Singh, M. Kapadia, and P. Falou sos, “Si ua ion agen s: agen -based ex e nalized s ee ing logic,” Compu e Anima ion and Vi ual Wo lds, ol. 21, no. 3–4, pp. 267–276, 2010. [20]L. Saî i, A. Boube a, and F. Nouioua, “App oaches o Modeling he Emo ional Aspec s o a C owd,” in Modelling and Simula ion (EUROSIM), 2013 8 h EUROSIM Cong ess on, 2013, pp. 151–154. [21]T. Bosse, M. Hoogendoo n, M. C. Klein, J. T eu , C. N. Van De Wal, and A. Van Wissen, “Modelling collec i e decision making in g oups and c owds: In eg a ing social con agion and in e ac ing emo ions, belie s and in en ions,” Au onomous Agen s and Mul i- Agen Sys ems, ol. 27, no. 1, pp. 52–84, 2013. [22]Massi e So wa e, “Simula ing Li e,” 2002. [Online]. A ailable: h p://www.massi eso wa e.com/. [23]S. Wu and Q. Sun, “Compu e simula ion o leade ship, consensus decision making and collec i e beha iou in humans,” PloS one, ol. 9, no. 1, 2014. [24]A. C. Bicha a, N. Sánchez-Pi, L. Co eia, and J. M. Molina, “Mul i- agen simula ions o eme gency si ua ions in an ai po scena io,” ADCAIJ: Ad ances in Dis ibu ed Compu ing and A i icial In elligence Jou nal, ol. 1, no. 3, pp. 69–73, 2013. [25]R. Hoce a , F. Ma son, V. Cassol, H. B aun, R. Bida a, and S. R. Musse, “F om hei en i onmen o hei beha io : a p ocedu al app oach o model g oups o i ual agen s,” in In elligen Vi ual Agen s, 2012, pp. 370–376. [26]E. Puyba e , “Swee Home 3D,” 2005. [Online]. A ailable: h p://www.swee home3d.com/. 74 6 . Re e ences [27]J. Gem o , R. Kadlec, M. Bída, O. Bu ke , R. Píbil, J. Ha líček, L. Zemčák, J. Šimlo ič, R. Vansa, M. Š olba, and o he s, “Pogamu 3 can assis de elope s in building AI (No only) o hei ideogame agen s,” Agen s o Games and Simula ions, pp. 1–15, 2009. [28]Epic Games, “Un eal Tou namen 2004.” [Online]. A ailable: h p://liand i.beyondun eal.com/Un eal_Tou namen _2004. [29]Epic Games, “UE2 Run ime.” [Online]. A ailable: h p://wiki.beyondun eal.com/Un eal_Engine_2_Run ime. [30]Epic Games, “UDK Documen a ion.” [Online]. A ailable: h ps://www.un ealengine.com/p e ious- e sions/documen a ion. [31]In o e sion So wa e, “De con: E e ybody Dies.” [Online]. A ailable: h p://www.in o e sion.co.uk/de con/. [32]K. Woodwa d, “s aigh edge - 2D polygon lib a y o games.” [Online]. A ailable: h ps://code.google.com/p/s aigh edge/. [33]V. Solu ions, “JTS Topology Sui e,” 2015. [Online]. A ailable: h p://www. i idsolu ions.com/j s/JTSHome.h m. [34]A. T euille, S. Coope , and Z. Popo ić, “Con inuum c owds,” ACM T ansac ions on G aphics (TOG), ol. 25, no. 3, pp. 1160–1168, 2006. [35]J. Shop and A. GPG, “C owd Simula ion in F oblins.” [36]J. Moe sch and H. Hamil on, “Hyb id Vec o Field Pa h inding.” [37]R. A. Finkel and J. L. Ben ley, “Quad ees a da a s uc u e o e ie al on composi e keys,” Ac a in o ma ica, ol. 4, no. 1, pp. 1–9, 1974. [38]C. W. Reynolds, S ee ing beha io s o au onomous cha ac e s, ol. 1999. 1999. [39]J. O kin, “Symbolic ep esen a ion o game wo ld s a e: Towa d eal- ime planning in games,” in P oceedings o he AAAI Wo kshop on Challenges in Game A i icial In elligence, 2004, ol. 5. [40]J. O kin, “Agen A chi ec u e Conside a ions o Real-Time Planning in Games.,” in AIIDE, 2005, pp. 105–110. [41]Monoli h P oduc ions, “F.E.A.R.,” 2005. [Online]. A ailable: h p://en.wikipedia.o g/wiki/F.E.A.R. [42]R. E. Fikes and N. J. Nilsson, “STRIPS: A new app oach o he applica ion o heo em p o ing o p oblem sol ing,” A i icial in elligence, ol. 2, no. 3, pp. 189–208, 1972. [43]J. J. B yson, “The beha io -o ien ed design o modula agen in elligence,” in Agen echnologies, in as uc u es, ools, and applica ions o e-se ices, Sp inge , 2003, pp. 61–76. [44]J. J. B yson, “In elligence by design: p inciples o modula i y and coo dina ion o enginee ing complex adap i e agen s,” 2001. 75 6 . Re e ences [45]R. A. B ooks, “A obus laye ed con ol sys em o a mobile obo ,” Robo ics and Au oma ion, IEEE Jou nal o , ol. 2, no. 1, pp. 14–23, 1986. [46]R. A. B ooks., “In elligence wi hou eason,” The a i icial li e ou e o a i icial in elligence: Building embodied, si ua ed agen s, pp. 25–81, 1995. [47]Ecma-in e na ional.o g, “S anda d ECMA-404,” 2015. [Online]. A ailable: h p://www.ecma- in e na ional.o g/publica ions/s anda ds/Ecma-404.h m. [48]Google, “google-gson - A Ja a lib a y o con e JSON o Ja a objec s and ice- e sa - Google P ojec Hos ing.” [Online]. A ailable: h ps://code.google.com/p/google-gson/. [49]Julio Vie a, “julman99/gson- i e,” 2015. [Online]. A ailable: h ps://gi hub.com/julman99/gson- i e. [50]Sqli e.o g, “SQLi e Home Page,” 2015. [Online]. A ailable: h ps://www.sqli e.o g/. [51]ne beans.o g, “Ne beans download page,” 2015. [Online]. A ailable: h ps://ne beans.o g/downloads/index.h ml. [52]P. Pla o m, “Pogamu Pla o m download page,” 2015. [Online]. A ailable: h p://diana.ms.m .cuni.cz/main/ iki-index.php? page=Download. [53]M. Powell, “JMonkey Engine,” A aliable in: h p://www. jmonkeyengine. com, 2008. [54]G. Co dasco, R. De Chia a, A. Mancuso, D. Mazzeo, V. Sca ano, and C. Spagnuolo, “A amewo k o dis ibu ing agen -based simula ions,” in Eu o-Pa 2011: Pa allel P ocessing Wo kshops, 2012, pp. 460–470. 76 7 Appendices Appendix I: Ra ael Pax, Juan Pa ón: Agen -based Simula- ion o C owds in Indoo Scena ios. 9 h In e na ional Symposium on In elligen Dis ibu ed Compu ing (IDC'2015), Guima aes (Po ugal), 7-9 oc . 2015 (accep ed o o al p esen a ion and ull publica ion) E-mail o he no i ica ion accep ance: Subjec : IDC'2015 no i ica ion o pape 20 F om: "IDC'2015" <idc2015@easychai .o g> Da e: 05/22/2015 05:49 PM To: Ra ael Pax < [email protected]> Dea Ra ael Pax, We a e glad o in o m ha you submission Agen -based Simula ion o C owds in Indoo Scena ios was accep ed o O al P esen a ion a he 9 h In e na ional Symposium on In elligen Dis ibu ed Compu ing (IDC'2015) and o publica ion as a Full Regula Pape (max 10 pages) in he IDC'2015 Con e ence P oceedings. You can consul he de ailed e iews a he end o his message. The Con e ence P oceedings will be edi ed by Sp inge in a olume o he Se ies S udies in Compu a ional In elligence. In a ew days we will send you a sepa a e message wi h ins uc ions on how o p epa e and submi he came a- eady e sion o you pape . The deadline o submi ing is June 19 h, 2015. All accep ed pape s mus be p esen ed o ally a he Con e ence. A leas one au ho o each accep ed pape mus egis e o he Con e ence. The s ic deadline o au ho egis a ion is June 19 h, 2015. On behal o he IDC'2015 o ganiza ion eam, hank you o submi ing you wo k. We look o wa d o seeing you in Guima ães nex Oc obe . Bes ega ds, Da id Camacho Paulo No ais I