Advertisement

Chatbot Building

Started by September 29, 2004 03:49 AM
3 comments, last by Nice Coder 20 years, 2 months ago
I've been working on an (opensource) chatbot for a little while now. It currently learns though "parroting" (copying) the user, it also has a keyword system. the keyword system loads up a list based on keywords entered. eg. Gamedev is a forum And gamedev and forum were keywords, gamedev has the outputs "I like gamedev", "Gamedev is nice", "Do you go there too?" forum has the outputs "Gamedev is a good forum", "i like going to forums", "How many times have you been to forums?" Those are all put onto one bit list "Gamedev is a good forum" "i like going to forums" "How many times have you been to forums?" "I like gamedev" "Gamedev is nice" "Do you go there too?" And one is chosen at random... and it works quite nice too. It is Here Please download, and post your comments here! Currently what i would like to add to it, is some sort of memory. Things like remembering the users name would make it seem more "humanish". Maybe a semantic net would help here? Any comments/sugestions/anything else you can think of! would be welcome. Anything about semantic nets would also be welcome. From, Nice coder [Edited by - Nice Coder on September 29, 2004 4:33:47 AM]
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
After much googleing i managed to find how a semantic network works.

I have implemented a "mildly working" one in parrotbot.

Currently, in order for the bot to learn new things from you (via the semantic net), you have to put an "A" or "The" infromt of the object, then the link, then then subject. eg:
"The ball is red"
object: ball
subject: red
link: is

But
"Sheep are wolly" won't work, because it has no a/the infront of the sheep. (i plan to combat this using yet another data file to specify which words would be given an a infront of them by defult during semantic network processing).

Here is the file. if you can't download it from there then go
Here
And click on the download link.

How does it fare,
Any commants/sugestions/anything else would be welcome!

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Advertisement
I can't really try it now... as long as it's better than my attempt.

Ben "How are you?"
Program "How am I"
B "I guess you're fine"
P "You guess I'm fine"
B "Yes"
P "How are you"
B "I am fine"
P "You are fine"
B "What do I like?"
P "What do you like?"
B "I like chese"
P "You like cheese"
B "Do you like cheese?"
P "I like cheese."
B "How are you?"
P "I like cheese."
B "What do you like?"
P "I am fine."
B "Yes?"
P "I am fine."
B "OK."
P "Do you like cheese"
B "Yes"
P "I like cheese"
B "Yes"
P "How are you?"
B "Fine."
P "Do you like cheese?"

It seems to get cheese on the brain [wink]
I had about a five minute chat with this - it had one word built in, "Hello", and a simple conjugator. As you can imagine, it soon became fairly idiotic to talk to!

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

1. what is a "conjugator", does it simply turn you into me and me or i into you? How exactly does your bot work?

2. my chatbot is much sillier sometimes... but i've only been talking to it for a few minutes total (without a memory wipe because of a fix, or an added feature).

Transcript:
NC = 1
Bot = 2

1-Hello
2-Hello
1-How are you?
2-Fine
1-Thats good to hear!
2-Good
1-What is good?
2-thats good
1-What is ok?
2-Hello
1-A person is an animal
2-Thank you for you contribution
1-What is an animal?
2-A person is an animal
1-Bye
2-Bye


I'm going to be uploading more "Mind" files (zip with everything on it). there has been a mind file update simce last time (i've been de-gunking parrotbot. i'll add more words/extra keywords/extra links for its semantic net soon).

i'm probably going to add a maths module soon. (expect it on 1.12Alpha). I was thinking of building a dictionary of words (in another data file), then use those to spell check the input.

My major problem with that is how to do a string compare function which will 1. allow me to find out the closest word and 2. allow me to add words, which are far away from already known words.

1. i can do with a sum error (abs(chra - chrb)), 2. i have not figured out a way to do that.

Any comments/sugestions/posts would be welcome.
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Thesorus is working, and i have added new (untested) command code support.

Current command codes are:
#ENEPARROT1E //Enable Direct match
#ENEPARROT2E //Enable left hand match
#ENEKWE //Enable Keywords
#ENESEME //Enable Semantic network
#ENEMATHE //Enable Math
#ENERRESP //Enable random responces (for when it doesn't know the answer)
#ENESYN //Enable Thesorus
#ENELEARN //Enable Parrot learning

#DECPARROT1E //Disable Direct match
#DECPARROT2E //Disable left hand match
#DECKWE //Disable keywords
#DECSEME //Disable semantic net
#DECMATHE //Disable math
#DECRRESP //Disable random responces
#DECSYN //Disable Thesorus
#DECLEARN //Disable learning
All command codes start with a # sign

These are mainly for debugging purposes (to find out what componant is causing a bad responce, ect.)

The bot will now answer a few questions, like:
who are you?
what are you?
What is your name
What version are you?
What new features do you have?
And
How are you?

You can double-click on a mesasage to have it displayed in a messagebox.

Any comments/sugestions/posts would be welcome.
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.

This topic is closed to new replies.

Advertisement