Artificial Intelligence (AI) & Ren'Py

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
2_an
Regular
Posts: 29
Joined: Sun Jul 22, 2018 5:54 pm
Location: Spain
Contact:

Re: Artificial Intelligence (AI) & Ren'Py

#16 Post by 2_an »

Hello, apologize if any word is not well understood. I'm from Spain and my English is not very good. Also, I'm new to this forum. And I'm also new to the world of RenPy, Python ... LOL.

Well, I've been testing the AIML for this thread, and I have the same problems that have been reported. Without much knowledge about the Python and RenPy code, I found amazing things for me.

1. It is possible to use the Bot.Aiml, without having the "standard" folder.
I deleted the "standard" folder, and the surprise was that the Bot could still answer me.
Then I thought, how can the robot answer if I have erased his brain?
Well, apparently his brain was not in the "standard" folder. His brain seems to reside in the file "standard.brn" (in my case, they are 4,600 KB).


Obviously this causes me many questions.

to. How could you enter all the information that is distributed in the AIML files of the standard folder, inside the standard.brn file?

b. If RenPy uses files with "brn" format to store all that AIML data, what's the point of having a folder full of AIML files?


2. I continued to explore the script a bit, and in the "AIMLbot.py" script, I noticed that it is possible to delete lines 25 and 26, and it does not affect the game. It is as if these lines do not matter at all.

(The lines in particular are you;

25---> self.kernel.bootstrap .....
26---> self.kernel.saveBrain ....

3. Finally, I tried to directly modify the "standard.brn" file, but even if I changed the words, then the bot did not work for them.


It is a disappointment. Although I write with the hope that a solution can be found. The creator said he kept new versions of his bot, with better features. I want you to share, I would like to try.
If possible, make it simple for people like me who are starting now in this world of RenPy.
Well, as you can see. I do not bring the solution. I only write to give my testimony that I also have that error.


A greeting and I will be attentive to the forum to see if there are any answers soon.!!

ocimpean
Newbie
Posts: 24
Joined: Tue Aug 27, 2013 9:13 pm
Location: Florida
Contact:

Re: Artificial Intelligence (AI) & Ren'Py

#17 Post by ocimpean »

Editing the standard.brn file works, in certain conditions. The only way I managed to change stadared.brn and see the changes reflected in the game, was by carefully choosing a disposable string and replacing it with another, having the EXACT same length.
That means you have to replace both the Question & Answer to get something usable, and is quite hard to implement large scale changes, as one character, space etc., plus or minus, will prevent your answer being displayed in the game.

User avatar
exuin
Regular
Posts: 36
Joined: Sat Mar 06, 2021 2:09 am
Deviantart: ShatteredRe
Github: ShatReal
itch: ShatteredReality
Discord: ShatteredReality#7834
Contact:

Re: Artificial Intelligence (AI) & Ren'Py

#18 Post by exuin »

Hey! Can I have some help with getting this to work today? I know this is 7 years old but I'd like to use it.

I'm getting the error "ImportError: No module named backports.configparser", but I can't figure out how to install anything called "backports."

Pyrodyne
Newbie
Posts: 2
Joined: Fri Jun 10, 2022 11:45 am
Contact:

Re: Artificial Intelligence (AI) & Ren'Py

#19 Post by Pyrodyne »

exuin wrote: Fri Mar 18, 2022 3:10 pm Hey! Can I have some help with getting this to work today? I know this is 7 years old but I'd like to use it.

I'm getting the error "ImportError: No module named backports.configparser", but I can't figure out how to install anything called "backports."
Maybe a bit late but I successfully got this working on Ren'Py 8/Python 3 if you are still interested :)

I am going to expand on this a little and make a simple system for pyaiml to send commands back to ren'py which would make it a lot more interactive.

User avatar
Andredron
Miko-Class Veteran
Posts: 714
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Artificial Intelligence (AI) & Ren'Py

#20 Post by Andredron »

Pyrodyne wrote: Fri Jun 10, 2022 12:05 pm
exuin wrote: Fri Mar 18, 2022 3:10 pm Hey! Can I have some help with getting this to work today? I know this is 7 years old but I'd like to use it.

I'm getting the error "ImportError: No module named backports.configparser", but I can't figure out how to install anything called "backports."
Maybe a bit late but I successfully got this working on Ren'Py 8/Python 3 if you are still interested :)

I am going to expand on this a little and make a simple system for pyaiml to send commands back to ren'py which would make it a lot more interactive.
Yes! I interested :D

Pyrodyne
Newbie
Posts: 2
Joined: Fri Jun 10, 2022 11:45 am
Contact:

Re: Artificial Intelligence (AI) & Ren'Py

#21 Post by Pyrodyne »

Here it is, mostly functional.
What does not work is the automatic creation of the brn file. For some reason it will create a blank one, I suspect the path changes but I am not sure how to correct it.

As it sits you can run python CLI, import AIMLbot.py in the game folder, and it should generate a functional brain which will then load normally for the game.

I wrote a simple hack, prefix the aiml response with an @ then check for it and then you can trigger ren'py to take control based on aiml responses :D

If someone could help sort out what is different about the paths I'd appreciate knowing what it is, it seems like sometimes it will address them properly and other times it will not.
Attachments
Aileen-renpy8.zip
(2.03 MiB) Downloaded 50 times

Post Reply

Who is online

Users browsing this forum: No registered users