Building a ‘Stewie’ Eliza Gmail IM Bot

September 8, 2008 – 7:02 pm

stewie iconInspired by an article about creating your own IM Bot via Imified, I signed up and created my own ‘Stewie’ Artificial Intelligence Bot.

large stewieBasically the Stewie bot is a program/robot that simulates a human conversation that you can communicate through Gmail instant messaging with quotes from Stewie from the Family Guy.

Eliza is a computer program written in 1966 by Joseph Weizenbaum which copied a therapist by rephrasing input into questions, thus almost simulating an interactive conversation. Eliza has been ported to many languages and is available in various websites you can interactively try out.

Setting up a bot on imified is fairly straight forward, go through a basic registration process, name your bot, (in my case, point to a url where your chat bot script will exist then add the bot as your buddy.

Although there is a fairly robust perl version available, my hosting account doesn’t have that perl Eliza module, so I found a php version written by Wayne Egert of After some modifications, and customizing the text responses, I uploaded a customized version of the php script ( to interface with the imified bot.

After getting the basic php eliza working with imified, I could talk to my bot via gmail talk by adding as a buddy.

The personality and responses were culled quotes from Stewie of family guy. Modifying The knowledge.txt file with responses based on certain keywords, and random responses if the Stewie bot doesn’t understand your input, Stewie Gmail Bot was born.

You can talk to Eliza-Stewie-Gmail-Bot by adding to your gmail talk buddies.


You can talk to the webbased one I created here!

Ok, its not the smartest, and it almost seems more like a random quote generator, but it does have some language parsing, keywords like how, what, why, i, i know, god, where triggers different responses.

Related Posts

Post a Comment