Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Handicaped perl AI: need advice

by Bishma (Beadle)
on May 07, 2002 at 07:52 UTC ( [id://164557]=perlquestion: print w/replies, xml ) Need Help??

Bishma has asked for the wisdom of the Perl Monks concerning the following question:

So I had this wild idea last night to make a feature for my website where people could "talk" to my site mascot in plain english and hold a bizzar conversation with it. (if any of you remeber the DOS program Claude or that parrot program that used to ship with 8bit creative soundcards it'll be like that).

Tonight the rational part of my brain took over and I realized this project is way over my head. My origonal idea was just to set up a big database of words to pattern match then print responses. This would work, but it would not only be bulky (very big database) the canned resposes would also get old fast.

I was hoping someone out there might have undertaken a similar project and could offer some advice. I'm not looking for HAL here. It doesn't really even to make sense most of the time... but it should keep its entertainment value for a while.

Thanks for any help.

Replies are listed 'Best First'.
Re: Handicaped perl AI: need advice
by moodster (Hermit) on May 07, 2002 at 08:26 UTC
    Hae you checked out Eliza? It's a classic example of a pseudo-AI that manages to hold a coherent conversation with the user by recognizing key phrases and asking questions in the manner of a psychoanalyst. It's actually pretty simple (we implemented a Eliza in scheme as a lab assignment at school), but very effective. I read somewhere that some people preferred talking to Eliza rather than a human psychoanalyst, because the felt the program made them more comfortable.

    There is of course a perl implementation called Chatbot::Eliza. I haven't played with it myself but it looks like it could be useful for you.

    Cheers,
    --Moodster

      On an interesting side note, Eliza has been implemented in BASIC - but not just any BASIC, rather, the BASIC that has itself been written in Parrot assembler. Last I checked she was playing secretary for some of the Parrot mailing lists :-)

      Cheers,
      Erik
I'd rather say 'limited' :p :)
by Olecram (Initiate) on May 07, 2002 at 08:15 UTC
    I would suggest, other thant the most needed TOP-DOWN approach,
    A quick analysis of what topics 'Talbot' (talking bot... Oh my am I so creative today :p ) should be able to handle.

    For example, you could put some links:
    Talk to talbot about weather
    Talk about music
    Talk about sex
    Each link should load a single interaction database and give a certain amount of key words to use in the questions, to restrict the field of action of the AI.

    Then you should figure what kind of response generator you like:
    Chance- based, on reasonable combinations of THE QUESTION WORDS, and combinations of ANSWER TEMPLATES with a database for WORDS in the answer!
    Pattern- based, pattern matching the question (for syntax) and offering a TEMPLATE ANSWER, with words from the database.

    Hope this helped... but I'm sure it did :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://164557]
Approved by jryan
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-03-28 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found