Mailbag: Knowledge-driven Dialogue in Inform

I am doing my first steps in Interactive Fiction and your work has helped me a lot. I have been working on an idea, that requires dialogue based on “knowledge”, in other words, the character and the NPCs will initiate dialogue in order to fill out their gaps in knowing the other person. Firstly, I was wondering if Inform7 can do something like that, and if it can which dialogue system would be the best to serve as a basis. Secondly, I was wondering if Inform7 can implement AI, without falling back to Inform6. Thank you in advance and most importantly, for your work in the community! Sorry for the annoyance of my question but I was kind of lost among the many different dialogue systems that are out there…
[and then on confirmation that the asker was okay with a mailbag post]:

First of all let me clarify that I am not asking for mentorship, with this question. More like pointing to the right direction, if there is such a direction. There is a strong chance that there is not something similar implemented, so in this case, don’t let me take your time.

My question is if there is a dialogue system in Inform7 (or in some other framework) , that is based on knowledge of a predefined set of data. For instance the protagonist to be able to query for any one of that data and to store that information in such a way, that the next answer to reveal even more data. Or the knowledge itself to enable the protagonist to make more specific questions. The answer I would like, is not how to implement such a system, of course, but only a reference of the type  “have a look at this extension of Inform7” or “there is no such thing implemented” or “there is no such thing, but you could draw inspiration from this”. Nothing more than that! I have thought of a potential implementation, treating data as things that are visible or not, and the knowledge to be treated as “possession” of those things, but I am not certain it is the right approach.

First of all, re. the Inform 6/7 question: Inform 7 is a full programming language, and you do not need to drop to Inform 6 to code behavior. In the early years there were things that were hard to express in Inform 7, especially mathematical things or elements that accessed files or manipulated on-screen behavior, but most of those elements do now have an Inform 7 wrapper available. Occasionally people still choose to insert Inform 6 chunks inside an Inform 7 program for various reasons, but it isn’t required.

Likewise, when you say “to implement AI,” this is such a big and fuzzy question that it’s hard to answer without more of a breakdown.

Inform 7 is good — and indeed much better than Inform 6 — for handling rule-based decision-making and firing off character interactions within the model world; the main issue here is performance if you’re driving a large number of characters or asking them to plan over complex world state. The rule-based aspects of Inform 7 in fact have influenced other approaches to game AI in larger game applications, as Elan Ruskin discusses in one of his GDC talks.

For other AI approaches, you’d have to do quite a bit more work; for instance, it isn’t really designed to make use of any natural language processing methods outside of its own rich and complex parsing mechanism, and if you wanted to do something that for instance tried to guess what the player meant by words that weren’t in the game’s dictionary but might be similar to ones that were, you’d more likely use some kind of special pre-processing layer or a call out to an external script, because it doesn’t provide ways to e.g. access WordNet or a word2vec model. Likewise, it’s not designed to plug together with SpaCy or Google NLU or any of the external tools that have come into being over the past decade+ to help interpret the semantic structure of a piece of input. It might be interesting to explore how that would work, but that doesn’t exist currently.

Inform plus machine learning is a slightly more interesting point of conversation, because the TextWorld project exists, and there are researchers who are exploring how to use an Inform-based world model as a sandbox environment for training ML agents to solve a text-based game.

That’s different again from the idea of an ML agent designed not to solve an IF game but to be a companion or competitor within an IF game, for the sake of enhancing the player’s experience. There are relatively few IF games in which it would even really be meaningful to talk about a competitor character within a game, because most IF doesn’t have mechanics designed for competitive play (though Kerkerkruip might work). My old game When in Rome 2 also featured an NPC with dynamically selected characteristics who might work counter to the intentions of the player, and it was possible in some cases to be bested or even killed by this creature, if you went up against a clever one and it got resources ready faster than you could.

Now, on to the main question.

Continue reading

Mailbag: Multimedia in Spanish Text Parser IF

Hi Emily,

I thought you might be able to shed some light on this question:

Text parser IF tends to rely heavily on the text for narrative, and uses little by way of multimedia.  Until you get to Spanish parser IF… here, multimedia is much more common. Spanish-language games often incorporate video, pictures, or sound effects.  Is there a reason behind this (possibly due to Spanish-language games using different engines better suited to multimedia?).  Or is there another reason?  Can Inform and similar platforms support these elements as well?

[Ed note: at the request of the asker, the original question has been re-written from a longer, less anonymous format.]

Several points here. One: for a lot of English-speaking IF fans, the defining IF of the commercial age came from Infocom in the early to mid 1980s, and almost all of their work was without illustration. There were a handful of late exceptions, but they were generally not considered Infocom’s best work.

arthur-the-quest-for-excalibur_3.png

Arthur: The Quest for Excalibur (Infocom / Bob Bates, 1989)

In Spain, by contrast, the golden age of commercial IF came just a few years later, on different hardware. Adventuras AD was publishing illustrated interactive fiction and setting expectations somewhat differently for hobbyist fans to follow. So most likely there was a certain amount of founder effect at work, in terms of what interactive fiction fans wanted to build.

Perhaps as a result of this, or perhaps coincidentally, Spanish language IF games have been written with an overlapping set of tools to Inform. Superglus for instance is a tool that compiles to the Glulx virtual machine, but uses a different, non-Inform parser.

And, in fact, the French and Italian IF communities have also traditionally done more with multimedia parser games than the Anglophone community — I’ve put a few links about this below as well.

Can Inform and similar platforms support these elements as well?

Yes, they can, though historically it was quite a bit of effort to get them set up. That’s less true now.

Continue reading

Mailbag: Academic literature on modeling conversations

hello :) I was reading some of your stuff about conversation systems, was wondering if you’d have any links/pointers to academic literature on modelling conversations (can be more theoretical/non-game-related), or stuff relevant to people who might be trying to do it?

This one came in via Twitter. I’ve covered some adjacent topics before on mailbag, including

  • Games that do complex conversational mechanics
  • Dialogue and story generation techniques (Parts 1, 2, 3)
  • Dialogue filtering to apply personality and emotion to existing text — this includes links to some academic research into how personality traits affect people’s utterances
  • And back in 2009 I wrote this on conversational analysis and how it applied to my work at the time, including going through a number of dialogue situations recorded in literature and talking about how the conversation model I was using at the time would address or fail to address those

But this question is asking something a little different, specifically about how conversation is modeled in the abstract, not necessarily in games and not necessarily for AI production purposes. What academic literature is out there to help us understand how people talk to one another? What types of approaches exist for modeling conversation in general?

Unsurprisingly, this is a huge field of study, so this is not remotely a literature review; instead, it’s a tour of a few pieces of terminology and resources that might be useful in digging deeper.

Also, I am not approaching it primarily from the perspective of a trained linguist (I’ve taken a few classes, but it’s not my field) and instead from the perspective of a person trying to model things for interactive conversation purposes.

So, with those caveats:

Continue reading

Mailbag: Getting Beta-Testers for Parser IF

I know you’re busy, and hopefully you didn’t delete this as spam ;-)

I’m writing my first interactive fiction game. Although it’s not finished, I’m already looking ahead to finding beta testers – beyond the few friends I have who once way back when played the original Infocom games.

I imagine it takes time to establish the relationships necessary to get people to the point they’re actually willing to take a look. Do you have any advice?

An aside: I’m a computer programmer and using Inform 7. It’s a nice system, and I get it. But I am not familiar with the culture of IF users. (For example, the authors of the Inform manual mention how disabling the UNDO function when the story ends is anathema to many players.) Also, just understanding how to make beta-testers’ jobs easier in general would be nice.

A first step would be to hang out a bit at the intfiction forum or possibly euphoria (I haven’t been to the latter for a while, so I don’t know how active it is, but it’s more of a chat space). Introduce yourself, participate in a few conversations.

It sometimes helps to offer to beta-test for other people, for two reasons: one, it builds those social connections, and two, it familiarizes you with how other people typically do this. If you’re planning to enter a competition, sometimes there are threads in the weeks before the competition deadline where authors are offering to swap beta-testing, and that can also be a useful way to pick up help.

Alternatively, if you live near Baltimore, Seattle, San Francisco, Boston, or London, there is a live meetup that meets pretty regularly near you, and those can be a great place to cultivate connections more quickly. My link roundups twice a month list all the events I know of that are coming up in the near future, but you may already have seen these.

As for expectations and norms: it’s a good idea to read some reviews of recently released games, especially ones that might be similar to yours; they may help you work out what people are expecting and what goes over well or badly. You don’t have to take this as gospel, of course, and sometimes you just really want to do something with your work that isn’t in the expected range. That’s fine. But it can be helpful to know what people are looking for so that you’re not too surprised. One way to look for that information is to check out IFDB and find games in your genre/style and see what people wrote about those. You could also read through reviews from the latest IF Comp to get more of a cross-section view.

Suggestions for Testing is a fairly old article of mine, but as it’s about parser IF, a lot of the recommendations still hold. It talks about what testers might expect to do, and what authors might expect from testers.

Preparing a Game for Testing is about figuring out where your game is likely to present problems so that you can look at those yourself before you ship it off.

Mailbag: Adapting IF Skills to Adjacent Media

This is a follow-on answer to a previous mailbag post, specifically the part in which the questioner asks,

Would you have any thoughts on how to… improve the adaptive skills needed for bringing IF to newer formats and into audio?

I take this to mean not “how do I port an existing work to an interactive format” (which is also an interesting question), but “how do I do IF-like interactivity in formats other than text, especially audio?”

Key challenges for this, in my experience, center on these areas:

Continue reading

Mailbag: Self-Training in Narrative Design

Big fan here—of your IF pieces and also of the way you’ve spread interactive fiction outside the IF community. I’m emailing to ask if you have any advice on IF education and bringing it to new platforms/media. 

[Some personally identifying information about the writer’s educational background redacted.]

As I move forward with securing workshop/speaking/consulting gigs, I’m feeling a slight panic that my base skills and knowledge of IF are somewhat lackluster. When it comes to a mastery of interactive thinking, I know that I have a lot of room to grow. 

Would you have any thoughts on how to flex those core IF muscles, and also improve the adaptive skills needed for bringing IF to newer formats and into audio?

Okay, so. This is a two-part question. I’m going to break it across two posts. This post will focus on “how do you flex core IF muscles.” I’ll come back next month to the question of skills for adaptation specifically.

The questioner asks about “a mastery of interactive thinking,” not about writing skills, so I’m going to assume the author feels comfortable on topics like prose and character development, and is more interested in understanding and practicing narrative design across multiple media. It also seems to be a design-focused question rather than a tools- or coding-focused question.

So I’ll try to tackle this from two angles: what are the things you might want to learn, and how might you learn them?

Finally, I should say: even with all the scoping-down I just did, this is a topic that I think would take a book to cover, not a single blog post. So the list of things you might want to know is at once very incomplete and unreasonably scary. No one will master all of it in a couple of months.

What I’d recommend doing, therefore, both to the OP and anyone else who is looking to use this as a guide:

  • Pick one or two areas that seem interesting to you and focus on those for a while; let your interest and enthusiasm be your guide
  • Use a mix of strategies to learn from other people (I list a bunch of approaches below)
  • Alternate between working with other people’s input/insights, and building your own thing. When something you’re reading makes an assertion you think is nonsense, build an experiment to prove the opposite. When something you play inspires you, give that a try. When you read a taxonomy of some kind, question whether it covers all the possibilities, and whether you can imagine categories the article-author didn’t consider (and would the results be any fun to play?)

Continue reading