Finite State Machines and Live Emergent Narrative Theatre Craig Paul Green 1⇤ 1 Northumbria University 2 Paper Dove Company Ltd craig.p.green@northumbria.ac.uk, daleon@paperdove.co.uk Abstract The proposed approach creates information through low- level finite state machine interactions with a digital environ- This paper presents a project currently in develop- ment. Finite state machines utilize a finite set of states to ment that examines novel approaches to creating perform tasks, it is prominent in video games as it is useful and presenting emergent narrative as a live perfor- when creating non-playable characters that are both reactive mance. The proposed approach will allow a nar- to environmental conditions and player interactions. To cre- rative to emerge from a systemic relationship be- ate audience agency, the way in which the data is generated tween audience, finite state machine and perform- can be modified by the audience. The data is then communi- ers. It exists at the intersection of gaming and the- cated to performers for use in their live improvisational story atre, implementing finite state machines to generate processes. The research aims to answer the following ques- a data set for performers to utilise, and that audi- tions: what types of data can be produced to help performers ence members can access and modify during a live form, develop and maintain consistent emergent narratives? performance. How will this data be communicated and used? In what way can we ensure that audience members understand the causal links between their actions and the actions of the performers? 1 Introduction Emergent narrative is a form of narrative development where 2 Related Work there is little or no author agency. The term was first coined Research in this area is needed because of growing trends in 1995 by Tinsley Galyean in his doctoral thesis Narrative towards emergent narrative within the arts, video game and Guidance of Interactivity. Galyean saw emergence as a natu- film sectors. In video game and film, exploration of emer- ral everyday phenomenon, stating that “We all construct nar- gent narrative has been established, through works such as ratives out of our daily activities to help us remember, un- Slime Rancher [Monomi-Park, 2016] and Wolves in the Walls derstand, categorize and share experience.” [Galyean, 1995]. [Fable-Studio, 2018]. These employ different rule sets to de- In place of traditional authoring, stories emerge from low- velop a narrative from interactions between users and vir- level interactions between elements in a system, “Rather than tual agents. Slime Rancher, in particular, employs finite seeing the hierarchy above as a top-down structure, one may state machine AI, in order to develop complex interconnected view it as a bottom-up structure, in which each level is created relationships between characters. Nick Popovich, CEO of by interaction below it.” [Aylett, 1999] Having stories emerge Monomi Park explains that to create emergent storytelling, from low-level interactions inevitably leads to problems with you must “cook emergent behaviours into the actors in your “narrative intelligibility” [Bruni and Baceviciute, 2013], the game, which generates emergent gameplay, which is then idea that a story must be coherent and meaningful for an au- viewed as emergent storytelling.” This is done by creating dience. There are many other problems such as with “story character agents with a “collision of wants and needs” [GDC, recognition”, which is a problem with a systems ability to un- 2017]. Therefore, “An emergent approach to game design derstand and adapt to the narrative it is generating; “Systems requires a globally designed game system that provides rules whose narratives emerge from simulations currently have no and boundaries for player interactions, rather than prescripted way of discerning the very stories they support.” [Ryan et al., paths” [Sweetser and Wiles, 2005]. 2015]. Using finite state machines for video games is a well- established practice, but within a theatrical context, the im- ⇤ craig.p.green@northumbria.ac.uk plementation is limited. Bad News: A game of death and Copyright c 2020 by the paper’s authors. Use permitted under Cre- communication [Ryan et al., 2016] employs improvisational ative Commons License Attribution 4.0 International (CC BY 4.0). actors to take the role of characters in a small fictional town in In: A. Jorge, R. Campos, A. Jatowt, A. Aizawa (eds.): Proceed- America. All of the relevant information is procedurally gen- ings of the first AI4Narratives Workshop, Yokohama, Japan, January erated and the user takes actions within this world through a 2021, published at http://ceur-ws.org text-based interface. 15 There are emergent structures in Improvisational theatre, machine is holding. All interactions are shown in fig 2, they but the dynamics are more complex as it “depends on per- include the following: Objects of Interest, a Food Source, formers observing their own and other performers actions, and Digital Representations of Performers. Objects of In- executing some quick deliberative process, and then select- terest stay in fixed locations, disappearing for a few seconds ing new actions to perform.” [Magerko et al., 2009]. In Bad once finite state machines have interacted with them. They news: A game of death and communication, this is mitigated can be modified by audience members, allowing the audience by the pace of interactivity and the procedurally generated to change their colour which changes the data generated by contextual and character relationship information, ensuring any finite state machines interacting with them. Red Objects that performers have a basis for their actions. Within con- of Interest will increase the negative number, and green will temporary performance art, works that play with the nature increase the positive number. Finite state machines will inter- of audience interactions are well established and are useful act with the closest Object of Interest to them. Food sources when considering audience agency over a performance. Ma- are moved randomly around the environment every time fi- rina Abramović’s performance Lips of Thomas [Abramovic, nite state machines interact with them. This moves the fi- 1975] is an example of nuanced audience agency. In this per- nite state machines around the environment, stopping them formance Abramović’ engaged in several self-abusive activi- from getting stuck interacting with a specific set of Objects ties including shredding her clothes, self-flagellation and lay- of Interest. The audience can also interact with these Food ing on a block of ice. These actions eventually prompted the Sources which attracts all finite state machines within five audience to physically stop the performance, and so “created metres, giving the audience a way to control the finite state a situation wherein the audience was suspended between the machines. Digital Representations of Performers hold indi- norms and rules of art and everyday life, between aesthetic vidual data sets that are specific to each on-stage performer. and ethical imperatives” [Fischer-Lichte, 2008]. When a finite state machine comes to the end of its life cycle, Interactive theatre and dance have the potential for emer- it will automatically move to the closest Digital Representa- gent narrative but currently employ limited emergence. The tion of a Performer and transfer its data. This data transfer forerunners of theatrical interactivity are companies such as is accumulative and so the data held by digitally represented Punchdrunk and Blast Theory, both of which primarily use performers are defined by the processes of the finite state ma- multiple-choice interactivity with a set number of pathways chines. through a story such as Prospero’s Island [Punch-Drunk, The data is then communicated to the corresponding on- 2014]. Blast Theory, in particular, explores the use of tech- stage performers, who use it to develop a story. Currently, as nology, in their seminal work, Desert Rain [Blast-Theory, a starting point for performances, a vague context is set. We 1999], using mixed reality as a way to present the stories of hope that in future work we will be able to work with audi- real people during the Gulf War. ences to contextualise the beginning of performances. The data produced is generic and does not intrinsically imply nar- 3 Research Project: Implementing an rative information, so the performers need to find ways of Emergent Narrative in a Theatre Setting converting it into usable information. A simple example of this might be: two performers on stage acting out a breakfast with Live Actors. scene, the lower the value a performer receives the more ar- The proposed system generates data to be used by live im- gumentative they become and vice versa. It could also be provisational performers, this is achieved by using the data to used for narrative devices such as the speed of the imagi- control stage equipment, which creates cues for performers to nary wind. Currently, the system can use the data that is interpret. The system allows the audience to modify how data generated to modify various stage equipment such as light- is generated, rather than directly changing the data. This ap- ing, sound, and video. These are used to create cues for per- proach outputs data at a defined rate, that cannot be changed former actions. An advantage of working with performers by the audience. This is useful for performers as the data is that there is no need for highly complex systems that at- changes gradually, making it more predictable than if the au- tempt to act intuitively to stimuli. High-level cognitive tasks dience were to modify the data at their discretion. Each finite are delegated to the performers and the computationally in- state machine creates an individual data set as they interact tensive task of information generation is left to the finite state with their environment. This data consists of a positive and a machines. By forcing the audience to work within the bound- negative number, and a third number which is an average be- aries of the systems data generation parameters, the audience tween the two. These numbers are continually changing dur- becomes immersed at the intersection of ‘mechanical immer- ing a finite state machines life cycle. Finite state machine life sion’ and ’narrative immersion’ [Mason, 2013]. The audi- cycles consist of interacting with their environment, dividing ence has to engage in repetitive tasks to develop their narra- to create more finite state machines with new data, and then tive immersion. Mechanical and narrative immersion is well dying after diving twice. Once they reach this stage, they de- established in the literature and often are seen as counter to posit their generated data for one of the onstage performers to each other, “Whereas ludic immersion presupposes a physi- use, then they stop all activities. The finite state machines are cally active participant, narrative immersion is an engagement represented in the digital world by floating orbs that traverse of the imagination in the construction and contemplation of a the digital environment, interacting with objects and chang- story world” [Marie-Laure Ryan, 2009], “ludic immersion” ing colour based on their data set, shown in fig 1. This allows here corresponds to Mason’s “mechanical immersion”. We the audience an understanding of the data that each finite state can view the immersive nature of the proposed system as cre- 16 ating a dual process immersion, as it is a result of both pro- cesses in sync with each other. It is important to make the Objects in distinction between manipulating data directly and manipu- lating the way in which it is generated. By asking an audi- digital ence member to stop and make complex narrative decisions, environment: immersion can be compromised [Louchart et al., 2008]. FSM agent with positive number FSM agent with negative FSM agent with negative number Food source for FSM agent, similar The interface between audience and performers will allow generated larger than negative. number generated larger than generated double positive. to the objects of interest but does positive. not directly change the generated data. audience members to influence the data, without disrupting the performance. It will also create a situation whereby au- dience members might work with or against each other to realise group or individual goals. Understanding audience agency in this context is a key part of the research. Murray defines agency as being “the satisfying power to take mean- ingful action and see the results of our decisions and choices.” [Murray, 1997] Although, the phrase ’meaningful’ is prob- Digital representation of performer on the stage with current data set Digital representation of performer on the stage with current data Object of interest for FSM agent which Object of interest for FSM agent which adds to the positive generated data adds to the negative generated data lematic, as it can be interpreted subjectively. “Diegetic” and value at zero or above. value set below zero. when interacted with. when interacted with. “extra-diegetic” agency can help to clarify the types of agency an audience member could have. “Diegetic” being “those choices that a player makes as a character or presence within Figure 2: Legend of Fig. 1 a story world that affect story” and “extra Diegetic” being “choices that a player makes as an external observer that af- fect the discourse” [Mason, 2013]. It is important to un- derstand that with all narrative media “we will always have 4 Future Work to exercise conscious work in order to find meaning” [Fen- This work is the basis for implementing finite state machines cott, 2001]. Another potential difficulty may lie with “author- within a theatrical context that creates an audience-performer audience distance (AAD),” which is the “notion of message relationship conducive to the development of an emergent transmission between sender and receiver.” [Bruni and Bace- narrative. The research primarily focuses on data creation and viciute, 2013]. With the proposed system, we consider the communication. Further work in this area could extend to de- amalgamation of performers, audience and procedural data veloping narrative frameworks which systematise performer as redefining the traditional author, and so audience agency is output, which is essential for creating explicit links between wrapped up in their ability to interpret causal links between performer output and audience input. Exploring the possi- their actions and the actions of the performers. An advantage bilities of remote online audiences could also be productive, in using finite state machines to generate data is it allows for possibly leading to greater accessibility and large amounts of automation. This allows the audience freedom to stop or start active participants which would dramatically change the dy- engaging with the system at will, without disturbing the nar- namic between the performer and audience. rative. Thus, maintaining audience immersion and allowing the system to adapt to the type of audience members engag- ing with it, “critical readers” and “naive readers” [Young and 5 Conclusion Cardona-Rivera, 2011]. The proposed research will be a step towards a hybrid system requiring interdisciplinary collaboration and the merging of traditions and technologies. It is a novel approach to creating an emergent narrative for live performance, utilising immer- sive technologies, where authorial control is combinatory, a synchronized effort between the audience, the performers and the procedural data generation process. The system creates a dynamic and robust bridge between audience and performers that holds many possibilities for extending its usability. By working directly with performers, it will be possible to ex- plore how this could extend, by understanding how generic data can be transformed into useful narrative data for impro- visation. Acknowledgements We thank Dr. Steve Gibson, Prof. Lars Erik Holmquist and Deriannna Thomas for their advice and comments on the manuscript. The work was supported by the IIIP European Figure 1: Image of digital environment, taken from a phone. Regional Development Fund. 17 References [Murray, 1997] Janet Horowitz Murray. Hamlet on the [Abramovic, 1975] Marina Abramovic. Lips of Thomas. Holodeck: The Future of Narrative in Cyberspace. Simon and Schuster, Holborn, London, 1997. Live Performance, 1975. [Punch-Drunk, 2014] Punch-Drunk. Prospero’s island. Live [Aylett, 1999] Ruth Aylett. Narrative in virtual environments interactive performance, 2014. - towards emergent narrative. Working notes of the Narra- tive Intelligence Symposium, 1:83–86, January 1999. [Ryan et al., 2015] James Owen Ryan, Michael Mateas, and Noah Wardrip-Fruin. Open design challenges for interac- [Blast-Theory, 1999] Blast-Theory. Desert rain. Live inter- tive emergent narrative. In Interactive Storytelling, pages active performance, 1999. 14–26, Cham, Switzerland, December 2015. Springer In- [Bruni and Baceviciute, 2013] Luis Emilio Bruni and Sarune ternational Publishing. Baceviciute. Narrative intelligibility and closure in in- [Ryan et al., 2016] James Owen Ryan, Adam J. Sum- teractive systems. In Interactive Storytelling, pages 13– merville, and Ben Samuel. Bad news: A game of death and 24, Cham, Switzerland, November 2013. Springer Inter- communication. In Proceedings of the 2016 CHI Confer- national Publishing. ence Extended Abstracts on Human Factors in Computing [Fable-Studio, 2018] Fable-Studio. Wolves in the Walls. Systems - CHI EA ’16, pages 160–163, San Jose, Califor- [Oculus Rift], 2018. Interactive virtual reality Film. nia, USA, May 2016. ACM Press. [Fencott, 2001] Clive Fencott. Virtual storytelling as narra- [Sweetser and Wiles, 2005] Penelope Sweetser and Janet tive potential: Towards an ecology of narrative. In Virtual Wiles. Scripting versus emergence : issues for game de- Storytelling Using Virtual Reality Technologies for Story- velopers and players in game environment design. In- telling, pages 90–99, Berlin, Heidelberg, September 2001. ternational Journal of Intelligent Games and Simulations, Springer. 4(1):1–9, 2005. [Fischer-Lichte, 2008] Erika Fischer-Lichte. The Transfor- [Young and Cardona-Rivera, 2011] R. Michael Young and mative Power of Performance: A New Aesthetics. Rout- Rogelio E. Cardona-Rivera. Approaching a player model ledge, Abingdon, London, June 2008. of game story comprehension through affordance in inter- active narrative. In Proceedings of the 18th AIIDE Confer- [Galyean, 1995] Tinsley A. Galyean. Narrative guidance of ence on Intelligent Narrative Technologies IV, pages 123– interactivity. PhD thesis, Massachusetts Institute of Tech- 130, Stanford, California, January 2011. AAAI Press. nology, USA, Massachusetts, 1995. [GDC, 2017] GDC. A thousand tiny tales: Emergent storytelling in slime rancher. Talk given by Nick Popovich at the annual Game Developers Conference, Youtube Video, 2017. https://www.youtube.com/watch? v=GbVFa89kUhw,Accessed:2020-04-11. [Louchart et al., 2008] Sandy Louchart, Ruth Aylett, Joao Dias, Rui Figueiredo, and Ana Paiva. Authoring emer- gent narrative-based games. Journal of Game Develop- ment, 3(1):19 – 37, January 2008. [Magerko et al., 2009] Brian Magerko, Waleed Manzoul, Mark Riedl, Allan Baumer, Daniel Fuller, Kurt Luther, and Celia Pearce. An empirical study of cognition and the- atrical improvisation. In Proceedings of the seventh ACM conference on Creativity and cognition, pages 117–126, Berkeley, California, USA, October 2009. Association for Computing Machinery. [Marie-Laure Ryan, 2009] Marie-Laure Ryan. From narra- tive games to playable stories: Toward a poetics of in- teractive narrative. StoryWorlds: A Journal of Narrative Studies, 1:43–59, January 2009. [Mason, 2013] Stacey Mason. On games and links: Extend- ing the vocabulary of agency and immersion in interactive narratives. In Interactive Storytelling, pages 25–34, Cham, Switzerland, November 2013. Springer International Pub- lishing. [Monomi-Park, 2016] Monomi-Park. Slime Rancher. [PC, Xbox One, Linux, Mac], 2016. Video Game. 18