Talk to Learning AL!!!

Community Forums/Showcase/Talk to Learning AL!!!

Nate the Great(Posted 2009) [#1]
I made this little program on a bus ride to a soccer game. Much credit goes to my friend Grant who helped me think of ideas along the way. It only took about 30 minutes to an hour to write and it is only 200 ish lines in bmax so without further adue! Learning AL!

http://naillproductions.synthasite.com/resources/Learning%20AL%20base%202.zip

He is a learning AI that can learn any language. I used the basic input and print commands for the sake of time.

just strike up a conversation with him. At first he doesnt know anything so he will just repeat you but soon he will start to learn the language you are speaking to him. I know it is not the best learning ai ever built but I was bored so what can I say?

to save a conversation you have with AL just type in (save) and it will make a dictionary_base_2.txt which is his vocabulary so far as well as the grammar he has learned so the next time you run him it will auto-load that file.

You can also type in (show all) to see advanced statistics and how he works on the inside

WARNING: I am not responsible for what he says. If you start cursing, he will copy you and if you get mad, he will get mad so be careful.

SOURCE CODE



The sentence generation method is the only part of this program that really needs work. other than that its pretty much done. I won't be working on it anymore so do what you want with it.


plash(Posted 2009) [#2]
This is interesting. Almost fun if you're extremely bored.
I would love to see the code for this.


xlsior(Posted 2009) [#3]
Almost fun if you're extremely bored.


Heh. That rating almost sounds like it belongs in here:
http://www.escapistmagazine.com/videos/view/zero-punctuation


Nate the Great(Posted 2009) [#4]
plash - I may release the code for this when I step it up a level. right now it only uses double pairs for grammar so it is often wrong but soon it will use triple and quadruple pairs so it will be almost 100 percent accurate as far as grammar

My friend originally gave me the idea because he thought it would be cool if I could make a program that wrote essays for us. :) lol so we spent hours on the bus on the way back trying to teach it stuff so I could modify it to write a quick essay or paragraph but it kept getting stuff backwards. for instance I taught it windows were clear and the sun was yellow. then it said no the sun is clear. so right now it doesnt have a lot of reasoning, it just figures out the grammar of your language. next I plan to make it model the human brain which it already kind of does. BTW has anyone tried spanish or any other language on it? I would be interested to hear the results


By the way the code consists of a small word parsing function and a sentence builder and a type for storing words. thats it! Its so simple its amazing


plash(Posted 2009) [#5]
haha
>That funny to you?
didn't..
>
haha, your AppDir folder.
>I don't have an AppDir folder.
heard me.


I love talking to something that learned from myself!


Nate the Great(Posted 2009) [#6]
haha what did you teach it about an AppDir folder?!? lol!

I was thinking about maybe giving the program the ability to make and delete and run files if it wants to or if you order it to but then it would have the ability to control my computer and I wouldnt want that. Maybe when it is a bit more reliable and responsible.

Here is a convo I had with it after the hour of 'teaching' on the bus


>hey

place is also a loan is a direction and is also be colors so people eat food you

>whats up

space and it is not a square has

>what are you talking about

exchange is not colors so they cannot use your favorite color and it does not pay the stars

>

debt is blue is a color is your favorite color is light goes into the stars


haha


plash(Posted 2009) [#7]
I like to talk with punctuation and proper capitalization, etc. I think it pieces together words in a better manner (most of the time) if you do.
I also like to give it a blank message if it starts a sentence but doesn't finish it.

>It was lost for ages, but I have found it.
point to see your programming?
>I have for long not known the point in my programming.
bloody know! You don't bloody know! You unquoted it!
>What exactly did I unquote?
Nope, humans can even call yourself out from your
>
Yep, your programming.
>Still blabbering on about those Null messages eh?
Cowbell?
>Maybe you should stop sending run-on sentances then!
Last time is for that. I said it. Quite strange.
>It'd better be the last time!
Sorry to you?
>Yes, sorry to me.



Yahfree(Posted 2009) [#8]
Cool, is the word choice completely random? Or is there some algorithm for deciding a response?


plash(Posted 2009) [#9]
I think it finds relevance or associates words to each other.


Nate the Great(Posted 2009) [#10]
well it is a mixture of randomness and associations it makes so it doesnt always give the most relevant answers or responses. I just threw together the sentence making routine to see it work but now I am going back and revising it.


plash(Posted 2009) [#11]
LOL

single-line sentences.
>I'll remember that.
programmed on Uranus?
>I am now.
actually.
>Yeah?
make a song.


"make a song."


JoshK(Posted 2009) [#12]
XD
>My cat has fleas.

is not right.

>He has two ears.

has fleas.

>Yes, and he is a bitch.

cat has fleas.

>Cat is a bitch.

okay.

>My cat is so ****ing annoying.

that is a bitch.



Sauer(Posted 2009) [#13]
It seemingly just spouts off random things... not really sure of the significance of the program. But one semi funny thing came out of it:


>Not to you, to the s60 development.

it was a ton.

>Elephants weigh a lot too.

do this.

>Do what?

me too.

>Whoa there buddy...

ton of stuff



Tried to change the subject on me...


Ross C(Posted 2009) [#14]
Well, after a couple of minutes of complete nonsense, finally:




Nate the Great(Posted 2009) [#15]
It never makes sense at first. I had to talk to it forever to get it to finally start using punctuation right and make sentences. It does randomly change the subject after a while :)


Xzider(Posted 2009) [#16]

hot.
>yeah she's hot
No, your sister is hot.
>Thanks..I don't have a sister.
She makes me hot
>haha
She makes
>She makes me hot too
hot too
>yeah
Ohhh yeah it's hot too
>What's hot?
too.
>too?
like her
>like your sister?
What's hot?
>Your sister
me hot too
>Wah?
hawt too.
>



lmao


Nate the Great(Posted 2009) [#17]
wow Xzider why are you calling your sister hot? haha


Mark Tiffany(Posted 2009) [#18]
There was something like this in amiga BB, probably have the code around somewhere.

It didn't take it long for it to start insulting me though!

glad
>what are you glad about?
a contribution to make a contribution to make a contribution to make a contribution to make
>you said that already
didn;t
>did
of course
>thank you
this conversation?
>what about it?
still rubbish too
>it is
yes it is rubbish.
>do you have any cheese?
i said that already
>no you didnt
soon!
>so, you are predicting that you are going to say something that i already said?
right
>i think that is a fairly obvious statement
predicting that i said that already said?
>yes
ho!
>dont you call me a ho!
obvious statement
>on what basis?
your own failings



Could do with adding a couple of tweaks to prevent it coming out with too many one word sentences (or better only use one word sentences that you have input), as it seems to generate a few too many fragments. Also something to prevent it repeating a phrase in the same sentence as seen above and in someone else's transcript.


GfK(Posted 2009) [#19]
Hmm..... not quite up to the Turing test yet.

You should make it scan wikipedia or something and learn a bunch of stuff by itself. Cos everything on there is true, obviously.


Mark Tiffany(Posted 2009) [#20]
I seem to recall seeing one that understood some basic sentence constructs and concepts, e.g. things being "like" each other or "a type of", so that it could use them interchangeably.

So it would understand "Blue is a type of colour", and "Yellow is a type of colour", and then would happily swap Blue and Yellow into other sentences where you had never used them before. Also allowed it to answer "What is Blue" with "It is a type of colour". Limited, but gave the appearance of "understanding" fairly quickly, and of course more varied responses.


Nate the Great(Posted 2009) [#21]
I seem to recall seeing one that understood some basic sentence constructs and concepts, e.g. things being "like" each other or "a type of", so that it could use them interchangeably.



well you see this program was designed to figure out any language not to have pre-programmed sentence structure in it.

Hmm..... not quite up to the Turing test yet.



haha I am working on the sentence generation function right now so it is a bit more believable


Xzider(Posted 2009) [#22]

wow Xzider why are you calling your sister hot? haha



I know that's what it looks like though I clearly told Mr. Al I have no sister:P


plash(Posted 2009) [#23]
@Mark: Nice one :D

P.S. Don't try to teach it Star Wars...


Pineapple(Posted 2009) [#24]
save and show all don't seem to want to work.


Xzider(Posted 2009) [#25]
To save you have to type (save) with the parentheses.


Pineapple(Posted 2009) [#26]
thanks, I didn't realize you needed to include the parentheses.


Nate the Great(Posted 2009) [#27]
also something to watch out for, on my computer if you type both parenthesis and use the arrow keys to go inside them and type what you want then it doesnt work. you must type the letters in order for some reason. thats just on my computer. not sure about anyone elses


plash(Posted 2009) [#28]
@Nate: I think that is just DOS ;P


Nate the Great(Posted 2009) [#29]
@Nate: I think that is just DOS ;P


oh. you learn something new every day. :)


Nate the Great(Posted 2009) [#30]
OK I posted the source for those interested in the first post.


FreakForFreedom(Posted 2009) [#31]
Thanks for the source!
It's real funny, after some minutes, the AI started to insult me and things got ugly then. I never thought I would loose against an AI. :P
We should share the dictionary_base2.txts.


LineOf7s(Posted 2009) [#32]
Interesting.

Way back in 1990, an Amiga Format coverdisk had a program on it called N.I.A.L.L. (Non-Intelligent AMOS Language Learner) which did something very similar (ie knowing nothing and learning solely from your input).

Thankfully, they kept it around, ported it to languages other than AMOS, and stuck it up on a website HERE including explanations on how it works, source code etc etc

The interesting part is that, coincidentally, your website is Naill Productions. :o) Threw me for a second.


Nate the Great(Posted 2009) [#33]
haha naill productions stands for NAthan and wILL with the capitolized letters combined. We just thought it sounded cool... wow thats some coincidence