imported>mutante mNo edit summary |
imported>mutante mNo edit summary |
||
Line 3: | Line 3: | ||
Creating An [[Eliza]] [[IRC]] [[Bots|Bot]]: Using The Comprehensive [[Perl]] Archive Network |
Creating An [[Eliza]] [[IRC]] [[Bots|Bot]]: Using The Comprehensive [[Perl]] Archive Network |
||
The Net::IRC module provides support for [[Perl]] to handle the [[IRC|Internet Relay Chat]] [[protocol]]. With this module, you can write an [[IRC]] [[Bots|bot]] -- a [[Perl]] program which connects to an [[IRC]] [[server]] as if it were an [[IRC]] [[client]] and interacts with that server programmatically. |
The [[Net::IRC]] module provides support for [[Perl]] to handle the [[IRC|Internet Relay Chat]] [[protocol]]. With this module, you can write an [[IRC]] [[Bots|bot]] -- a [[Perl]] program which connects to an [[IRC]] [[server]] as if it were an [[IRC]] [[client]] and interacts with that server programmatically. |
||
The second is one of my favorite modules, Chatbot::Eliza, which implements the classic [[Eliza]] algorithm. The original Eliza program was written by [[Joseph Weizenbaum]] and was described in the Communications of the ACM in 1966: Eliza is a mock Rogerian psychotherapist. It prompts for user input and uses a simple transformation [[algorithm]] to change user input into a follow-up question. The program is designed to give the appearance of understanding. |
The second is one of my favorite modules, Chatbot::Eliza, which implements the classic [[Eliza]] algorithm. The original Eliza program was written by [[Joseph Weizenbaum]] and was described in the Communications of the ACM in 1966: Eliza is a mock Rogerian psychotherapist. It prompts for user input and uses a simple transformation [[algorithm]] to change user input into a follow-up question. The program is designed to give the appearance of understanding. |
||
Line 9: | Line 9: | ||
This program is a faithful implementation of the program described by Weizenbaum. It uses a simplified script language devised by Charles Hayden. The content of the script is the same as Weizenbaum's. |
This program is a faithful implementation of the program described by Weizenbaum. It uses a simplified script language devised by Charles Hayden. The content of the script is the same as Weizenbaum's. |
||
I wanted to see what would happen if the Net::IRC module was hooked into Chatbot::Eliza to make an [[IRC]] bot that acts like a psychotherapist. The process was easier than I thought, and a good example of how to reuse existing code from the CPAN. |
I wanted to see what would happen if the [[Net::IRC]] module was hooked into Chatbot::Eliza to make an [[IRC]] bot that acts like a psychotherapist. The process was easier than I thought, and a good example of how to reuse existing code from the [[CPAN]]. |
||
To install the two modules needed in this program, simply do the following: |
To install the two modules needed in this program, simply do the following: |
Latest revision as of 21:38, 10 February 2005
Creating An Eliza IRC Bot: Using The Comprehensive Perl Archive Network
The Net::IRC module provides support for Perl to handle the Internet Relay Chat protocol. With this module, you can write an IRC bot -- a Perl program which connects to an IRC server as if it were an IRC client and interacts with that server programmatically.
The second is one of my favorite modules, Chatbot::Eliza, which implements the classic Eliza algorithm. The original Eliza program was written by Joseph Weizenbaum and was described in the Communications of the ACM in 1966: Eliza is a mock Rogerian psychotherapist. It prompts for user input and uses a simple transformation algorithm to change user input into a follow-up question. The program is designed to give the appearance of understanding.
This program is a faithful implementation of the program described by Weizenbaum. It uses a simplified script language devised by Charles Hayden. The content of the script is the same as Weizenbaum's.
I wanted to see what would happen if the Net::IRC module was hooked into Chatbot::Eliza to make an IRC bot that acts like a psychotherapist. The process was easier than I thought, and a good example of how to reuse existing code from the CPAN.
To install the two modules needed in this program, simply do the following:
$ perl -MCPAN -eshell cpan> install Net::IRC Chatbot::Eliza [cpan installation stuff omitted] cpan> quit $
...
--> Joseph Weizenbaum Bots IRC Perl