top of page

Creating an Interactive Narrative with AI

Created by: Mike Herman

Faculty Mentor: Steve DiPaola

1bd8023b-48f8-435c-b911-d8b540a02edb_rw_

What is the future of interactive narrative in the age of advanced deep learning AI systems? This project looks to understand, explore and create new techniques with one of the newest AI systems available from the open source group OpenAI called GPT-3. It is a whole new way of working with AI based interaction narrative and in many ways this project with my supervisor (Steve DiPaola), SIAT grad programmers and other experts will be on the cutting edge of advanced techniques. My GPT-3 research will attempt to create the following interactive AI narrative: 

 

"The year is 2055 in a universe where meta-humans or "super heroes" are the ordinary. But this day takes an extraordinary turn as the citizens of the city of Megalopolis suddenly start turning into birds! As Commissioner of the Megalopolis police department, you must solve the case and stop this fledgling disaster. The only suspect you have is an 8 year old girl at an orphanage named Rita, who the nuns call: The Red Herring."

User Experience

Red Herring's Bird-Pocolypse is an AI based interactive narrative that uses an AI system, GPT-3, a dynamic natural language processing (NLP) system in chatbot form to tell the above absurdly hilarious tale. The Commissioner's only suspect is the Red Herring, and as the Commissioner, players must use deductive reasoning and social intelligence to decipher her responses and ask the correct questions. How it differentiates itself from other emerging GPT-3 based narrative research attempts (as all this research is very new) is instead of using AI to dynamically create the events of the story, we are using the innovative AI system to create a reflective, talking, reasoning character that drives the narrative of the story. The main user experience is dialog based, where the user interacts via back and forth discussion (Figure 1) with the AI character. Given the systems, the discussion is not fully pre determined but open ended and emergent. 

Screenshot (95).png

Figure 1: GPT-3 dialogue chatbot in Tivoli Cloud VR. 

Narrative Experience

Red Herring's Bird-Pocolypse's narrative went through many changes before finally evolving to where it is now. When it comes to designing a video game, the gameplay should drive the story and not the other way around. Upon deciding that the game would be using the very new AI system, GPT-3 as a chatbot within Tivoli Cloud VR, I began to conceptualize narrative settings that could revolve around a two person scene; a conversation between two individuals that could somehow fulfill a narrative arc. I had various ideas for scenarios for this developing narrative but ultimately I found an interrogation between a police commissioner and their prime suspect to be the most appealing. The interrogation originally entailed defusing a bomb but was altered to something more light-hearted (a bird-demic) to avoid the AI potentially going down some particular (potentially dark) paths (Figure 2). 

198eb012-a245-4883-8236-0133a4ed4fa2_rw_

Figure 2: Early sketches of the Red Herring character.

We eventually decided that the interrogation room wasn't the best setting to showcase the chaos so it was changed to an outside location: a swing set. The character of Red Herring then became the now 8 year old bird-obsessed orphan named Rita Harrington, now acting as the literal Red Herring of the story for a true "master mind". 

Research & Prompt Programming

The most interesting yet truly daunting part about working with technology that is as new and as cutting edge as GPT-3’s AI systems is that currently, not only is there not a lot of reference material online as of right now, but in fact these very novel systems are at an early research stage. However, one source that provided some great insight for the prompt programming aspect of this project was Gwern’s GPT-3 Creative Fiction (2020). Gwern makes many apt comparisons and metaphors throughout the article and he perfectly sums up how one show approach prompt programming as opposed to traditional software: “With regular software, you have to think through exactly how to do something; with deep learning software, you have to focus on providing data which in some way embodies the correct answer which you want; but with GPT-3, you instead think about how to describe what you want” (Para 28, 2020)

Screenshot (109).png
Screenshot (107).png

Figure 3: GPT-3 prompt programming.

For example, in our prompt programming prompts, I wrote the directions in a paragraph form with dialogue examples also reiterating those instructions (Figure 3). Gwern himself also puts an emphasis on format when providing instruction for GTP-3, arguing that “disappointing performance can be improved dramatically by finding appropriate formatting or prompts: arithmetic improves enormously with comma formatting of decimals” (Para 28, 2020)

Prototyping & Dual Dialogue

After doing the necessary research to conceive an approach to my prompt programming, I began the trial and error process of testing my various prompts. My biggest discovery while prototyping the chatbot was giving it an internal monologue (Figure 4). What started as an homage to noir crime thrillers (where the audience was aware of the protagonist's thoughts), we instead discovered that this implementation meant the AI could make the distinction between what it's thoughts and what it was vocalizing. In some examples we even say that it would think one thing and respond in another; it would lie. This distinction would also create another stream of data for the programmers so for example, if we know the chatbot is lying and saying something counter to what it was thinking, the coder could implement body language into the character model that could reflect this. 

Screenshot (93).png

Figure 4: Rita’s dual dialogue

Conclusion

Much of the work is not only about forwarding this particular narrative, but attempting to understand and innovative this new area of research. DiPaola and Tivoli CTO Caitlyn both have commented to me, that this is heralding a new form of AI as narrative assistant and where previously you would have to program much of the direction. Now not only can you program in more traditional ways, you can use a simple suggestive prompt to propose what this thinking AI should do. It is limited (like an improv actor who is extremely well-read) but truly emergent and the goal is to create new techniques for the whole field on how to best work with it for artistic endeavours. 

Research Artifacts 

GPT-3 Research Paper.

Video presentation of research paper.

In Association with: 

Professor Steve DiPaola (Mentor) : https://www.sfu.ca/siat/people/research-faculty/steve-dipaola.html

Caitlyn Meeks & Tivoli Cloud VR : https://tivolicloud.com/

bottom of page