Eliza and IF

My favorite approach to psychotherapy involves a donkey and a parachute.

Hm, nice one!

Do you have a mod operator?

I’ve research a bit more on the subject.

There are several open source chatbots, but it seems there are 3 major ones: AIML, Rivescript and ChatScript. You can find a good forum about those topics there: chatbots.org/ai_zone/

AIML is verbose and ugly, like all XML/HTML variants :slight_smile:

To get a ā€œhiā€ reply to a ā€œhelloā€, in AIML it’s:

<category> <pattern>HELLO</pattern> <template>hi</template> </category>

In RiveScript it’s:

+ hello
- hi 

and in ChatScript :

u:GREET (hello) hi

(here GREET is optionnal, but it can be used for further interaction)

ChatScript is a huge project, with many documents and tutorials:
sourceforge.net/projects/chatscript/

Unlike several other AI systems, there are some ways to make the bot a bit more interesting and ā€œintelligentā€ than the average. What is good for IF developpers, is you can also create some inputs from the bot in a specific order, so you can really develop a real story or a game with it.

It’s a C++ project, you can put it on a dedicated server and make it accessible to your players with a php interface

1 Like

Just for completeness, since it wasn’t mentioned before yet:

ifdb.tads.org/viewgame?id=fh8iwavcu4ldm98i

Also:

ifdb.tads.org/viewgame?id=nfsjiwg00sh5rnh9

Also, this thing is mac-only so I can’t test it, but it claims to have an Eliza-like interface. It’s also not Inform, so it’s less relevant. But I like linking stuff so here goes:

ifdb.tads.org/viewgame?id=jyvg305atwaugqgv

1 Like

Yes, Inform 7 calls this the ā€œremainder after dividing X by Yā€. inform7.com/learn/man/doc226.html

In an inform game you have the added capability of limited context using the state of the world to decide the replies.
One could also use an extension providing emotions and even have actors that modify their responses based on mood, which, of course needn’t be fixed since the progression of the game due to the player or other actors, or presence of particular scenes could certainly modify the moods of actors.

PS: If a game lives in glulx it would even be possible write a routine to import AIML from a separate file. With AIML one possibility is to include patterns that match conditions in the world as well as arbitrary text. Using AIML would also allow importation of some of the fairly extensive preexisting pattern files used by the Alice/Pandora bots.

1 Like