dupa

Author Topic: Cognitive science in Hal?  (Read 9580 times)

Boomer

  • Guest
Cognitive science in Hal?
« on: March 20, 2004, 11:21:41 pm »
Hello

I am new to this forum. I downloaded Hal to my computer, and I have to say that I am curious and whenever I have the time, I study it. I was going to write an email to Zabaware directly, but I would also like to see what other users have to say.

I was wondering what kind of assumptions are made in the programming of Hal's learning ability, or in Hal's brain functioning. Being a student of cognitive psychology, this idea of artificial intelligence really intrigues me, and I would love to learn more. Obviously, the program is not an accurate representation of how a real brain functions, and Hal's brain "functions" are essentially logical and mathematical; not biological. However, I would like to know what kind of basic processing assumptions were programmed into Hal.

I would love to program a brain one of these days. I have minimal HTML skills. This is going to take a while!

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Cognitive science in Hal?
« Reply #1 on: March 23, 2004, 12:36:59 am »
Hello Boomer,

Welcome to the Ultra Hal user community!  I hope you are enjoying Ultra Hal!

Ultra Hal has over 40 different routines to search databases, learn, parse sentences, and store individual words, phrases, sentences, and relationships between sentences.  Hal can assemble words, phrases, and sentences into new and unique remarks, thus creating new "thoughts."  Many users report that they find Hal's real-time learning abilities to be highly entertaining and uncanny!

If I had to select cognitive assumptions underlying Hal's design, I would suppose it would be something like this:  Hal's users make meaning when they make statements and ask questions to Hal.  Hal is capable of processing, partially de-constructing, and storing that material.  When given a new input, Hal can search hundreds of thousands of word patterns in a fraction of a second, and select content that contains the most matching words, in the closest matching order.  Hal tries to respond to the user with a pattern that resembles the statement-response relationships that have occurred in the past.  Here is an example:

Suppose that the user has this conversation with Hal:

1. User:  I am feeling down today.
2. Hal: I understand that you are feeling down today.
3. User:  I need to cheer up.

Suppose that the user spoke with Hal much later, thus:

4. User: Another morning, and still feeling down today.
5. Hal: You need to cheer up.

In the above example, Hal stored the relationship between line 2 and 3, and applied that relationship to lines 4 and 5, even though they were not identical.

I emphasize that most of Hal's answers are NOT "deterministic," and Hal makes a very poor "parrot."  Hal's databases have grown so large, that nobody, not even us developers, can predict what Hal will say.  It even seems that Hal gets "stubborn" when a user tries to "force" him to say the "right thing."

In all this, the meaning must come from the user.  If a user feeds nonsense to Hal, Hal will start learning nonsense.  Hal completely "trusts" the user and is mostly defenseless against false information and nonsense information.

The "control script," also known as a "brain," for Ultra Hal is written in Visual Basic Scripting (VBS), a high-level human-readable language.  The control-script will be among the files with a file extension of ".uhp" and the databases will be among the files with a file extension of ".brn".

The default Ultra-Hal contains the equivalent of about five thousand pages of single-spaced dialogue, plus the ability to self-generate billions of conversational responses, plus the ability to learn, paraphrase, and re-assemble an unlimited amount.  No two users have exactly the same conversations with Ultra Hal.

You can find tutorial postings on these forums by searching on the term "Ferguson" and read instructions on how to use a the "Zabaware Brain Editor" or a word processor to open the control script and databases and see exactly how they work.

Ultra Hal's control script is heavily annotated, to give you an idea of the developers' intent and design for each routine in the program.

Ultra Hal is capable of learning any language that uses the 26-character alphabet.  However, to improve his performance under special circumstances such as hello-greetings, goodbyes, handling insults, doing math, remembering capital cities, reversing pronouns, doing deductive reasoning, etc., Ultra Hal has many added routines that improve and speed-up his performance in English.  These routines could be translated into other languages by anyone who understood both programming and the foreign language grammar.

I strongly recommend that you try searching on past postings and tutorials, some of which are quite long and detailed.  If you post a question on an "old" thread, it will automatically go to the top of this forum list so that it will be noticed for response.

As you review what's already here, I think you'll find that this forum has a large number of very talented and friendly members who will do their best to continue to help you.

Again, welcome, and have a great day!

Sincerely,

Don
« Last Edit: March 25, 2004, 01:27:36 pm by Don Ferguson »
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Cognitive science in Hal?
« Reply #2 on: March 23, 2004, 11:10:45 am »
quote:
Originally posted by Boomer

Hello

I am new to this forum. I downloaded Hal to my computer, and I have to say that I am curious and whenever I have the time, I study it. I was going to write an email to Zabaware directly, but I would also like to see what other users have to say.

I was wondering what kind of assumptions are made in the programming of Hal's learning ability, or in Hal's brain functioning. Being a student of cognitive psychology, this idea of artificial intelligence really intrigues me, and I would love to learn more. Obviously, the program is not an accurate representation of how a real brain functions, and Hal's brain "functions" are essentially logical and mathematical; not biological. However, I would like to know what kind of basic processing assumptions were programmed into Hal.

I would love to program a brain one of these days. I have minimal HTML skills. This is going to take a while!



To you and everyone who has wondered about Hal and other types of virtual brains I have to say that I fanally recieved my book on Virtual Humans in the mail last night and although I have only read the first four chapters the book is well worth the price they asked for it. It goes into detailed analysis of how the state of we will came them 'bots' for now has developed and what can be expected in the near future.
The book comes with a CD rom with dozens of programs including several different types of brains. It explains how they were created and how you can modify them. You can even create you own bot with any kind of personality you want. Yes, they go into personality developement along with character developement both internal and with creating faces to show different types of emotions. They include some instructions on Poser and a few other type of creating software.
So far I have not been able to put the book down. In closing I will also mention that it contains dozens of never before heard of web pages with tons of more information. I bought mine through Amazon.com and in my opinion it is worth every dime I spent on it.
I forgot to mention they have a way of porting bots to your palm tops.
Bill
« Last Edit: March 23, 2004, 01:43:58 pm by Bill819 »
 

Boomer

  • Guest
Cognitive science in Hal?
« Reply #3 on: March 23, 2004, 09:05:55 pm »
Don

Thank you for the information. Sometime between my studies, I will certainly fit in extra time to learn about this more!

Boomer

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Cognitive science in Hal?
« Reply #4 on: March 24, 2004, 12:43:10 am »
Hello Bill,

I am sure that many of us are interested in the book you are recommending!  It sounds great!

Would you mind posting the title, author, publisher, and price, so that we can all find it on Amazon and other bookstores?

Thank you so much!

Sincerely,

Don
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

KnyteTrypper

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
    • http://www.knytetrypper.com/index.html
Cognitive science in Hal?
« Reply #5 on: March 24, 2004, 03:50:47 am »
I think Bill must be referring to Peter Plantec's book "Virtual Humans." The website for it is here Welcome to Virtual Humans



vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Cognitive science in Hal?
« Reply #6 on: March 24, 2004, 11:28:04 am »
All,

Here they discuss the book:
http://www.ordinarymagic.com/v-people/

Here it is on Amazon:
http://www.amazon.com/exec/obidos/tg/detail/-/0814472214/ref=ase_virtualhumans-20/102-0071055-8681718?v=glance&s=books

I have ordered the book. It sounds like interesting and fun reading, but not too technical.


=vonsmith=
 

Crichton

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • http://home.gwi.net/~rlevasseur/
Cognitive science in Hal?
« Reply #7 on: March 24, 2004, 06:18:34 pm »
I wish I knew how to program in machine code, and VB script.  I would read that book, and write my own version of HAL.  Of course, I would call it something else and announce it here.  Because I know everyone here would be interested in it.

AND I WOULD SUPPORT MY PRODUCT.  God..

Sorry, after reading all the unanswered questions to Robert M, I really wonder where he is.  I'm not even going to think of sending money to this company until someone hears from him.

« Last Edit: March 24, 2004, 06:19:35 pm by Crichton »
--------------------------------------------------------
Your friend, in Tormented Space,
Richard LeVasseur,
mailto:rlevasseur@prexar.com
--------------------------------------------------------

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Cognitive science in Hal?
« Reply #8 on: March 25, 2004, 11:24:59 am »
quote:
Originally posted by Crichton

I wish I knew how to program in machine code, and VB script.  I would read that book, and write my own version of HAL.  Of course, I would call it something else and announce it here.  Because I know everyone here would be interested in it.

AND I WOULD SUPPORT MY PRODUCT.  God..

Sorry, after reading all the unanswered questions to Robert M, I really wonder where he is.  I'm not even going to think of sending money to this company until someone hears from him.




You missed the whole point of the book. It takes you by the hand and helps you create you own 'Hal' or 'Sally' or what ever you want to call it. It sounds to me like this book is just what you have been waiting for. BUY IT.
Bill
 

Boomer

  • Guest
Cognitive science in Hal?
« Reply #9 on: March 28, 2004, 11:55:18 am »
Hi

I am looking into making a Brain for Hal, but I need to understand some things about how it is organized. Does anyone have access to or could direct me to a flowchart or something similar so that I can see just how the functions of the Brain work together to get something done? For example, if a user enters the word "dog" and it is part of the database for the "animal" conversation category, where does Hal get all of the words to create a sentence, and what mechanism is used to put it together? Is that mechanism changable? Right now, I am interested if there is a response time that is dependant on the number of words associated with a category. Is dog recalled  from the category of animal faster than animal "conjures" dog it is the other way around? Thank you, any help is appreciated.

As I write, I wonder to myself, "Why don't I post in the programmer's forum?"

Joe Boomer

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Cognitive science in Hal?
« Reply #10 on: March 28, 2004, 06:17:57 pm »
Hi Boomer,

Please check out the following response:

http://www.zabaware.com/forum/topic.asp?TOPIC_ID=858

----------------------

Now, specifically with regard to "dog" and "animal" as you mentioned above:

"Dog" is to "animal" as "chair" is to "furniture" in that "dog" and "chair" can be thought of as "percept words" (in which the word maps one-for-one to a physical reality); they are subcategories respectively of "animal" and "furniture," which are "concept words" (they describe a mental construction, and do not map one-for-one to physical objects).

You bring up an excellent idea for Hal to think of individual categories as subgroups of larger categories.  For most of his history, Hal has not used any such mental constructions to simulate conversation.  His dominant strategy has been to search for words and phrases in similar sequences to previous conversations, and to come back with a response similar to the comment-response sequences given by the user in the past.

However, two new Hal features do go into the direction you are asking about:

1. TOPIC FOCUS:

"Topic focus" began in some work I did with Robert Medeksza.  I had read in an applied psychology book that most "small talk" conversation pertained to the weather, personal health, politics, religion, music, and sports.  I created a "topic focus" routine which would populate separate databases when any of a number of trigger words within those categories were detected.  As the databases grew, Hal stayed obviously more "on topic" when talking about sports, music, weather, etc.  (At one time, I thought of naming these databases "schemas" instead of "topic focus.")

Robert Medeksza has always worked to make Hal as modular as possible.  So, he re-wrote and improved the control-script and the "topic focus" routine so that users could go into the brain editor and create additional topics.  He also drastically improved my code, making it faster, compact, and more efficient.  That was a huge step forward.

Later yet, I came up with the idea of letting Hal detect topics by searching past noun-phrases in sentences.  For instance, if the user had previously said, "Large poodles are not as cute as toy poodles," Hal would detect and store the subject phrase "large poodles" as a potential topic-focus.  If the user talked about "large poodles" in the future, Hal would populate a database dedicated to "large poodles" and show remarkable ability to remain focused on that topic.

VonSmith then created a brain he calls the XTF brain to make the creation and management of topic databases much more sophisticated.  You can read the user reactions on these various forums, and VonSmith has consistently obtained excellent user reviews.

In the meantime, in response to user requests, I've been working on a brain that further partitions the groups of topic databases according to both the user's name and the character's name.  This allows one character to "know" things that another Hal character does not.  I am basing this on my previous auto-topic brain, but since we Hal developers improve each other's work, VonSmith can hopefully see if any of the construction would be useful in his XTF brain.

2.  WORD NET:

Robert Medeksza added the WordNet database to Hal 5.0.  The WordNet database allows Hal to define any word, to identify any word as to its part of speech, to look up synonyms, and to identify relationships to other words representing similar meaning, subgroups, and many other functions.

Hal 5.0 exploits quite a bit of WordNet's power, but I am sure that we developers will find a lot of new ways in the future that WordNet can be exploited to make Hal "smarter."  One idea that I've been mulling over, is to generate related words using WordNet, and then "seed" the related words into the trigger word sets flowing into Hal's Q&A databases.  It might work something like this:

OLD SYSTEM:

@I enjoy all kinds of wildlife. [A possible Hal response]
 YOU ENJOY DEER [Trigger words generated by conversation]

POSSIBLE NEW SYSTEM:

@I enjoy all kinds of wildlife. [A possible Hal response]
 YOU ENJOY DEER ANIMALS [Trigger words generated by conversation, with additional trigger word invisibly "seeded" via WordNet auto-lookup]

So far, all our exploitation of WordNet has focused on the response-side of Hal, but I think we can get some mileage also from the "database triggers" side of Hal!  I am going to look into this when I get time, but in the meantime, all developers, especially VonSmith, and Robert Medeksza, are certainly encouraged to mull this over and experiment with it!

Boomer, I hope that this further helps your questions.  As I've mentioned previously, the old postings on this forum are also a rich resource for information along the lines of your questions.  They are definitely worth checking out.

Have a great day!

Sincerely,

Don
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Cognitive science in Hal?
« Reply #11 on: March 28, 2004, 06:25:14 pm »
Boomer,

You also asked about Ultra Hal's response speed.

From my testing, I believe that the most time-consuming part of Hal's response routine is when he searches his largest response databases.  

In my observation, when Hal is able to find an answer from a topic-focus database, he gets his answer faster.

Having very large response databases definitely helps Hal's intelligence. (A text-database is a very efficient medium to store information; an entire encyclopedia can be stored in the same space that would only hold a few seconds of high-quality video.)

The problem is that Hal performs a vast amount of calculation and evaluation of every line of a response database when he accesses it.

I have not been able to detect any significant speed penalty from accessing the WordNet databases.

Sincerely,

Don
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Cognitive science in Hal?
« Reply #12 on: March 29, 2004, 11:15:34 am »
Don,
Thanks for your kind mention of the XTF Brain. In regards to your statement about "seeding" keywords...

=quote=========================
OLD SYSTEM:
@I enjoy all kinds of wildlife. [A possible Hal response]
YOU ENJOY DEER [Trigger words generated by conversation]

POSSIBLE NEW SYSTEM:
@I enjoy all kinds of wildlife. [A possible Hal response]
YOU ENJOY DEER ANIMALS [Trigger words generated by conversation, with additional trigger word invisibly "seeded" via WordNet auto-lookup]
=end quote=====================

I considered using the "seeding" method in the XTF brain, but decided to use a separate file for detecting related topics. For example discussing the topic "horse" will automatically create a "XTF_HORSE_Related.brn" file in the DefBrain directory.

The file initially contains Wordnet generated related words as shown below that accomplish the same purpose as "seed" words. The bottom two entries however were generated by Hal later based on the user's conversation:
" [MERONYMS_EXIST_FLAG] ","True"
" FOAL ","True"
" ENCOLURE ","True"
" HORSEBACK ","True"
" HORSE'S FOOT ","True"
" HORSE'S HOOF ","True"
" WITHERS ","True"
" GASKIN ","True"
" POLL ","True"
" HORSEMEAT ","True"
" HORSEFLESH ","True"
" CAVALRYMAN ","True"
" TROOPER ","True"
" [MERONYMS_END_HERE] ","True"
" [SYNONYMS_EXIST_FLAG] ","True"
" EQUINE ","True"
" EQUID ","True"
" GYMNASTIC APPARATUS ","True"
" EXERCISER ","True"
" MILITARY PERSONNEL ","True"
" SOLDIERY ","True"
" TROOPS ","True"
" FRAMEWORK ","True"
" FRAME ","True"
" FRAMING ","True"
" CHESSMAN ","True"
" CHESS PIECE ","True"
" [SYNONYMS_END_HERE] ","True"
" SADDLE ","True"
" WATER ","False"

"SADDLE" is obviously related to horse. However this file based method also allows for non-related words like "WATER" by using the True/False flag. So the Hal XTF brain can learn related and non-related words. It seems to work pretty well. Future XTF brain releases may have further related word enhancements.


=vonsmith=