If you've been following my posts on artificial intelligence (or AI, if you prefer), you may have already spent some time playing with Eliza and consulting with the Emacs Doctor. I hope so because I'm going to take this one step further. Log in to your Linux system and let's get going . . .
As much fun as the emacs doctor might be, you'll soon discover that it's not much different from our friend, Eliza. For a more credible machine intelligence, you'll soon run into something called AIML, or Artificial Intelligence Markup Language. Much of the energy that has gone into developing AI programs of late focuses on AIML interpreters and the A.L.I.C.E. system created by Dr. Richard Wallace (more on this shortly). Dr. Wallace won the 2000, 2001, and 2004 Loebner prize for the most 'human' program; that would be the bronze since no one has yet claimed the gold.
There are many AIML chatbots out there. Some masquerade as famous people like Captain Kirk, Elvis, or God. And yes, you can chat with them on their respective Websites. If, however, you'd like to get into the AIML action yourself, start with one of the projects built on this language. Like Howie.
Howie is an artificial intelligence whose AIML interpreter is written in Python (pyAIML), so he's a great learning tool if you want to create your own AI. Installation is easy and Howie will happily chat with you about a whole variety of things. Howie can also log into a number of communication systems like IRC or Jabber where he can pretend to be a real person and you can run your own Turing test. He'll answer questions, look up various bits of information for you such as addresses or definitions, and even do a little work for you. You can get Howie from howie.sourceforge.net.
Installing and running Howie is simple. Extract the distribution bundle into a folder, cd to that folder and run the following:
On the Ubuntu system on which I did my testing, I needed to install the python-twisted-words package as well. The above command creates a file called runme.py which you can then execute to start Howie from the command line. For now, make sure you add the "-l" option to the runme.py script so that Howie runs locally rather than connectin to various network services ( ./runme.py -l ). Howie's prompt is ">>>". All you need to do is start typing.
>>> Hello Howie. What can I call you? >>> Marcel I've been waiting for you. What is your occupation? >>> I am a writer and computer guy. That is interesting. >>> Why are you asking me personal questions? Marcel Gagne programmed me for asking me personal questions. >>> I am going to have to talk to that guy. How do you plan to do this? >>> By talking to myself. Will that accomplish your objective?
Howie has an easy to read configuration file called howie.ini, found in the distribution directory. Just edit the file and change his name and his master's name to whatever you like.
# [botinfo] name = Howie master = Marcel
You can configure Howie to chat on a variety of services, from Jabber/XMPP, IRC, MSN, and others. For those who are curious about these things, there's a folder called howie with a subfolder called frontends where all the communication interfaces are found. To set Howie up with appropriate credentials for these services, edit the howie.ini file once again. You'll see several paragraphs like the following.
# The IRC interface [irc] active = yes server = irc.marcelgagne.com port = 6667 nick = Howie channel = #wftlchat # The Jabber chat interface [jabber] active = no username = password = server = jabber.org resource = default nickname = Howie
As you play and experiment with Howie, you'll see the name ALICE show up more and more. ALICE is a modern computer intelligence wh likes to think of herself as a sentient entity, claims to know a lot of gossip and expresses a fondness for Dr. Wallace, her creator. ALICE is but an acronym for artificial linguistic internet computer entity. As impressive as her conversational abilities are, ALICE, like Eliza and all other programs before her, has yet to pass the Turing test. That doesn't deter the legion of developers who continue to work on creating a program that will one day satisfy Turing's vision of a machine whose responses are indistinguishable from a human's, programs built on AIML and the ALICE framework. In fact, a visit to alicebot.org is a jumpimg point for not only the original ALICE code (all of which is GPL) but many other AIML implementations in PHP, Perl, Ruby . . . you name it.
One such implementation is a kind of living homage to the original alicebot code (known as ProjectD). He's called charliebot and you can download him from sourceforge.net/projects/charliebot/ where the source waits for you to join the search for artificial life. I say 'he' but charliebot comes with three distinct AI personalities. They are Charlie, Anna, and Alice. That's because Charlie is based on Anna who is based on Alice. The charliebot code itself is written in Java and does require that you have a copy of Java on your system, whether you choose to simply run the program or compile it yourself. To get a feel for ALICE, you may want to start with the precompiled version and run it using the Java Runtime Environment (JRE).
Human: Do you like being a program? ALICE: I have never known another existence. Do you like being a human?
If you would like to work with the source code and compile ALICE yourself, you'll need a full Java Development Kit. Either way, you need to get ALICE and the AIML language. These can be downloaded from the Alicebot web site at alicebot.org. Click the downloads link and prepare to be a bit confused because the site will direct you to a number of ALICE implementations. One of these is programD.
Get the latest program code and unzip it into a test directory. (In order to do your own development, you will also want the AIML language code, the current file being standard-aiml-current.zip.)
tar -xzvf charliebot-src_4.1.8.tar.gz cd charliebot
To start the charliebot server, execute the following command:
The system will respond with the following dialogue:
Starting Charliebot version 4.1.8 [17:28:55] Using Java VM 20.1-b02 from Sun Microsystems Inc. [17:28:55] On Linux version 3.0.0-14-generic-pae (i386) [17:28:55] Predicates with no values defined will return: "it". [17:28:56] Initializing Multiplexor. [17:28:56] Loading Graphmaster. [17:28:56] Starting up with "/home/mgagne/src/charliebot/conf/startup.xml". [17:28:56] Configuring bot "Alice". [17:28:56] Loaded 291 input substitutions. [17:28:56] Loaded 19 gender substitutions. [17:28:56] Loaded 9 person substitutions. [17:28:56] Loaded 48 person2 substitutions. [17:28:56] Loaded 4 sentence-splitters. [17:28:57] 6000 categories loaded so far. [17:28:58] 12000 categories loaded so far. [17:28:59] 18000 categories loaded so far. [17:28:59] 24000 categories loaded so far.
Eventually, you'll see Alice come online.
[17:29:14] Response 1 in 483 ms. (Average: 483.0 ms.) [17:29:14] Alice> Can you tell me any gossip? [17:29:14] [Alice] user>
You can now start chatting with Alice, the default of the three personalities.
Alice> Where are you located? user> Near here. Alice> Tell me a little about your life in Near here. Well I live in a house with my wife and two boys. Alice> Well that's okay. How much is your rent? That's a rather personal question. Alice> Perhaps you have a personal answer.
At any point, you can switch to one of the other personalities.
/talkto Charlie /talkto Anna
There's a lot of system chat happening between the responses where you can see how your text is analyzed and the reponses formulated. What makes the whole program far more interesting is that it's actually running on port 2001 of your computer. What that means is that we can access charliebot using a Web browser. Conversations are much easier to follow this way.
http://localhost:2001/?botid=Anna&template=anna http://localhost:2001/?botid=Alice&template=alice http://localhost:2001/?botid=Charlie&template=chat
For those who have their own Web server, you now have a ready made AI to chat with visitors. The package comes with lots of information on how to modify the AI, the server, and more. It's a great place to start. Meanwhile, the entire conversation is being logged in the charliebot directory. There's a folder called logs where the conversations for each personality is stored.
To see other attempts at AIs (based on the ALICE and AIML framework), check out Pandorabots.com. It's essentially a site where you can host your creation and try out those created by others.
One of the things you'll notice about all of this is the decided lack of anything really new. I would suggest that is because artificial intelligence has already hit a kind of wall, at least when trying to mimic human conversation. Many AIs have already been put to work in online stores, answering questions, and trying to upsell. Visit the Loebner prize site and look at the winners of the last couple of years -- they're selling their AIs to sell. We shouldn't be surprised, I suppose. Robots are machines and machines are just tools created to serve their human masters.