iwho home

Wonko - BOTmaster ...

Why don't you come up to the lab,
and see what's on the slab.
I can see you're quivering with an-ti-ci ........ pation.

Well, I've been making me a man,
with blonde hair, and a tan,
and he's good for relieving my ........ tension.

I'm just a 1337 bot master,
from Sunny Brisbane,
[apologies to F. N. Furter, Dr, retired, for stealing and mashing lyrics unashamedly]

Wrangling with artificial intelligences is my current passion. More specifically, AIs that can link to things in-world in SecondLife via mash-ups.

A curious mash-up sequence that involves an AIML conversation bot, a client-side utility that messages via port 80 [the http port ... yes, plain old web] to log in an avatar [player file] into SecondLife, connect it to the AIML bot [so you can talk to it] whilst providing some degree of remote-control to that avatar is what I am currently researching - phew.


Well ... my SecondLife avatar, Wonko Whizenhunt is building an historical SecondLife sim above an island owned by Decka Mah [RL name Lindy McKeown, a PHD researcher looking at learning models in 3D worlds - I am one of her "lab Rabbits"]. The sim based on some fact and a lot of conjecture, and need "players" in the scenario that visitors can interrogate, that can take part in a murder trial, generally do things on their own, and because I thought this would be a cool way to experience a narrative.

I have already created static objects that talk - thanks to a variation of an ingenious script developed by Azwaldo Villota [a nice e-chappie that is a teacher and researcher in the US whom I have only met virtually - RL name John Wallace] and am looking at using a range of interactive objects to embed clues, information and provide a rich experience for the visitor.

This research, strangely, has not come without cost. Time and energy probably being the most expensive here, but knowledge is a good thing. I needed an in-world agent that would connect an avatar to the conversation engine - these are beginning to emerge, one that I bought (L$2000 EACH avatar = approx $7 in real money) was made by a SecondLife Resident called Thoys [SLURL] thanks to a grant from Decka. I created my ALT avatar [apparently not wise to use your primary avatar for this, as it terminally breaks it - a feature apparently] and then associated that avatar to the in-world agent by telling the vending machine who the "owner avatar" was - in this case Wonko Whizenhunt was going to be the owner of the ALT avatar named Doppelganger Writer.

Then I browsed on over to Thoys's Wobshite : http://slbot.thoys.nl/ and downloaded the client program that is used to control [much like a puppeteer controls it's puppets] via http strings the in-world avatar, unpack and run the install. It is a great shame that there is almost NO documentation for this tool, and the links of the wobshite mostly lead to "to be developed" pages - you get that. The story continues ...

So ... to the process of AIML mash-up bot creation:

defining the AIML bot
Sign in to PandoraBots Site

The nice people at pandorabots.com offer free, trainable, AIML-based bots. Aren't they nice?

AIML is Artificial Intelligence Markup Language - a subset of XML, allowing associative definition of question/response and pattern-based chat

The botmaster console allows you to manage your many bots [well, yes, when this screen grab was taken there was only 1].

As far as I can tell, there is no stated limit on the number of bots you can have.

Bot Flavour Specification

Pandora offers a few basic flavours of bot, I have only experimented with a few - for this character I decided to start with a blank bot. Give it a name, press create and you are ready to start teaching your bot stuff.

The different flavours determine what AIML markup your bot starts with - some are very chatty and rich, others appear confused, still others arrive tabla-rasa [empty headed]

define your bot

The basic steps [as I have encountered them, so far] are:

  1. define bot properties
  2. train it with specific content
  3. publish it so it can be contacted in the outside world.
add properties to your bot

Properties are things about itself that the bot knows. In the pictured example, I have added a property called "age", so that when a chatter asks "how old are you" it will access this property.

I am still learning what to include as properties and what to include as general chatter in the conversation training [later].

there seems no logical limit to the complexity here, and if you create an odd property that it cannot connect with you can always tweak it's response later in the trainng interface.

begin conversation training

When training a bot, you type the thing you might say to the bot - it will search it's conversation database looking for "matches" to all or part of what you said, and respons accordingly.

Because I started with a blank bot, it does not know how to respond to anything much at all. this is where it then becomes time consuming but interesting.

no idea response

The training interface indicates how truly blank my bot is initially. When I mention a key question to it "what is evidence", it has NO IDEA what I am talking about.

It's standard response is "I have no answer for that".

By entering questions and responses, you "teach" the bot stuff, presumably later the more you talk to it, the more connections it makes to that response.

learnt it

This screen demonstrates that the bot has now learnt that bit of knowledge.

Digging into it's AIML brain, the markup that has occurred is:

<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">
<pattern>WHAT IS EVIDENCE</pattern>
<template>Evidence is what will tell us the story of what really happened</template>

this is also fairly useful programatically, as the above markup can also be generated by server-side web services like alicebot.com, from locally hosted PHP/MySQL Databases, which in itself is a neat way to control your content without relying on third-party external services.

publish your bot To make the bot visible to the outside world, you PUBLISH it. There again seems no logical limit to the munber of published bots you can have - each publishing creates the necessary database links to allow you to chat to that bot via HTTP [common old web].
a published bot

We now have a live-to-web bot. Talk to him:


or see and talk to the flash-interfaced [Oddcast VHost] bot at:


The "botID" is important here - as it is the Pandora-specific Unique Identifier used later.

Connect and communicate

A video tutorial that almost, but not entirely, fails to adequately describe very much useful at all - pity really as this is almost the only documentation available from Thoys.

It does, however, address visually the process of associating the bot to an alternative avatar's account, and hints at a command set you issue to your bot in-world via instant message to it.

r-click on tray icon of running client program

r-clicking on the tray icon brings up a menu that lets you initiate the remote login process - choose ADD CLIENT.

this menu also lets you switch between the bots [yes, apparently you can have many bots in at the same time - yet to test this]

nominate avatar to activate remotely nominate the login details of the ALT avatar [remembering, this ALT Avatar is like a totally complete character, not a dumbed down object pretending to be a person-driven in-game presence]
bot comes in-world without me You get confirmation when your remote instance has entered the SecondLife Grid
Connected, nominating owner of bot You can nominate who is in remote control of this avatar, and the tabbed dialogue lets you browse some of the characteristics of this avatar remotely.
remote inspection of inventory ... including it's inventory - not yet sure how useful this feature is in the current version of the client.
remote-chatting through the external client

You can hold conversations with anyone in talking distance, without being in-world. A truly useful feature would be the ability to IM people also, but that is not available yet.

Similarly, with the inventory not active, remotely teleporting and other things are not accessible. this necessitates the puppet master being in-world to get the ALT avatar to do much more than speak.

connecting the in-world avatar to the out of world AIML bot

By wiring the ALT avatar to your pre-prepared Pandora AIML Bot, that avatar has fulll control over the pre-programmed vocabulary. This is where it starts to get interesting, as the avatar is live in world, and can be talked to as though it is a person, it looks like a person and can be dressed appropriately.

This has real potential to be useful I think as an in-world expert when real people are not available.

So we come to the wierd [yet strangely wonderful] part of the project - with Me in world [the handsome grey thin alienesque chappie in the tweed suit - it was late, and I was tired] with my Doppelganger [the muscle-bound hunk of spunk], I can issue commands to get him to do stuff.

Pictured are me dancing with myself [nigel no-friends?] and simultaneously having a chat, with the response from Doppy coming from the AIML Pandora Bot made previously.

There is something slightly surreal about this scenario, particularly as my doppelganger dances better than I do, but exploring the command set, there seems some commands that work better than others. I have summarized the command list below, but have found some of them do not yet work - I can hope this is still in development as I see HUGE potential should it ever stabilise.

This is an in-world demo of Me with my BOT, dancing with myself [yes, I realise just how sad that sounds].

It demonstrates some of the abilities of the Bot to converse using the Pandora Chat engine, and obey instructions Instant Messaged to it.

available commands:
repeatanims, stoprepeatanims
clone, detach, fixlook, wear, wearnum
deletethis, rezmap, thiskey, thispermissions
dialoglisten, dialogreply, listen, say, saychan, shout, stoplisten, whisper, who
balance, buythis, givecash, paythis, sellthis
allrights, invitefriend, resetrights
help, helpnote, programstats, regioninfo, version
cd, ls, mkdir, rezinvo, rmdir
fly, follow, land, sit, sithere, sitkey, sitnum, stand, stopfollow, teleport, teleportav, teleportme, touchhere
busy, forceresit, logout
Command Notes Usage Works?
repeatanims repeats someones animations. usage: /repeatanims [Firstname] [Lastname] yup
stoprepeatanims stops repeating someones animations   yup
clone clones an avatar. (use this function on own risk, the bot will send an instantmessage with a verification to the one you want to clone) usage: /clone [Firstname] [Lastname]  
detach detaches an Item (Not Implemented)    
fixlook gets rid of the ruthed avatar    
wear wears the object/directory/clothing with the given name in the inventory usage: /wear [name]  
wearnum works after usage of wear command when there are multiple wearables with the same name    
deletethis deletes the object that you selected last, by clicking it with right    
rezmap rez a map of the sim you are in now    
thiskey gets the key of the last selected object usage: /thiskey  
thispermissions sets the permissions of the object you selected last usage: /setpermissions [type] [permissions]".type can be everyone, group or nextowner. permissions can contain +, -, m, c, o and t ( m=mod c=copy t=transfer o=move +=setpermissiontrue -=setpermissionfalse) e.g. "/thispermissions nextowner +cm-t  
dialoglisten if a dialog appears it will be sent to your IM    
dialogreply reply on a dialog usage: /dialogreply [channel] [option]  
listen listens on local chat and sends it to your IM    
say say to local area   yup
saychan say to localchat channel. (could also let you talk on negative channels) usage: /saychan NUM MESSAGE  
shout shout to local area    
stoplisten stops listening on local chat    
whisper whisper to local area    
who who is arround    
balance shows the current L$ balance of the bot   yup
buythis buys the last selected object usage: /buythis  
givecash Gives you cash usage: /givecash AMOUNT  
paythis pays the last selected object with the given price usage: /paythis [price]  
sellthis sells the last selected object for the given price usage: /sellthis [type] [price]" type can be original, not, contents or copy. e.g "/sellthis copy 300  
allrights gives the bot all rights on the friendlist (mod rights/see on map map/show online)    
invitefriend sends an friendship invite to the person usage: /invitefriend [Firstname] [Lastname]  
resetrights resets the friendlist rights to show online only    
help shows available commands and takes commands as parameter to see their info   yup
programstats shows the current memory usage of Thoys' SL Bot    
regioninfo hows the info of the given region, can also show info about the current region if no name is given usage: /regioninfo [name]  
version shows the current version    
cd changes the current directory usage: /cd [directory] yup
ls shows the contents of the current inventory directory   yup
mkdir creates a new directory in the current directory usage: /mkdir [directory] yup
rezinvo rezzes an inventory    
rmdir removes a directory in the current directory usage: /rmdir [directory]  
fly makes the bot fly    
follow makes the bot follow someone, enter no name to let it follow yourself usage: /follow [name] yup
land makes the bot land    
sit makes the avatar sit on the object usage: /sit [object]  
sithere makes the avatar sit on the object you selected last, by rightclicking it    
sitkey Sits on a object with the key you entered usage: /sitkey [KEY]  
works after usage of sit command when there are multiple objects with the same name    
stand makes the bot stand up    
stopfollow makes the bot stop following    
teleport teleports the bot to the given location usage: /teleport sim/x/y/z  
teleportav makes the bot send the av an teleport to its location usage: /teleportav [Firstname] [Lastname]  
teleportme makes the bot send you a teleport to its location    
touchhere makes the avatar touch the object you selected last, by rightclicking it    
busy toggles the users busy status usage: /busy  
forceresit toggles the resit function that is used for resitting the bot when its kicked off a chair (its on by default)    
logout turns off a bot usage: /logout yup

as I get commands to work, I will annotate the above table.


What do you think?

Mail me with your ideas/feedback - I'll post it for others to see if you like.

© w2k+7
goto wOnKosite