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
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
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:
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.