imported>port-212-202-56-240.reverse.qsc.de No edit summary |
imported>mutante mNo edit summary |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
http://www.linux-mag.com/1999-06/perl_01.html |
* http://www.linux-mag.com/1999-06/perl_01.html |
||
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 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: |
|||
<pre> |
|||
$ perl -MCPAN -eshell |
|||
cpan> install Net::IRC Chatbot::Eliza |
|||
[cpan installation stuff omitted] |
|||
cpan> quit |
|||
$ |
|||
</pre> |
|||
... |
|||
--> [[Joseph Weizenbaum]] [[Bots]] [[IRC]] [[Perl]] |
|||
* http://i5.nyu.edu/~mm64/x52.9265/january1966.html |
|||
[[Category:Bots]] |
|||
[[Category:IRC]] |
|||
[[Category:Computer]] |
|||
[[Category:Programs]] |
|||
[[Category:Perl]] |
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