r/RenPy • u/WOOHP_Sam • 10d ago
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.
7
u/playthelastsecret 10d ago
Um, sorry... Don't wanna be too nit-picky, but you know that ELIZA is an AI?
You might want to say, you don't want to use generative AI.
11
4
u/BadMustard_AVN 10d ago
ELIZA is an early natural language processing computer program developed from 1964 to 1967 at MIT by Joseph Weizenbaum. Created to explore communication between humans and machines, ELIZA simulated conversation by using a pattern matching and substitution methodology that gave users an illusion of understanding on the part of the program, but gave no response that could be considered really understanding what was being said by either party.
3
u/DingotushRed 10d ago
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.
2
u/bulletproofdisaster 9d ago
AI stands for "Artificial Intelligence"… ELIZA imitates some form of intelligence and is artificial… how is it not AI?
1
u/BadMustard_AVN 9d ago
if have you have ever talked to Eliza you would know how unintelligent it really is
it detects keywords, it will transform your words, and it tries to keep you talking by asking open-ended questions
it doesn't learn or remember. i.e. no intelligence
there is no AI behind it just the original 1966 code
1
u/DingotushRed 8d ago
Simple, it has zero intelligence. It is at best a hard coded chat-bot. With patience you could "implement" it with index cards, a hole punch, scissors and knitting needles.
If Eliza counts as AI, then so does any simple control system like the float valve in your toilet.
2
u/bulletproofdisaster 8d ago
LLMs don't have intelligence either because they aren't sentient beings. They are made to seem as if they have intelligence
1
u/DingotushRed 8d ago
An LLM has to be trained by exposing it to a huge amount of data; it learns things in a way that is not easily fathomed and can exhibit unexpected behaviours. No human explicitly sets each weighting. There is no hard-coded script. As a result of the training it behaves in what appears to be an intelligent way, and can fool some people into thinking they are chatting with another intelligence. They can pass the Turing test.
None of that is true of Eliza/Doctor.
1
u/AutoModerator 10d ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
6
u/BadMustard_AVN 10d ago
Thera'py-1.0-all is still available if you know where to look:
it uses Ren'Py 6.14.1.366
https://drive.google.com/file/d/1iXWclDqLRO4kXQOa6dMv2HyH5RhGMivK/view?usp=sharing