mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#185821 14/09/07 07:13 PM
Joined: Sep 2006
Posts: 14
N
negeren Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Sep 2006
Posts: 14
ok I really don't get the concept of a self learning script. well the scripting for it anyway. if anyone could help me out with some examples so I can better understand how it functions so I can write one of my own for my bot. thank you.

Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
Originally Posted By: negeren
ok I really don't get the concept of a self learning script. well the scripting for it anyway.

Obviously you know something about the concept of self learning. If you tell more, we can help you scripting it wink

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I'm not shure what you looking for, but one way to do it is like:

!learn bla is bla bla

!learn hello is hi there, how are you $nick

then make the bot store the lines in a *.txt file, and when ever a word is said on the channel, lets say hello, then the bot reply to that user "hi there, how are you $nick", is this what you looking for?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
ehm ... is that a SELF learning concept???

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
yes, many bot's using that. One perl bot that are populare..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
I merely expected a method with which the bot can learn by itself, not by telling it to learn .... I use a quite simple method for my own bot, but I hoped negeren could explain a more sophisticated concept smile

Joined: Aug 2006
Posts: 183
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
You're getting into the realm of artificial intelligence. Is it possible to make a self learning bot? Possibly, but it would be far and away the most complex ever script ever written.

I've toyed around with having bots pick up on bad words by themselves, but it was too difficult and by the time I was done I was only around batting 20% with a ton of false positives.


Yar
Joined: Sep 2006
Posts: 14
N
negeren Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Sep 2006
Posts: 14
ok I know the common
on *:text:*hello:$chan { /msg hello $nick }
commands but I was thinking more along the lines of nick recognition and text comparison.
like with above on text command it will look for hello anywhere in the beginning text. but what if the bot says hey $nick randomly. then $nick says hello $me how are you then the bot replies hello again instead of I'm good how are you. or what if $nick says whats up $me how are you.
ok now lets say we have it set up to say.
on *:text:*hi:$chan { /msg hello $nick }
on *:text:how are you*:$chan { /msg I'm good and you }
and the bot replies to the first trigger so it says hello $nick.
or the bot replies to the second trigger so it says I'm good and you. but what if it could combine the responses to say hello $nick how are you. or as in the first example it says I'm good.
I have seen many pearl bots and vb bots that learn from chatting with users so I was wanting to build a AI engine so the bot self learns from scratch and can write its own script.

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
As was mentioned before, this is possible, however it is unbelievably complicated. It would likely involve neural net structures and fuzzy logic, and that is just for starters. The mIRC scripting language can undoubtedly perform the necessary logic, just as any other standard language can.. that is, if you can figure out how to make the code properly. You could start by researching AI as a general topic and see if you can comprehend it enough to create binary logic that will act as AI.

Good Luck.

-genius_at_work

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Keep in mind that there are a couple good chat bots out there that can respond correctly to a surprising amount of conversation. They don't "learn" afaik, but it's a good place to look to get started. I don't know the names of them, but searching for stuff like "mIRC AI bot" might help. I think one is something like Lucy Bot or Mary Bot or some female name like that.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2006
Posts: 14
N
negeren Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Sep 2006
Posts: 14
are you talking about the alice bot

Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
As genius_at_work pointed out, it is difficult to script a self-learning bot. I have made an AI-bot for mirc and although its capabilities are limited, it succeeds in fooling people quite well smile

For an AI chatbot you need the following components:
(1) An eventhandler that decides when to answer somebody who is calling it. My bot is capable of having a conversation with a predefined maximum number of people in a chatroom, ignoring other people who are talking. I use about 10 timers to control the bot in a way that it looks like a human chatter. It is also possible to transfer a conversation from one chatter to another.
(2) A dialog handler that recognizes words and phrases and generates an answer. It also determines what to do after putting the answer on the channel: keep on listening to the chatter, ignore the chatter, go into a second level dialog, etc.
(3) Besides word and phrase recognition it is nice to have some kind of a self-learning system. I use this one:
- the bot logs every sentence that contains 5 or more words (it skips color codes and special characters like , . : : etc)
- if it cannot recognize a word or phrase it will search in the logfile for two lines that contains the first 3 words of a chatter's sentence
- if it finds two lines it takes the first half of the first line and the second half of the second line, combines them and puts that as an answer in the channel

For instance somebody says: "i got a brand new car" and it finds the two lines: "yesterday i got a strange email" and "that is how i got a virus", it will combine them to: "yesterday i got a virus". This is a simple example but sometimes it produces quite nice answers.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: negeren
are you talking about the alice bot


Yes, that is the one. I haven't used it, but I hear it's a decent response bot that fools many people. In any case, it's not a bad place to start.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I also started making an AI bot, but I just decided it wasn't worth it and it's just sitting in a folder on my computer. smile

I like your 3rd item. That could provide for some very interesting responses.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
Well, I think it was worth to make it. I'll give you three examples (Berend is my bot):

This one is based on searching the "three words technique":
Code:
[05-04-2006 08:15:20] <sunshine^koffie> can I have a coffee Berend-Botje
[05-04-2006 08:15:26] <Berend-Botje> honey can i have a specification


This one is based on the "three words technique" plus phrase recognition:
Code:
[05-04-2006 20:17:48] <HandsomeM33> i am looking for a nice girl who wants to have a 
serious date
[05-04-2006 20:17:54] <Berend-Botje> hello i am looking for an exciting date 
tonight with a lady
[05-04-2006 20:18:05] <Dutchgirl45> go to a dating site HandsomeM33
[05-04-2006 20:18:07] * Bono-Smiles is available for Berend-Botje
[05-04-2006 20:18:11] <Berend-Botje> do you love me Bono-Smiles?


And this one is based on phrase recognition only:
Code:
[06-04-2006 01:48:44] <gentleman> everybody gone to sleep??
[06-04-2006 01:48:47] <Berend-Botje> *yawn* me too :S
[06-04-2006 01:48:54] <gentleman> ok man
[06-04-2006 01:49:04] <Berend-Botje> you know, i look at you and i think i am going 
to fall in love with you 
[06-04-2006 01:49:14] <gentleman> HUH???
[06-04-2006 01:49:17] <Berend-Botje> huh?
[06-04-2006 01:50:03] <gentleman> why???
[06-04-2006 01:50:40] <gentleman> BB?
[06-04-2006 01:50:44] <Berend-Botje> you called me gentleman?
[06-04-2006 01:50:56] <gentleman> well i don't know
[06-04-2006 01:51:00] <Berend-Botje> i know a joke!
[06-04-2006 01:51:09] <gentleman> yes a good one please
[06-04-2006 01:51:15] <Berend-Botje> that's my idea too :)
[06-04-2006 01:51:21] <gentleman> whahahaha
[06-04-2006 01:51:25] <Berend-Botje> LOL LOL LOL

Joined: Aug 2006
Posts: 183
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
I've done a bit of work with some of the ideas from above. Sadly, even when it "fools" people, they tend to think its just on drugs.

Make sure it can fool the perfect bot test. "Hey Nick, what is 2+2?"

I've yet to see a bot answer 4. Usually, its "lol!" or "That's a silly question!" or something to avoid answering the question at all. This is fairly easy to do to, if you know a bit of Regex.

Also, bots don't make mistakes but people do! Make sure you toss in the occasional typo. Its best to make a list of letters to typo. For instance, common typos for F would be D, G, C, V, E, and W. Those are the letters next to D on the keyboard.

Also, switching letters in words is another common typo. Instead of "Table" you'd do something like "Talbe". Some mistales are more common than others

I've found that by adding these typos to words greatly increases the chance of fooling some one.

Last edited by Thrull; 16/09/07 02:43 AM.

Yar
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
LOL
Originally Posted By: Thrull

Make sure it can fool the perfect bot test. "Hey Nick, what is 2+2?"

My bot will answer: 4. It is - amongst other things - also capable of telling the time and date, sending pictures of itself on request and to recognize chatters by sexe. You can ask him in various ways ("how much is .." "please calculate ...", "do you have a picture", "can you send a picture") and answers are choosen randomly, like "i think 4", "4 it is", "ehm ... 4!" etcetera.

Originally Posted By: Thrull

Also, bots don't make mistakes but people do! Make sure you toss in the occasional typo. Its best to make a list of letters to typo. For instance, common typos for F would be D, G, C, V, E, and W. Those are the letters next to D on the keyboard.

Also, switching letters in words is another common typo. Instead of "Table" you'd do something like "Talbe". Some mistales are more common than others

I've found that by adding these typos to words greatly increases the chance of fooling some one.

It does too and even corrects himselves (randomly, not every time). It also misses a letter sometimes.

Another feature is that he delays his answer according to the length of the sentence he has to place in the channel. Some people really believe somebody is typing on a keyboard.

Now, it looks like I present this as THE perfect AI bot for mirc, but it isn't. By far it isn't! The trick is that most chat conversations are about the same subjects, namely: nothing. This makes it easy to get a conversation going. Features like delay, typo's and knowing how to calculate gives the bot a human face, which fools average chatters. Can you imagine that some people ask whether Berend-Botje is male or female (Berend is a Dutch name for boys only) ?? Berend will answer something like: were did you get your biology lessons? "At school" is the most given answer .....

Chatting is about nothing at all :p

Joined: Aug 2006
Posts: 183
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
Oh, I'm sure your bot is great for doing that kind of thing. Can it pass the Turing Test? Probably not. And if it CAN, then there's like a million dollar prize for you to claim.

You're quite correct in that most of the idle chat on IRC is just that: Idle chat. I don't tend to go to those types of channels so the few attempts I made at a bot did much much worse than they could have if I went elsewhere.

Perhaps I should try again. I'll add it to my ever-growing to do list. smile


Yar
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
Originally Posted By: Thrull
Can it pass the Turing Test?

5 minutes maybe, 10 at most, but much longer for chatters how won't pass either grin

Originally Posted By: Thrull
Perhaps I should try again. I'll add it to my ever-growing to do list. smile

Good luck! It took me about 6 months to complete. Maybe I'll write a kind of "recipe" if anybody is interested...

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Originally Posted By: noMen
Maybe I'll write a kind of "recipe" if anybody is interested...


Yeah sounds pretty good, write one for a chicken korma.

* SladeKraven loves his korma.

Page 1 of 2 1 2

Link Copied to Clipboard