ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

Thumbnail

Aimlbot

by Synthiam

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

How to add the Aimlbot robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Artificial Intelligence category tab.
  5. Press the Aimlbot icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Aimlbot robot skill.

How to use the Aimlbot robot skill

AimlBot is a localized chatbot client that uses AIML (Artificial Intelligence Markup Language). The AIML configuration files are stored locally and can be edited by hand or with an AIML editing tool. Additionally, settings for the session can be adjusted programmatically using the ControlCommand. 


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 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. The new config folder must contain the CONFIG and AIML folders from the plugin root folder. 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 that 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 editor, such as with a notepad. There's also a built-in editor that I've included; more info is below.

GaitoBotEditor
Springwald Software created a built-in editor called GaitoBotEditorGaitoBotEditor was developed by Springwald Software with no relation to Synthiam. Synthiam cannot support or assist with using this AIML editor, but their online manual is straightforward. The AIML files will have to be loaded 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
You may open the AIML editor directly with the Open AIML Editor button in the settings menu. Otherwise, if you're looking for files related to specific keywords, the SEARCH option will be helpful. If you want 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.


Session Settings Memory


Each session starts with a fresh memory. The default value can be specified by editing the config settings files on startup. However, during the chat session the values can be altered. They can be altered by either entering phrase to alter them, or programatically with the SetValue ControlCommand().

Here is an example of altering the value by speaking to the chatbot. The name of the user has been changed to Mr. Bob by telling the chatbot the value.
User-inserted image


Alternatively, the same value can be changed by a script. For example, if the Camera Device is combined with the Cognitive Face robot skill, the chatbot can be told who you are. The example syntax would be

Code:


ControlCommand("AimlBot", "SetValue", "name", "Mr Bob")


All setting data from the current session can be viewed by selecting the Show All Settings option in the dropdown.
User-inserted image




Control Commands


A few ControlCommand for interacting with this skill programmatically from other robot skills. 

- SetPhrase
This will set the phrase as if typed into the user input box. If using a speech recognition robot skill, this is the ControlCommand to send the user's spoken phrase text.

- SetValue
This will set the value in the session to your specified value. For example, you can set the value NAME to "Bob," and the chatbot will now know you as Bob. Interacting with settings can be done by asking the chatbot a setting value, such as 'What is my name?' or 'What is my birthday?'. You can configure these settings with text by entering 'My name is Bob' or 'My birthday is Friday', and the chatbot will know those values. 

*Note: All settings can be viewed by selecting the View All Settings option in the menu dropdown on the main screen.


How to Use AimlBot Skill


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

2) Enter your text into the text field in the main window.

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 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 can 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 updatetime file. An example phrase to activate this is: Move Forward.

ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

PRO
USA
#1  
Dear author of this plug in......I'm trying to run two instances of AIMLBot on separate ARCs on the same computer. They both seem to share the same config folder and settings files. Is there a way to load different setting files for each instance?
PRO
Synthiam
#2   — Edited
No, you can only have one configuration folder and therefore only one configuration. Every instance of ARC will use the same configuration files. 

I can modify it to load the configuration from a folder that you specific - if that’s what you require?
PRO
USA
#3  
I think this would be a good inclusion. If you ran many robots from a single computer, you could have all of their AIMLBot responses different, giving the illusion of separate personalities. By having different folders, its less likely to have a situation where you could accidentally overwrite the setting file.
#4  
I too would appreciate this option. While I don't run multiple instances at the same time I do have different projects on my windows tablet that would benefit from having different AIML files.
PRO
Synthiam
#5  
Okay - I’ll think of something over the weekend
United Kingdom
#6  
Is the source code available for this one?
PRO
Synthiam
#7  
I can post it tonight when I’m in front of a pc for ya
PRO
Synthiam
#9   — Edited
You can now specify the folder for the configuration files. The new folder requires the AIML and CONFIG folders from the plugin folder to be copied. 

The source code is available as well - in the description of the plugin
PRO
USA
#10  
Thank you! This will come in very handy for many of us.
#12  
Is there a way to save information from a session? For example if I tell the bot my name it remembers it for that session but when I exit and restart it's back to unnamed user.
PRO
Synthiam
#13  
Not presently. You can edit the config files to set default values. Perhaps I can add ControlCommand() that allows you to set values. That way you can save them with the project to a text file or something.
#14  
Ok, I can manually edit the file. That's the only thing I miss from my robot lab, the program ab chatbot. But Synthiam is far better at everything else.
PRO
Synthiam
#15   — Edited
@danf - that's an easy fix - i can just add that functionality. Another reason we're better is we'll make changes based on user feedback :D. I forgot about my robot lab, is that still around?
#16   — Edited
MRL is still around. Focusing on Inmoov as always. Their AIML implementation of ProgramAB is really good. ProgramAB operates against the AIML 2.0 standard though which offers a lot more possibilities. Synthiam (you) could reproduce all that or figure out a way to adopt and upgrade to the 2.0 standard. Putting bandaids on 1.0 which is no longer supported does not seem the way to go.

The Pandorabots plugin is 1.0 as well while their site has moved on to 2.0. We are using a legacy backdoor. I had asked previously and you investigated and there was some reason that it was not easy to do. I can't remember what that was. Would be nice though.
#17  
I started building a chatbot using Pandorabot 2.0.  Is it possible to import some of the AIML files from it to use with AimlBot?

User-inserted image
United Kingdom
#18  
Sorry for the newbie question. If I edit the config file to make my own questions and responses and save it, will it be stored for the future?

Also, is it possible to talk the bot verbally and teach it things. For example your name is max and then it remembers it?
Brazil
#19  
Olá, Como configurar o AimlBot e existe um vídeo explicativo sobre este plugin?
PRO
Canada
#20  
Sorry, i don't think there is an explanation video for the plug-in. I looked but I couldn't find one.
PRO
USA
#21  
what files do I modify / edit to make my own responses in aiml.Bot?
PRO
USA
#23   — Edited
Hi Justin

This is EZAng 

The new EZ program ARC

The audio answers AIML works well


thanks
PRO
Synthiam
#24   — Edited
EZAng, this aiml plugin does not speak and never has. You need to create a new question for help on how to program your robot
#25  
Hi EzAng, I have not experimented with AIML in while.  I'm not sure I'm the best person to help on this.  Can you explain more about the issue you are having?
PRO
USA
#26   — Edited
I got everything working

My AIML Bot works just like Pandora Bot -  I ask questions, get audio answers

I added more AIML bot code also

Here is what I did:

Bing Speech control add:

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

Aiml control add

java
Audio.say(getVar("$BotResponse"));

Above works with PC

Audio.sayEZB(getVar("$BotResponse"));

Above works with ez -robot


now it works, trial and error, happy I learned perseverance a long time ago :-)

thanks
PRO
Synthiam
#27   — Edited
Latest update (v16) checks if the config directory exists. If not, it defaults to the plugin folder config.
PRO
USA
#28   — Edited
I do have C:\ProgramData\ARC\Plugins

I made a folder in my C:\Users\angbe\Documents\ARC\Plugins (I made the Plugins folder)  and copied all the plugin files in there, it works now
PRO
Synthiam
#29  
That’ll break it in the future. My instructions were correct. I didn’t ask if you had the folder. The instructions were to select that folder as the configuration. See my screenshot vs yours. 

my advise is to delete the new folder you created and update the plugin. The new plugin will auto adjust to the correct folder.
PRO
USA
#30  
ok I will try that
PRO
USA
#31  
I deleted the folder as you stated, closed the program, then re-started it, installed it Aiml again,  and no luck, I will reboot and come back,
PRO
USA
#32  
Still does not work

When I go to shut the program, it freezes all the time
PRO
USA
#33   — Edited
all good now!! 

fixed the code

thanks
#34  
Hi DJ,

First of all I have been using this with Bing for a while now and it works great! Thank you for all your work! It is absolutely wonderful! Leaving behind the original windows speech recognition is FANTASTIC. Windows was wrong much more than it was ever right. Also, I finally started to customize my AIML files--and that's a whole lot of work! 

1. Now my first question is this, when I "say(...)" every line that is returned from aimlbot, aimlbot sometimes gives me a ":-)" and of course that is not pronounced correctly. Any suggestions on how to get rid of smilies before they get to "say(...)"?

2. Is there any way to have the robot ask for my name at the beginning of the aiml session? 

Thanks. 

Thomas

PS. is it A.R.C. or ARC like Noah's Ark?
#35  
I deleted all of the :-). That worked for me. Editing a set of AIML files is quite time consuming.xD
#36  
Hi,
When I SEARCH on some text, I get a windows error message.

1. Go to aimlbot / settings window
2. enter "dj" into the text field.
3. click the "Search" button

Expected: file opens for editing.
Actual: Windows error message states, "Windows can't open this type of file (.aiml)"

User-inserted image
PRO
Canada
#37  
Hmmm...it works for me, it gives me this pop-up:

User-inserted image


The problem seems to be on your end, maybe do try to set the default program that opens .aiml to Notepad. Right-click on an .aiml file and select "open with" then "choose another app" and then select the checkbox to "Always open with this app" and then select Notepad to open it.
#38  
Yeah, that looks like the problem. I needed to set the default application to open AIML files. I picked "notebook" although It isn't great.

It seams that aimlbot needs a manual all for itself.:)

And that "Gaitobot", I can't seem to get it working right. I have yet to be able to create and edit an AIML file. I have been messing with it for over an hour with out any success.  It just gives me all sorts of errors. And the help files were not much help either.
PRO
Canada
#39  
I'm not sure what Notebook is but Windows Notepad is a classic text editor that you can't go wrong with.

AIML isn't something Synthiam developed, rather we support it. AIML is a rather large topic and while we can offer a quick way to access .aiml files we can't support the format itself here. If you are new to AIML I would recommend that you browse around the web and get more acquainted with it. 

Gaitobot actually has a very comprehensive getting started tutorial, have you seen it: 
https://www.gaitobot.de/gaitobot/AIMLEditor/Tutorials/en/GaitoBot_Tutorial_0001.htm
#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
PRO
USA
#61  
@Thomas,
is there any instructions anywhere on the web how to use the editor.
thanks in advance.
PRO
USA
#63  
Thanks DJ,  Looks like it;s German, I think I get the jest of it.
PRO
Synthiam
#64  
I noticed that as well - it's not very well documented. It would be nice to find a manual for it. I thought there was a webpage or some help file included with the program? Is there anything in the installation folder?
#65  
v21 has been updated 

- new ControlCommand added that allows specifying "memory" values of the current session programatically. For example, you can set the user's name with

Code:


ControlCommand("AimlBot", "SetValue", "name", "Mr Bob");


And when the chatbot is asked "What Is My Name?", the chatbot will respond with the name.
User-inserted image


- There is a new option to view all memory settings
User-inserted image


All settings and their values will be displayed....
User-inserted image