mIRC Home    About    Download    Register    News    Help

Print Thread
Programming evolution #194500 05/02/08 05:05 PM
Joined: Oct 2007
Posts: 51
T
Trashlord_ Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2007
Posts: 51
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?

Re: Programming evolution [Re: Trashlord_] #194501 05/02/08 05:11 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Drugs are bad mmkay

Re: Programming evolution [Re: hixxy] #194503 05/02/08 05:23 PM
Joined: Oct 2007
Posts: 51
T
Trashlord_ Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2007
Posts: 51
Dude, be serious.

Do you think it's possible?

This is a serious matter.

Re: Programming evolution [Re: Trashlord_] #194506 05/02/08 06:04 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: Programming evolution [Re: Trashlord_] #194511 05/02/08 07:38 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
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.

Re: Programming evolution [Re: LostShadow] #194512 05/02/08 07:41 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
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.

Re: Programming evolution [Re: Trashlord_] #194515 05/02/08 08:08 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
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.


Last edited by Sais; 05/02/08 08:13 PM.

Sais
Re: Programming evolution [Re: Trashlord_] #194516 05/02/08 08:22 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
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 ;-]


If it ain't broken, don't fix it!
Re: Programming evolution [Re: LostShadow] #194518 05/02/08 08:32 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
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.


Sais
Re: Programming evolution [Re: Sais] #194524 05/02/08 09:51 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
but orange means round, orange tasty fruit! that's all you need to know


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Programming evolution [Re: Sais] #194527 05/02/08 10:23 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Programming evolution [Re: Sais] #194537 05/02/08 11:29 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
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

Last edited by Sais; 05/02/08 11:33 PM.

Sais
Re: Programming evolution [Re: Sais] #194557 06/02/08 07:00 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
If you're going to attach words to a single variable, you'll need binary variables to avoid that size limit.


Invision Support
#Invision on irc.irchighway.net
Re: Programming evolution [Re: Riamus2] #194563 06/02/08 10:10 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
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.


Sais
Re: Programming evolution [Re: Sais] #194670 09/02/08 05:13 PM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
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.


[02:16] * Titanic has quit IRC (Excess Flood)
Re: Programming evolution [Re: The_JD] #194757 11/02/08 12:12 PM
Joined: Feb 2008
Posts: 11
5
5arah Offline
Pikka bird
Offline
Pikka bird
5
Joined: Feb 2008
Posts: 11
hi Sais