Jump to content
  • Advertisement
Sign in to follow this  
Nice Coder

Chatbot Building

This topic is 5467 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post

Link to post
Share on other sites
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

"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
And click on the download link.

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

Nice coder

Share this post

Link to post
Share on other sites
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!

Share this post

Link to post
Share on other sites
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).

NC = 1
Bot = 2

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

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.
Nice coder

Share this post

Link to post
Share on other sites
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?
How are you?

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

Any comments/sugestions/posts would be welcome.
Nice coder

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!