The AI Effect

By TMFKSOFT on Jun 15, 2011

This is my first AI script it gives your bot the effect of learning.

To teach the bot say something like:
Tree is a Plant

then ask via
What is a tree?

the reply will be:

a tree is a plant

Etc
Im improving it a lot so soon it will recognise correct grammar.

on 1:TEXT:What is *?:#:{
  var %item $left($3,-1)
  if ($readini(whatis.ini,meh,%item) != $null) {
    msg # %item is a $readini(whatis.ini,meh,%item)
  }
}
on 1:TEXT:* is a *:#:{
  describe # has just learnt something ^-^
  writeini whatis.ini meh $1 $4-
}

on 1:ACTION:is a *:#:{
  describe # has just learnt something ^-^
  writeini whatis.ini meh $nick $3-
}

Comments

Sign in to comment.
TMFKSOFT   -  Sep 23, 2012

This script is over a year old. It either needs updating else ignoring. It merely serves as an example for WRITEINI and READINI.

 Respond  
LikeLakers2   -  Sep 23, 2012

[17:03] <LikeLakers2[BNC]> the cake is a lie
[17:03] * Legend has just learnt something ^-^
[17:03] <LikeLakers2[BNC]> what is a cake?

Of course, no output. And yes, I know I'm supposed to say "what is a the cake?" but even you can tell its improper English.

Now that I'm done ranting, I'd probably say bmotion is better for me, for this purpose.

 Respond  
TMFKSOFT   -  Jun 18, 2011

Remember to add a ? at the end
I have fixed the script ill release it later

 Respond  
Jethro   -  Jun 17, 2011

Cave_Johnson, use my chacha search socket script at:

http://www.hawkee.com/snippet/7688/

You have to understand that mIRC is not "humanly intellectual," so it's harder than you think to store preset questions and use a couple of simple text event to do the matching. It's also inefficient to store bunch of questions and answers in an INI file when you can use a socket to return the results you're after.

Below is the output from my chacha script:> !chacha what is a tree?

A tree is a perennial woody plant. It is most often defined as a woody plant that has many secondary branches supported clear of the ground on a single main stem or trunk with clear apical dominance.The answer is much more in-depth as you can see. If you like it, please bump up its rating, as some haters lowered it out of spite.
 Respond  
Cave_Johnson   -  Jun 17, 2011

I said: tree is a plant and it said Has just learnt something then I said what is a tree and the bot said nothing..

 Respond  
Jethro   -  Jun 15, 2011

/me speaks in British accent:

"Oi you bugger off mate and leave me snippet be!"

I say that for TMFKSOFT...

Don't mind me. I'm just horsing around. :P

 Respond  
blackvenomm666   -  Jun 15, 2011

i was trying to be funneh jethro not actually give him a hard time haha

 Respond  
Jethro   -  Jun 15, 2011

Well, blackvenommm666, actually the word learnt is used in UK quite often, just uncommon in the US. This brings us to the pronunciation phenomenon; we say tomato, and they say tomahto; and we say potato and they potahto...you get the idea...lol

 Respond  
blackvenomm666   -  Jun 15, 2011

describe # has just learnt something ^-^

^^^ evidently it hasnt learned proper english:D

 Respond  
Jethro   -  Jun 15, 2011

Your bot can be mocked and output incorrect results.

You're advised to include the -n switch for the writeini command.

Your snippet reminds me of a socket script I made that connects to chacha search service, which they provide commonly asked questions at: http://www.chacha.com/

ChaCha is a search engine which specializes in a question answering service that uses a technique known as the human search engine.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.