AtmoWire  
  Adobe Atmosphere tutorials, resources, directory, reviews, and news.  
 
  Home
  Features
  Directory
  Forum
  Tutorials
  Resources
  Reference
  Calendar
  Contests
  Job Listings
  Builder Profiles
  Store
  Links
  Contact








Chat-Bots in Adobe Atmosphere
     Part two of a six part tutorial by Stuart Forbes

Setting up your own pandorabot
What's Part 2 all about?
In Part 1 of this tutorial you set up a link to our pandora bot. This is an artificial intelligence robot based on the work of Dr. Richard Wallace and the A.I.M.L. foundation. In Part 2 you are going to learn how to create your own pandorabot, and link it to the world you set up in Part 1.

Step 1: Register and Log In
Click here then fill in the registration form to set up your free account.

Once this is set up click here to go to the main page and enter you email address and password to log in (you may also see a link at the bottom of the page with your name that lets you log in automatically).

Step 2: Create a bot
When you've logged in, click on Create a new bot (top left of screen).

On the new screen, enter the name you want to give your bot next to Bot Name. Then under the section: Startup AIML - please select the AIML set you wish to include. (we suggest you choose Option 2 - Dr Wallace's A.L.I.C.E - March 2002) this one gives you a very powerful and interesting bot script to get you started.

Finally, click on Create Bot

Step 3: Publish your bot
In the section under Your Bots you'll see a row starting with the name of your bot - click on Publish in that row.

You'll now see the message: Your Pandorabot has been published. You can talk to your bot by clicking on this link. Click on that link and your bot page will now open - test it out by typing a message in the text box and pressing Enter on the keyboard- you should get a message back from the bot and a record of the whole conversation on screen.These next bits are very important, as you're going to need the information you get in the next Step:

  • In the address bar of your browser you'll see an address like: http://www.pandorabots.com/pandora/ talk?botid=ef79e46abe35c1e7 write down your bot's id (all the characters after the = e.g. ef79e46abe35c1e7 in the example above) or copy and paste them into Notepad.

  • Now click View on your browser's menu bar then click the option Source. In the text now displayed look for: <input type="HIDDEN" name="botcust2" value="a1f154b1ce1c5619"> write down all the characters inside the quotes in the value = section (e.g. 1f154b1ce1c5619 in the example above) or copy and paste them into Notepad.


 
Step 4: Linking to your bot
On your hard drive, look for the file call that you downloaded in Part 1.

You'll need to alter this file by replacing the current bot id and botcust2 settings with the values you found in the last Step, like this:
  • Load the original file call from your computer into Notepad
  • Carefully alter BOTH sections of the script which say: botid=a1a50c598e34cbe by deleting the characters after botid= and replacing them with your bot's id (which you noted down or copied in the last Step)
  • Now carefully alter the section that says: botcust2=a14b35641e12eebd by deleting the characters after botcust2= and replacing them with your botcust2 value (which you noted down or copied in the last Step) NB be VERY careful how you do this, don't press ENTER or change any other characters and make sure you alter BOTH sections!
  • Now click File on Notepad's menu bar then Save to save the file
NB it is VERY IMPORTANT to follow these instructions exactly - only use Notepad and Save - DO NOT use another text editor or 'Save As' because you might mess up the hidden line feed characters in the file, which won't work when you upload it (Unix is VERY fussy about its line feeds - I know I've wasted hours on this!!!).

Now upload the amended file to your cg-bin directory (see Step 1 for details), replacing the one that's there and making sure you set the new file's permission to 755.

Testing the link
Now it's time to test it out in the sample world page you uploaded to your site. This is called testbot.htm. Type the address in your web browser e.g. www.yoursite.com/bot/testbot.htm where yoursite.com is your site's address and bot is the folder you saved the main files in.

When the page has loaded, try asking the bot a question by typing it in starting with B: e.g. B: How are you? You should get an answer in the chat line starting with Bot Says: which is the last response from your new bot on your pandorabots page e.g. Bot Says: Hi. This can take a few seconds especially if the net is busy.

If you don't get an answer check whether Adobe's chat server is working by clicking:

and checking whether there are any names in the User Box that pops up. If it's blank, try refreshing the web page (F5) - if that doesn't work you'll have to try again another time when the chat server is working, sorry!

If the chat server is working and you still can't get a response, try checking the call file again to make sure you've altered it correctly for your bot's id (it might be worth downloading the original file from Step 1 again and altering that).
If you're still having problems then pay a visit to my forum - there's a topic called Using Intelligent Chat Bots in Atmosphere where you can find out more information and post any questions you may have.


  Go to:     Part 1     Part 2     Part 3     Part 4     Part 5     Part 6 Coming soon  


Please be sure to check out Stuart Forbes' website at http://www.hsworlds.com.

To view more great worlds that Stuart has built Click Here.


Copyright© 2004 AtmoWire.com - All rights reserved.