Introducing L.E.A.F.

LEAF (Learning Entities and Adaptive Framework) is a research-driven game prototype exploring how artificial intelligence (AI) can support dynamic, personalized companion characters within interactive media. Rather than relying on fully scripted paths, the AI companion both responds to structured input and also invisibly tracks the player’s patterns of behavior, making its own decisions and responses in real-time based on a set of pre-determined moral values and personality traits. This system aims to create interactions that feel alive, personal, and reactive - breaking free from traditional branching dialogue trees, as well as to understand whether this kind of interaction can support meaningful immersion and dynamic storytelling in games.

The goal of the project is to create a working prototype that demonstrates the potential of generative AI in building emotionally rich, reactive game characters. This includes designing and implementing a companion system powered by GPT-4, where player interactions influence the AI’s behavior both directly and indirectly. The companion system will track player choices invisibly, adjust the AI’s current and future decisions based on moral alignment and personal values, and simulate the growth - or breakdown - of trust between the companion and the player. The project also aims to create an event-based narrative structure that tests the strength of player-companion relationship across various interaction types.

The game will be a turn-based role-playing game with a 2D side-scrolling perspective and set within a forest environment. The player will select one of several pre-defined AI companion personas, each with their own unique traits, values, and quirks. As the player and companion travel together, they will encounter randomized events such as combat, dialogue exchanges, memory challenges, loyalty tests, and NPC interactions. The AI companion adapts over time, not only responding to explicit choices but also altering behavior based on the player’s interaction patterns. These adaptations can result in strengthened trust, emotional distancing, rebellion, or even abandonment.

The project uses an autoethnographic research methodology, allowing me to engage with the game directly, documenting and analyzing my own experiences while also iterating upon the design. On the technical side, GPT-4 is used as a generative backbone of the companion’s voice and decision-making system. A custom middleware layer will be designed to interpret player actions and translate them into structured prompts, allowing the AI to react to gameplay with more than just dialogue.

The final deliverable will be a playable research prototype that demonstrates real-time interaction between player and AI companions. The game will showcase AI-generated dialogue, decision-making affected by tracked behavior, and a progression system rooted in player-agency and consequence. The companion will evolve across a randomized series of forest encounters, offering insight into how AI-driven personalities can feel responsive and alive. While the prototype is small in scope, it is designed as a proof of concept for narratively meaningful AI companions in interactive media.

Previous
Previous

Integrating GPT-4 into Unity