Snowpine Sandbox

Overview

When generative AI first exploded onto the scene, I had the same thought as everyone else: “Man, this would be incredible for dynamic, immersive NPCs!” There has been a lot of exploration in this space in the relatively short time that the tech has been available, and several startups are chasing this goal from various angles. To me, the possibilities here are really just limitless, and I couldn’t resist the opportunity to see what I could put together here. This is very much still an active project, and I hope to be able to post updates here from time to time.

The overall goal is to create a prototype that demonstrates an advanced AI-driven framework for interactive environments, creating believable, persistent relationships and memories between players and NPCs leveraging large language models. 

This results in a living social ecosystem where characters develop authentic relationships and accumulate meaningful memories, allowing past experiences to organically influence future interactions and relationship evolution. 

To accomplish this, I’ve created a memory system and dynamic relationship networks that persist across sessions, enabling natural interactions where past experiences continuously shape future behaviors and social dynamics. These work alongside a robust personality framework that allows the definition of an NPCs traits, moral alignment, goals, and background. All of these work together to create dynamic social interactions that evolve relationships and a character’s motivations over time.

Heavily influence by the work described in, Generative Agents: Interactive Simulacra of Human Behavior.

Key Features

Intelligent Memory Architecture
  • Characters remember individual interaction histories with different players and NPCs
  • Long-term memory system that summarizes and scores important events using cosine similarity for relevance matching
  • Dynamic retrieval of contextually relevant memories based on current situations
  • Conversation summarization with importance scoring for efficient long-term storage
Dynamic Relationship Networks
  • Multi-layered reputation system where repeated interactions gradually influence long-term relationships
  • Trust and affinity metrics that affect information sharing and response patterns
  • Relationship aging and persistence tracking between all characters
  • Cross-character reputation effects where discussing someone can influence relationships with current conversation partners
Adaptive Social Interactions
  • Multi-participant conversations between any combination of characters
  • NPCs initiate conversations and join discussions based on their relationship histories and personality compatibility
  • Conversation flow influenced by relationship dynamics, personality traits, and shared memories
  • Location-aware interactions that consider environmental context in memory formation
Rich Character Psychology
  • Customizable personality frameworks with traits like morality, order/chaos alignment, and behavioral characteristics
  • Secrecy metrics for memories that characters share selectively based on trust levels
  • Emotional persistence through stubbornness and forgiveness parameters
  • Runtime character editor for adjusting psychological parameters during development
Technical Architecture
  • AWS Lambda backend handling LLM requests with optimized prompt generation
  • MongoDB persistence for memories, relationships, and character psychological profiles
  • User authentication with interaction analytics and usage tracking
  • Advanced embedding calculations for semantic memory matching and retrieval