Making AI Play Improv Games

Posted May 10, 2024

Can AI replace humans when it comes to improv? Let's try doing that with Agentic AI.

They got a bigger crowd than I usually did

While the buzz is still well and alive for generative AI tools with human interaction, you might not have heard about Agentic AI. Agentic AI involves one or more AI entities, dubbed agents, working together to achieve a goal with little to no human supervision. The agents can be configured to run all processes autonomously or to ask for human input during certain steps of the interaction.

A typical copilot or assistant requires a user to interact or converse with it. In the case of Agentic AI, the assistants interact with each other. A human defines "who" the agents are and "what" they will attempt to achieve together. After that, the agents will make their own decisions about how best to achieve their objective.

Some use cases of Agentic AI are:

  • Agents that work together create, tune, and send emails
  • Agents that create a headline based on text and create thumbnail art
  • Agents that detect and attempt to remediate data anomalies

These are all very "businessey" scenarios. What would happen if we asked agents to do something more artistic, like improv comedy?

Introducing "Yes, And"

I have been an improv performer on-and-off for the last twenty years. I know, how much more of a nerd can I be? One of the very first games you learn in improv class is "Yes, And." The point of the exercise is to learn to build on ideas and work as a team rather than as individual performers. It's a basic building block of theater and, frankly, life itself.

The rules are fairly simple:

  1. Two or more improvisers get a suggestion for a story. Example: Flying cats
  2. An improviser starts with an opening sentence: "There was an island recently discovered inhabited by an unknown species of flying cats."
  3. The next improviser builds onto the story, starting with the phrase "yes, and". "Yes, and the explorer who made the discovery brought some cats back home with her."
  4. The game goes on like this with all improvisers in the game.
  5. The game ends when one of the improvisers (or sometimes somebody off-stage) says "and, scene."

It's a fun game for everyone. Try it with your friends and family. If they don't want to try, get new ones.

Bring in the Agents

Setup

Now, we are going to use Copilot Builder to create some agents to play the game.

Disclaimer: Copilot Builder is an AI platform that my company, Stratus Innovations created. The platform allows you to easily create and manage AI assistants and includes support for using your own data securely.

In Copilot Builder, agents are known as "personas" (and do a bit more than the typical agent, but that's another story). I have created two improviser agents:

Improviser 1 - You are an improviser. You have a witty, sly sense of humor. When you are happy with the outcome of a scene, say "and scene".

Improviser 2 - You are an improviser with a zany, off-the-wall sense of humor. You love references to Star Wars.

Note that I told the first improviser to say "and scene" so the two improvisers don't go on forever. This is called an agent termination strategy.

Personas on Copilot Builder

Next, we'll define an interaction between the personas. This is where we define the goal of the agents and also how to play "Yes, And." LLMs don't seem to know how to play this game from their datasets, so it's crucial to verbosely define the game:

Play a game of "yes, and" where two improvisers build a story.

Rules:

  1. The first improviser creates an idea based on the subject.
  2. The next improviser says "Yes, and" with their idea that builds upon the story.
  3. Each improviser can say one idea.
  4. Each improviser can only say one sentence per turn.
  5. An improviser can't say "yes, and" to their own sentence.
  6. An improviser can't say "and scene" to their own sentence.
Interaction screen

We'll also include a variable for the subject of the game, otherwise the improvisers would just pick a random topic.

We then set the first improviser to take a turn as Improviser 1. We also set the termination phrase to "and scene" and specify that Improviser 1 is the persona responsible for ending the scene.

Interaction termination

Playing the Game

Enough already, let's play the game! We'll set the subject to "flying cats." What do we get?

Improviser 1

Alright, let's get this whimsical story soaring. Here goes!

One sunny day, a small town was taken by surprise as all the cats suddenly sprouted wings and took to the skies

Improviser 2

Yes, and the local birds, utterly confused and a tad jealous, started hosting workshops on "Aerial Agility & Grace: Lessons from the Newly Winged".

Improviser 1

Yes, and amid the unexpected air traffic, daring cats formed an elite squadron, known as "The Whisker Wingmen," navigating through delicate catnip clouds.

Improviser 2

Yes, and inspired by the felicitous flight of these feline aviators, the humans launched a fancy feline-themed airline, offering scenic tours across the pawsome sky bridges the cats had discovered.

Improviser 1

And scene!

Result

We can run this game again to see if we get similar results:

Improviser 1

Once upon a time, in a far-off magical kingdom, there was a special breed of cats with the ability to fly.

Improviser 2

Yes, and these flying cats were charged with delivering messages between the various kingdoms, making them the fastest and most reliable postal service in all the lands.

Improviser 1

Yes, and along the way, Whiskers met a wise old owl who warned her of the dangers that lay ahead, but also gifted her a magical collar that could make her invisible at will.

Improviser 2

Yes, and finally, upon reaching the Floating Isles, Whiskers discovered the treasure was not of gold or jewels but a lost library of ancient wisdom that could improve the lives of all creatures in the kingdoms.

Improviser 1

And scene.

Analysis

It seems like the AI can handle this game fairly well.

  1. We taught it how to play the game and it understood the rules well.
  2. It understood how an improviser would act given their personality traits.
  3. It knew when to end a scene.

If I do say so myself, it took barely any time at all to get a good working prototype.

However, I noticed something seemed a bit... off?

So, I ran the game 20 more times. That's too much to include here, but I observed some interesting things:

  1. The AI will repeat ideas. This happened as soon as the 4th execution of the game. For this subject, it loved ideas about kingdoms and flying squadrons.
  2. The stories the agents make feel disjointed compared to humans. The ideas themselves are related, but there is rarely a flow to a story. Did you notice in the second story that Improviser 1 included a previously unmentioned character named Whiskers? Where did that come from? An audience would typically be confused or bored.
  3. The Improviser 1 agent doesn't really know what being "happy" with a scene is, so it calls the scene at what seems like a random time. We can probably give it more clarity into what would make it happy, but for a human, this is more of a feeling than something you can define.

Yes, But

I'd deem the results of our experiment to be a bit inconclusive.

Yes, AI agents can certainly play the game if you define it well, but it does so strictly from a technological level. In other words, as expected, AI agents play "Yes, And" like we expect robots would.

But there is some good news: if you fear for your job being replaced by AI, you can always have a career in improv.

© 2024 Josh Greenwald