Inspiration
Our main inspiration and Motivations stems from the fact that the majority of our team members grew up having played video games. Especially open world role playing games like Skyrim and Fallout 4 with expansive worlds but not so expansive and flushed out dynamic dialogues with non player characters. We were also influenced by a recent paper 'Generative Agents: Interactive Simulacra of Human Behavior' by a collaborated research group from Stanford and Google Research. This paper introduces generative agents, computational software agents that simulate believable human behavior. The agents engage in various activities, remember experiences, and plan behavior using a large language model. In an interactive sandbox environment, they demonstrate believable individual and social behaviors. The paper emphasizes the importance of observation, planning, and reflection in achieving believable agent behavior and presents patterns for simulating human behavior.
What it does
We wanted to apply these principles and see how this paper can be applied to create a more immersive open world expense in games through
We also wanted to utilize Dall E 2 in our project. Since the user experience with our hack was in the form of text, having a visual component would enhance what our project does. This aspect of the hack generates a randomized character profiles for Non player character Agents. We randomized character aspects from appearance to occupation and even
How we built it
Firstly we attempted to search for a base model that could run inference locally on a device without the need to externalise the compute to a server provider, but also matches the performance quality and reasoning of GPT-3. The Alpaca model by a research group at Stanford suited our hardware restrictions, we further downsized the model parameters to initiate faster execution time. Secondly, we incorporated prompt engineering techniques from a research paper called “Generative Agents: Interactive Simulacra of Human Behavior”, this allowed us to reliability cultivate emergent behaviors between the agents in our game simulation even on a frugal compute. We used HuggingFace api to swiftly place the model in our pytorch environment, using networkx and sentencepiece to further form and and organize the strings generated by model. Each agent is given an embedded identity, character and description through fixed prompts. With these prompts the agents interact in the given locations in the city. The city is predefined, and fed through the model and agents which creates the emergent behaviors in the simulation. The memories formed by the agents are stored in a function that ranks the memories and allows the language model to compress the strings further to reduce compute. This finalises the application allowing it to run on local devices suchas an iPhone or budget laptop.
Challenges we ran into
Such a rigorous project comes with its greatest challenges. One such challenge is having the packages run on cloud. The biggest challenge is getting the model to run. We use mainly microsoft API, and running the project through google cloud. Since we are given the free version, there was less computing capabilities, hence we have to down-size the model so it can run using google cloud.
Accomplishments that we're proud of
We’re proud of taking an ambitious idea from initial thought to working prototype. This is made all the more satisfying given that our prototype is interfacing with advanced generative LLMs.
What we learned
Reading a academic papers and applying them to projects APIs and how to integrate them within our Hacks
What's next for Dynamic Storyteller
Dynamic Storyteller currently is a text-based game. We are going to continue this project as a passion project. We want to add features such as loading and saving, player gameplay, main menu, and setting customization. After adding accessories to make this simulation more of a game, we want to add live animation and we are currently thinking of a 2-D art similar to StarDew valley. Since this simulation is currently down-sized and running through Google colab, we want to find a server that can host a game this big and have the computing power to run each character and the world.
Built With
- dalle
- googlecolab
- openai
- python


Log in or sign up for Devpost to join the conversation.