Eliza and IF


Any idea of how can I build in an eliza style bot in my IF?

1 Like

Perhaps you don’t want to build in an eliza style bot in your IF?

…I kid, I kid. This BASIC listing should provide strong hints. Essentially, it’s a simple affair: take input, check to see if the input is a question, prune the preface to the question, then either regurgitate the subject of the question or a non sequitur.

Ah, Eliza. So many fruitless conversations have I had with thee…

“Hey Eliza, that dog is vicious.”

Eliza: Oh, that dog is vicious.

“Hey Eliza you are pointlessly repetitive.”

Eliza: Oh, I am pointlessly repetitive.

Yeah. It’s like she doesn’t even listen. sighs

I’ve had better convos with Eliza than with some actual ppl in meatspace.


Something similar in IF could be really interesting. If I was going to try it (which I’m not, because I don’t have a fraction of the coding patience I’d need to be happy with the results) the NPC would be a old, possibly malfunctioning robot, and the PC would become increasingly frustrated when she failed to glean useful information from it.

Has Eliza type interaction been done before in IF?

These are not the interactions you are looking for.

Some time ago I was looking how to make some artificial intelligence, or at least how to make a chatbot. It seems the most wide spread system is the one based on AIML:


But it seems quite tedious to set up (many projects, in php for example are now dead), not flexible at all, very verbose (you have to enter endless XML data to achieve something). In my language (French), the default libraries we can gather are quite buggy and the responses not very clever. However, I found some chatbot in French (and English), to be above the average, but the authors didn’t release their source code, unfortunately.

So I was wondering if it couldn’t be possible to create a similar chatbot using Inform7, with the table systems (to collect knowledge), I’m pretty sure it could beat AIML, and it should also be more flexible and easier to create.

What do you think?

Frankly, my immediate reaction was “if nothing else, it’d make a good stress test for the compiler.”

Which explains why it does such a startlingly good impression of a psychotherapist…

So true. And if you want to make it really realistic, just have the NPC pretend to make notes and not actually reply at all, then when the player quits redirect them to a web page for them to enter their credit card details.

As I recall, that was more or less an overt strategy: few people have a license to meander in that specific way other than (a stereotypical) psychotherapist.


I am not really comfortable with inform 7.

I’ve been reading Aaron Reed’s Creating Interactive Fiction With Inform 7. I suggest checking it out or just perusing other documentation about it. I spent months and months just reading before even attempting my own game.

But part of the fun of reading the included documentation is trying out all the examples (and making little changes) as you go!

True, I did that, but I didn’t venture to show anyone anything “complete”, lol :laughing:

The problem is that it isn’t like any other traditional programming language.

If you think you can, try making a program which determines if the number entered is prime or not

Well, it’s not a traditional programming language, as it’s based on natural(ish) language. For non-codey people like myself it’s awesome, but maybe you’d prefer Inform 6? Especially if you’re attempting something ambitious like a chatbot.


Heh. The person who originally wrote it intended to show that you could get startlingly “intelligent” behavior without actually trying to “understand” English. I gather he also didn’t like the Rogerian approach to psychotherapy, which was quite popular at the time.