http://qs321.pair.com?node_id=11113838


in reply to Re^3: Artificial Intelligence experiment
in thread Artificial Intelligence experiment

"If not, anyone care to take a stab at it?"

Sounds like your are volunteering to fulfill your own request of a web interface for this piece of computer history ;)

  • Comment on Re^4: Artificial Intelligence experiment

Replies are listed 'Best First'.
Re^5: Artificial Intelligence experiment
by PerlGuy(Tom) (Acolyte) on Mar 05, 2020 at 12:59 UTC

    I might, but no sense reinventing the wheel.

    The author, John Nolan, has already provided a web interface with the download from metacpan.org:

    #!/usr/bin/perl # This simple script implements a Chatbot::Eliza # object in a cgi program. It uses the CGI.pm module # written by Lincoln Stein. # # Needless to say, you must have the CGI.pm module # installed and working properly with CGI scripts on # your Web server before you can try to run this script. # CGI.pm is not included with Eliza.pm. # # Information about CGI.pm is here: # http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html use CGI; use Chatbot::Eliza; my $cgi = new CGI; my $chatbot = new Chatbot::Eliza; srand( time ^ ($$ + ($$ << 15)) ); # seed the random number generator print $cgi->header; print $cgi->start_html; print $cgi->start_multipart_form; print $cgi->h2('Eliza session'); # These lines contain the "Eliza" functionality. # User comments are passed through the module's transform # method, and the output is used to prompt the user # for futher input. # if ( $cgi->param() ) { $prompt = $chatbot->transform( $cgi->param('Comment') ); } else { $prompt = $chatbot->transform('Hello'); } $cgi->param('Comment',''); print $cgi->h3($prompt), $cgi->br, $cgi->textarea( -name => 'Comment', -wrap => 'yes', -rows => 3, -columns => 70 ); print $cgi->p, $cgi->submit('Action','Send to Eliza'), $cgi->reset('Reset'); print $cgi->endform; print $cgi->end_html;

    I could just put it up on the web as-is, but I very much doubt the Eliza module is installed on my bargain basement hosting service, or that they would be willing to install it for me.

    It might be fun to write a web version that doesn't depend on CGI.pm. (or Chatbot::Eliza for that matter) Probably quite doable. The code is well documented and doesn't appear to be too complicated.

    I'd probably take a different approach to the whole thing though, like drop the "therapy" angle and have it just be more conversational. Code-wise, I'd also drop the object-orientedness.

    Tom

      "I might, but no sense reinventing the wheel."

      After asking if anyone else would write one for you...

        PerlGuy(Tom)'s bio: "... I could never get any real programmers to write the programs I thought were needed. I would not accept that what I wanted was really "impossible". Often they didn't really seem to comprehend what I was trying to say, or didn't listen long enough to really get it. ... I still feel frustrated that they just, either didn't quite understand, or just couldn't quite get it right. ..."

        Re^6: Artificial Intelligence experiment Re^6: Artificial Intelligence experiment by marto on Mar 05, 2020 at 13:03 UTC

        "I might, but no sense reinventing the wheel."

        After asking if anyone else would write one for you...

        After downloading and unzipping the actual files, it was then that I found there was a web-interface already included.

        Tom

Re^5: Artificial Intelligence experiment
by PerlGuy(Tom) (Acolyte) on Mar 05, 2020 at 23:44 UTC

    I did originally write: "PS: (command line - wondering if anyone has created a web interface already. Probably. If not, I might take a stab at it?)

    But then I didn't want anyone to feel left out. So changed "I" to "Anyone".

    I mostly write programs (or try anyway) for one of two reasons. Either because it seems like fun or it is something required to save humanity from self destruction

    In the late 80's and early 90's I was involved in the development of the World Wide Web because I believed it would reduce paper consumption and, in time, slow, or even reverse the rapid destruction of old growth forests being clear-cut all over the world, at the time, largely, just to supply Newsprint.

    Any programs I've ever written have been General Public License, which is also why I write programs in Perl.

    In this case I don't think an AI Bot is going to save the world, so this would be just for fun.

    Tom

      "I did originally write..."

      The node XML history does not reflect this, nor have you marked your post as being edited. Regardless of what your personal motivations are it's better to do basic research first (what you asked others to do was already part of the distribution you linked to) or make some effort yourself before soliciting others to work on your 'fun' nostalgia trip.

      A reply falls below the community's threshold of quality. You may see it by logging in.
      "... In the late 80's and early 90's I was involved in the development of the World Wide Web..."

      Yes, sure. And I was in the Foreign Legion in 1954 when we lost the Battle of Dien Bien Phu. And as a matter of fact I’m the one and only son of the Führer. See also. Regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help