Author:

Nicolas Teofilovic
Supervisor:Prof. Gudrun Klinker
Advisor:Daniel Dyrda (@ga67gub)
Submission Date:[created]


Project Description

Using AI as a game master in an interactive story game: Our game A.I. Noire explores the possibilities of using an AI as a game master to directly impact the game's story and interactions with the player. The game itself is based on a relatively simple isometric point and click story game, where as a detective the player must solve a mysterious murder by searching rooms for items that contain clues, use these items and speak with NPCs to find out what happened. We are using the OpenAI GPT capabilities by sending game related information at runtime and parsing the result into ingame actions and general game-states. We enforce answers in a specific interpretable schema that directly respond to NPC conversation text, item descriptions, item creation and validation of the player's case solution input. Within a statically designed level and a static minimal narrative setup, a different story can be experienced in each session.Game executable can be downloaded at https://ach1oto.itch.io/ai-noire

Systems

AI game master

Instead of writing a story beforehand and giving the player the same experience each playthrough, this task is handled by a GPT instance. This receives the starting state of the game (a man has been killed, there are a set number of people, rooms and interactable objects in the house where the game takes place, and the player controls a detective trying to solve the murder) and then generates a new story every time the game is relaunched, using the specific state we give it as a baseline. When the player interacts with the game world and the characters within it, some responses are pre-generated only once and others are created at runtime by the AI. The game parses the current game state and player interaction into a GPT-readable format, sends it to the GPT instance through the OpenAI API and then uses the response to change the world according to the AI. The player can use the different interaction methods to gather clues and then try to solve the mystery by sending a solving promt to the AI. This will then respond either positively or negatively, depending on the solve prompt.

Item system

The player interacts with the world like in many other games of the Point and Click genre (Monkey Island, Maniac Mansion etc.). Players can interact with specific objects, pick them up and combine them with other objects. For our game, we added a discover feature, where the AI can choose to add a hidden feature to an item (e.g. a secret compartment in a table). The AI is also capable of creating new objects. These do not have an actual model and are only visible in the game's inventory, but behave just like the other objects.

Room system

Our game is set inside a mansion which only consists of seperate rooms. Rooms are connected to each other by doors which can be interacted with by the player. Only the room with the player insided is loaded while every other room is unloaded dynamically. This fits well with our isometric perspective and allows a lot of items with detailed meshes. It also improves our AI prompting to focus on the current relevant characters next to the player.

Rooms:


Presentation slides


Trailer

ai_noire_trailer_music.mp4