BOT memory

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



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>


I do a python redirection to a webservice : 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 :

Aiml ( french words )

Shared memory :

Personnal memory :

Short memory


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bartcam's picture

OK I Try That.

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?

moz4r's picture

The problem when you start to

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 :