GPT-3 Orc Simulator

In this article I present Orc Simulator, a deceptively simple game. It’s just you, an Orc, a cave, an amulet and some chicken. Can you get the amulet?

The code is here, with an MIT license. Download it, add your OpenAPI key, and have a go: GitHub - emlynoregan/orc-simulator: This is the Orc Simulator, a simple demo game using GPT-3 and the Data / Narrative model.

Note that you can rack up a decent bill pretty quickly — you have been warned!

[Source]

3 Likes

Really cool idea and read.
I wonder how much will each game session cost on average :grimacing:

1 Like

This is very interesting!

I was thinking of a similar architecture, with a deliberate state tracker and a renderer that converts the state into a prompt.

The state tracker would be something like your strength: 5, orc strength: 7, orc attitude: 0, orc inventory: {sword, amulet} and such.

A renderer would convert the state into something more GPT-3 friendly. So instead of something bland like “The orc has a sword. The orc is strong,” the fight prompt for a difference of 2 would instead be “You attack an orc that is much stronger than you. The orc has a sword while you are only armed with your fists.”

And when it gives the sword, both might strength 6, so it might be “You attack the unarmed orc. Even though you have a sword, his size and strength make it an even fight.”

You can potentially add several rounds of combat with changing strength and tracking injury from the narrative to data engine.

Attitude would be more interesting. If attitude is -1, it might say, “The orc wields a sword but he doesn’t like you.” If the attitude is 5, it might be “The orc wields a sword and trusts you completely.”

1 Like

Hey thanks for posting my article; I didn’t know about this forum.

I’m hoping to develop the data/narrative model further.

1 Like

My Orc simulator is deliberately simplistic, it’s for demonstrating the data/narrative model really. But please feel free to expand on it, it’s open source, free to all.

1 Like

Glad you found us! Would love your thoughts on LitRPG Adventures if you ever have time. I’m building up a lot of content before I take a stab at a game…

Just launched that, but it’s not live GPT-3…

I’ve played with game elements, but I’ve not completed anything… yet!