Hi this is what I use to give the chatbot some learning capacities:

It's a WIP

3 things:

Short time memory:

I used <topic> tag and <set> vars

They are temporary informations that are used only, example to turn on specific subject of conversation

<think><set name="topic">SPEAKABOUTROBOTS</set></think>

Set the conversation subject to SPEAKABOUTROBOTS

So all the AIML into

<topic name="SPEAKABOUTROBOTS">

</topic>

Are parsed in priority

<set tag> are used to set, example, the numbers of persons in front of the robot in time T

Personal memory

I use this to store some personal information like "What is my mothers name"

You can play with it with : <think><set name="whatismymothername"><star /></set></think>

like with short memory, BUT with the help from python : chatBot.savePredicates() it populate the local DB config ( from aiml/config folder ). And on the next restart with the help of chatBot.getPredicate() , the data are back

Shared memory between bots

I use a specific python function to send a record to an open Database . It's simple :

I dedicate some patern like :

 <pattern>THE * IS *</pattern>

"THE SKY IS BLUE"

I do a python redirection to a webservice : http://www.myai.cloud/shared_memory.php?action=update&question=WHAT IS THE SKY&awnser="THE SKY IS BLUE"

Something I didn't use is : WriteAIML because I have some problems with it. And finaly did'nt need it.

This is embedded ProgramAb function that create an aiml from Data about specific <learn> aiml tag

Sorry I wrote this post very fast and maybe it's not accuracy enough

I add some videos later

Sources :

python :

https://github.com/MyRobotLab/aiml/blob/master/bots/BOTS-FRENCH/Inmoov_…

Aiml ( french words )

Shared memory : https://github.com/MyRobotLab/aiml/blob/master/bots/BOTS-FRENCH/Inmoov_…

Personnal memory : https://github.com/MyRobotLab/aiml/blob/master/bots/BOTS-FRENCH/Inmoov_…

Short memory

https://github.com/MyRobotLab/aiml/blob/master/bots/BOTS-FRENCH/Inmoov_…

 

bartcam

7 years 5 months ago

Ok, I try that, but i want to save data into my disk, not on the server.
What problem do You have with writeAIML, something is wrong with creating new aiml files on real time?
 

The problem when you start to play with the learn tag and WriteAIML / WriteAIMLIF, program ab try do a sync between AIML files ans CSV files. ( the sync failed I think because I use utf8 ) . And newly created AIML files are not parsed anymore. ( AIMLIF folder is parsed in priority ).

I did't spend a lot of time on it , and don't know if it's better now.

I just delete the AIMIF folder every starts

You can look at the mastablasta work about learn tag :

https://github.com/MyRobotLab/pyrobotlab/tree/master/home/Mastablasta/a…