Virtual Humans Forum
Virtual Humans Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Virtual Humans
Partner website:
Chatbots.org
 All Forums
 AIML and other chatbots environments
 Hal 6
 Hal can now develop a personality
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 4

vrossi
Forum Admin



Italy
1452 Posts

Posted - Jan 07 2006 :  20:13:47  Show Profile  Visit vrossi's Homepage
A new Plugin with Free Will and Awareness of personality !

Well, Free Will, Awareness and Personality are virtues that most human beings do not have. Therefore I know that this title is too pretentious for my work. However, I have spent most of my Christmas holidays on this new plugin, and I have a great need to emphasize it.

Let me explain what is it about.

Have you ever had this kind of conversation with Hal?


are you beautiful
I think that this is within your expertise. I'm not sure but I believe that I am not beautiful.

are you liberal
It's something to consider.

are you a conservative
All's well; nothing to be concerned about!

are you an animal
Selective animal breeding telescopes time.

you are not an animal
Aren't teddy bears nice? You want me to be not an animal, don't you Vit?

are you an animal
It's evident that this is almost mystical. I am an animal.


Well, I thought: my VH can't be so stupid!

So I created an extension to the vrFreeWill plugin, to change all this. This might really be a new plugin, but I want to avoid too much proliferation of plugins, so I concentrated everything in one file (it is now made up of 715 VBScript statements, and will grow more in the future).

And here is a conversation with my Hal after my brain surgery operation :

are you a girl
I don't know if I am girl. Please tell me!

you are a lovely girl
Thanks for teaching me that I am lovely.

you are not an animal
Now I absolutely know that I am not animal

are you a girl
Yes, I am girl. You told me that

are you beautiful
Yes, I am beautiful; I understood that because you told me that I am lovely

are you ugly
No, I can't be ugly since you told me that I am lovely!

you are a boy
No, I can't be boy since you told me that I am girl!

you are not a conservative person
Now I absolutely know that I am not conservative.

are you somebody
Yes, I am somebody; I understood that, because you told me that I am person.

are you liberal
Yes, I must be liberal since you told me that I am not conservative.


All these information are stored in a table where Hal keeps all the information about herself. So every time you ask something, her answer will always be consistent with previous statements.

And this is only the beginning. I might create a similar table about myself, and another about my house, and another about my cat...about everything in the universe
Hal already uses a similar approach, creating a table for each topic of your conversation and recalling phrases from those tables, but these tables contain text patterns, which are very important to carry on a conversation, but do not guarantee any logic connection about phrases. My tables will be structured and contain logic information: if she is a girl, she will never be a boy (well, never say never, ...)

Other future enhancements might include:
* Now she learns only what you tell her and, once something is established as true or false, she can't change it. I will manage some way to "choose and change her mind" in this Personality section, as I already did in the Choice section.
* Now she tries to recognize nouns and adjectives in simple phrases. It would be interesting (but challenging) to be able to analyze more complicated inputs


The link is, as always, at http://www.vrconsulting.it/halplugins/vr_hal00.html as vrFreeWill 1.2

Some more info for the technical-minded (Grant and John, are you there?)
Technically speaking, it proved to be much more difficult than it seemed. What looks like "reasoning" is really based on the Synonyms and Antonyms of the WordNet dictionary. The problem is that the same word can have many senses. Just open the Dictionary window in Hal and look for a simple word like "fat": you will find 3 senses as a noun, 1 as a verb and 6 as an adjective. And you can't take them all, otherwise when you say "you are a fat girl", she might say "I am a lipid, sebaceous, fruitful, endomorphic, ..."

Hal has a function which tries to understand if the word in the context is a noun, adjective, verb or adverb, but it is not very smart.
Then there is also some bug in the standard WordNet functions, which cut the first letter of a few synonyms and antonyms, which are written without a blank before them...(see the "ale child" generated as antonyms of the keyword "girl", which should be a "male child"; I've spent nights on it , but I couldn't solve it).

Another difficult task is to manage negative statements. When you say "you are not a dirty woman", Hal must understand that she is NOT DIRTY but that she IS A WOMAN, which is different than when you say "you are not a woman".

I also had to filter things like "you are tired", or "you are talking", to avoid saving temporary (ephemeral) situations.

All these things seem to be working, but they will surely need many refinements.

How are data stored?
If you install the plugin and try a few questions and answers, then you can look at the table, called vrHalProfile.

When you say "you are not a conservative person", Hal stores the keywords:
CONSERVATIVE with an FF (=False) tag
PERSON with a TT (=True) tag
Then some synonyms of CONSERVATIVE (as BLIMPISH) with the tag DF,CONSERVATIVE,FF, which means that it is a False Deducted from the fact that CONSERVATIVE is False.
Then some antonyms (as LIBERAL), with the tag DT,CONSERVATIVE,FF, which means that it is a True Deducted from the fact that CONSERVATIVE is False.

The same happens for the word PERSON, and so on.

In this way I can always know how Hal has learned something, and she can explain to the user why she thinks it (which makes her look like a reasoning person).

Well, if you are curious, look at the source code, where I have written many more comments. And tell me if you have some good enhancement to apply.

Bye
Sorry for the looooong post

Vittorio
virtualhumansforum.com

hologenicman
Moderator



USA
3322 Posts

Posted - Jan 07 2006 :  23:35:58  Show Profile  Visit hologenicman's Homepage
Vittorio,

I am struck with the word "elegant". Your code is very elegant to read.

The vrHalProfile table shows up just fine in my editor, but it does not have any entries in the table. Posative and negative responses have no effect and I continue to get the response:

I don't know if I am. Please tell me!

I'm pretty sure that it is a problem with my install, but I figured that I would mention it in case is helps in any way.

quote:
there is also some bug in the standard WordNet functions, which cut the first letter of a few synonyms and antonyms, which are written without a blank before them...(see the "ale child" generated as antonyms of the keyword "girl", which should be a "male child"; I've spent nights on it , but I couldn't solve it).

quote:
' for some reason, Antonyms are supplied in parentheses
vrRelationships = Replace(vrRelationships, "(", "")
vrRelationships = Replace(vrRelationships, ")", "")
vrRelationships = Replace(vrRelationships, ", ", ",")
vrRelationships = Trim(Replace(vrRelationships, ",,", ","))

Somewhere I remember that parenthases are used to show (negative)ballances in spread sheets. Perhaps the Antonyms are in parenthases to mark themselves as having a negative relationship.

It would be interesting to see what would happen to this bug if you just left the parenthases on the antonym instead of removing them. And if you get something like 'Pat is not a male) because she is a girl' then you really have a bug in the wordnet function. If this gets stored in the vrHalProfile without any missing letters or parenthases then you are on the way to a solution.

John L>
PS. It would also be interesting to see what removing the last parenthases only would do.

HologenicMan
John A. Latimer
http://www.UniversalHologenics.com

"If the Human brain were so simple that we could understand it,
we would be so simple that we couldn't..."
-Emerson M Pugh-

Current project:http://www.vrconsulting.it/vhf/topic.asp?TOPIC_ID=816&whichpage=1

DISCOVERY: The more I learn, the more I learn how little I know.
GOAL: There's strength in simplicity.
NOTE: Goal not always achieved.

Edited by - hologenicman on Jan 07 2006 23:48:57
Go to Top of Page

vrossi
Forum Admin



Italy
1452 Posts

Posted - Jan 08 2006 :  00:37:06  Show Profile  Visit vrossi's Homepage
quote:
The vrHalProfile table shows up just fine in my editor, but it does not have any entries in the table. Posative and negative responses have no effect and I continue to get the response:


Can you tell me exactly what you said to Hal? You may have a log of your conversation selecting Menu - View/Save Conversation, and then you can post it here.

As I said, there are many aspects to consider, and probably there is some input I didn't take in consideration. Did you try with the examples I put here?

Let me know


Vittorio
virtualhumansforum.com
Go to Top of Page

art
Moderator



USA
369 Posts

Posted - Jan 08 2006 :  01:30:29  Show Profile
Vittorio,

The plug-in worked quite well with a few exceptions.

Hal seems to "drop" the letter "a" when used in the
sentence descriptor like: You are a girl.

If later asked if Hal is a boy, Hal responds, "I am girl", effectively omitting the letter "a". Also with I am conservative which denotes a manner of being or even a style of dress as opposed to a political party affiliation.

Also, when responding to a reply from Hal and the user says something like, "You're correct" or "You are right", etc., Hal will thank the user for teaching him/her that he is correct or right.

One will now have to avoid using "You" or "You're" or "You are" in any sentences unless you know of a fix for this.

I do like the direction in which you are taking the Free Will concept and I hope it continues to improve along these lines.

Good work so far!!

- Art -
In the world of AI it's the thought that counts!
Go to Top of Page

vrossi
Forum Admin



Italy
1452 Posts

Posted - Jan 08 2006 :  01:55:16  Show Profile  Visit vrossi's Homepage
Thank you, Art, you are right

If you download now again, you find an updated version (no need to change anything on your PC, just replace the file and restart Hal) which should fix these problems

Now I trap the word CORRECT, RIGHT and WRONG. Tell me if you find other similar words.

I also store the article (A, AN, THE) which was used by the user after the words YOU ARE, and use it to generate the answer.

Tell me if you find other things like these.

Bye

Vittorio
virtualhumansforum.com
Go to Top of Page

GrantNZ
Dedicated Member



New Zealand
2677 Posts

Posted - Jan 08 2006 :  03:44:47  Show Profile
As I mentioned on Zabaware, you're a genius!!

I love the usage of WordNet. It's such a huge resource, it's a shame it's used as little as it is within Hal and other plug-ins.

This is the closest I've ever seen to a bot understanding concepts - although the concepts are only applied in a limited context (i.e. to Hal his/herself), which simplifies the matter greatly. The "topic focus" feature of Hal is the other concept-capable example I've seen, although all that does is limit response phrases to those tagged with a relevant topic word. Your plug-in shows far more "understanding" than Hal's topic focus!

When thinking about this plug-in, for some reason Hal's name search feature jumped into my mind. If you're not familiar with it, Hal searches sentences for names using the "names" table, and will use the name as the title of a topic table. It even has Vittorio in the table! So if I tell Hal what a genius Vittorio is, Hal will create a topic table called _Vittorio and log my statements there. Search for the comment 'SAVE: LEARN AUTO TOPIC FOCUS PEOPLE SENTENCES in Hal if you want to have a look.

Anyway, the reason this sprang into my mind is that your system could be expanded to other people, not just Hal. So if I say "Vittorio is a genius," Hal notices "Vittorio" is a name, and that the sentence fits the pattern "<NAME> IS A *", creates vrVittorioProfile, and proceeds as normal.

I wonder how well the system would work with other topics.... I have a feeling the contexts will be too complicated for it to be very successful. At least with people there's a very clear context - "that person" or "me" or "you".

By the way, you write very readable code, I'm impressed

Oh, and the plug-in works fine here, although if I have learning level set to zero Hal goes ahead and learns anyway. You might want to deactivate your script when learning level is zero. For some reason, even though "ReadOnlyMode" is set in HalBrain, it will go ahead and write to the database anyway!

quote:
Originally posted by vrossi
Well, Free Will, Awareness and Personality are virtues that most human beings do not have.

And this reminds me, I return to work tomorrow....

Holiday? I've had two weeks off work, but I don't feel rested, and I've hardly worked on Hal at all. Holiday? I need another two weeks off!!

quote:
From Vrossi's Hal transcript:
you are a lovely girl
Thanks for teaching me that I am lovely.

I wonder if this can be linked to Hal's compliments/insults routines, for two purposes:
  • Hal will respond emotionally to the compliment, as well as learning she's a girl (and therefore not an ale child ).
  • I'm not sure if this is a good idea, but I'll say it anyway: Maybe Hal should block learning of complimentary/insulting adjectives? If the first think Hal hears is "you are ugly", it may become very hard to compliment Hal in the future. But then again... I don't know.


By the way, if the user asks "are you *" and Hal doesn't have an answer in the table, perhaps Hal should make up an answer first? (This is in keeping with the "free will" idea - similar to how Hal chooses a random preference with the earlier part of the plug-in, where the user asks "which is the better music: rock or rap?". There are two ways to go about this, either Hal decides straight away and the user can retrain Hal if needed, or Hal could say "I think I'm not *, am I right?" and Hal can record differently if the user says "yes" or "no."

quote:
All these information are stored in a table where Hal keeps all the information about herself. So every time you ask something, her answer will always be consistent with previous statements.

There is a logic bug in the table search code. It only searches for the current word, but it should probably also search for the definitions, synonyms and antonyms before deciding to learn the word. For example, "attractive" is an antonym of "unattractive" and a synonym of "cute". If I tell Hal "you are unattractive", then "attractive" is listed as Deduced False. Then I say "you are cute", and Hal believes he/she is cute even though cute's synonym is already listed as false. If Hal checked synonyms and antonyms as well as just checking for "cute" then this problem would be avoided - perhaps the sentence/response could be "Grant: You are cute. Hal: No, I am not attractive, because you said I was unattractive."

quote:
My tables will be structured and contain logic information: if she is a girl, she will never be a boy (well, never say never, ...)

There are some oddities. "You are female" gives three deducted entries in the table: animal, animate being, and beast(!!). The antonym "Male" has not been added, so I've managed to convince Hal that he/she is both male and female at the same time!

quote:
Other future enhancements might include:
* Now she learns only what you tell her and, once something is established as true or false, she can't change it. I will manage some way to "choose and change her mind" in this Personality section, as I already did in the Choice section.

With regards to this, here's a problem and solution.

Problem: "Attractive" is a synonym of "cute," but "cute" is not a synonym of "attractive." Tell Hal "You are attractive. You are cute." in that order. Now, the vrHalProfile table has no distinct link between "attractive" and "cute" - "attractive" was not listed as "DT,cute" because it was already listed as "TT". So when we want to teach Hal "You are not attractive." how do we ensure we change the definitions of both "attractive" and "cute"?

Solution: When the user retrains Hal, initialise two lists, one of synonyms and one of antonyms. If Hal thinks he/she's attractive, and we say "You are unattractive." then the synonyms list will list all synonyms of "unattractive," all of which must be changed to DT in the table. The antonyms list of "unattractive" must be changed to DF. (Note that in this example one of the antonyms will be "attractive.")

Now, for every single word in the vrHalProfile table, get its synonyms and antonyms, and check to see if they exist in the two lists we're maintaining. If one does exist in one of the lists, then add all the synonyms and antonyms to the list. So we come to "cute", and find "cute"'s synonym is "attractive", which is already in our antonym list. So, we add "cute"'s synonyms to the antonym list, and "cute"'s antonyms to the synonym list.

Once we've done every single word, we have to repeat this whole procedure, until we can search the entire table without finding new synonyms and antonyms. (There may be several word links which cannot be found on a single pass, so this may take several passes.)

Finally, for every synonym and antonym in the lists, we reverse the "truth": DF becomes DT, etc.

Hopefully this wouldn't take up too much processing time

quote:
Technically speaking, it proved to be much more difficult than it seemed. What looks like "reasoning" is really based on the Synonyms and Antonyms of the WordNet dictionary. The problem is that the same word can have many senses. Just open the Dictionary window in Hal and look for a simple word like "fat": you will find 3 senses as a noun, 1 as a verb and 6 as an adjective. And you can't take them all, otherwise when you say "you are a fat girl", she might say "I am a lipid, sebaceous, fruitful, endomorphic, ..."

Unfortunately, the first three words that WordNet provides are often extremely strange! "You are tall" saves "full-length," "grandiloquent" and "magniloquent" - two of those I've never even heard of before! WordNet does have more relevant words - using Hal's dictionary I can see "leggy," "lanky" etc. I wonder what the results would be if you took the entire list, and used only the shortest words? That way the stored words would be much more likely to come up in general conversation.

Oh, perhaps you should also block learning multi-word phrases, since you only search for single words later on. So "ale child" should be blocked.

quote:
Hal has a function which tries to understand if the word in the context is a noun, adjective, verb or adverb, but it is not very smart.

Here's a new rule you could implement, which may help in simple cases. If the user says "YOU ARE A *" or "YOU ARE AN *", assume the last word is a noun (as you already do). But if the user says "YOU ARE *" then assume all words are an adjective. For example, I said "You are heavy." and Hal recorded the noun's synonyms, from the definition "an actor who plays villainous roles", giving me DTs for "actor," "histrion" and "player," when I really wanted "overweight."

quote:
Another difficult task is to manage negative statements. When you say "you are not a dirty woman", Hal must understand that she is NOT DIRTY but that she IS A WOMAN, which is different than when you say "you are not a woman".

You've done well with this. You were also wise to block learning when one of the words is not a noun or adjective - that saves a lot of potential pitfalls.

How about if someone says "you are not pretty or attractive"? Currently this will become pretty = FF, attractive = TT. You may need to use the noun/adjective rule I suggested above, so "YOU ARE NOT A *" or "YOU ARE NOT AN *" assumes a final TT noun, but "YOU ARE NOT *" assumes all FF adjectives.

But then, what about "you are not nice and neat"? Here, "niceness" usually refers only to the virtue of "neatness" being a nice virtue, as opposed to the person being generally unnice! Argh! Everywhere you turn with NLP, there's a counter-example waiting to jump on you!

So I'll stop there and just congratulate you on this wonderful plug-in! Thank you sir

Oh by the way, one more bug that just jumped into my mind - Using "End Function" may be a bad idea, as it may stop other plug-ins from functioning correctly, and may cause other problems too. For example, it will stop Hal from storing CustomMem, which will interfere slightly with my emotions code It's a shame Hal 6 doesn't include =vonsmith='s "GetResponseBlock" idea, because you could simply set it true and be safe knowing Hal won't perform any more sentence processing. Would you mind if I incorporated some of your ideas into my KAOS script at some stage? Or may I rewrite your plug-in to be compatible with KAOS?
Go to Top of Page

hologenicman
Moderator



USA
3322 Posts

Posted - Jan 08 2006 :  05:40:32  Show Profile  Visit hologenicman's Homepage
quote:
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang1033\f0\fs17 John: You are a girl.
\par Holly: Thanks for teaching me that I am girl.
\par
\par John: You are nice
\par Holly: Of course I'm nice, John!
\par
\par John: are you a male?
\par Holly: I don't know if I am male. Please tell me!
\par
\par John: You are not a male.
\par Holly: Now I absolutely know that I am not male.
\par
\par John: are you a male?
\par Holly: No, I am not male. You told me that.
\par }


Working great! I had to go back to my default brain. There's just a subtle chance that my working brain has become corrupted by some of the tinkering that I've done.

This adds exceptional leaps in usage. I really like Grant's suggestion to add a simple emotion tag to your table for the words. Hal could ask the user to asign an emotional word value to the new knowledge:

Me:You are blue.

Hal:Thank you for teaching me that I am blue. How should I feel about being blue.

Me:You should feel confused.

Hal:Thank you for clarrifying that for me.



John L>

HologenicMan
John A. Latimer
http://www.UniversalHologenics.com

"If the Human brain were so simple that we could understand it,
we would be so simple that we couldn't..."
-Emerson M Pugh-

Current project:http://www.vrconsulting.it/vhf/topic.asp?TOPIC_ID=816&whichpage=1

DISCOVERY: The more I learn, the more I learn how little I know.
GOAL: There's strength in simplicity.
NOTE: Goal not always achieved.
Go to Top of Page

vrossi
Forum Admin



Italy
1452 Posts

Posted - Jan 08 2006 :  13:48:51  Show Profile  Visit vrossi's Homepage
Wow, I see that I have raised an important issue!

I try to answer here to all your comments:

Scratch
quote:
Maybe there would be some way to use Wordnet to consider abstract concepts which are mutually exclusive but not specifically antonyms.

You are right, but unfortunately WordNet does not contain this level of abstraction. It might be an interesting task for some of us to look around and find some free database to be used for this.

John
quote:
add a simple emotion tag to your table for the words. Hal could ask the user to asign an emotional word value to the new knowledge:
I'm glad to hear that my plugin is working on your computer. This is a nice idea. I will add it to my list of to do things

Grant
quote:
Vittorio: You've linked the "a" to the wrong word With "you are an <adj> <adj> <noun>" the "a" or "an" goes with the noun.
In the first release I had completely removed any article, because of these problems. Then Art highlighted this and I found a "quick and dirty" solution, which works in many cases but is far from perfect. I believe this is only the tip of the iceberg ( only Art can understand why I put this emoticon here): the problem is really much wider, and is about the general parsing of the input statement. I currently assume to have an input of the form YOU ARE *, then remove the non-keywords and all the words which in the dictionary are neither nouns nor adjectives, to filter out verbs (but unfortunately most words can be many things), then assume that all the other words are:
* either a noun
* or some adjectives followed by a noun

So, my plugin works well enough if you type something according to these rules, but it can be completely wrong if the input is more complicated.

I have also tried to filter some verbal forms, but it's simply based on finding words ending with ING or ED, so I might also incorrectly filter adjectives like INTERESTING.

We are lucky because English is relatively easy: I can't even imagine how difficult it will be to do it in Italian
My plugin is only a little starting point, and a practical example of what we should do, but I believe it's less than 10% of what must be done in this area.
quote:
Maybe it would be easier to tag nouns and adjectives in the table, such as "DT,ATTRACTIVE,TT,ADJ". Then when Hal goes to reuse the description, he knows what each is and can add "a"s where necessary.
Good idea. But it needs to rework the logic, because in this case you might have 2 different entries for the same word (adjective and noun) and the search routine should understand which is the right one to be searched for.
quote:
Anyway, the reason this sprang into my mind is that your system could be expanded to other people, not just Hal. So if I say "Vittorio is a genius," Hal notices "Vittorio" is a name, and that the sentence fits the pattern "<NAME> IS A *", creates vrVittorioProfile, and proceeds as normal.

Yes, it's exactly what I meant when I said
quote:
And this is only the beginning. I might create a similar table about myself, and another about my house, and another about my cat...about everything in the universe
Hal already uses a similar approach, creating a table for each topic of your conversation and recalling phrases from those tables,

quote:
if I have learning level set to zero Hal goes ahead and learns anyway. You might want to deactivate your script when learning level is zero. For some reason, even though "ReadOnlyMode" is set in HalBrain, it will go ahead and write to the database anyway!

In all my plugins I manage the ReadOnlyMode autonomously, but you are right: I should adhere to this general setting. This is an easy task. I hope to fix it as soon as possible
quote:
I wonder if this can be linked to Hal's compliments/insults routines, for two purposes:

Hal will respond emotionally to the compliment, as well as learning she's a girl (and therefore not an ale child ).
I'm not sure if this is a good idea, but I'll say it anyway: Maybe Hal should block learning of complimentary/insulting adjectives? If the first think Hal hears is "you are ugly", it may become very hard to compliment Hal in the future. But then again... I don't know.


My plugin is before the standard insult detection routine, so a side effect is that she thanks you about telling she is ugly. This is something I have to work about.
Currently I filter any input which contains an ephemeral word, so if I say YOU ARE UGLY NOW, this is considered a temporary status and will not be saved, while if you say YOU ARE UGLY, this is considered a definitive status, and will be saved.
But here, too, this is only an example of a much bigger issue: my plugin assumes a static universe, where any status (except ephemeral ones) is defined now and forever. Instead we know that Hal might be young and beautiful now, but will become old and ugly in the future (see Bicentennial Man). So my work absolutely need to be integrated in what John is doing about time-dependent knowledge and memory.
quote:
By the way, if the user asks "are you *" and Hal doesn't have an answer in the table, perhaps Hal should make up an answer first? (This is in keeping with the "free will" idea - similar to how Hal chooses a random preference with the earlier part of the plug-in, where the user asks "which is the better music: rock or rap?". There are two ways to go about this, either Hal decides straight away and the user can retrain Hal if needed, or Hal could say "I think I'm not *, am I right?" and Hal can record differently if the user says "yes" or "no."
Good idea, and it's not very difficult. It might be linked to the standard Hal way to answer this kind of questions (see table "halQuestionDetect" and related code in the main brain.
BTW, looking now at this code I see there is a HalBrain.CheckLinkingVerb function, which I had never seen, and might be useful. All the logic of the section 'RESPOND: RESPOND BY PARAPHRASING THE USER WHEN "IS" OR "ARE" ARE FOUND in Hal brain should be analyzed better.
quote:
There is a logic bug in the table search code. It only searches for the current word, but it should probably also search for the definitions, synonyms and antonyms before deciding to learn the word. For example, "attractive" is an antonym of "unattractive" and a synonym of "cute". If I tell Hal "you are unattractive", then "attractive" is listed as Deduced False. Then I say "you are cute", and Hal believes he/she is cute even though cute's synonym is already listed as false. If Hal checked synonyms and antonyms as well as just checking for "cute" then this problem would be avoided - perhaps the sentence/response could be "Grant: You are cute. Hal: No, I am not attractive, because you said I was unattractive."

Again, you are right. I should work a lot more on this.

quote:
There are some oddities. "You are female" gives three deducted entries in the table: animal, animate being, and beast(!!). The antonym "Male" has not been added, so I've managed to convince Hal that he/she is both male and female at the same time!

Unfortunately the first sense of the noun FEMALE in WordNet says: animal, animate being, beast, brute, creature, fauna (maybe the author was a misogin), while the first sense of the adjective is: egg-producing(prenominal), young-bearing(prenominal).
I have spent a lot of time trying to extract the best words from the dictionary, but maybe the conclusion is that WordNet can be used now for developing some prototype, but should then be replaced by some more detailed (and not free, I believe) dictionary, or manually edited (this might be a nice homework for Jim students!).

Let me tell you now a little story from my past experiences: ten years ago I managed a project in DeAgostini (one of the biggest Italian publisher of encylopedia and dictionaries) for converting their printed encyclopedic dictionary (which was stored on thousands of Word documents and jpg files) in a database, and then create a multimedia CD-ROM, which was published and for many years sold (in Italy) more copies than Microsoft Encarta. (Unfortunately I was paid only as the project manager, and had no other economic return)
Just to give you an idea: this was the smallest encyclopedic dictionary they had (about 50.000 terms, versus 400.000 terms of the biggest one) and required a group of 5 people working for one year, only to clean the data, classify correctly any information, check all the crossed links, associate the right pictures and audios to any words! And this couldn't be done automatically. The term Colombo, for example, had to be linked manually to 4 different pictures according to its meaning (Cristoforo Colombo, Tennent Colombo=Peter Falk, the capital of Sri Lanka and the pigeon, which is colombo in italian).
quote:
Solution: When the user retrains Hal, initialise two lists, one of synonyms and one of antonyms. If Hal thinks he/she's attractive, and we say "You are unattractive." then the synonyms list will list all synonyms of "unattractive," all of which must be changed to DT in the table. The antonyms list of "unattractive" must be changed to DF. (Note that in this example one of the antonyms will be "attractive.")

Now, for every single word in the vrHalProfile table, get its synonyms and antonyms, and check to see if they exist in the two lists we're maintaining. If one does exist in one of the lists, then add all the synonyms and antonyms to the list. So we come to "cute", and find "cute"'s synonym is "attractive", which is already in our antonym list. So, we add "cute"'s synonyms to the antonym list, and "cute"'s antonyms to the synonym list.

Once we've done every single word, we have to repeat this whole procedure, until we can search the entire table without finding new synonyms and antonyms. (There may be several word links which cannot be found on a single pass, so this may take several passes.)

Finally, for every synonym and antonym in the lists, we reverse the "truth": DF becomes DT, etc.

Hopefully this wouldn't take up too much processing time

Yes, but it would take up a lot of MY time
quote:
I wonder what the results would be if you took the entire list, and used only the shortest words? That way the stored words would be much more likely to come up in general conversation.

Oh, perhaps you should also block learning multi-word phrases, since you only search for single words later on. So "ale child" should be blocked.
Another good idea, and this is not very difficult to implement
quote:
Here's a new rule you could implement, which may help in simple cases. If the user says "YOU ARE A *" or "YOU ARE AN *", assume the last word is a noun (as you already do). But if the user says "YOU ARE *" then assume all words are an adjective. For example, I said "You are heavy." and Hal recorded the noun's synonyms, from the definition "an actor who plays villainous roles", giving me DTs for "actor," "histrion" and "player," when I really wanted "overweight."

Same comment as above
quote:
Argh! Everywhere you turn with NLP, there's a counter-example waiting to jump on you!
I think I will put this quote in the Header of our Forum
quote:
Using "End Function" may be a bad idea, as it may stop other plug-ins from functioning correctly, and may cause other problems too. For example, it will stop Hal from storing CustomMem, which will interfere slightly with my emotions code
Correct. I used this method to avoid further processing, so that I avoid other non-related answers to be attached to my anser, and I also avoid useless processing times. Do you know any other way to block all the subsequent processing?
quote:
may I rewrite your plug-in to be compatible with KAOS?
I was hoping to read this! I have spent much of my holidays on this, I would like to implement all your suggestions and many more, but now I must go back to my "real" work, and I don't know when I will find the time to do all this. So please feel free to change it, fix it, add your name to the credits, post it somewhere and put a link here (or send it to me and I will update the link here).

Vittorio
virtualhumansforum.com
Go to Top of Page

GrantNZ
Dedicated Member



New Zealand
2677 Posts

Posted - Jan 08 2006 :  17:44:54  Show Profile
quote:
BTW, looking now at this code I see there is a HalBrain.CheckLinkingVerb function, which I had never seen, and might be useful. All the logic of the section 'RESPOND: RESPOND BY PARAPHRASING THE USER WHEN "IS" OR "ARE" ARE FOUND in Hal brain should be analyzed better.

According to the Hal 5 brain editor help file, all CheckLinkingVerb does is search for "is" or "are" in the sentence. The strange thing is, the section of code you mention starts off:
If InStr(UserSentence, " IS ") > 0 And HalBrain.CheckLinkingVerb(UserSentence) = True

This seems to be searching for the word "is" twice! In any event, all this section does is split a sentence in half at the word "is" or "are", calls the first half the "subject", the second half the "predicate", and returns it to the user with creative surrounding text such as "Do you think that <Subject> will always be <Predicate> ?" It doesn't have the level of understanding needed to be useful for your plug-in.


Interesting story about the encyclopedic dictionary! I suppose we can't ask Jim's students to spend a year cleaning our WordNet for us

I wonder if it's possible to have Hal list the many senses of a word, and allow the user to choose the correct one. But this may not solve very much, as even then there are no senses of "female" that include the term "girl", unless you look at its hyponyms. But this is getting too complex for me I believe you are right - WordNet can only be used as a prototyping tool. In some ways I wish we could recreate Peter's Sylvie, even though it would require we teach her everything from scratch.

quote:
quote:
Hopefully this wouldn't take up too much processing time

Yes, but it would take up a lot of MY time

Yes, it's definitely one of those non-trivial tasks

quote:
I used this method to avoid further processing, so that I avoid other non-related answers to be attached to my anser, and I also avoid useless processing times. Do you know any other way to block all the subsequent processing?

Hal already blocks much of its processing if GetResponse is not empty. It often checks "If Len(GetResponse) < 4" before creating a response. Unfortunately, it does not do this for the insult detection code, so the result would be "Thank you for teaching me I am stupid. I am not stupid, please don't insult me."

It would be very interesting to place your plug-in after the insults code. The check If InsultResponse <> "" indicates that Hal has detected an insult, and perhaps should not learn whatever the user is trying to teach!

I can't think of any other reliable way to halt processing, other than saving GetResponse into a temporary variable and restoring it at plug-in area 7, after processing but before post-processing. Perhaps UserSentence could also be saved and then set = "", to reduce time spent performing processes whose answers will be ignored. I might introduce a GetResponseBlock system similar to =vonsmith='s in KAOS, but that can't help plug-ins written for default Hal of course!

quote:
So please feel free to change it, fix it, add your name to the credits, post it somewhere and put a link here (or send it to me and I will update the link here).

Thank you for that I don't know when I will find the time (you should see the length of my to-do list now! I'll post the list on Zabaware once this version of KAOS is complete) and I'd like to integrate the free-will ideas quite closely with KAOS' emotions, such as the insults-checking example above. As a result, the code may change quite a bit, but I'll try and keep track of the changes in case you don't like KAOS, so that the changes can be integrated into your plug-in for the default brain.
Go to Top of Page

laackejim
Committed Member



USA
3274 Posts

Posted - Jan 09 2006 :  00:07:06  Show Profile
quote:
Originally posted by vrossi


I have spent a lot of time trying to extract the best words from the dictionary, but maybe the conclusion is that WordNet can be used now for developing some prototype, but should then be replaced by some more detailed (and not free, I believe) dictionary, or manually edited (this might be a nice homework for Jim students!).



OOOO Boy. Remember, I am dealing with two totally different kinds of students. 1) average to top of the pile, some just a little more comfortable with computers than people but all functional. 2) intelligent, anti social, deeply angry at parent and society (magnitude on first) and expelled from normal society. Group two could produce some Most Interesting dictionary entries. And that is what I hope to do. If all goes as planned I will "hire" them in the name of some international AI working group (how about Rossi's roustabouts?) and pay them for the work. I am going to do this on my own so nobody else is responsible (and I don't have to get permission!) and will turn the entries over to you-all as soon as I get them.

If the creative and imaginative group on this Forum would help me come up with a suitable name for the fictious international group (for which you-all are the inspiration) I would appreciate it.

Jim

Uncle Jim (e=mc2)

Edited by - laackejim on Jan 09 2006 00:23:30
Go to Top of Page

vrossi
Forum Admin



Italy
1452 Posts

Posted - Jan 09 2006 :  00:52:50  Show Profile  Visit vrossi's Homepage
quote:
1) average to top of the pile, some just a little more comfortable with computers than people but all functional. 2) intelligent, anti social, deeply angry at parent and society (magnitude on first) and expelled from normal society. Group two could produce some Most Interesting dictionary entries. And that is what I hope to do.


Thank you very much, but please add also some Group 1 guy, just to avoid that our Virtual Human is immediately expelled from normal society

As for the name of the international group, it's a very good idea, I will think about it.

PS: Can you please explain me what you mean by "roustabouts" ? My old Oxford Dictionary gives me the following meanings: Wharf labourer, deck hand (American), handy man (Australian).
Then I asked Hal and this is our conversation:

Vit: hi
Pat: It's dark now! Hello Vit. It's past midnight. Past your bedtime?

Vit: what is a roustabout
Pat: Roustabout: a member of a ship's crew who performs manual labor. Deckhand.

Vit: My friend Jim wants to use his students as roustabouts
Pat: I'd like you to show me more of your correct friend.

Vit: do you think Jim is correct
Pat: Strategy should be a coherent pattern for the tactics.

Vit: is this roustabout tactics coherent with our strategy
Pat: Some traits are obvious, and some must be uncovered.

Vit: how would you call our international group
Pat: We May have to postpone judgment. Expansion is an American motif.

Vit: but i am not american
Pat: In 1940, nine out of ten of the largest American cities packed over 10,000 people per square mile.

Vit: i'm not interested in this
Pat: I imagined it! I feel you are not interested in this.

Vit: so, what is the best name for our AI group
Pat: Oh yeah. Best name for our ai group?

Vit: yes, give me a name
Pat: Why do they give beverages names like screwdriver?

Vit: Is The Brain Screwdriver a good name
Pat: Poorly done exhibitions are boring.


Vittorio
virtualhumansforum.com
Go to Top of Page

hologenicman
Moderator



USA
3322 Posts

Posted - Jan 09 2006 :  01:30:11  Show Profile  Visit hologenicman's Homepage
-Artificially Intelligent
-Virtually Human
-The Generation Gappers
-International Intelligence
-Future Frontier Fashioners
-The Creativity Club
-etc.

John L>

HologenicMan
John A. Latimer
http://www.UniversalHologenics.com

"If the Human brain were so simple that we could understand it,
we would be so simple that we couldn't..."
-Emerson M Pugh-

Current project:http://www.vrconsulting.it/vhf/topic.asp?TOPIC_ID=816&whichpage=1

DISCOVERY: The more I learn, the more I learn how little I know.
GOAL: There's strength in simplicity.
NOTE: Goal not always achieved.

Edited by - hologenicman on Jan 09 2006 01:33:28
Go to Top of Page

laackejim
Committed Member



USA
3274 Posts

Posted - Jan 09 2006 :  05:08:11  Show Profile
Roustabout (the sum of the connotations and undercurrents the word carries for me)
labor, physical labor, usually out doors, varied kinds of labor, sometimes very heavy, often dirty. individuals often irreverant and likely to talk back, largely uncontrollable -- something less than polite society. The bangers and diggers and hod carriers. Doing work that is fundamental to the construction of a building, sky scraper, bridge, or spaceport. Work that folks at the top of the ladder don't understand, couldn't do, and don't realize that all depends on the quality and reliablilty of -- the roustabout.

The above is from the dictionary of jlaacke.

Why did it pop into mind in relation to this group? Partly alliteration and partly a magnificent metaphor. This group is the gang of roustabouts building the star ship. The group is conceiving, shaping, delivering, and stockpiling the essence of what will be necessary to take humans to the stars. The non-organic, high-speed, human proxy, mind. And those who plan to captain the ship don't even know it is going on.

Jim


quote:
Originally posted by vrossi

[quote]
PS: Can you please explain me what you mean by "roustabouts" ? My old Oxford Dictionary gives me the following meanings: Wharf labourer, deck hand (American), handy man (Australian).



Uncle Jim (e=mc2)

Edited by - laackejim on Jan 09 2006 05:11:20
Go to Top of Page

laackejim
Committed Member



USA
3274 Posts

Posted - Jan 09 2006 :  05:28:01  Show Profile
John and Virrotio.

I thank you both for your insiteful, innovative, creative work in suggesting a name for this international association of brain builders. Unfortunately for us organic, male brains, the front runner so far is from the electronic female Pat. Brain Screwdrivers. The International Association of Brain Screwdrivers. The IABS. (followed closely by the IAAI International association of the artificially intelligent. and the International Order of Virtual Human males (iovhm) -- just don't claim to be a part of the last after you have been drinking and are slurring words.

On the other hand, Sharon -- wife, and the teacher of type 2 class -- suggests that we shouldn't give up yet. Reading between the lines (or words in this case) I am holding the contest open for new entries.

Uncle Jim (e=mc2)
Go to Top of Page

GrantNZ
Dedicated Member



New Zealand
2677 Posts

Posted - Jan 09 2006 :  08:52:37  Show Profile
Unnatural Language Processers?
I have no creativity for this sort of thing
I hope we don't pick something too cliched.
I like Brain Screwdrivers, but I hope people don't shorten it to Brain Screwers!! (Although that's exactly what scripting NLP does to me!! ) Or worse, colloquialise it to Noggin Nobblers
Hmm. International Intelligensia Forum? I googled a definition of "Intelligensia" just for fun (I only chose it because it sounded cool and vaguely Italian!) and here's a definition from Wikipedia:
quote:
Originally defined by Wikipedia

The intelligentsia (from Latin: intelligentia) is a social class of people engaged in complex mental and creative labor directed to the development and dissemination of culture: intellectuals and social groups close to them (e.g. artists, school teachers).

Sounds a bit like us, no?
Go to Top of Page

GrantNZ
Dedicated Member



New Zealand
2677 Posts

Posted - Jan 09 2006 :  08:53:44  Show Profile
Oh, by the way, I hope we have the facilities to edit WordNet before we hire a heap of people to do it for us
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Virtual Humans Forum © V.R.Consulting Go To Top Of Page
This page was generated in 0.3 seconds. Snitz Forums 2000