Wednesday, November 23, 2011

How to Create Custom Pandorabot Responses

Second Life Pandorabots come preconfigured with AI response capabilities using Wikipedia, Wolfram Alpha, and an Artificial Linguistic Internet Computer Entity (A.L.I.C.E.) programmed in AIML. By default, all Pandorbots use a customized Bot ID at pandorabots.com for their AIML responses. This default Bot ID has been extensively customized for use in Second Life by the Second Life Pandorbots. However, some owners of Second Life Pandorabots may wish to customize their Pandorabot to provide responses specific to their deployment (e.g. shop attendant, tour guide, roleplay bot, etc).

Create Your Own Bot At Pandorabots.com
In order to provide site specific customized responses for your Pandorabot you need to create your own Bot at pandorabots.com. First, sign-up for an account at pandorabots.com by visiting http://pandorabots.com/botmaster/en/new-account. After you have registered for an account and logged in, click "Create a Pandorabot". Enter a name for your Pandorabot in the name field and select one of the "Startup AIML" choices. The default Pandorabot Bot ID uses Dr Wallace's A.L.I.C.E. for the startup AIML and this is the one you should select if you are going to be copying the Second Life Pandorabots AIML (see below).

Train Your New Bot
Once you have entered a name and selected a startup AIML, click "Create Pandorabot". You are now ready to either train or program your customized Pandorabot. The easiest way to provide custom responses is by "training" the Pandorabot. Click on the "Train" button near the top of the page. This allows you to enter phrases a human might say to your Pandorabot, see what the Pandorabot would reply, and type in the response that you would like your Pandorabot to give instead.

Edit Your New Bot's Properties
In addition to training your Pandorabot for specific phrase recognition and custom responses you can edit the Properties of your Pandorabot by clicking on the "Properties" button near the top of the page. Fill in, add, or change any of the Property fields on this page and click "Submit Changes" at the bottom of the page.

Upload Replacement And New AIML Files
Advanced botmasters can more extensively program the Pandorabot by editing the AIML (Artificial Intelligence Markup Language). This allows you to more generally specify patterns to recognize, categories, and templates with which to respond. To edit your Pandorabot's AIML, click on the "AIML" button near the top of the page. Here you can download, modify, and upload the AIML files your Pandorabot uses. First, let's see how you would replace some of your Pandorabot's AIML files with the ones I have customized for use in Second Life.

To use the AIML I have customized download a zip file of my AIML files at http://tinyurl.com/c433udn . My modified AIML files have been  named "AnaA", "AnaB", and so on denoting they replace the default AIML files named "A", "B", and so on.

Once you have downloaded my custom AIML return to the AIML tab at pandorabots.com. In the right hand column, uncheck the AIML files you will be replacing (e.g. uncheck A.aiml if you will be uploading my AnaA.aiml). At the bottom of the page, upload the custom AIML files you wish to use (e.g. the ones you downloaded from Scribd).

In addition to uploading my custom AIML replacement files you can create your own new AIML file specifying the responses you wish your Pandorabot to use. Copy an existing AIML file, rename it, and modify the categories, patterns, and templates to suit your individual bot's deployment. For instance, copy the "pandorabots" AIML file and rename it "MyShop.aiml" replacing the categories, patterns, and templates with phrases to match and responses suited to your shop. Upload your new AIML file(s).

Publish Your New Bot And Copy The Bot ID
Once you have customized your Bot as pandorabots.com you must "Publish" it to get a Bot ID. Click on the bot's name then the "publish" link. You will be taken to a page which says:
This pandorabot is published at:
http://www.pandorabots.com/pandora/talk?botid=blablabla 
Where "blablabla" above is your Bot ID. Copy this string.
Edit the Configuration notecard in your Second Life Pandorabot.
Add a line at the top of the notecard something like:
    BOT_ID = b8dad52dce344c95
but instead of "b8dad52dce344c95" use the Bot ID you copied
above. Save the notecard. You're done.

Subsequent changes to AIML you make at pandorabots.com will
be reflected immediately in your Second Life Pandorabot once
you republish your bot at pandorabots.com.

4 comments:

  1. Where can i find the secondlife script to link the pandorabot to SL?

    ReplyDelete
  2. I sell a variety of scripted agents linking Pandorabots to Second Life. You can find these in the Second Life Marketplace by searching for "Pandorabot Missy Restless" - http://bit.ly/xfltPD

    ReplyDelete
  3. Do you sell them full perm for creators?

    ReplyDelete
  4. No, I don't sell full perm Pandorabot scripts although some of my other items are full perm (e.g. the Wikimedia Commons Textures). I contract on a "per project" basis.

    ReplyDelete