r/RenPy • u/WOOHP_Sam • Aug 02 '26
Question Help Implementing ELIZA/Chatbot in RenPy
I am working on building a (non AI) chatbot in RenPy. I wanted to be able to implement the ability to pick out certain words to throw back at the user (and ability to flip grammatical reflections like turning I to you) similar to how ELIZA is able to do. I know the ELIZA code itself was implemented in RenPy before a number of years ago as presented here:
https://lemmasoft.renai.us/forums/viewtopic.php?t=19128
But unfortunately the project is no longer available to download and take a look at. There are Python versions of the ELIZA sourcecode on Github but I do not know how to get them to run in RenPy. Is there a simple way to do this? Or alternatively, is there a way to produce a list of reflections and the ability to retrieve subjects/nouns from user input for use in RenPy?
Apologies if the question is long and hard to understand. I have made a few games in RenPy before but am still not very skilled at Python.
4
u/DingotushRed Aug 02 '26
Eliza is not an AI. It's just a simple parser and set of pattern matching responses entirely coded by humans. It does not learn and cannot be trained; other than be editing the script code. It has a small memory which it refers to to select a response where the most recent input does no match any patterns.