SusGPT — A ChatGPT Murder Mystery

Language AI; A powerful tool for Game Dialogue Systems

Sawyer Walker
10 min readApr 10, 2023

Games have made incredible advancements in the areas of narrative world-building and AI in the last decade increasing both engagement and immersion within our gameplay experiences. With the recent and rapid development of language AI (LAI), there are new tools for storytellers and narrative designers to expand upon established systems while enhancing the level of engagement players experience within these worlds.

Given that it has been a prominent topic in recent months, many of us in the games industry are familiar with the concept of LAI. However, to provide a clear definition, let’s ask ChatGPT how it defines LAI.

“Language AI refers to the use of artificial intelligence and natural language processing techniques to create systems capable of understanding, generating, and manipulating human language. These systems can be trained on large datasets of text to learn how to recognize patterns and relationships between words and phrases. Language AI has many applications, including language translation, chatbots, speech recognition, sentiment analysis, and text generation.”

During a recent game jam at Uken Inc. — called a Hadoukathon — we developed a prototype murder mystery game, called SusGPT, to create a proof of concept for the potential of LAI text generation being integrated into an adversarial dialogue system. SusGPT demonstrated how LAI tools can be effectively leveraged for such systems to create character emulation. These new software tools provide a novel and accessible way for the talented writers and designers in our industry to enhance the player experience in RPGs, Horror Games, Mystery Games, and many other narrative-driven experiences.

SusGPT

SusGPT is a murder mystery game where the player assumes the role of a detective tasked with interrogating a group of 6 suspects to solve a murder. The objective is to collect critical evidence such as the weapon, the location, and the motive of the crime. Then use that evidence to identify and arrest the perpetrator.

The core gameplay experience follows the established murder mystery loop. Initially, the player is introduced to the crime scene and murder details, and the cast of suspects are provided with demographic information and backstory. The players are then given the opportunity to interrogate the suspects and ponder their suspicions. Following this, a major event occurs that removes one suspect from the list of suspects. Following a second round of questioning, the players then make their accusation, and the outcome is revealed. The success of the investigation loop hinges on the player’s ability to effectively interrogate and gather information from the AI suspects. The ultimate objective is to accuse the correct suspect and complete a precise police report, leading to justice being served for the victim.

The gameplay was driven by the adversarial dialogue system where ChatGPT was integrated, which created a call and response loop for player questions where the AI was instructed to hide the correct information from the player. The ChatGPT API was integrated with Unity, which allows for real-time communication between the AI model and the game. By leveraging Unity’s built in text systems, our team was able to get ChatGPT to generate responses to player input, creating the complete system loop within hours. This enables game developers to easily incorporate AI-powered dialogue systems into their games and provide a very effective dialogue tool increasing the quality of the UX for players within a very small scope.

SusGPT Interrogation Scene

Our system was designed knowing that simply implementing these tools into the game does not produce a strong or contextually appropriate result. At the beginning, the AI is incapable of understanding its gameplay purpose and will only behave as it is told to do so. Which means the AI needs to be set up for success and primed by writers and designers.

Setting The Stage for AI

While the primary UX of a murder mystery is established and recognizable, ChatGPT has its own behavioural limitations to consider when attempting to generate character emulation. The LAI as it defined itself, is attempting to understand, generate, and manipulate human language to produce text. Which therefore requires writers and narrative systems designers to intervene and prime the AI to properly utilize their stories as it correlates to gameplay.

Through interactions with ChatGPT prior to designing the system, we found that it is quite precise in its responses and can often expound on irrelevant or extraneous details. For SusGPT this meant that there was always a risk of the AI breaking character and spoiling the mystery for the player. Our solution was to provide the AI with a fixed set of rules that it must abide by. Combined with the details that made up our characters, their mannerisms, typical behaviours, mood, and tone when speaking to the player.

The basic set of rules that we required were:
1. Stay in Character

2. Respond to the player using the character details.
3. Do not reveal anything the character does not know

4. Use our canned responses for specific types of questions. — “Did you do it?!”

5. The AI response should not exceed [X] amount of characters
6. If the player asks more than one question at a time, give the rejection response while in character.

7. The Player can only ask [X] amount questions before the character rejects further questions.

With these parameters, we were able to receive tailored responses that were very successful at producing a scripted personality. Which was crucial since ChatGPT and current iterations of LAI are incapable of being effective members within the creative process. But through fixed rules, we were able to make it a good actor in a predeterministic environment and conversation.

SusGPT — Rules prompt and output

To leverage this primed behaviour within SusGPT, our narrative designer created a detailed murder scenario, complete with all of the required clues that determined the branched outcomes that the player could receive. But more particularly for the characters, writing their backstories and demographic information; such as age, gender, country of origin, and personality traits. The AI would have also been given what each suspect’s relationship was to the victim and association to one another. In addition to their current mood or emotional state within the scenario.

SusGPT- Character Sheet

These particular personality details are at the core of ChatGPT’s system of manipulating human language; we are effectively telling it how to do that on a per character basis. As well as training it for an adversarial line of questioning. When these details were provided to the AI, it was able to focus its response and lose its literal use of dialogue. Keeping the conversation more dynamic and intriguing for the player. All of these system variables, narrative designs, and story expositions would be given to the AI prior to each interrogation. This allowed for the AI to experience a shift in mood, or for the player to gain information from one suspect and leverage it against another in a meaningful way.

The successful utilization of this tool in SusGPT demonstrated its potential in delivering narrative exposition and interaction. However, it also highlighted the need for human input in creating a detailed narrative and rule sets that reflect the intended outcome and anticipate the player’s interactions. The LAI is not capable of being an active member within the creative process, but it can enhance the player’s immersion with accurate and appropriate responses and prove to be a strong tool for narrative games. The integration of ChatGPT in SusGPT showed the possibilities and limitations of these tools, but also how they could be leveraged within our established world building techniques.

Conversational AI in Games

Characters play an integral part of every RPG experience, providing players with something to interact with and imbuing our narratives with emotional depth. They also serve as the source of tasks that the player must complete.

In SusGPT, the backstory of each character is essential as it determines how the suspect will respond to the player’s questions and interact with the player during interrogations. Effective communication and knowledge are crucial to delivering the intended experience, making this dialogue system an important aspect of the narrative that should reflect realistic behaviour.

Many titles rely on existing dialogue techniques that have become standard for modern RPGs and other narrative experiences. As designers, we can leverage LAI effectively to create new and exciting UX loops that increase the depth of immersion in our worlds. Rather than relying solely on static responses to a set of multiple-choice player interactions, we can provide players with a text box, or in future iterations, a microphone. Using these tools to speak to the characters within the world allows players to get to know each of them on a deeper level than is currently attainable, due to the high cost of development as well as the relevance to the world.

Mock — Potential RPG Dialogue

A town guard is typically a town guard, with a set of responses and behaviour shared among the group. However, if each guard had AI dialogue that reflected a unique connection to the community they were guarding, players could get to know the cultures, communities, and individuals in their towns much better. LAI could generate text based on the information provided by writers, allowing players to discover more about the objectives presented by characters and events.

Of course, this would be a meaningful tool in generating player objectives. The characters within these worlds know who and what they are, as well as what they and others need. They can ask the player for help or to participate in the objectives presented by other characters and events. With a depth of knowledge written into their data, they can be true participants in the player’s gameplay and more than mere set pieces, meant to provide colour to the stage.

There are major caveats to this system, however, such as the pre-deterministic nature of the player’s objectives. Since the entire premise of a game depends on predictable outcomes or rewards, the AI is not the ends but the means to providing a rewarding experience. Getting to know a village and its inhabitants and their relations to one another and other communities can only provide the player with more options for dialogue that LAI would be able to answer and could lead to the beginnings of new objectives.

For example, In a fantasy RPG, characters could know things about their regions, neighbours, and country. Through exploratory conversations, the player could learn about the best places to gather plants, or about secret caves with hidden passwords that must be spoken, or offer a lonely orphan a place to live and a loving relationship. Rather than a simple exchange of time and resources for more resources, the characters within these communities could grow to like or hate the player and adjust the information they share with the player accordingly. Creating an economy of relationships and knowledge.

While LAI cannot replace the creative input of a real human being, it has the potential to create new gameplay systems and reduce the development cost for many projects. This capability can serve all developers, from indie to AAA, in creating a stronger world narrative in an attainable scope. Now, writers and narrative designers can focus not only on the cost of writing every conversation with the player, but also on providing each character with knowledge and experiences that the player can interact with. Seeing the success our small team had with integrating ChatGPT into our interrogation system, we became incredibly excited about what the industry’s talent could do with these systems.

Narrative Tool Belt

While there is always the fear that this kind of technology will replace creative jobs, I believe that it will only serve as an additional tool in narrative development over the coming decades. This technology allows our teams of writers and designers to exponentially produce more complex worlds and narratives that can be leveraged by either their own AI systems or through 3rd party software.

The development and expansion of LAI offer new possibilities for narrative designers, writers, and game designers to expand upon established techniques and enhance the level of immersion players experience in game worlds. This increases the flexibility of role-playing within our existing systems, while also providing affordable tools to our creative teams that will reduce the costs associated with creating dialogue-driven narratives. As studios and game engines create their own LAI’s or leverage existing software, we will begin to see more of these experiences become prevalent.

As these tools develop, like the recent inclusion of voice-to-text being added to ChatGPT, we can expect further expansions that will open more doors for developers. SusGPT demonstrated how LAI can effectively be integrated for character emulation and become a core part of dialectic storytelling and world-building. However, while LAI can be an effective tool for delivering narrative exposition and interaction, it is not capable of truly participating in the creative process and requires the personality and experiences that only humans can accurately create. By leveraging the incredible talent pool of storytellers and narrative designers in our industry, the integration of LAI increases the amount of creative tools we can leverage and will only open up more opportunities for our artistic medium.

_________________________________________________________________

Uken Inc. (2023). SusGPT [Video Game]. Unreleased. Developed by Alexandre Matte-Deschênes, Kate Liu, Max Pham, Renz Sampang, Pedro Stringhini, Lisa Stephens, and Sawyer Walker.

--

--

Sawyer Walker
0 Followers

Game Designer @Ukengames , formerly @blueislestudios . Who Wants to be a Millionaire | Jeopardy | Citadel: Forged with Fire | Valley