2014-10-19

Almost Human

We all know IRC, don't we? It's the geeky chat thing we all geeks used before MSN, Skype, Viber, Whatsapp and Facebook messenger. Some of us still use it.

Sometime around 15 years ago IRC was a way of life for many computer hobbyist in Finland. Most of IRCers were young - most probably single - guys, for obvious reasons. One day things changed; an attractive girl called Liisa started to use IRC - or so many believed.

Liisa was very open for chatting with everyone, and she didn't mind a little flirt either. Sometimes she was a bit moody but that didn't stop guys to continue chatting with her.

Sometimes she kept company for someone for hours and hours, usually more if the person was drunk. After all, when you are drunk it's not so easy to know you are chatting with a computer program...


Liisa the IRC chat bot

In 1966 Joseph Weizenbaum wrote famous ELIZA virtual doctor program. In 1984 Finnish Pekka Tolonen wrote his Finnish version of ELIZA on Commodore 64 and named it Kalle Kotipsykiatri (Kalle the home psychiatrist). Those programs was based on natural language processing.

Finnish is extremely difficult language and the Kalle Kotipsykiatri program and it's algorithms looked very complex to me at that time. Additionally the program didn't seem to learn or memorize anything, it just created responses based on the algorithm.

Sometime between 1997 and 1999 - can't remember exactly the year anymore - I decided to write an IRC bot for my own fun. She got the name Liisa.

Different kind of approach

One big difference to it's predecessors is the fact that Liisa had persistent memory; everything it learnt was saved to a database so it was able to survive restarts.

Another difference is that Liisa had only little bit of programmed intelligence in it, for example it knew how to learn about new IRC channels from other's users' information. I wrote Liisa primarily as an IRC bot, which means it was able to join IRC channels (chatrooms) to listen and learn.

Liisa collected everything it saw on the channels to chat log files for further processing. Based on randomized events it sometimes joined those new channels and left empty or inactive channels.

In IRC it's possible to talk on chat rooms (channels) or in private 1-to-1 chat. Liisa was able to discuss on both. In private chat it looked like any other chat bot, but on channels it behave like any other human.

Multilingual personality disorder

Instead of having an algorithm to construct the sentences, Liisa used statistical analysis of the chat logs. This had a great advantage; Liisa was multilingual since it didn't even try to understand the languages.

For example if the human chatter asked "What do you think about last night's game?" the program used it's database of other humans' responses to the same sentence and randomized between them and returned a very human answer, for example "Do you mean Finland vs. Sweden?".

This kind of answer would have been impossible for typical chat programs since it required updated data on the hockey games played.

I also implemented a function which determined the mood of the human chatters. Appropriate answers to an angry user would be different from a happy one. Liisa also had it's own mood which was affected by the mood of human chatters.

Rest in peace

Since Liisa was able to move around in the IRC by itself it became well known after a while. Some people liked it while some really hated it. At some point, probably in 2001, I decided to stop using Liisa anymore to avoid pissing people off too much.

The program was written in Perl and the data store was Berkeley DB. Remember, this was before 2000. :)

I had published the source code as scrambled PDF file to allow people to look at it but not to run it. At that time I didn't think the program would be useful in the future so I didn't unfortunately save any copies.

- Toni

ps. too bad that Loebner Prize wasn't invented yet at that time.




No comments:

Post a Comment