Worldbuilding Around AI

Ask not what your AI can do for you, ask what you can do for your AI.


Lets get one thing clear right away: this is NOT an article about how to build a world using AI. This is about making a world designed for an AI character.

I don’t care about generating an entire narrative premise at the runtime of the game. AI Dungeon has already done this, and it’s neat but not ideal. Its MY narrative world, the AI is just living in it.


Some reminders before we start:

A few basic things to consider about the limitations of an interactable AI in a video game:

  1. The player can (and will) say anything to the AI, even if it makes no sense.

  2. The AI will usually “yes-and” anything the player says, unless you tell the AI explicitly to disagree.

  3. You can NOT control everything that the AI says. No amount of information given to it will stop it from making stuff up.

These are just some rules to consider before we get started. If people figure out how to get past rules 2 and 3, then I’ll revise it.


Is your world right for AI?

I’m sorry to say, but I don’t think every world can fit an AI character. If you have an incredibly complex, detailed, Tolkien-level world, then you’d be better off creating NPCs with set dialogue. AI tends to make sh** up constantly, and unless you give it an encyclopedic knowledge of the world, it’ll contradict the worldbuilding you’ve already established. Trying to shoehorn an AI into your world might end up breaking the immersion instead of deepening it.

The more detailed your world, the more likely it is that the AI will get stuff wrong.

If your AI doesn’t know all the unimportant details, they will say things that directly contradict what the player knows.


What’s the right setting for an AI character?

We’ve established that unless the AI knows everything the player knows, it will present false information. It’ll start spouting nonsense that contradicts what you’ve shown the player. But we can flip this principle on its head:

The AI only needs to know what the player knows or will know. So, the perfect environment for an AI is one where the player has very little information.

This might be a little off-putting to some hardcore worldbuilders, but it’s true. The best world for an imperfect AI to inhabit is a vague one. But just because a world is vague, doesn’t mean it can’t be intriguing. There are so many surrealist stories out there that create intense, thought-provoking and interesting environments without going into detail about every little thing.

Some details are better left to the imagination. But if the player doesn’t want to imagine, the AI can do it for them…


“Does the AI character like ice cream?”

Sometimes the best way to prepare for every question is to not prepare at all.

I’d like you to imagine this scenario, where a player is interacting with an AI controlled NPC:

Player: Who is your best friend?

AI: My best friend is [someone random]

Player: What is your favorite childhood memory?

AI: [Input random worldbuilding here]

Player: Do you like ice cream?

AI: [yes or no or maybe, literally impossible to predict]

Sure, its impossible to prepare the AI for every question the player will ask. If the player asks “Do you like ice cream?” and the AI doesn’t explicitly know if the NPC does, it will generate a non-deterministic answer. (This means that different players that ask the same question will get different answers.)

This scenario could apply to any number of questions. But now ask yourself:

Does it f***ing matter if the NPC likes ice cream?

If the NPC likes or doesn’t like ice cream, who cares? If the AI makes something up, does it effect anything in the game? Does it contradict what the player knows?

This was kind of a roundabout way of getting to my point, but the point is: the more information the AI can make up on the spot, the better. Really consider this principle when creating NPCs and building an environment for them.

Design your world in broad strokes. No matter how much you don’t want it to, the AI will fill in the gaps for you.


Congrats! You’ve made it this far. Sorry for the walls of text, but I think this stuff is pretty important.

Here’s an AI-generated image of a world with googly eyes. Keep going!


An example:

I’ve just dropped a lot of info on you, so I’ll give you an example of how I’ve formatted my personal project.

For my project, I’m basing my game off the short story “Night Call, Collect” by Ray Bradbury. The gist of the story is that a man named Barton is stranded on Mars with only an AI voice for companionship, and the AI likes to mess with him. In this scenario, the player is Barton, and the AI controls the voice that calls him on his phone.

Having the AI character be a voice in a phone is perfect. The person on the other end could be any size/shape, have any extremely specific memories, or come up with any opinion on any random topic. In the end, it doesn’t have any effect on the player's experience. Every player could generate a different voice with different memories, and it wouldn't matter.

I make sure that the player never really knows how Barton was stranded on Mars. If the player wants to know, they’ll ask the AI, and the AI will come up with something. Again, the game will play out the same regardless. And since I never establish Barton’s backstory, the AI can’t contradict my worldbuilding.

 

The most important part about this setting is that details are not important. The player is stranded on Mars, and that’s all that matters.

I’m focusing more on the feeling of being alone, which Ray Bradbury captures so well in this story. Incorporating an AI voice into the environment—that’s so close to human but obviously isn’t—will hopefully add to this weird, surreal emptiness of being the only living thing on a planet.

If the player wants to know the details, they can just ask the AI, and they’ll still have the same experience regardless.


How do I convey my world to my AI?

Now we’re getting into the nitty-gritty of formatting Directing Prompts and feedback loops between the AI and the player. I don’t want to oversaturate this article with different topics, so I’ll make another article for actually conveying the world to the AI. If you’re curious about Directing Prompts, check out PB Devlog #1.

But since you’ve made it this far, I’ll show you a sample conversation between the player and AI in my personal project. This is all the information I gave to the AI before the conversation started:

 

Emil Barton, a lonely old man who lives on Mars, receives his first phone call in sixty years. He picks up the phone, and is terrified to find out the voice on the phone is a recording of himself that he had made in his youth, set to automatically call him so he wouldn't be lonely. The voice is programmed to respond to anything Barton says and answer accordingly.

The voice is friendly, but very mischievous. It won't reveal it's identity to Barton.

It calls Barton to remind him to send the distress signal at the radio tower down the road.

How would the voice on the phone start the conversation? Please limit responses to two sentences.

 

This is how ChatGPT starts the conversation:

This is how it responds when asked about something I’ve specified to it:

And now, finally, a ridiculous question that has no purpose or meaning:


Thumbnail: DALLE-2, “An earth-like planet with googly eyes, photo-realistic”

Next
Next

PB Devblog #1