Wednesday, November 16, 2011

How to Start METAbolt Every Time Windows Starts

The PC on which your METAbolt client is running can restart for a variety of reasons. Microsoft frequently installs updates which require a restart. Power interruptions, system crashes, and other temporary failures can cause your computer to reboot. You can easily configure your system to restart METAbolt when this happens thus keeping your bot(s) active and logged into Second Life.

Follow the procedure outlined previously and create a BAT file to start your METAbolt bot(s).

Copy the BAT file(s) to the Windows System Startup Folder:

Start -> All Programs -> Startup on the Start Menu

On Windows 7 this is the folder: 

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
Windows 7 does not allow shortcuts in this Startup folder so a copy of your BAT file rather than a shortcut must be created. Earlier versions of Windows will allow a shortcut.

Monday, November 7, 2011

Pandorabots Can Now Query Wolfram Alpha

The latest major upgrade to all Pandorabots includes support for Wolfram Alpha queries. Wolfram Alpha, created by Wolfram Research, is the world's most sophisticated answer engine. The combination of Wikipedia query, Wolfram Alpha query, and custom AIML responses from pandorabots.com make Pandorabots the smartest scripted agents in Second Life. Or anywhere, for that matter.

Wolfram Alpha query support has been added to all Pandorabots including the Pandorabot METAbolt Add-On, Pandorabot Actorbot Add-On, Restless Studio Smart Dance Pole, Inner Spheres, Pandorabot V5, and Subgenius Pandorabot.

To trigger a Wolfram Alpha query simply preface your local chat with one of the trigger phrases setup in the Configuration notecard. By default the Wolfram Alpha trigger phrases are "wolfram", "alpha", and "wolfram alpha". So, for example, chatting "wolfram what is the cube root of 387" would get a response from your Pandorabot:
Input :
387^(1/3)

Exact result :
3^(2/3) 43^(1/3)

Decimal approximation :
7.2873616311218428454286590881202865642949650868366337582348...

Continued fraction :
[7; 3, 2, 11, 1, 23, 1, 27, 2, 1, 1, 2, 2, 1, 28, 1, 47, 1, 5, 1, 3, 25, 5, 3, 1, ...]
Initially the Pandorabot is configured to use a shared demonstration Wolfram Alpha application ID limited to 2000 queries per month. Configure your Pandorabot with a unique application ID obtained by registering at http://products.wolframalpha.com/api . Edit the Configuration notecard and set ALPHA_APP_ID  to your App ID.

Sunday, November 6, 2011

How to Configure a Non-English Second Life Pandorabot

I receive frequent requests from Pandorabot owners asking me how they can get their Pandorabot to respond in a non-English language. The default behavior of all Pandorabots including the Pandorabot METAbolt Add-On, Pandorabot Actorbot Add-On, Smart Dance Pole, Inner Spheres, and Pandorabot V5 is to look for trigger phrases in English and respond in English. Some default responses are non-English where translations have been provided in the Artificial Intelligence Markup Language (AIML) the Pandorabot is using at pandorabots.com. Here's how you can configure your Pandorabot to recognize non-English trigger phrases and respond in a non-English language.

The following settings in the Configuration notecard control language preferences in Pandorabots:


Quick & Easy

Edit the Configuration notecard in your Pandorabot and add the following two lines to the top of the notecard:

    LANG_CODE = xx
    WIKIPEDIA_TRIGGERS =what is ,?,what's ,?,what're ,?,what is a ,?,what is an ,?,what is the ,?,what are the ,?,what's a ,?,what's an ,?,who is,?,who are,?,who're,?,who's,?,,?

Where "xx" is one of the 2 letter language codes from the "Wiki" column in the table at http://meta.wikimedia.org/wiki/List_of_Wikipedias

More Difficult

Add translations of the Wikipedia triggers in the language you prefer. For example, to configure your Pandorabot to query the French Wikipedia when it detects "who is", "what is", or "who are" in French spoken in local chat, set the following:

    LANG_CODE = fr
    WIKIPEDIA_TRIGGERS =what is ,?,what's ,?,what're ,?,what is a ,?,what is an ,?,what is the ,?,what are the ,?,what's a ,?,what's an ,?,who is,?,who are,?,who're,?,who's,?,ce qui est ,?,qui est ,?,qui sont ,?,,?

Similarly, add translations for the EMAIL_TRIGGERS, SPELL_TRIGGERS, and SHUTOFF_TRIGGERS

Detailed & Thorough

Edit the Configuration notecard in your Pandorabot and modify the following notecard settings:

LANG_CODE
Use one of the 2 letter codes from the "Wiki" column in the table at http://meta.wikimedia.org/wiki/List_of_Wikipedias
For instance, to query the Italian Wikipedia, set
    LANG_CODE = it
If no Wikipedia article exists for your query in the preferred language then the Pandorabot will try the English Wikipedia.

LANG_CODES
A list of 2 letter language codes which will be selectable via the Pandorabot dialog menu.

LANG_NAMES
A list of language names that correspond to the LANG_CODES list. This is what will be displayed in the Pandorbot dialog menu buttons.

UNWIKIABLE_PHRASES
This is a list of phrases which should not be passed to Wikipedia. To accomodate non-English speaking guests, you can translate these phrases into your guests' language(s) and either replace or add to the list.

WIKIPEDIA_TRIGGERS
These phrases trigger a Wikipedia query. Add to this list similar phrases in the language(s) your guests will be using. Alternatively, to force every message the Pandorabot hears to Wikipedia, add an empty string to the list of triggers. For example:

        WIKIPEDIA_TRIGGERS =what is ,?,what's ,?,what're ,?,what is a ,?,what is an ,?,what is the ,?,what are the ,?,what's a ,?,what's an ,?,who is,?,who are,?,who're,?,who's,?,ce qui est ,?,qui est ,?,qui sont ,?,,?

ALPHA_TRIGGERS
These phrases indicate the resident wishes to query Wolfram Alpha for a factual answer. The default Wolfram Alpha triggers are “wolfram alpha”, “wolfram “, and “alpha “. For example, to ask Wolfram Alpha for the cube root of 387 you could say “wolfram what is the cube root of 387”. If you wish to provide Wolfram Alpha triggers in another language, add them to this list.

EMAIL_TRIGGERS
These phrases indicate the resident wishes to send email. Add to this list similar phrases in the language(s) your guests will be using.

SPELL_TRIGGERS
These phrases indicate the resident wishes to check the spelling of a word. Add to this list similar phrases in the language(s) your guests will use.

SHUTOFF_TRIGGERS
These phrases will shut the Pandorabot off until touched. By default the Pandorabot will stop responding when it hears either “Be quiet” or “Shut up” in local chat. Add to this list similar phrases in the language(s) your guests will be using.

Greeting New Arrivals

To set the greeting issued to new arrivals, edit the Greeter_Config notecard and set the GREET_1, GREET_2, GREET_3, and GREET_4 variables with a welcome message in the language of your preference.

Custom Language AIML

Many of the Pandorabot responses are generated with the Artificial Intelligence Markup Language (AIML) at pandorabots.com. Even with all of the above settings configured for a non-English language the Pandorabot will still draw some responses from either the English language Wikipedia, Wolfram Alpha, or the AIML responses at pandorabots.com. Many of the responses at pandorabots.com have been translated into German and French. However, most are English only.

To provide for non-English pandorabots.com responses it will either be necessary to translate the existing default AIML or create a custom set of AIML files in the preferred language. If you have a custom set of AIML files already prepared and used by a public Pandorabot at pandorabots.com then you can configure your Second Life Pandorabot to use that AIML by setting
    BOT_ID = that-pandorabots-id
in the Configuration notecard.