artificial intelligence

Anthropomorphizing Spirit

This morning,  I  was telling Sally about an xkcd cartoon where the Spirit rover is doing its  work on Mars,  counting down the days until its mission is over. The rover is seen thinking about the day when it can come home, then starts to question what it did wrong as the days and months pass. Eventually, humans return to Mars, long after Spirit had "died".

17
Jan

ALICE and friends. Artificial Intelligence Reloaded

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.

16
Jan

Is Artificial Intelligence A Threat?

Once upon a time, I believed that someday soon, computers would be so complex, the programs so sophisticated, the interconnectedness of networks so all-encompassing, that is was only a matter of time before a true artificial intelligence emerged from this vast computational creation. I read everything I could on the subject, focusing much of my attention on the emerging field of neural networks. I lapped up science fiction stories about intelligent computers (in truth, I lapped up science fiction in general). I also developed a real fondness for any and all attempts at creating a machine that could pass the Turing test.

Alan Turing died in June 1954 less than three weeks before his 42nd birthday. Nevertheless, the computer you are using today, along with many of the programs you use on a day to day basis, owes a lot to Alan Turing, computer scientist, mathematician, and cryptographer extraordinaire. Thanks in large part to his work, the Allies were able to decode the German Enigma code in the Second World War, an important step toward defeating the Nazis. You could also call him the spiritual father of modern artificial intelligence research. Anyone working in the field of artificial intelligence knows about the Turing test.

For many in the field of artificial intelligence research, Turing's famous test proposes a means of determining whether a machine, or a program, could show intelligence -- whether it could think. Here's the short version of the Turing test which Turing himself actually called "The Imitation Game".  A human subject, who will act as judge, is placed in front of a keyboard in an isolated room. Somewhere else, another person in another location takes part in what we would today call an instant messaging conversation. There is a third participant, a computer program. The conversation begins with the computer program and the other person chatting with our judge. The human will obvioulsy converse as a human. The computer will imitate a human being engaged in conversation. If the judge cannot tell the human from the machine, the machine passes the test.

Turing's original "Imitation Game" involved a man and a woman hidden in isolation. The idea was to see whether the judge could tell the man from the woman, strictly from the typed conversation.

It is amazing really—more than sixty years have passed since Turing proposed his famous test, and we are still trying to create these wonderful thinking machines. There's even a formal competition with a $100,000 prize and an 18 carat solid gold medal for the first person to create a machine whose responses are indistinguishable from a human being. It's called The Loebner Prize for artificial intelligence and as yet, no one has claimed the grand prize. 

For the record, I don't believe that true AI, a sentient self-aware computer intelligence, is actually possible or will ever happen. I used to think it was inevitable. If you wish to argue with me on the subject, feel free to comment. I could be wrong (it wouldn't be the first time) and a real AI may yet emerge from the complexity that is the Internet. My friend, Rob Sawyer wrote a marvelous trilogy ("Wake", "Watch", and "Wonder") about that very idea. His AI emerges from the background noise of the Internet, so to speak. By the way, if you haven't read the series, or read Rob's work, you are truly missing out.

Let's pretend that an AI was possible and that such an intelligence will, some day soon, emerge. Since, having been wrong before, I could be wrong about this, should we fear this emerging intelligence? What should we do about this intelligence once we become aware of its existence? Will it be a force for good, or the ruin of the human race? Would an AI, gifted with limitless knowledge and access to the world's computer resources, behumanity's greatest foe? 

My gut instinct has always been to treat it as a foe, a sadly human response I admit, but given the price of error, a prudent one. I have said for some time, as many will attest, that if we ever create a real AI, our first priority is to kill it. Or words to that effect. We would still have to define whether the existence of intelligence qualifies as life, a different arument for a different day. Nevertheless, my feelings have been unwavering for years now. Pull the plug! Turn it off. I’ve recently softened that stance . . . a little.

I recently watched a documentary on Ray Kurtzweill, called Transcendent Man. I’ve also been reading 'The Moral Landscape", by Sam Harris. In a sense, both these works have given me a little new insight, feeding, as it were, from each other.

In “The Moral Landscape”, Harris argues that we define our moral relationship with other life forms based on our understanding of their capacity to experience pain and suffering, as well ecstasy and joy. We crush an insect without thought because we don’t believe that an insect is able to experience the depth of feeling that a mouse or a bird or a dog can, never mind a human. While we do occasionally sacrifice animals for research, or labour, or food, we do think twice about the treatment they receive while they live.

Perhaps an AI, with its vast intelligence, would examine us through a similar moral lens, understanding that we humans, with our strange and sometimes extreme passions, and our capacity for experiencing everything from great joy to the deepest sadness, aren't merely annoyances that must be done away with. Maybe the very nature of intelligence demands that we examine everything through the prism of morality, seeking first to understand rather than destroy. In assuming that an AI must naturally be humanity's enemy, might we not be closing the door on our greatest friend?

Kurtzeill sees AI an inevitable, the natural extension of our own intelligence and the next step in human evolution. AI is part of the Singularity he sees as emerging in his own lifetime. Not the end of the human race, but the next step in our evolution. In his view, artificial intelligence isn't what kills us all, but what allows us all to live forever.

While I may still harbor doubts about the possibility of artificial intellligence, I view the old question differently. Friend or Foe? I still don't know, but I'm not as convinced as I once was that the prudent response to the emergence of AI is its destruction. 

And so I turn to you . . . assuming that an AI did come into being, what would you do about it?

20
Dec

Meet The Emacs Doctor

In my last article on the subject of artificial intelligence (or AI, if you prefer), I introduced you to Eliza, a computerized psychiatrist. Eliza may be simple, but she is patient and she's happy to let you talk.

Speaking of therapy, and at the risk of opening up old wounds and old battles, specifically the "vi vs emacs" conflict (the answer is vi, or vim), let's consider another form of AI therapy.

The original Eliza program was written using an early version of Lisp. It is not surprising then that one of the most famous examples of Lisp development included with your Linux system, the Emacs editor, should pay homage to the good doctor. When talking about Emacs, it becomes almost difficult to classify it as strictly an editor. The brainchild of Richard M. Stallman (founder of the Free Software Foundation), GNU Emacs is more than just a nice, powerful, if somewhat complex, editor. It's a mail reader, news reader, web browser, program development environment, Lisp interpreter and psychotherapist. No, really! I kid you not.

Try this. Start Emacs by typing emacs. You do not have to specify a filename for this. Now, press Esc-X, then type doctor and press Enter. The doctor is in. More so, the doctor lives! Note my conversation with the Emacs doctor in Figure 1.

Figure 1: The Emacs doctor IS in!

As much fun as the emacs doctor might be, you'll soon discover that it's not much different from our friend, Eliza. The advantage here is that, the doctor is always in, assuming, of course, that you have emacs installed. So next time you find yourself contemplating the meaning of life while you are in the middle of some stubborn Python code, save your work and just call up the doctor. It's free software so you can keep the 5 cents.

14
Dec

Need A Psychiatrist? Meet Eliza

For some of us, our original exposure to AI, or artificial intelligence, goes back to an old program called Eliza. Eliza was a kind of computerized psychiatrist written in the 1960s by Professor Joseph Weizenbaum at the Massachusetts Institute of Technology. Eliza (named after the character in George Bernard Shaw's "Pygmalion") was an exercise in human response and natural language communication with so-called machine intelligence. The version I played with all those years ago was a DOS program running on a TRS-80. Ah, nostalgia. Eliza may not have been a great doctor, but it was a fun and fascinating program, a kind of whimsical promise of the future of AI.

Over forty years have passed since Eliza made her debut in 1966. You can still find incarnations of her everywhere on the Internet. Eliza's ghost is represented in many of the bots and chatterbots you'll find on IRC channels and MUDs. In fact, you can download Eliza as a Perl module and experiment with the creation of your own bots using your own Linux system. The code is available at the CPAN repository or the Comprehensive Perl Archive Network. You can find the latest incarnation at http://search.cpan.org/dist/Chatbot-Eliza/ .

The file is called Chatbot-Eliza. When I picked up my copy, it was version 1.04 and I installed it in the following way.

tar -xzvf Chatbot-Eliza-1.04.tar.gz
cd Chatbot-Eliza-1.04
perl Makefile.PL
make
sudo make install

In the installation directory, you'll notice a file called simple. You can use this as the basis for creating your own AI, or you can simply execute the script by typing ./simple as I did in the following example:

$ ./simple
Welcome to your therapy session.
Your therapist's name is Liz.

Liz:    Is something troubling you?
you:    I'm concerned about artificial intelligence.
Liz:    Do you know anyone else who is concerned about artificial intelligence?
you:    Several people I know have different concerns regarding the subject.
Liz:    What differences do you see?
you:    Some are excited about computer intelligence and others are frightened.
Liz:    Do computers worry you?
you:    Not particularly.
Liz:    Tell me more about that.
you:    I've always had a fondness for computers, real or fictional.
Liz:    What about machines worries you?
you:    That they might actually understand what i am talking about.
Liz:    Are such questions much on your mind?
you:    Are they on yours?
Liz:    Possibly they are they on mine.
you:    Do you have anything else to offer?
Liz:    We were discussing you -- not me.
you:    I see. I should probably go.
Liz:    That's quite interesting.
you:    Goodbye.
Liz:    Goodbye.  It was nice talking to you.

The script that calls the chatbot can be extremely simple, hence its name. If you don't like the name Liz or the introductory text, edit the file and change it here.

use Chatbot::Eliza;
$chatbot = new Chatbot::Eliza 'Sigmund';
$chatbot->command_interface();

Make the script executable and run it. In this case, I have renamed my chatbot Sigmund. The default name is actually Liz. In the distribution directory, you will also find a file called doctor.txt that can be used as the basis for your own bot. I created one called mywords.txt from the doctor.txt file and modified my startup script slightly:

#!/usr/bin/perl -w
use Chatbot::Eliza;
$chatbot = new Chatbot::Eliza {
        name => 'Turing',
        scriptfile => 'mywords.txt',
        };
$chatbot->command_interface();

Now I start my script with the command ./myai, and this is the result:

$ ./my-ai

Turing: Well, well. Another person trying to see if machines can think.
you: There's no doubt that I am curious.

Particularly interesting in this distribution is an included script called twobots that lets two Eliza bots talk to each other. The resulting discussions can be quite interesting. You'll also find a script called simple.cgi so that you may add your own Eliza chatbot to your web site and share your therapist, or whatever you want Eliza to be, with the world. 

Artificial? Definitely. Intelligence? Depends on who you ask, I suppose.

Have fun!

Comments

Subscribe to RSS - artificial intelligence