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 one of a six part tutorial by Stuart Forbes
As there's a lot to cover and we have limited resources we are developing this tutorial one step at a time. For help with it, or to share ideas with other people interested in bot development why not visit our conference room. Our events calendar lets you know when tech help will be on line, and when the next tutorial stage will be ready, and our forum has a section especially for bot development. We don't know all the answers yet, but together we'll find them! (editors note: the above links refer to pages on Stuart's site at http://www.hsworlds.com.)

Installing and Testing the Java Applet
What's this tutorial about?
This whole tutorial is aimed at helping you set up a intelligent, talking chat bot in your world. We are very grateful to Superted for permission to use his java applet that is a very important part of the process. If you would like to see an example of a bot in action before you start, take a look here.

What's involved?
There are 6 main stages to the process:
  • installing and testing Superted's java applet to connect to our pandora bot
  • setting up your own pandora bot and checking out communication with it
  • setting up and testing the text to speech system
  • setting up bot animation
  • adding the bot script to your own world
  • teaching your chat bot what to say
What do I need?
Firstly,you need a web host which allows you to use CGI scripts. Most hosts do, but you need to check this out. You also need to find out from your host (e.g.from their FAQ/ forum) what is the name of the *root directory for storing cgi files (e.g. cgi-bin) and the **path to use for calling PERL scripts (usually /usr/bin/perl).

Secondly, you need an FTP program for uploading files to your web host and setting up file permissions etc. There are many excellent free/shareware/low cost programs out there - we use SmartFTP.

You also need to have had some practice in uploading files and setting up file permissions (not the space here for a full tutorial on that I'm afraid!)

Thirdly, you'll need a fair bit of patience (but if you've been using atmo for a while you've probably got that!)

Installing Superted's java applet
Firstly you'll need to download the files here, and use e.g. WinZip to unzip them into a folder. Now copy all these files into the same folder on your web site (e.g.called bot) EXCEPT pandorabots.cgi and call - these need to be copied into your site's *root cgi directory (e.g. cgi-bin.

Now you have to set the file permissions for both of these files to 755 - this is VERY IMPORTANT. e.g. In SmartFTP right click on the file in the host directory, type 755 into Permissions then click OK:

 
Testing the applet on its own
In your web browser's address bar, type in the web path and file name for your pandorabots.cgi file. This will probably be something like www.yourworld.com/cgi-bin/pandorabots.cgi This should print out a message in your browser something like: Hello there

If you want to see how it should work, click here to try out the script on our site.

If yours doesn't print anything like this, then you need to experiment with the path name (check out with your web host how files in the cgi bin are accessed directly from the web)

If this doesn't work then you need to check out with your web host where PERL scripts are run from - If it's different from /usr/bin/perl then you'll need to alter the file pandorabots.cgi to suit like this:
  • load the original pandorabots.cgi file from your computer into Notepad
  • carefully alter the line at the beginning (#!/usr/bin/perl) so it refers to the location your web host has given you - make sure you leave the #! bit at the beginning)
  • 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 and make sure you set its file permission to 755.

If you're still having problems then pay a visit to our (HSWorlds.com's) 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.

Testing the applet in a world
If the applet is working on its own it's time to test it out in the sample world page you uploaded to your site. This is called bot.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:  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!


  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.