A geek’s-eye view of chatbots and interactive fiction for the macrophile crowd, specifically examining AIML and Inform 7 and touching on some newer tools.

Interactive Macrophilia

Arilin Thorferra

Do you remember the Choose Your Own Adventure books? They’d start with a scene introducing characters and a premise, take them to a point where the main character had to make a decision, and then present the reader with a choice: “If Bob follows Shirley, turn to page 63. If he throws his pet rock at her, turn to page 128.”

In its most basic sense, this is interactive fiction, a story the reader participates in. Writing.com has its own implementation of them, and the macrophile and vorarephile communities have adopted that site for their own nefarious purposes. (Most of what’s on Writing.com is, candidly, pretty terrible, but that’s a different topic.) But the name “interactive fiction” (or just “IF”) was invented for a different kind of storytelling, one that started with the game Zork: The Great Underground Empire and other text adventures.

If you’ve never played IF, there are many places out there where you can get fine introductions; they’re similar to a CYOA story, but far more flexible. Instead of choosing from a list, the player gives simple commands, like go east or examine the chest or unlock the wooden door with the copper key. (In most IF, those could have been abbreviated to e, x chest and unlock door with key.) If you meet a character in a game, you can interact with commands like greet Thanos or ask Thanos about food or Thanos, kiss me.

What brought my attention back around to this was something I bet many of you, particularly the vorarephiles, already knew about, the Thanos Chatbot. (If you’ve met her, you got suspicious at those example commands above, huh?) Thanos is offline now, but she wasn’t just any chatbot; she was designed to mimic the style of roleplay people tend to use on IRC or IM, with both participants describing their actions, not just chatting. In character, she was a really cute wolf girl wearing nothing but a pentacle necklace. She thought you were cute, too, by which she meant “tasty-looking.” Behind the wolf lurked an Alicebot, the engine from a famous chatbot named ALICE.

Here’s a brief interaction with Thanos:

Me: Hello, Thanos. My name is Arilin.
Thanos: Hello there! I’m pleased to introduce myself to you, Arilin.
Me: You’re very pretty.
Thanos: Thanks you are very attractive too Arilin.
Me: How tall are you?
Thanos: About 6 feet tall.
Me: Can you grow?
Thanos: Afraid not, sweetie. But I can shrink YOU so that I appear much larger to you. Will that do?
Me: Yes.
Thanos: Definitely.
Me: Shrink me.
Thanos: Grins and turns around, thwapping you with her tail. Within moments you feel a vertigo sensation with a clutching at your gut. The sensation envolopes you and gradually makes the world around you increase greatly in stature. The wolf becomes what seems like a large statue, followed by a tree, finally like the size of a building. You’re merely at her hindpaws now, easy enough to cover you in one fell step if she so desired. Was it so smart to ask that of her? You are now fully at the mercy of a she wolf.
Me: I kiss you.
Thanos: Presses her lips gently to your’s and kisses back, murring softly.

Okay, Thanos needed a copy editor. But she was undeniably impressive. Being derived partially from ALICE’s knowledge base, she knew hundreds of topics and had thousands of responses. What’s more, since she was designed for roleplay, she knew a wide range of direct commands—in a dozen sessions I doubt I scratched the surface.

Yet you might notice that her response to my kissing her was odd. Since she’d just shrunk me, I should have been kissing her toe! And when I said “yes” to her question about shrinking me, she could have just gone ahead and done it without waiting for a command. (As I regularly remind people, the giantess is always the one in charge.) You might accuse Thanos of poor programming here—but don’t. The truth is more complex.

Chatbots work by pattern matching. To understand my greeting, Thanos had a “predicate” defined—a pattern to look for and responses to that pattern. It looks something like this:

    <pattern>MY NAME IS *</pattern>
        <think><set name="name"><star/></set></think>
            <li>Nice to meet you,</li>
            <li>I'm pleased to introduce myself to you,</li>
        <get name="name"/>

This is AIML, “AI Markup Language”; the similarity to “raw” HTML is no coincidence, as AIML is in the family tree. The predicate above matches “MY NAME IS (phrase),” stores the phrase (represented by “*”) as your name, picks a random response from a list, and puts the name after the response.

While Thanos knew my name, she didn’t know that she’s shrunk me. A computer-controlled character is governed by “state machines,” a way to model behavior with a set of states (remembered information) and rules governing them—for instance, “If you are 6′ tall and Thanos shrinks you, you are now 6″ tall.” Thanos has a response for “shrink me,” but she has no state machine for the action.

Storing my name is a simple state machine, and AIML can do that one better. When Thanos shrinks you, the predicate could contain <set name="player-size">tiny</set>; then Thanos could have one predicate that matches “I kiss you” and “player-size=tiny” and another when your size is normal. Problem solved!

But what about every other action size affects? AIML has no way to generalize. For every single response in which size matters, Thanos’ programmer would need to tailor the response. As you can imagine, that would get quickly out of hand.

This is a “domain problem”: chatbots are designed to chat, not to roleplay. AIML can mimic conversation threads by letting predicates match on the bot’s own last response as well as what else we’ve seen. But a chatbot is prepared for you to change the subject at any time—all the predicates are always active. Imagine you’re on page 83 of a Choose Your Own Adventure. Your options are to turn to page 32, 46, or 125. But if you’re using a chatbot and you type something that’s a better match to what’s on page 42, zip! Off you go, whether or not it makes a lick of sense.

If you played with Thanos you’d likely run into this issue quickly. If you tried to do a specific kind of scene with her she might have known all the appropriate responses, but not the order they went in. It was very easy to get her to eat you and then make out with you. Technically, it’s possible to solve this problem in AIML, but it would be exceedingly difficult.

But is it easier using, say, Inform, a popular language for interactive fiction? At first glance one would say not: you can’t talk to an IF NPC in freeform text. Most games restrict you to the kinds of commands I mentioned above (“ask Thanos about teeth”). This doesn’t sound like a great way to have a conversation—but that’s not actually the question. The question is whether it’s a good way to roleplay, a distinctly different matter.

Unlike AIML, Inform has the concept of a world populated with people and things, all of whom have different properties. Its set of rules—the equivalent of AIML’s predicates—define not just the text of the game’s responses to you, but how the world works: what it means for something to be a container, or to be a door, or to be dark, or to be lockable. This means that a whole lot of the issues involved in complex state machines are handled for you. Like AIML, you can teach Inform new rules; unlike AIML, those rules can be generalizations. Let’s teach Inform a little about us:

Scale is a kind of value. The scales are micro, normal, and macro.
 Everything has a scale. The scale of a thing is usually normal.

Definition: a thing is oversized if its scale is greater than the scale
 of the person asked.

Instead of an actor taking, pulling, pushing, or opening an oversized
 thing (called bigthing):
    say "[The bigthing] is too big to handle."

(Yes, that’s really valid Inform code.) This changes Inform’s world model: now Inform knows everything’s scale (roughly), and Inform understands “oversized” as meaning an object bigger than the person trying to use it (“the person asked”). We can also teach it new actions and commands. How about:

Growing is an action applying to nothing. Understand "grow" as growing.

Check an actor growing:
    if the scale of the person asked is macro, say "[The person asked]
     can't get any larger."

Carry out an actor growing:
    change the scale of the person asked to the scale after the scale of
     the person asked;
    say "Presto!"

We could write “shrink” in the same way. (By “applying to nothing,” I’m telling Inform “grow” is an action that doesn’t take a direct object like “take ball” does.) Now give ourselves a room to test in:

Great Hall is a room. "This is the testing room. Nothing special."

A medicine ball, a figurine, and a box are here. The scale of the ball
 is macro. The scale of the figurine is micro.

If we ran that, we’d have a working game. The output might be something like this:

Great Hall
This is the testing room. Nothing special.

You can see a medicine ball, a figurine, and a box here.

> get box

> get ball
The medicine ball is too big to handle.

> grow

> get ball

Finally, let’s add our own wolf girl:

Cutewolf is a woman in the Great Hall. The description of Cutewolf is
 "She's a cute wolf girl, and she's [the scale of Cutewolf]-sized."

Persuasion rule for asking Cutewolf to try doing something: persuasion

If we type “Cutewolf, get ball” she won’t be able to pick it up, either, but if we type “Cutewolf, grow” first, then she will. While we’re at it:

Before asking Cutewolf to try eating the player:
    if the scale of Cutewolf is greater than the scale of the player:
        say "Cutewolf shrugs. 'Okay.' She picks you up, closes her jaws
         around your little (to her) body, tilts her head back, and
         swallows. You hear a pleased 'Mmm. Players are pretty tasty'
         fading above, then hear a titanic heartbeat in darkness. Then you
         splash into her stomach and dissolve. Oh, bother.";
        end the game in death.

If you type “Cutewolf, eat me” when she’s normal-sized the game will reply, “Cutewolf is unable to do that.” Type “Cutewolf, grow” and try again, though, and darned if she has no problem this time.

Granted, right now Cutewolf is hardly Miss Personality. She has only one line (when she eats you). We can say “Cutewolf, pick up the box” or “Cutewolf, eat me!” but we can’t “ask Cutewolf about teeth” or “tell Cutewolf about fantasies”—and the kind of conversation AIML lets us model, where we could be saying, “Cutewolf, you have the most beautiful eyes” instead of a dry “flirt with Cutewolf,” is all but impossible.

But how much of a limitation is that? It doesn’t take much work to turn the scene above into something like this:

Great Hall
This huge room, fully four stories high, befits a museum. But there’s not much in here yet other than the bare floors.

You can see a giant medicine ball, a figurine, a box, and Cutewolf here.

Cutewolf is pushing at the medicine ball to no avail.

> look at cutewolf
You don’t know what her real name is, but everyone just calls her Cutewolf. She is awfully cute, to be sure, about twenty years old, deep blue eyes and the figure of a high school cheerleader.

> ask about ball
“What are you trying to do?” you ask the wolf. “It’s bigger than you are.”

“Just move it to the side of the room,” she replies. “It’s in the way. If only I was bigger…”

> cutewolf, grow
She tilts her head to the side and looks at you. “Hey, it’s not like I can just snap my fingers”—she snaps her fingers—“and…” Her eyes widen as her clothes tighten, then burst, shredding as she gets larger. In very short order you’re no longer eye to eye with her, but eye to chest, then eye to hip, then eye to knee. She stops growing just before her ears brush the ceiling. She looks down at you, still wide-eyed. “Well, what do you know, I can just snap my fingers and become a giantess.”

You can’t help but stare. You’ve always wondered what she looked like unclothed, but this isn’t the way you imagined you’d find out.

> ask about ball
“I… guess you won’t have a problem with the ball now,” you say.

Cutewolf smirks and kicks the ball, and it rockets toward the side of the room. “Nope,” she agrees. It hits the wall—and smashes right through and out into the street. You hear a metallic crunch and car horns. “Oops,” she says, looking sheepish… but maybe not quite as concerned about her newfound ability to casually cause massive damage as one might wish.

> cutewolf, shrink
She looks down. It’s uncomfortably like having the full attention of a skyscraper. “Hmm. Let me think about that,” she rumbles, putting a hand on her hip and striking a mock thoughtful pose. Then she leans over, bending deeply at the waist, bringing her huge teeth to within mere inches of you. “No.”

The commands the IF engine gives you are good enough to direct conversational flow. You can’t talk about topics outside the IF world’s scope—but assuming the world itself is holding your interest, most of the time you won’t miss it. (IF authors need to review transcripts to make the game respond better to what players do try, but the same is true for chatbot authors.)

I’ve had a few ideas for IF games and, yes, one of them is the kind of game that would make macrophiles and vorarephiles happy. (Well, some of them. The macros who can’t stand vore, not so much; the vores who spend most of their time wailing you’re doing it all wrong dammit, even less so.) It’s the one I’m most likely to finish of the concepts I have, but at the moment there’s little more than an idea testbed.

Mostly, though, I’d like to get people thinking about interactive fiction. I’ve seen posts from Dekadens, Thanos’ creator, urging people to create their own chatbots. Why not? Likewise, I encourage people to play around with Inform (or one of a few other interactive fiction systems out there, like TADS). I’m surprised how few furries—let alone macrophiles—have ever considered it. C’mon, you’re all sitting in front of computers! You’re nerds! I mean that as a compliment.

If you have any ideas about furry/macro IF (or chatbots), I’d be interested in hearing from you.

Postscript (November 2016)

Several people mentioned ADRIFT, another interactive fiction system that’s enjoyed a fair amount of success over the years. ADRIFT has no programming language. Instead, you use GUI dialogs to build a game out of rooms, objects, characters, events and tasks. This makes it much easier to write games in. It has a few drawbacks compared to Inform and TADS; the game editor only runs on Windows, for instance, and it has a reputation for being a bit less powerful than the other major systems. It’s worth noting that ADRIFT’s author found this very article (back on macrophile.com), and commented that he thinks the sample game above with Cutewolf would be possible in his system, though!

Also, I’ve seen a couple interesting game systems built around the “Choose Your Own Adventure” concept. A clever system called Twine has all but taken over the indie text adventure game scene, and I’ve played around with writing my own game. (Actually, I’ve tried twice. One day…) In addition, there’s Ren’Py, a “visual novel engine” that’s been used for some commercial indie games. It’s built for stories with illustrations, animation, and sounds; Twine and Inform 7 have more limited support for multimedia.

When I wrote this article, Thanos was still up. She bounced up and down for various reasons afterward. As far as I can determine, she went offline permanently in 2013, when PandoraBots—the “AliceBot” hosting service—decided to go after the corporate chatbot market and prohibited existing adults-only bots. While there are other ways to host AIML-based bots, it’s unclear to me whether Thanos’ creator, Dekadens, still has a copy of the bot’s source data.

Further Postscript (January 2024)

No, this doesn’t get into the possibility of generative text systems trained on large language models, like AI Dungeon, which have obvious potential for interactive roleplaying. There’s a lot of both practical and ethical questions around them, which you can find virtually anywhere else on the internet at this point. I may dig into these more deeply someday, but that will be a different article.