In Search of Test Cases

Short essay question:

Suppose someone handed you a brand shiny new library for implementing conversation in IF. What kind of thing would you want to use it for? What options do you want to make sure have been accounted for? [more inside]

I’m not (primarily) looking for suggestions about interface (i.e., whether we use ASK/TELL or menus or TADS-3-style suggestions). I’m assuming that people will want to have available most of the existing common styles of conversation interface. I’m also trying to design so that alternative interfaces could be added by secondary extensions; this gets me off the hook of having to write all possible variations into my own code.

I’m also not (primarily) looking for really esoteric, one-game-only sorts of gimmicks, or complex AI scenarios where you’d be adding a conversation-goal-seeking engine to the back end of the library in order to dictate how NPCs decide what to say next. That’s interesting stuff, and I want to provide enough hooks that such things could in theory be grafted on, but it’s not the main point of investigation here.

What I’m primarily looking for are ideas short and universal enough that they’d make good test-suite material, and that focus on the quip-management level of the conversation model. Like:

  • A scenario in which the player is not allowed to leave until the NPC has finished telling several turns’ worth of information.
  • A scenario in which the NPC asks a question and the player is constrained to answer it before changing the subject.
  • A scenario in which no matter what the player says, the NPC ignores it until some pre-condition is fulfilled.



18 thoughts on “In Search of Test Cases”

  1. An NPC with two or three emotional states that you can alter through conversation.

    Two NPCs having a conversation that you can interrupt, and when you leave they go back to it.

    A conversation that you cannot leave until you reach the end.

  2. I dunno; all the ideas so far seem like either one-game-only sorts of gimmicks, or something accomplishable in two lines of code. I would also worry that putting in ‘can’t leave until X’ modules would make users think this was standard and they should do it, and while I can imagine a few cases where it might be good, it seems like normally it’d just be bad design.

  3. Some of these are two-lines-of-code ideas — I don’t need a special module to implement the player-can’t-leave idea.

    But I do need to test the more complicated surrounding machinery to make sure that nothing else going on will screw up the simple implementation, and the author always has access to the relevant state information about the conversation engine (e.g.: is it obvious to the author how the following line of code should end?)

    Instead of going somewhere when…

    So yeah, I’m not quite asking for feature suggestions — though if people have those, that’s fine. At the moment I’m mostly trying to make sure that the existing tool can be used for the assortment of relatively obvious things we might want it to do. An early test, which I didn’t mention here because I’ve already written it, was a short scenario set in the first person past tense; this immediately showed up all the places where the output handling needed to become more flexible.

  4. Big conversations. Meaning, conversation involving multiple people at once. I’ve done a re-implementation of Conversation Framework using a I7 group relation (treating the current interlocutor as the person you’re facing when you speak), but I’m avoiding the generalized problem of which-NPC-responds-first with parlor tricks.

    However, the thing I’m doing isn’t intended to be very reusable.

  5. The following may be more complex or specific than what you’re looking for here (especially the second one), but I’m going to go ahead and suggest them because I find them kind of fun to think about:

    How about a scenario in which an NPC’s willingness to repeat information on a given topic varies according to how recently, and how often, the PC has asked for it?

    For example, I ask the Christmas Tree Monster about Ms. Dunbar. It tells me what it has to say about her in one turn. If I ask again immediately, the CTM paraphrases what it just said, assuming that I didn’t quite understand it the first time. If I ask it a third time too soon, the CTM becomes impatient and refuses to cooperate, but if I go off and do something else for a good long while and then come back and ask the CTM about Dunbar again, it chides me gently for my poor memory, but repeats the information anyway.

    Or how about a scenario in which the player talks to an NPC, then goes away, puts on a disguise, and comes back to have a new conversation with the same NPC? The game’s model of what the PC knows about the NPC includes information from the first conversation, but the NPC thinks the disguised PC is a different person. But if the disguised PC mentions a secret that the NPC revealed in the first conversation, the NPC realizes who the PC is, and all the information from the first conversation suddenly becomes relevant to the NPC’s behaviour in the new conversation.

  6. Oh, I think I get it–not ‘can we use the library to do these things’, but ‘can we still do these things while using the library’? That makes more sense.

    In that case, here’s some ideas that are pretty definitely gimmicky, but which I would expect to be able to code up while still using the library:

    * Using regular expressions to parse user dialog.
    * Dialog with someone who’s not in the room.
    * Dialog with someone who’s mute (say, an animal who understands you).
    * A conversation that can either happen in the same room as you, or over a garbled cell phone.
    * A conversation with someone, any of which can happen both before and after learning their language.
    * Implementing a tape recorder to record a conversation. (sub-points: that plays things back all garbled / which you listen to after learning the language being spoken)
    * A conversation you can have as different PCs

  7. Agenda-based conversations, where the NPC wants to tell you something and will go out of his or her way to do so. (Say, Deadline, but the PC is Duffy, and so the Inspector goes and discovers things and wants to tell you about them.)

  8. I second Ron’s idea of a conversation involving multiple people, even if it’s just a fixed group where no one can enter or leave (as in a salon or prison cell or some such).

    Sort of in keeping with that, I would love a conversation system that had the ability to designate something the “topic at hand.” One problem I’ve had with conversation in I7 is that it’s difficult to design a system where the subject can be a person or object in the room as well as something more abstract.

    A way to simulate very basic emotional relationships, perhaps in an example where certain topics are off limits until you’ve reached a level of intimacy with your interlocutor.

  9. One problem I’ve had with conversation in I7 is that it’s difficult to design a system where the subject can be a person or object in the room as well as something more abstract.

    I hit this problem a lot, too. I had to keep making two versions of many verbs, one for Topics and one for Objects. I finally got rid of Topics altogether and just declared a new kind-of-object called Concept and used it instead. Simplified the code greatly!

  10. I hit this problem a lot, too. I had to keep making two versions of many verbs, one for Topics and one for Objects. I finally got rid of Topics altogether and just declared a new kind-of-object called Concept and used it instead. Simplified the code greatly!

    Yeah, that level of thing is already worked into the system.

  11. How about handling disambiguation during conversation:

    >ask fred about rock
    Fred doesn’t seem to know which rock you mean, the blue rock or the red rock.


    >ask fred about rock
    Fred looks perplexed. “Now would that be the blue rock or the red rock?”

  12. @ David’s example

    I think that (for a general extension) it would be better to keep parser messages out of the fiction. Thus, let the parser ask what the player means, but don’t let Fred ask so and don’t let him look puzzled either. Fred may not be the kind of person who ever looks puzzled, or who ever asks you to clarify yourself.

  13. @ Victor’s response to my example …

    Nevertheless, it’s something a potential author may want to do; an extension is therefore the best place for it. Authors can then decide whether to use it or not. (It was actually inspired by an old RAIF thread).

    Sometimes you come across as being a little “prescriptive”, Victor!

  14. I just realised that was a bit ambiguous; what I meant was, this is something that the extension could allow — not as default, but as an option. I was not suggesting that every NPC should look perplexed when you ask them an ambiguous question …

  15. I don’t think we disagree, then, David. All I wanted to say was that parser messages are more neutral, so they should be default, or at least included, in a general purpose extension.

    And, you know, sometimes I want to come across as a bit prescriptive–but on closer inspection, you’ll find my judgments to be quite sensitive to context. ;) (Except when it comes to morality, where I don’t even think that judgment is an appropriate mode.)

  16. Thanks, everybody, for the ideas, which I am crunching through. Most of the test cases I’ve written so far probably aren’t that interesting to play in their own right, but I did write one of them as a submission to Up Right Down, which puts together multiple versions of the same story.

    The tiny and highly un-game-like Fugue is an URD tale rendered using the conversation library to handle multiple characters; they can be addressed individually but can also continue contributing to the conversation after the player has turned to someone else.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: