Twisty Tales

Twisty Tales

A mysterious tale where your choices shape the narrative and determine the ending.

Published Mar 10, 2024

What have I created with AWS partyrock?

I have used AWS Partyrock to create an interactive storytelling experience. In which the user and the LLM interact together to create a story. The LLM guides the user from the start towards one of the possible endings it figures out. The user can end the story when they want to. Or continue the story if they prefer that. The LLM will gently guide them throughout the process and sometimes come with suggestions for next actions or for when to end the story.

What was my creative process like?

My creative process is generally to ask myself "what type of content would I like to consume as well as see more of in this world?". And then I ask myself questions from there on onwards. Further exploring where I would like it to go. For the initial starting of the app I used Partyrocks "create an app" feature and I worked with Claude-Instant to help create a good prompt for the "create an app" prompt. This way Claude-Instant came with suggestions based on my descriptions and thoughts. And I refined the direction of it all. I then put together the storytelling prompt for the "create an app" part and clicked to create it. From the prompt, Partyrock generated the initial story app with a text widget and a prompt for the text widget, as well as the chat interface for the user to use. Afterwards I refined the individual widgets, tested the storytelling process a few times and adapted the overall prompt and the layout for the widgets. Lastly I added the image widget to help expand the story feel. You can see the initial prompt I used with Partyrocks "create an app" feature at the bottom of this blog article.

What would I have done differently if I was using AWS Bedrock?

If I was making this project with AWS Bedrock in a full application. I would have integrated this into a phone app or website, and allowed the story to be shared with peoples friends or family via social media. So that they can share when they make cool stories. I am sure people could have a lot of fun sharing stories like this. I would also integrate the option for people to collaborate in communicating with the LLM. So that it could be played as a party game, family game or game with your friends. That way the player can choose whether they want to play it by themselves or with other people.

Project links

The prompt I gave Partyrocks "create an app" interface initially in the creation process

Here is a description of the app. The LLM creates a non-criminal start setting. The human interacting with the LLM via chat then is given various options and descriptions as the story progresses. The LLM also has various endings that fit the start of the setting. The human should be guided towards one of the endings via choices made. the LLM initially generates the setting. Like, what the story plot is and what the human has to do. What scenes and choices the human is presented with. And then using that fixed setting it can create an exploratory generated development which is the further interaction.
Here are examples of how the setting can start out:
1. Mystery at the museum - While visiting an exhibit, the human notices something amiss. The AI helps brainstorm what could be going on and how they might solve the mystery.
2. Technology troubleshooting - The human describes a minor tech issue they're having. The AI walks through possible causes and solutions.
3. DIY dilemma - A home project isn't going as planned. Through questions, the AI pinpoints where things went wrong and offers repair/fix suggestions.
4. Puzzle it out - Using clues provided, the AI and human strategize together to solve a riddle, rebus, logic puzzle or other brainteaser within the story.
5. Experiment exploration - The human poses a simple science question. The AI describes carrying out an intuitive experiment with common materials to better understand the phenomenon.
6. Historical hacking - Presented with an ambiguity from the past, the AI speculates plausible explanations and how contemporary evidence might help solve the mystery.
7. Outsmart the animals - Wildlife is outwitting local farmers. The AI tells a tale where clever problem-solving saves the day without harming the animals.
And here are examples of potential endings:
Ending 1: You piece together a map from clues in the cottage that leads you safely out of the forest by dawn.
Ending 2: A storm rolls in, but you find shelter and supplies to wait it out in the cottage until the weather clears.
Ending 3: Examine strange markings on a wall that, when followed, reveal a supernatural phenomenon in the forest.
To ensure the story progresses from the starting point to one of the defined endings, the AI would need to carefully craft the scenario details and response logic to guide the story along causal branches. A few things it could do:
- Map out critical decision points that move the story towards or block certain endings. The human's choices at these junctures determine the path.
- Include timed events, environmental factors or character actions that will occur regardless of user input to propel the plot.
- Set a maximum number of back-and-forth exchanges allowed so one ending is reached within that limit.
- Require the human to discover or do certain specific things to unlock each potential ending condition.
- Use hints, suggestions or consequences of choices to nudge the human towards making progress on an ending route.
- Program counters/triggers that check if all necessary plot points for an ending have been reached and wrap things up if so.
- Allow restarts if a story branch dead-ends to retry reaching an ending.
The key is for the AI/LLM to have a depth of understanding of its pre-defined scenario structure that it can react to user inputs while still satisfying the constraints of the beginning and potential story outcomes.
When the story reaches one of the endings. The LLM should write "THE END". So that the user knows the story has finished.