mIRC Homepage

Programming evolution

Posted By: Trashlord_

Programming evolution - 05/02/08 05:05 PM

Some of you may have heard or seen the movie Animatrix.

In this movie, it is described that humans have creates robots, programs, much like we have today, but these robots and programs have evolved, and developed their own conciousness.

In other words, they became living creatures, only they were created by humans.

And they were intelligent, even more than humans were, which led to them creating better, and more efficient Artificial Intelligence.

In recent days, I have decided to take on the challenge of creating an artificially intelligent bot, coded in mIRC scripting.

My main goal was to create a bot which will learn the English language, and will be able to have full conversations with other IRC users, much like a human would.

I can not find a way to do this right now, it seems to be too complex.

I wanted the bot to be able to learn completely by itself, with a minor help of grammar rules, which it would have been taught by me.

Do you think this is possible?
Can it be done?

Is it possible to bypass the limitations of a programmed bot, with programming?

Some of you may have encountered artificial intelligence chatting bots before, such as the Alice bot, but there's a different between what I want to create, and those bots.

These bots (such as Alice Bot), have predefined sentences and words in a database, from which they retrieve them, according to what is being said to them.

This though, is not what I mean.

I want to create a bot which will sit in an IRC channel, and completely learn everything from scratch.

One problem is, how will this bot know what the words it sees, mean?

I had thought of making it add all words to a database, with a number next to them.

So the bot does have some sort of meaning and understanding about the specific word, it may not be the way we as humans understand that word, but it's something, it has something to compare the word with, so when the word is said, the bot knows it means "that number".

So, do you think it's possible?
And if it can be done, do you think there's a chance bots of this type will somehow develop their own conciousness?

And if they do, what will they be like?
Posted By: hixxy

Re: Programming evolution - 05/02/08 05:11 PM

Drugs are bad mmkay
Posted By: Trashlord_

Re: Programming evolution - 05/02/08 05:23 PM

Dude, be serious.

Do you think it's possible?

This is a serious matter.
Posted By: starbucks_mafia

Re: Programming evolution - 05/02/08 06:04 PM

Could someone create a bot that used sophisticated lexical analysis and various other methods to emulate human conversation in a way that fooled people into believing they were talking to another human being? Yes, probably, provided they had the necessary background in natural language processing and related fields. But definitely not in mIRC script. You might want to take a look at the Turing Test for more information about the theory behind the idea and also discussion about whether that truly represents intelligence or merely dynamic, but ultimately still programmed responses.

Could someone create a program that was truly intelligent and conscious? Impossible to know without having some clear definition of what consciousness is. But in practical terms for here and now with the computers and technology available: No. And absolutely positively not-in-a-million-lifetimes could it ever be done using mIRC's scripting language.
Posted By: LostShadow

Re: Programming evolution - 05/02/08 07:38 PM

Er Sid.

Just ask Oliver for his perl bot.

It's the most artificial-intelligence bot I ever seen.

Don't know how he did it..

-Neal.
Posted By: LostShadow

Re: Programming evolution - 05/02/08 07:41 PM

O nvm.

You wanted it in mIRC scripting.

And non-defined.

How about.

A socket bot.

That can read from dictionary.com.

So when it wants to know or understand words, it'll dictionary.com it.

*shrug*

I guess it'll have to just store strings. And parts of sentences.

Like if people ever say the same 2 or 3 words in that order, the bot stores it. But not any 1 individual word.
Posted By: Sais

Re: Programming evolution - 05/02/08 08:08 PM

Google for things like "Markov chains", "lexical analysis", "Natural Language", "Machine learning" as a starting point. The comp.lang.ai faq is perhaps a useful starting point, too.

Then realise how huge an endeavour this is!

Natural Language processing has been given some serious attention, and it is possible to get some OK results. But I can't say I've seen anything that's any more than just "OK".

There was _one_ account I read of a computer being able to "speak like a child", having been "taught from scratch"...but the article never went into details.

Posted By: Doqnach

Re: Programming evolution - 05/02/08 08:22 PM

I think the easy answer would be: yes it's possible, but not in your lifetime ;-]

there are many universities who do studies in these area's who haven't even made such a program, let alone anyone doing it in a scripting language like that of mIRC O_o

there are a few premade bots/scripts out there which mimic some behaviour they picked up from the channel they are stationed in but none of them are even close to human like reactions ;-]
Posted By: Sais

Re: Programming evolution - 05/02/08 08:32 PM

Quote:
So when it wants to know or understand words, it'll dictionary.com it.


And when it doesn't understand the words it reads from dictionary.com it'll look those up? And then look those up and then....

There's more to understanding the meaning of a word than just re-expressing it in terms of other words.
Posted By: argv0

Re: Programming evolution - 05/02/08 09:51 PM

but orange means round, orange tasty fruit! that's all you need to know
Posted By: Riamus2

Re: Programming evolution - 05/02/08 10:23 PM

About the best use of a dictionary site wouldn't really be the definitions, but the type of word (verb, noun, etc). With that, the bot would at least have the ability to combine things into something that could potentially be a valid sentence even if the words themselves aren't correct.

Example (not valid because it's just nouns):

car ball ocean sky

Example (could be valid if the word meanings were different):

the moon wrote ocean

Obviously, that makes no sense because we know what those words mean. However, the point I'm making is that without actual meaning of words, it could be a valid sentence. Just combining the right types of words together could form a valid sentence. Then, you can move to what words mean and what words can be put together and still make sense.

That isn't to say this is easy or possible in mIRC. I'm just showing that the definitions aren't necessarily the most important part of a dictionary lookup.
Posted By: Sais

Re: Programming evolution - 05/02/08 11:29 PM

A quickly knocked-up Markov chain programme:

Code:
;; Markov chain

#Markov on
on *:TEXT:*:#:{ 
  ;; cycle through each "word", adding it to the chain
  var %n = $0, %i = 1
  var %w1 = _NOWORD_, %w2 = _NOWORD_
  while (%i <= %n) {
    var %word = $gettok($1-,%i,32)
    insert $prefix(%w1,%w2) %word 
    %w1 = %w2
    %w2 = %word
    inc %i
  }
}

alias -l insert {
  if (!$hget(Markov)) { hmake Markov 50 }
  var %index = $1, %value = $2-
  hadd -s Markov %index $hget(Markov,%index) %value
}

alias -l prefix {
  var %word1 = $remove($1,`), %word2 = $remove($2,`)
  return $+(%word1,`,%word2)
}

on *:TEXT:!Markov*:#markovtest:{
  msg $chan [MARKOV] $genmarkov($2)
}

on *:INPUT:#markovtest:{
  if ($1 == !Markov) {
    msg $chan [MARKOV] $genmarkov($2)
  }
}


alias -l genmarkov {
  var %length = $iif($1,$1,10)
  var %i = 1, %w1 = _NOWORD_, %w2 = _NOWORD_, %out
  while (%i <= %length) {
    var %list = $hget(Markov,$prefix(%w1,%w2))
    var %nextword = $gettok(%list, $r(1,$numtok(%list,32)), 32)
    if (%nextword === _NOWORD_) { return }
    %out = %out %nextword
    %w1 = %w2
    %w2 = %nextword
    inc %i
  }
  return %out
}
#Markov end


To use it, you'll need to join #markovtest (or whatever channel you feel like using, but rename the two instances above), and type !Markov. The default is to stop after (maximum) 10 words. If you type !Markov N, it will stop after max N words.

I find that it is just spewing out fairly non-random lines at the moment, so it probably needs a _lot_ more seeding - it's currently at 1105 entries, but the average length of each list is only 1.26 words.

It'll probably overrun the 900-char length limit before it gets too useful, unfortunately, but it might give you an idea of how easy it is to make relatively intelligible sentences with rather little effort.

(Attribution: I nabbed the basis of the code from "Programming in Lua", which I had to hand. Thanks Roberto! It also explains why it perhaps isn't in the best of data structures for mIRCScript smile
Posted By: Riamus2

Re: Programming evolution - 06/02/08 07:00 PM

If you're going to attach words to a single variable, you'll need binary variables to avoid that size limit.
Posted By: Sais

Re: Programming evolution - 06/02/08 10:10 PM

Yep - or multiple hash tables or a file or...

Just goes to show why mIRCScript isn't the best of languages to use, I guess.
Posted By: The_JD

Re: Programming evolution - 09/02/08 05:13 PM

Dictionary and Thesauras are great tools when venturing on this kind of programming.

Im presuming you want the bot to learn from what people are saying on IRC. There are several issues with this:

* Spelling/Typos etc. Do you want your bot to be 'dumb'?
* Random responses from people (eg. user joins and says "HIGUYSIMGAY")
* Following conversations. At times it may be difficult for a bot to 'guess' who is talking to who.
* many more

But it definately is possible. I might give it a try in a year or two. You will need to teach your bot about words such as "and" "or" "while" etc.
Posted By: 5arah

Re: Programming evolution - 11/02/08 12:12 PM

hi Sais
© 2022 mIRC Discussion Forums