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.
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?
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.
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’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.
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.