• Welcome to Valhalla Legends Archive.
 

An AI bot that pretends to be a real person

Started by MrMachineCode, September 18, 2003, 01:39 AM

Previous topic - Next topic

MrMachineCode

Edit:  I have added whitespace to make this easier to read.  I realize now that the post was like one run-on thought, so it was hard to find good places to put the breaks.

I have already written a program that can carry on a conversation, (like the Eliza program) but it's different from Eliza in that it actually learns and remembers what is said to it.  I later found out that what I had come up with was actually something that has been around for years;  I had reinvented something known as the Markov model.  No matter.  Basically the way it works is that it analyzes everything it "hears" and uses that to expand it's database of known words and possible orders that those words can appear in.  

To generate a reply, it takes part of someone else's sentence (one or two words) to use a seed, and it then uses it's database to "grow" more words onto the sentence, kind of like how crystals grow off of a smaller crystal.  In this way it combines the last thing that someone said, with other things it's heard in the past, to  produce a comment that (hopefully!!) has some sort of relevance.  In any case, it usually comes up with some hilarious replies.

I figured it would be fun to take that program (it's all ansi C++, and fairly modular) and use some chewing gum and bailing wire to tack it on top of some bnet bot code.  (Right now the program isn't internet-aware, it only talks to the person at the keyboard.)  Given the general level of b.s. in public chat, it could probably hang out in a channel for quite some time before you realized that the answers it gives made any less sense than most of the things the real people there say.

Now, a friend of mine has already programmed this bot in mIRC script, and it's fun as hell to play with, but what we found out working together on it is that it's tricky to get the right balance of frequency of replies, so that people don't get annoyed.  For instance the bot did fine when there were 5 ppl in the mIRC chat room, but soon there were more ppl and when there were 20 ppl talking, and the bot responded instantaneously to each person, it quickly got kicked for "flooding" although technically it was only trying to keep up...

Well more so than that, I guess it's just that you see so many spam bots, and bots that annoy people, that I want to take extra care to make my AI program "polite".  I'm sure that I'm not the first person to think of putting an Eliza-class program on bnet, why do I never seem to see them though?

Anyhow, rather than annoy you with technical questions of the programming when I can RTFM, I'd rather ask, what's your opinion on things that should be done to make a bot that's funny but not over the top or hogging the channel?

Camel

#1
Paragraphs, please!

[edit] This also has nothing to do with battle.net botdev

MrMachineCode

Quote from: Camel on September 18, 2003, 01:51 AM
Paragraphs, please!

[edit] This also has nothing to do with battle.net botdev

@ Paragraphs:  point taken.  I plead forgiveness; I've been corrupted by too many postings to forums that automatically strip all your whitespace and paragraph breaks, to the point I stopped using them.

@ Has nothing to do with botdev:  In what way does this not have anything to do with development?

Camel

This is more of a general programming question: It is not something unique to a battle.net bot.

Dark-Feanor

#4
It kinda does have to do with bot dev, because this is an idea for a bot that he is asking for opinions on. It would be nice to have a bot that works like that and helps people with questions they might have, but the person asking a question would not be able to tell if it is a bot or not.
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

iago

#5
Actually, writing something like that was supposed to be one of my summer projects, but I never got past writeing a bot that can connect.

In my opinion, it would be best if it just targeted a single specific person.  Like, if there were 10 people talking, you would set it to reply to "iago" only.  Also, a little delay would be nice (2 or 3 seconds) so it doesn't seem quite so obvious.

If you want to discuss any of it, feel free to IM me, my info is at the left <--


Finally, this IS botdev related, and Camel's opinion doesn't count for anything, so don't worry about him :-)

Edit: You can edit your own posts to make them more readable *cough*
And which forums strip whitespace?  That's just dumb!
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Camel

Quote from: iago on September 18, 2003, 11:24 AMthis IS botdev related
This is true. If only the forum was named "General Bot Development," it would be the perfect thread.

K

This is something I have done, although I did not write the "AI" myself -- I wrote a plugin to my chat bot using some of the resources available from the Alice Project: http://www.alicebot.org/

One pointer, if you want to run something like this on battle net:

don't let *everyone* trigger the bot, and don't let it be triggered by everything they say -- you'll flood off in the first case, and annoy people in the second.  For example, AliceOnline responds only when a person is in her user list (or when loose mode is set), and only then when what they say contains "alice."  This keeps the amount of random drivel that she says down to a minimum,  and keeps the channel (OTS) happy.

Good luck! And make sure you implement whisper responses -- it's always fun to see how long it takes people to realize that alice is not a girl and not going to cyber with you.

Spht

Quote from: Camel on September 18, 2003, 12:15 PM
Quote from: iago on September 18, 2003, 11:24 AMthis IS botdev related
This is true. If only the forum was named "General Bot Development," it would be the perfect thread.

Although he never specified what the bot was for, he probably posted here because the bot is for Battle.net, which is fine. If later specified that it's not for Battle.net, then someone may move this thread.

iago

Only responding to people who say "alice" is a bad idea, because half the fun is them not realizing it's an ai :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


MrMachineCode

#10
OK, I can see that.  You're right; although this *will* be a battle net bot, the question was a general one I ought to have posted to the general bot development board, not battlenet bot development.  I don't know if on this board the moderators move threads, or if I should post a continuation there.

Picking out one person to talk to at a time, that is a good idea, one I hadn't thought of.  I can add some randomization to it so that it will occaisionally decide to switch topics, but not try to comment on everything.

The thing about responding to it's own name, made me laugh because it's similar to a problem the mIRC version had.  The bot talks about whatever you say to it, so whenever someone asked it if it was a bot, it would begin to spout, in a warped manner, mixed up combinations of other sentences it knew about bots, and thus reveal itself!

Myndfyre: thank you for your email about my post, unfortunately I was unable to reply to it because the return address on the email you sent me is not a real email address.

K

Quote from: iago on September 18, 2003, 04:48 PM
Only responding to people who say "alice" is a bad idea, because half the fun is them not realizing it's an ai :)

Well, that's only partially true -- it actually responds to "ali" -- not a combination used very often, but I realize it comes up in some words.  It also always responds (via whisper) if you whisper it -- which is generally what people wanting to cyber do.  I wish I could find some good logs.....

iago

There isn't a general bot-development board, it's ok that it's here..
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Kp

Have it pick a random number in some moderately small range, say [3, 8).  After that many talks, respond to something and roll a new random number.  Alternately, instead of using that number to control how often it talks, use it to control how often the bot switches the people to whom it listens.  Also, if you have it restricted to a certain subset of people to which it responds, you may want to have it "get bored" if the person stays quiet too long.  Otherwise, it might go silent if all the people it is watching stop talking for a while.  How you determine bot boredom is a matter of preference, of course.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Adron

Quote from: Kp on September 18, 2003, 09:48 PM
How you determine bot boredom is a matter of preference, of course.

"Boredom" and other such factors could be displayed in some kind of pretty interface to those who are interested in how the simulation is working. You could simulate boredom, hunger, mood, sleepiness and many other factors...