Thumbnail

Aimlbot

AimlBot is a localized chatbot client that uses AIML (Artificial Intelligence Markup Language).

+ How To Add This Control To Your Project (Click to Expand)
  1. Make sure you have the latest version of ARC installed.
  2. Select the Get button in this page to download the archive file.
  3. Double click the downloaded archive file to execute installer.
  4. The installer will add this control to ARC.
  5. Load ARC and press the Project -> Add Control button from the menu.
  6. Choose the Artificial Intelligence category tab.
  7. Press the Aimlbot icon to add the control to your project.

Manual

AimlBot is a localized chatbot client that uses AIML (Artificial Intelligence Markup Language). This operates the same as the PandoraBot client, except it doesn't require an internet connection. The AIML configuration files are stored locally and can be edited by hand or with an AIML editing tool.

Main Window


User-inserted image

1. Text Entry Field
This is where you write your text entry.

2. Send button

Click the Send button, or hit enter, when you are ready to send your text entry to the AimlBot.

3. Response Display

This is where the AimlBot will respond with its text-based response.

Settings


User-inserted image

1. Response Variable and Script
AIML responses can embed ez-script with square brackets [ and ]. For example, if you load the AIML file t.aiml, you will find this example under the category "test". Search the document for the word "test" and you will see the following response...

Code:

This is just a test $Direction.[say("Testing")]

As you can see in the above example, when the word "test" is entered as a phrase into the artificial intelligence engine, the response includes a variable and a script to run.

2. Open Config Folder
You can specify the configuration folder to have multiple personalities per project. To do so, the new config folder must contain the CONFIG and AIML folders from the plugin root folder. Simply look in the current config folder of this plugin, and copy the AIML and CONFIG folders into the new folder. Specify the new folder by pressing the change configuration folder button. This value is saved per project.

*Note: make a copy of the AIML files if you will be making modifications to them. The files may be overwritten during robot skill updates. Here's a video explaining how to make a copy of the default files into a new folder so you can edit them.

3. Open AIML Editor
Please note, the AIML editor requires .Net 3.5 to be installed. The config menu of this plugin has a button to open the AIML config folder or search for a phrase among all AIML files. The file search ability makes it easy to find a response to edit with your own editor, such as with notepad. There's also a built-in editor that I've included, more info below.

GaitoBotEditor
There is a built-in editor included called GaitoBotEditor that was created by Springwald Software with no relation to Synthiam. Synthiam cannot support or assist with using this AIML editor, but their online manual is pretty clear. The AIML files will have to be loaded one-by-one into the editor as a new workspace. We don't have much experience with the editor, but it seems to do the trick! The GaitoBotEditor requires .Net 3.5 to be installed.

4. Search
In the settings menu, you may open the AIML editor directly with the Open AIML Editor button. Otherwise, if you're looking for files related to specific key words, the SEARCH option will be useful. If you're wanting to modify all responses to the word " Banana", type the word "Banana" and press SEARCH. The interface will prompt a menu asking if you wish to open all the files corresponding to that word.

How to Use AimlBot Skill


1) Add the AimlBot Skill to your ARC project (Project -> Add Skill -> Artificial Intelligence -> AimlBot).

2) In the main window enter your text into the text field.

3) Click the Send button. 

4) Read the response in the response display. 

Script Samples



The AilmBot skill accepts control commands to get data from other skills. This means if you use the a speech recognition skill like Bing Speech Recognition you can send a speech-to-text entry directly to the AimlBot text field with:

Code:

ControlCommand("AimlBot", "SetPhrase", $BingSpeech)

This skill also has the ability to execute a script when the chat result is returned. AimlBot can speak the result with:

Code:

Say($BotResponse)
-or-

Code:

SayEZB($BotResponse)

Another feature of this skill is moving a robot based on the code entered in the update.aiml file. An example phrase to activate this is: Move Forward

Requirements


ARC 2020.01.24.00 or greater

Resources


The source code for this skill can be downloaded here: https://github.com/synthiam/Behavior_Control_AimlBot

#41  
Is it possible to embed ARC code into the AIML files? Could I run a motor from AIML? If so, what would be the syntax?
#42  
Does anyone know if it is possible to do math within aiml code?
#43  
DJ,

Did you implement XFIND in your aimlbot?

Thomas Messerschmidt
PRO
Synthiam
#44   — Edited
The manual above explains how to include code in the aiml. Scroll up and check the manual for all the informations:)
#45  
New issue: I updated AIMLBot on Sunday and it appears that it overwrote all of my AIML files. Is there any way to prevent that? I lost a lot of work.
PRO
Synthiam
#47   — Edited
This skill has been updated to include a message in the Config dialog about backing up the AIML & Config folders to a personalized location on your hard drive. I advise backing up your config files before updating to this version.

User-inserted image
PRO
USA
#49  
Seems the editor instructions/tutorials are all flash based and no longer work on their site.
PRO
Synthiam
#50  
Aimlbot doesn’t have a website. It’s a local application and doesn’t require an internet connection.
PRO
USA
#51   — Edited

Quote:

Seems the editor ....
The Gaitobot editor...looking for instructions on how to use it. The instructions are no longer available on their website as they are flash.
#52  
I want to add AIML code dynamically, that is asking my robot to learn new AIML data and then use that data without reloading the AIML configuration manually. Is there anyway to "load AIML configuration" programically? While it is quite easy to add a line of text to an AIML file, I have found no way to restart the AimlBot skill so that it loads my new AIML code.
PRO
Synthiam
#53   — Edited
That can be done. 

please do not double post. Other post was deleted.
PRO
Synthiam
#55   — Edited
Added Reload Config button and ControlCommand for reloading the config programmatically
#56   — Edited
Thanks DJ! The button works PERFECTLY!:) I haven't tried using the command programmatically yet.
#57  
So this is really cool. Still I want to dynamically add to an AIML file and use the newly added code right away. But I can't because the new line of code is placed at the end of the file--after the "</aiml> tag which breaks AIMLBot requiring me to manually move the tag. I know I could probably read, store, and rewrite the entire existing AIML file into memory, delete the </aiml> tag, add the new code, and finally place the tag at the end of the file, but does anyone have a better idea? 

My code: 

Code:

saywait("When you hear the beep please add new input.")
sleep(2000)

saywait("beep")
sleep(200)
controlCommand("Bing Speech Recognition", "StartListening")
controlCommand("Bing Speech Recognition", "UnpauseListening")
sleep(3000)
controlCommand("Bing Speech Recognition", "PauseListening")
controlCommand("Bing Speech Recognition", "StopListening")
sleep(2000)
$sAIMLInput = $BingSpeech

saywait("New input was learned.")

sleep(2000)
saywait("When you hear the beep please add new output.")
sleep(2000)

$bLearnAIML = true
saywait("beep")
sleep(200)
controlCommand("Bing Speech Recognition", "StartListening")
controlCommand("Bing Speech Recognition", "UnpauseListening")
sleep(3000)
controlCommand("Bing Speech Recognition", "PauseListening")
controlCommand("Bing Speech Recognition", "StopListening")
sleep(2000)
$sAIMLOutput = $BingSpeech
saywait("New output was learned.")



$sAIMLLineOfCode = ""+ $sAIMLInput + " " + $sAIMLOutput + " "

print($sAIMLLineOfCode)

FileWriteLine("c:/AIMLCode.aiml",$sAIMLLineOfCode)
saywait("New AIML was added to the file")
PRO
USA
#58   — Edited
Hi Tom, I re- worked my AIML code this morning and tried you script, it does add responses.

EzAng
#59  
Ez, I have a new bit of code that creates a new file each time with the <aim> tags as needed. It also allows multiple "categories" to be added. I will try to post it into a tutorial. I didn't have much luck with the tutorial last time. I couldn't make it "public." Otherwise, I'll put the code here tomorrow.
#60  
Again, I had no luck in making a tutorial, so here is my updated code. It also allows multiple "categories" to be added and then reloads the configuration so that the new AIML can be used without stopping your robot. Each time it is invoked it creates a new aiml file (complete with the start and stop tags) with a unique name so that it doesn't overwrite any existing ones. 

make sure to customize your $AIMLPath variable so that it points to your aiml file. 

Code:

#say("Starting A I M L learning")

##SoundNote("c2",2000)
$UniqueTime = $year + "." + $month + "." + $day + "-" + $hour + "." + $minute + "." + $second
$AIMLPath = "C:\Users\Thomas\Documents\AIML_Simone\aiml"
$AIMLFilename = $AIMLPath + "\0AIMLCode" + $UniqueTime + ".aiml"
print($AIMLFilename)

FileWriteLine($AIMLFilename,"")

$bLearningAIML = true

:AddNewAIML


################# ADD INPUT ###############
saywait("When you hear the beep please add new input.")
sleep(1000)

saywait("beep")
sleep(200)
controlCommand("Bing Speech Recognition", "StartListening")
controlCommand("Bing Speech Recognition", "UnpauseListening")
sleep(3000)
controlCommand("Bing Speech Recognition", "PauseListening")
controlCommand("Bing Speech Recognition", "StopListening")
#sleep(2000)
$sAIMLInput = $BingSpeech
print($BingSpeech)
saywait("New input was learned.")


################# ADD OUTPUT ###############
sleep(2000)
saywait("When you hear the beep please add new output.")
sleep(1000)

$bLearnAIML = true
saywait("beep")
sleep(200)
controlCommand("Bing Speech Recognition", "StartListening")
controlCommand("Bing Speech Recognition", "UnpauseListening")
sleep(3000)
controlCommand("Bing Speech Recognition", "PauseListening")
controlCommand("Bing Speech Recognition", "StopListening")
sleep(2000)
$sAIMLOutput = $BingSpeech
saywait("New output was learned.")
print("Heard:" + $BingSpeech)

$sAIMLLineOfCode = ""+ $sAIMLInput + " " + $sAIMLOutput + " "
print($sAIMLLineOfCode)

FileWriteLine($AIMLFilename,$sAIMLLineOfCode)
saywait("New AIML was added to the file")
sleep(1000)


############ DOES USER WANT TO ADD MORE? #############
saywait("do you want to add another category?")
sleep(1000)

saywait("beep")
sleep(200)
controlCommand("Bing Speech Recognition", "StartListening")
controlCommand("Bing Speech Recognition", "UnpauseListening")
sleep(2000)
controlCommand("Bing Speech Recognition", "PauseListening")
controlCommand("Bing Speech Recognition", "StopListening")
sleep(1000)
$sAnotherYesNo = $BingSpeech
print("Heard:" + $BingSpeech)

if($sAnotherYesNo = "Yes")
goto(AddNewAIML)
endif
print("Heard:" + $BingSpeech)


############ FINALIZE AND WRITE NEW FILE ##############
sleep(1000)
saywait("Finalizing A I M L document.")



FileWriteLine($AIMLFilename,"")
sleep(2000)
controlCommand("AimlBot", "ReloadConfig")

saywait("The new A I M L file is ready to use.")

$bLearningAIML = false