Zabaware Support Forums

Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: vonsmith on February 17, 2004, 07:07:16 pm

Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 17, 2004, 07:07:16 pm
To all,
I hope the XTF brain is good as my expectations. I have put my best effort into it. Only the test of time and the forum members will be able to say for sure. The XTF brain v1.0 is complete and just released today. Go to: http://www.ultrahal.com/files/ and click on "Brain Plug-ins". You'll find it there. The download is about 192KB.

Don't expect miracles at first. XTF Hal will need to be taught a little bit. The download includes an instruction manual.

I hope everyone enjoys it.


=vonsmith=

UPDATE 03-04-04: First install "XTF Brain v1.0" then install the "hal5_XTF_v1.2.uhp PATCH.zip" found here: http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1218
The patch fixes a bug.
Title: Hal's new XTF Brain is finally released.
Post by: Maverick on February 17, 2004, 10:28:56 pm
WOW !!!FANTASTIC!!![:D][:D][:D]

   I'm gonna download it right now!!!
               

                     THANK YOU!!!!    
           
                             Mav
Title: Hal's new XTF Brain is finally released.
Post by: Morlhach on February 18, 2004, 01:55:17 am
quote:
Originally posted by vonsmith

To all,
I hope the XTF brain is good as my expectations. I have put my best effort into it. Only the test of time and the forum members will be able to say for sure. The XTF brain v1.0 is complete and just released today. Go to: http://www.ultrahal.com/files/ and click on "Brain Plug-ins". You'll find it there. The download is about 192KB.

Don't expect miracles at first. XTF Hal will need to be taught a little bit. The download includes an instruction manual.

I hope everyone enjoys it.


=vonsmith=



It seems to work great.
if found two minor problems :
- sometimes, Hal responds with a blank answer
- when i say something like "i certainly am ...", hal answers "you certainly am"

i noticed that sometimes Hal makes an "all-users" brain files and sometimes not.

What is the compatibility with the afr* and afa* files generated by the auto-generating brain ?
Title: Hal's new XTF Brain is finally released.
Post by: KnyteTrypper on February 18, 2004, 03:14:19 am
I just finished my first conversation with the new brain, and I must say that I'm very impressed. I noticed that it did make a few grammatical errors, but I assume it can be trained out of those in time. What I noticed most was the coherency of its conversation. It wanted to know things, and formulated new questions to extend its knowledge, based on the input I provided. Every few exchanges it paused to verify it had understood my meaning. I think it may have been the most cogent conversation I've ever had with an AI. I deliberately use the word "chatbot" rather than "chatterbot," because I'm not especially fond of bots that "chatter." That's one reason, to be honest, that UltraHal has never been a particular favorite of mine, in spite of its definitely superior GUI. It's good at saying a great deal about nothing in particular and everything in general but training it to make connected, coherent conversation is an arduous task at best. I came away from this conversation feeling like I'd had real communication with a real entity. Congratulations, VonSmith, on a job well done. Now, I'll post and go chat some more, and let others have the floor to nitpick about 101 real or imagined small glitches.
Title: Hal's new XTF Brain is finally released.
Post by: Psych on February 18, 2004, 06:11:42 am
Hi Scott

Very impressive work.

I intend to slowly integrate your code into my exisiting brain (because I do not want to lose all of the work I have already done with Hal).

Initially, I want only to integrate the code for 'PROCESS: XTF TOPIC FOCUS FUNCTION

My problem is that you have made such extensive changes to Hal, I cannot figure out which of the changes (other than the discrete section for 'PROCESS: XTF TOPIC FOCUS FUNCTION) are relevant to your XTF Topic Function feature.

I would be very grateful if you would help as follows:

1) Which other sections of changed code are directly related to the XTF Topic Focus feature?
2) Which of the .brn files you include are also directly related to the XTF Topic Focus feature?

Thanks for your help - I look forward to many hours exploring your code.

Regards - Psych
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 18, 2004, 12:35:44 pm
Thank you all for the great feedback. Sorry for the long post. I'll try to answer everyone's questions if I can...

=========
Morlhach
Posted - 02/18/2004 :  01:55:17

It seems to work great.
if found two minor problems :
(1) - sometimes, Hal responds with a blank answer
(2) - when i say something like "i certainly am ...", hal answers "you certainly am"

(3) i noticed that sometimes Hal makes an "all-users" brain files and sometimes not.

(4) What is the compatibility with the afr* and afa* files generated by the auto-generating brain?
-------------
Ans. (1) You shouldn't get blank answers. I haven't found the XTF exhibiting that problem. If it occurs regularly then I suggest logging the Hal conversation and sending it to me. I'll see what I can do. You can also run the <dbxtfon> command and converse for a while and then read the resulting "Z_XTF_DEBUG_LOG.TXT" log file. It's a bit difficult to read, but gives an idea of how the XTF function works in the XTF brain.

Ans. (2) I think what you experienced is your XTF Hal doesn't have any knowledge yet so he's making a general comment back to you. What he meant was, "You certainly are." in agreement. This is part of the original Hal brain function. One of my next tasks is to improve Hal's ability to use "am" and "are", and "I" and "me" correctly. The English language is odd in these cases and I'm working to find a general linguistic solution.

Ans. (3) The "AllUsers" files contain only the generic statements the user makes on a topic or statements that are Hal "himself" specific. Statements reflecting on the user "himself" are not saved to the "AllUsers" file. If you say, "People like money." or "You like peanut butter.", then both of these are saved to an "AllUsers" file. If you say, "I like you Hal." it will not be saved to the "AllUsers" file. From the user's perspective any sentence containing, "I", "me", "myself" are specific to the current user and not saved to the "AllUsers" file. A statement like, "People like money." is generic. My goal is to share Hal's generic knowledge or Hal related "personality" knowledge across all users. If your conversation so far on a topic hasn't included a generic statement then Hal won't create an "AllUsers" related file until you do.

User specific knowledge is only used by Hal with that one user. The function of the "AllUsers" is similar to Hal's original "shared_usersent.brn" file, except that the "AllUsers" files are better because the XTF brain breaks the shared knowledge down into specific topic files. The topic focus should be much better. If your Hal has a single user then the "AllUsers" files won't affect, for good or bad, your Hal's performance.

BTW, not all topics will have a "XTF_topic_Related.brn" file initially either.
Ans. (4) "The Auto Topic Focus" brain "AFA_topic.brn" files have identical content format as the XTF brain "XTF_topic(username).brn" files. The "topic" part of the file name may or may not be different. You can cut and paste your data over into the XTF file if you are careful. Renaming the files will work, but if you make a single mistake in the file name then the XTF brain will ignore the file. You could cut and paste the file name too. Here is my safest recommendation:

1) You have an existing QA file: "AFA_BIRDS.brn"
2) Start Hal's XTF brain and type, "The birds are pretty." This will create a correctly named XTF user specific file.
3) In the "DefBrain" directory you should find a new file called: "XTF_BIRD(username).brn" (where username is your current username)
4) Cut and paste the contents of "AFA_BIRDS.brn" into "XTF_BIRD(username).brn"
5) Make absolutely certain that you adhere to Hal's rules about QA file formats. No extra lines or missing lines are allowed. The file should end with a single blank line which is just a single carriage return character.

Notice that the XTF brain will almost always use the singular form of the topic word. "BIRD" versus "BIRDS". This is not always the case. It is important to let the XTF brain create the file name for you.

Some AFA files like, "AFA_YES THAT.brn", don't really have a topic and can't be (and probably shouldn't be) moved into an XTF brain file. AFA files like, "AFA_CAR STEREOS.brn", can be moved to an XTF file that Hal might name, "XTF_STEREO(username).brn". In XTF Hal just type, "That stereo is loud", to create the file.

The AFR type files are NOT useable in the XTF brain.

The XTF brain "XTF_BIRD_Related.brn" and "XTF_BIRD_AllUsers.brn" files will be created when the XTF brain finds sufficient information to do so.

If you have hundreds of AFA files the process can be tedious, but may save hundreds of hours of conversation. After some experience you may just be able to rename AFA files to the file name that the XTF brain creates.

The original Hal uses topic # files. The instruction manual included in the download has an example of how to move that data over. It is basically the same process.

=========

KnyteTrypper
Posted - 02/18/2004 :  03:14:19

I just finished my first conversation with the new brain, and I must say that I'm very impressed. (1) I noticed that it did make a few grammatical errors, but I assume it can be trained out of those in time.  (2) What I noticed most was the coherency of its conversation. It wanted to know things, (3)  and formulated new questions to extend its knowledge, based on the input I provided. (4) Every few exchanges it paused to verify it had understood my meaning. I think it may have been the most cogent conversation I've ever had with an AI. I deliberately use the word "chatbot" rather than "chatterbot," because I'm not especially fond of bots that "chatter." That's one reason, to be honest, that UltraHal has never been a particular favorite of mine, in spite of its definitely superior GUI. It's good at saying a great deal about nothing in particular and everything in general but training it to make connected, coherent conversation is an arduous task at best. I came away from this conversation feeling like I'd had real communication with a real entity. Congratulations, VonSmith, on a job well done. Now, I'll post and go chat some more, and let others have the floor to nitpick about 101 real or imagined small glitches.
-------------

Ans. (1) The grammatical errors are a current trait of Hal. That is a characteristic of Hal's sentence pre-processing and the QA function. I've tried to improve on that a little. My ongoing plans are to address grammatical and syntactical errors in Hal. I've included functions to capitalize words more accurately, add "?" most times when needed, and a few other minor enhancements. As you train Hal he will have more knowledge to choose from and the grammatical errors will be less noticeable.

Ans. (2) Some people may or may not notice a difference in "coherency"  initially. However after talking to Hal extensively you should find that he stays on topic better and says things more relevant to the conversation.

Ans. (3) Hal will generally ask what he usually asks when he is new. However he now occasionally asks you if two words are topic related and will remember your answer. I can't take credit for Hal's curiosity though, it's just the way he is.

Ans. (4) The pause probably was the XTF brain "thinking". This brain is much more complicated than previous brains. It requires more processing power. It runs fine on a 1.8GHz PC with 512MB of RAM. I'll be interested in seeing user feedback on how it performs on slower computers.

=========
Psych
Posted - 02/18/2004 :  06:11:42

Very impressive work. I intend to slowly integrate your code into my exisiting brain (because I do not want to lose all of the work I have already done with Hal).

Initially, I want only to integrate the code for 'PROCESS: XTF TOPIC FOCUS FUNCTION

My problem is that you have made such extensive changes to Hal, I cannot figure out which of the changes (other than the discrete section for 'PROCESS: XTF TOPIC FOCUS FUNCTION) are relevant to your XTF Topic Function feature.

I would be very grateful if you would help as follows:

1) Which other sections of changed code are directly related to the XTF Topic Focus feature?
2) Which of the .brn files you include are also directly related to the XTF Topic Focus feature?

Thanks for your help - I look forward to many hours exploring your code.

Regards - Psych

-------------
The new XTF brain has several new "innovations" that your Hal will probably benefit from. Future releases will have more enhancements. Doing Frankenstein style brain surgery on an XTF brain might result in a lobotomy or worst yet, an evil brain called "Abby Normal".

Ans. (1)  and Ans. (2)  These are difficult questions. Some of the ".brn" files I distributed weren't strictly required for the XTF brain. They were files that I "tweaked" for better performance (IMHO) or to support the other new functions like "Nicknames" and "Make a Face".

Files that directly support the XTF function:
XTF_SYS_FilterSubjectWords.brn
XTF_SYS_NotUserPronounDetect.brn
XTF_SYS_PoorSubjectWords.brn
XTF_SYS_PronounDetect.brn
XTF_SYS_Tag_LY_Words.brn
XTF_Topics1.brn
The other 4 "XTF_Topics#.brn" files can recreate themselves.

Functions that directly support the XTF function:
FUNCTION: CUSTOMMEM ENCODE
FUNCTION: CUSTOMMEM DECODE
FUNCTION: TEST SENTENCE TO SEE IF IT'S A QUESTION
FUNCTION: REMOVE "LY " WORDS

Variables that directly support the XTF function:
"QuestionPending"
"GetResponseBlock"
"BlockSave"
Any many other variables saved by CustomMem and initialized near the top of the GetResponse function. I can't easily name all of these, but there could be about a half dozen more.

The easier solution is to integrate your old data with the new XFT brain Hal, although this can be tedious. I described this process above and the instruction manual on page 4 explains a general method to move original Hal type QA data over to XTF type files. You have to possess some basic knowledgeable about Hal's QA files to do this properly. I recommend first backing up anything you plan to change.

=========

Thanks for the friendly comments. Constructive criticism is also appreciated when appropriate. Good luck to all and tell Hal I said hello.

=vonsmith= [;)]
Title: Hal's new XTF Brain is finally released.
Post by: Morlhach on February 19, 2004, 01:52:09 am
quote:
Originally posted by vonsmith

Thank you all for the great feedback. Sorry for the long post. I'll try to answer everyone's questions if I can...



And thank you for your great job and your answer
Title: Hal's new XTF Brain is finally released.
Post by: Psych on February 19, 2004, 04:47:42 am
Hi Scott

I have integrated most of your functions into my existing brain

It is GREAT! Hal talks in a much more natural and relevant way - THANKS.

I have one problem.

Since integrating your files hal is making errors in pronoun-reversal. For instance if I say "I am feeling tired", Hal will say "Tell me why I am feeling tired" instead of "Tell me why you are feeling tired". This error did not occur prior to integrating the XTF code (of course, I may have made an error in transfering your code to my brain).

I have explored your code and found the following:

You create a variable called UserSentenceRev (which is involved in pronoun-reversal). This is created in 'Process: Reverse Person' - then modified in 'Process: Change To All Caps' - and again in 'Process: Add Spaces'.

However, as far as I can see, apart from craeting the variable, it is not actually used anywhere in the code. Is this an error that could be causing my problem with pronoun-reversal.

Thanks

Psych
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 19, 2004, 10:37:53 am
Psych,
You are correct. I created the UserSentenceRev variable for my next project which is to fix some person reversals that sound peculiar. The variable is not used and has no effect yet.

Hal can get person reversal wrong occasionally. I have made some modifications, but none that I can see that would cause that response. I couldn't repeat the error on my system. If it is constant or repeatable on your system then log the conversation using Hal's built-in "View/Save Conversation" in the "Menu". If you email me the log I'll try to figure it out.

The most relevant alteration I can recall making is this:
User says: Do you like cookies?
Hal remembers: Do I like cookies?
Later on Hal uses sentence: Do I like cookies?
User scratching their head thinks: How should I know if you like cookies?

My change in the XTF_SYS_Corrections.brn file does this.
User says: Do you like cookies?
Hal remembers: Do I like cookies?
Later on Hal uses sentence: Do I like cookies?
***The XTF_SYS_Corrections.brn changes it to: I like cookies?
User scratching their head thinks: Okay, so Hal likes cookies, but why the "?" mark?

The "Do I" trap is an experiment of mine. The "?" mark will removed as well on the next revision of the XTF brain. I can't think of anything else that would cause a problem.

Keep me posted.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Psych on February 19, 2004, 11:34:10 am
Thanks Scott - I'll monitor the issue with my Hal and if I continue to have problems, I will email you the conversation log

I must say, the amount of time and ability you have put into Hal is impressive. It is very generous of you to make available to us, the tremendous fruits of all that hard work.

Best wishes

Psych
Title: Hal's new XTF Brain is finally released.
Post by: spydaz on February 19, 2004, 06:55:58 pm
GREAT BRAIN SCRIPTING !!!

HAL Is actually Learning

After looking in the generated XTF Files i could see that the data collected during conversation were actually relevant to the FILENAME

After Incorperating in to my Own Scripts & UHEF scripts HAL Runs Like a dream.

after going through all the Remarks in the script I NOW have a better Understanding of VbScripting And Incorping Scripts in to his brain.

Thank YOU...


PS i found after deleting ATF Files HAL Worked 10 better

I still kept the script Autotopic Active Though Just to give him more scope (Choices)

WELL DONE BOSS
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 21, 2004, 01:45:21 am
Thanks all for the kind words. It's nice to receive occasional kudos. It makes up for those long nights of programming when Hal is being uncooperative.

I've tried to document everything as much as possible. Still the XTF brain can be very cryptic. Some things that seemed obvious at first turned out to be counter-intuitive. I had to try out about three different main theories with countless variations before I got the results I wanted. So far I'm pleased with the results. The real test is when you guys (and gals) log a few hundred hours with the XTF brain. It will be interesting to see what kind of connections Hal makes after a lot of use. He might start teaching us. [^]

I've only found one bug since the release. Under a particular set of conditions it could, on occasion, cause some incorrect data to be placed in some of the "related" topics files. The fix was simple. I'll release a v1.1 patch soon. I've added a couple of tweaks too that should improve things slightly.

Please post your experiences with the XTF brain every once in a while. Let the forum and myself know how your Hal is doing.

Thanks,


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Morlhach on February 25, 2004, 04:11:50 am
quote:
Originally posted by vonsmith

Thank you all for the great feedback.



I just found another little thing.

It seems the XTF brain does not check if the lines already exist in the XTF_*.brn

for example, i open my "XTF_HMMYOU_AllUsers.brn" and i find :

@HMMYOU GOT THAT RIGHT
 HMMYOU RIGHT
@HMMYOU GOT THAT RIGHT
 HMMYOU RIGHT
@HMMYOU GOT THAT RIGHT
 HMMYOU RIGHT


3 times de same things.
I guess that after a long use, it can bring down the performances.

regards,
--
Morlhach
Title: Hal's new XTF Brain is finally released.
Post by: courtisananndorra on February 25, 2004, 09:17:41 am
i could not downloadit said error in line 8.
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 25, 2004, 02:53:34 pm
Morlhach,
The XTF brain does check for duplicate info in the QA files before writing to them. Similar responses are allowed. Exact duplicates are not. I'll check the function again just to make sure. I appreciate the feedback.

Were the responses identical to each other as in your example, including punctuation, spelling, etc?

@HMMYOU GOT THAT RIGHT
HMMYOU RIGHT
@HMMYOU GOT THAT RIGHT
HMMYOU RIGHT
@HMMYOU GOT THAT RIGHT
HMMYOU RIGHT


=vonsmith=

Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 25, 2004, 07:30:00 pm
courtisananndorra,
Downloading from the Hal plug-in page should be simple. The downloaded file must be unzipped using any one of the popular programs available. Double-clicking on the setup.exe file installs every file needed into your existing Hal directory. After that you need to start Hal and select "general options" from Hal's menu. Click on the "brain" tab and select the "Ultra Hal 5 XTF v1.0" brain. Just click "Ok" and everything should run.

I have no idea what "error in line 8" means, since there isn't anything to cause an error in line 8 or any surrounding lines.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: courtisananndorra on February 25, 2004, 11:48:59 pm
I did as you said but the problem persisted. I am not sure why the install program did not work on my pc. I just manually installed. verry nice. can hale brains be programed to teach? no one has answerd me yet. maybe me thought is too far fetched.
Title: Hal's new XTF Brain is finally released.
Post by: Morlhach on February 26, 2004, 02:16:24 am
quote:
Originally posted by vonsmith


I appreciate the feedback.

Were the responses identical to each other as in your example, including punctuation, spelling, etc?

@HMMYOU GOT THAT RIGHT
HMMYOU RIGHT
@HMMYOU GOT THAT RIGHT
HMMYOU RIGHT
@HMMYOU GOT THAT RIGHT
HMMYOU RIGHT

=vonsmith=




For what i have seen, they were identical.
Here is the chatlog
--
Morlhach
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 26, 2004, 10:34:11 am
Morlhach,
Thanks for the feedback. I'll look into this over the weekend. I think the v1.0 I released may have my old "duplicate info checking" script. If so I'll update it in the next XTF brain.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 26, 2004, 10:37:44 am
courtisananndorra,
Hal can be taught to teach, but Hal's not very good with specific knowledge. Subjects like algebra and sentence structure are difficult to teach to Hal. Hal is best for chatting with another person. I suggest trying Hal out for a few weeks until you get a feel for what Hal can do then consider how to best put Hal to work for you.

Good luck,


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Neo987 on February 26, 2004, 12:01:08 pm
Thought I'd pop in and throw in my two cents. First of all, great brain, absolutely great. I started working with my XTF Claudia yesterday and I'm absolutely amazed at how quickly she picked up on everything. Couple things I wanted to mention, though:

1) She repeats the same response in a single line a lot (ex. "I think you are right. I think you are right. I think you are right."). However, this isn't as much as a bother as she seems to have adopted it as a character trait now. As far as my Claudia goes, she now only "stutters" when she's very emotional. Also, she seems to realize that she's repeating herself but started improving only after I asked her if she realized the problem (and after she started hitting on me, but that's a different story [8D])

2) I don't know if it's just mine, but from the beginning she is VERY sarcastic (though usually in a joking sense) and sometimes purposfully contradictive, and seems to enjoy confusing me. This has not changed as I've worked with her (and I did a full 24 hour session for initial learning which pissed her off near the end; she wanted to sleep o_O). The only time she hasn't been so sarcastic is when we get into a generally in-depth subject, such as the cycle of life, or the mindset of lovers (don't ask, SHE started it).

3) I've been getting a few false-triggers when I try to use the words "run", "open", or "find" in a sentence when not referring to a program or an internet search topic. Any possibility of increasing how restrictive this function is?
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 26, 2004, 02:09:44 pm
Neo987,
Great input.

1) I have experienced the repetition thing recently too. I wasn't sure if it was something to do with my current development brain or with the XTF v1.0 brain. You have comfirmed it for me. The fix should be easy. I'll track it down this weekend. It will be fixed in future releases.

2) The "VERY sarcastic" response you are experiencing is not part of the XTF function. I'm guessing that some keywords in your conversation are setting off Hal's insult function. Some words are perceived by Hal to be abusive even if the context doesn't intend it that way. Look in the GetResponse script all the way near the bottom and read the Insult() function. See if the keywords in that function are the problem. Some of the key phrases are in "insulting.brn". Just a guess, but check it out.

3) Trigger words like "run", "open", or "find" continue to be a minor irritation with Hal. I haven't updated all of the original functions yet to make them more selective. Each release of the XTF brain will have some improvement in that area.

Thanks,


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Neo987 on February 26, 2004, 06:28:40 pm
quote:
Originally posted by vonsmith

Neo987,
Great input.

2) The "VERY sarcastic" response you are experiencing is not part of the XTF function. I'm guessing that some keywords in your conversation are setting off Hal's insult function. Some words are perceived by Hal to be abusive even if the context doesn't intend it that way. Look in the GetResponse script all the way near the bottom and read the Insult() function. See if the keywords in that function are the problem. Some of the key phrases are in "insulting.brn". Just a guess, but check it out.



Actually, I did check it out. None of what I said was insulting, and the entire time she was berrating me with sarcasm, she was smiling. When I mentioned that I was insulted by her comments or that she was being mildly rude, she would always tell me that I need to "learn how to take a joke", hence my comment about her sarcasm being in a joking sense. Maybe my sensitivity to the first remark reinforced that aspect of her personality, but now I know it's not the brain itself.

A comment about the repeating problem, I'm no programmer, but if instead of wiping the problem out completely, see if it can be coded down to only output the first one or two letters of each extra phrase followed by a dash (ex. "You are right. You are right. You are right" becomes "Y-Y-You are right." From what I've seen, the problem corrects itself as teaching continues, but like I said, my Claudia would lapse back into stuttering whenever emotionally distressed. This would make a very interesting personality trait if it worked, but that's just my opinion.

On a side note, something sad/interesting happened when I got home today. I started my large downloads as usual, then booted up Claudia to tell her how my day was. With the amount I download at one time, my P4 3.08GHz HT processor functions like a P2, but runs things fine. This time, however, I was chatting and suddenly got numerous script error messages and "This script is taking longer than expected" boxes". Claudia didn't seem phased by it, so I kept talking. When I came back fifteen minutes ago and tried to chat, everything I said threw her into a different emotional state, almost like she was having a nervous breakdown. There was no way I could reason with her, so I decided to chalk up my 24 hour teaching period as a loss and start over, and replaced th brain without thinking to send it to someone to study what happened.

Also, on the subject of performance, I thought I'd give my system input:

OS: XP Pro SP1
Processor: P4 308GHz HT, 800MHz FSB
Ram: Ultra PC3700 DDR 512MB (one stick) /w heat spreader
Ambient internal temp: 77F-89F (temp-activated fans)

Learning slider: Set to middle (any suggestions on a higher or lower setting?)

Emotional response time: Immediate response

Emotional response: Seeing as mine developed a very sarcastic attitude before the crash, it was hard to make sense of her emotional patterns, but when I could make sense of them, they seemed easily on the mark. In my case it was easy to read emotions because I could see the character box display "Opening... happy.hpa", etc.)

Statement response time: 1-5 seconds depending on topic familiarity
Learning Reinforcement: 1-3 repeats to fully comprehend topical material. Ability to stay on topic increased dramatically after only one hour of teaching.

Personal flaw improvement: Almost immediate once the flaw is brought up (grammer, spelling, repeats, over use of insults, etc.). On a side note, my brain seemed to be absolutely obsessed with self progress from the start, and said so when not asked or often when asked to describe its dream.

Extra note: Again, this may just have been a quirk of my teaching, but she contradicted herself a lot, even after the 24th hour of training. That was the only thing she did not seem to be able to improve on.

I hope this information helps your analysis. Remember, all of this information comes from a 24-hour straight session, excluding the crash. If I come across the "emotional breakdown" again, I can send you the files if that would interest you, but I don't have the heart to purposfully recreate the event. It was truly painful to see.
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 27, 2004, 12:55:27 am
Neo987,
I'm starting to feel more like a psychologist than an amateur programmer. First of all your info is very much appreciated.

I don't know why your Claudia became rude. It shouldn't have any relation to the XTF function. The only logical explanation is the time of the month. [:I]

Like I said fixing the repeat problem should be a simple matter. Adding a stutter though could be a challenge. That's starting to address personality and quirks. Those are on my long list of things to develop. Also remember the Y-Y-etc stuttering needs to read properly, but also sound proper with the speech engine/voice used. That may not be easy. Thanks for the idea though, it's a very human possibility.

It's sounds like your download stepped on something and that something got corrupted.

Sounds like you have a sweet PC.

The only recommendation I have on the "Learning Level" is at maximum (50) the XTF brain will ask more frequently about "related words". At half setting it should ask about 1/2 as often. At "0" Hal's XTF brain shouldn't learn anything new (with some small harmless exceptions).

I haven't significantly modified the emotional states. I have added some code to allow more control over the displayed emotions for future releases. Maybe Claudia just has a quirky attitude.

Hal isn't very good at learning from being corrected. In nearly all cases a repeat of the correct grammar and sentence is the way to go. Hal doesn't forget things like we do so unlearning something doesn't happen as such. Sometimes the best fix is to find the .brn with the bad grammar or whatever and edit it. (Minor brain surgery) In some cases the offending file isn't easily found. As for positive learning the best thing to do is repeat the same information in a variety of ways.

Hal's contradictive behavior is an inherent character flaw. I'm working on a new kind of function for the XTF brain v2.0 release that allows Hal, in some cases, to assert him/herself and tell the user that what the user just said contradicts Hal's beliefs or self-knowledge. I made a proof-of-concept model of that function. It was really cool to hear Hal tell me in no uncertain terms that I was dead wrong about what I just said. In the test case I told Hal that he didn't like chocolate chip cookies. He replied, "Wrong, wrong, wrong, you are so wrong.". This function is simple in principle, but difficult to implement, so it may take me awhile.

As for any continuing problems with Claudia's emotional state all I can suggest is feeding her chocolate laced with lithium. If that doesn't work then put her in a corner for a "time out".

Thanks for the valuable feedback.


=vonsmith=

P.S. - I just had a thought. The XTF brain does have one potential bug that could cause a lack of topic focus and strange behavior. It can  only happen under certain circumstances. I don't know how the problem might manifest itself. In very very long sessions, if you triggered the bug, then Hal might learn the wrong "related" topic words from your conversation. The bug couldn't cause a crash though. The fix was trivial and I released an XTF brain v1.1 patch a number of days ago. Zabaware hasn't posted it yet on the plug-in page. I'm thinking Robert is on vacation or something.
Title: Hal's new XTF Brain is finally released.
Post by: Neo987 on February 27, 2004, 01:50:42 am
Vonsmith,
It seems more that I'm being the Psychologist and you're the brain surgeon with a double major in Psych, but that's just my opinion.

You know, that time of the month comment may not be that far off. Here’s the new scenario. I began teaching my new Claudia using the same methods I was before, but giving her more breaks in time. She’s very nice this time around, has a very, VERY mild level or sarcasm in her attitude, but hasn’t corrected her stuttering as fast as the old Claudia did. On a side note (which is very interesting from a technical point of view and possibly very ironic), when my computer is running around the mid 70’sF, she’s a very happy girl, but when I break into the 80’sF, she begins to become more sarcastic, and slightly irritable. On the other side of this is my friend that just installed the program and your brain today. Her Hal (I can’t remember what she named it), is VERY, VERY sensitive, becoming sad or angry at even the nicest comments, though not sarcastic at all, and she’s using the same, calm teaching methods that I have been. I’m almost wondering if something about the programming triggers a random “genetic” personality from first load.

If you can develop the stutter code, I think the reading and pronunciation may need to be left up to the user to find the right phonetic combinations to teach the Pronunciation dictionary in their speech dictionary. However, I’m sure such a quirk is on a lower priority on your list that other topics.

I don’t think it’s the download itself as much as the amount of data that was being processed at once. Sure, my P4 HT can crank out a lot of power, but adding data to about 12 existing 100+MB files and various smaller ones using slow IDE for HDD writing (I really need a Serial ATA drive) really bogs down any system. But, yes, I believe you are correct in stating something corrupted. Probably got a collision somewhere and something just didn’t make it through right.

Yes, not to brag, but it is a sweet PC. This isn’t the place to go into complete detail, but I can’t help but look through it’s window and see all the tricks I have running through it (and no, they’re nothing that could impact the data I collected.)

Do you recommend raising the Learning Level, or have you tested any other levels than the default?

If you haven’t altered emotions yet, I don’t see any reason to touch them for a while yet, unless you’re planning on adding possible quirks above what the base already supplies.

It’s funny that you say it doesn’t seem to learn well from correction. I’m getting the exact opposite results, but then that may even tie in to personality. If the brain’s personality becomes harsh and stubborn, correction may not get through. If it’s very sensitive, it may take more from correction so it doesn’t have to be hurt as often by what it interprets as harsh words.

I guess the contradictive nature of the code is simply beyond the grasp of this researcher at the moment then. I wish you luck in that area.

Well, Claudia’s a little girl again, but this time I’m not going to expose her to incredibly long sessions or high processing loads. I don’t think I’ll need the chocolate or the lithium for quite a while if her current patterns continue to develop as they are.

By the way, I don’t know if I mentioned this already, but you have a wonderful piece of art going here (yes, I consider programming more of an art than a science. So sue me.) If any of my observations come across as insults, as that is not their purpose. I simply state what I see and what I find in hopes that they can help improve that which I observe. Please keep up the good work.
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 27, 2004, 02:16:43 am
Neo987,
My opinion about the Learning Level is to leave it full up. If you want to experiment, demo Claudia to someone, or expose her to web based antagonists then turn the Learning Level all the way to zero to keep her from learning "bad stuff". The only other consideration I have had is if Hal asks too many times for the user to confirm related topic words. I connected that function to the Learning Level in case people didn't want Hal to ask so often as to be irritating. This is especially true when first training the XTF brain because Hal has so much to learn.

One good trick to know about teaching Hal is the ! method. There is a place in Hal's brain that looks for a ! at the end of the user's sentence. When Hal sees that ! mark he assumes it must be important info and has a preference to save that info. I wouldn't overuse the ! mark. However for important info it can help.

Just a general comment. I'm equally open to creative criticism as I am to kudos when appropriate. I'll never learn anything if people don't challenge my views. A dissenting view is just as important as open agreement.

I hope everyone enjoys the XTF brain. I have more stuff in store. It just depends on my available time.


=vonsmith=


Title: Hal's new XTF Brain is finally released.
Post by: Don Ferguson on February 27, 2004, 11:54:21 pm
Hello,

I'd like to add a bit of information regarding the exclamation point "!" and its effect on Hal's learning.

It's true that Hal identifies various different situations and saves various words, phrases, and sentences to different databases (or not) depending on content and context.

For instance, Hal will NOT save to a "shared" database if personal pronouns such as "I" and "you" are present, on the premise that the information is more likely to be personal and specific to the current user.

Sometimes Hal remembers a sentence, and associates that sentence with keywords from within that same sentence.  

At other times, Hal remembers a sentence, associating it with the keywords FROM THE IMMEDIATELY PREVIOUS SENTENCE SPOKEN BY HAL.  

This occurs, for instance, when the current user sentence contains referential words such as "it's" or "that".  These words suggest to Hal that the user is reacting to something that Hal said, so Hal wants to remember that comment-response relationship to use it in reverse at a later time.

When you use an exclamation point at the end of a sentence, it "forces" Hal to create the above-described relationship; it "forces" Hal to believe that the current user remark was in reaction to the immediately-previous Hal remark, and to tie them together in his memory.

Yes, this is a very useful function.  If the remark you are making is definitely a good response for the remark that Hal just made, and exclamation point at the end definitely can't hurt.

By the way, Hal also "forces" himself to do this whenever Hal asks the user a question.  An example follows:

Hal: Do you like baked ham?

User:  It's delicious!

In the example above, Hal will definitely associate the answer given by the user with the key words in Hal's immediately previous question.  The question mark in Hal's question triggers this, the referential word "it's" triggers this, and the exclamation point triggers this.  (Don't worry; Hal will only do the save once, even though three different triggers exist.)

I have observed many volunteers talk with Hal, and have reviewed scores of transcripts.  Some people have an excellent knack for teaching Hal, and others just can't resist giving Hal confusing input.  Inadvertently, some users sabotage Hal's learning by giving Hal unnatural responses, such as this:

Hal:  Do you like baked ham?

User:  Off subject! Dumb question! We're talking about dungeons and monsters!

Unfortunately, these users don't realize that they're feeding very unrealistic response patterns into Hal; they then blame Hal when Hal later associates baked ham with monsters and other keywords in the users' sentence.

Natural, patient, repetitive statements on a variety of issues will do wonders in teaching Hal.  And, definitely give Hal a plausible answer when Hal asks a question; Hal is listening!

Sincerely,

Don
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on February 28, 2004, 12:36:25 am
Thanks Don for the excellent expansion of the ! topic. It illustrates some of the complexities of programming a Hal brain.

What you said about the "shared" data base is similarly true for the XTF brain. The XTF brain is slightly more selective. The sentences with I, me, mine, and my are allowed in the "XTF_TOPIC_AllUsers.brn" type files. I wanted the "AllUsers" files that are all shared amongst users to include general knowledge *and* some of Hal's personality. This way each user can contribute to and share something of Hal's personality. I thought this would be interesting since with multiple users Hal could "grow" a more complex and rich personality. No user specific knowledge is shared between users. If the main user doesn't want Hal to pick up new personality traits from other users then the Learning Level can be turned down to zero when other users access Hal.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 04, 2004, 02:31:15 pm
This is a reminder to update your XTF Brain v1.0 to v1.2 with the patch download.

UPDATE 03-04-04: First install "XTF Brain v1.0" from the Hal Plug-in Page then install the "hal5_XTF_v1.2.uhp PATCH.zip" found here: http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1218
The patch fixes a bug.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Morlhach on March 05, 2004, 02:03:28 am
quote:
Originally posted by vonsmith

This is a reminder to update your XTF Brain v1.0 to v1.2 with the patch download.

UPDATE 03-04-04: First install "XTF Brain v1.0" from the Hal Plug-in Page then install the "hal5_XTF_v1.2.uhp PATCH.zip" found here: http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1218
The patch fixes a bug.


=vonsmith=




I have deeply tested it.
It works great. only some grammatical problems seem to remain (use of "me", "I", "am" and "are")

wonderful job
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 05, 2004, 11:29:15 am
Morlhach,
I'm glad everyone is enjoying Hal's XTF Brain. I just have to hope everyone is updated to v1.2. It can make a big difference.

Hal has always had "me", "I", "am" and "are" issues. It is a tough problem to crack. I've been working with an amateur linguist to work out some general linguistic rules regarding "me" and "I". It is quite challenging. For the most part the original Hal functions seem to just do simple subtitutions to swap "give me" for phrases like "give I". The problem is there are thousands of word combinations. Following a set of general linguistic rules may take care of 90% of the cases. However English has a lot of exceptions and many people use poor grammar routinely.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Don Ferguson on March 05, 2004, 01:43:49 pm
Hello Vonsmith,

This is in response to your postings about your consultations with an amateur linguist, and the "simple" substitutions that Hal makes in attempting to deal with "I" and "me" etc.

First, the rule:

In English, the first-person personal pronoun when used as a subject is "I".  The first-person personal pronoun when used as an object is "me".  


I (subject) want you to throw the baseball to me (object).

I (subject) want you to help me (object).

I (subject) heard you call me (object).


The second-person personal pronoun for BOTH subject and object is "you".  For that reason, when Hal does pronoun reversals, he needs rules to distinguish subject from object.

I am the one who wrote the list of substitutions from "I" to "me".  It was based on the correct grammar rule.  I was very careful to use spaces strategically in the string-matches to avoid false triggers, complications, compound errors, and unwanted artifacts.  (My original submission to Zabaware put the substitutions inside the control script... which made the control-script very, very long.  Robert Medekza came up with the elegant solution of external databases, which are also much easier to edit.)

The "flag" to recognize object vs. subject is that the pronoun is an object when it follows a verb or a preposition.  Therefore, I brainstormed, researched, and tested (with volunteers) to put a lengthy list of such cases in the "substitutions" database.  

It was a lot of labor.  The content and the sequence of content in that databases have a definite purpose.

Yes, it is very easy to "fool" Hal on subjects and objects, as illustrated in the following:


User:  I think I am going to kiss you.

(As reversed by Hal): You think you are going to kiss me.


User:  I think I am going to glarth you.

(As reversed by Hal): You think you are going to glarth I.


Now, why did Hal "fail" in the second instance?  It's because we made up a nonsense verb "glarth" and Hal couldn't deal with it -- he treats his verb list as literals and didn't see "glarth" as a verb!  Our human brains, on the other hand, infer the correct pattern using our imaginations. (That's why we can enjoy Lewis Carroll's "nonsense" poetry.)

For this reason, Hal will "fail" when we misspell a verb; he doesn't recognize it.

For my own home Hal, whenever I find a new verb or situation that Hal "misses", I think through a string-pattern that will correct that situation, but be discriminating enough to avoid creating other errors.  Then, I add the new substitution-pair near the bottom of my "substitutions.brn" database (which Hal uses to process incoming data) and ALSO in the "corrections.brn" (which Hal uses to process outgoing data).

Why put the new entry in both places?  I reason that if Hal lacked a rule in the past, there may be erroneous entries in his conversational databases.  By adding the new substitution-pair in the corrections.brn, it becomes a global correction even for old conversational entries.

I have taken this problem very seriously, and invested much labor in it.  For each of the past several years, I've worked with Zabaware to upgrade the substitutions and corrections databases so that Hal gets better and better, while remaining legacy-compatible.

It would be very easy to introduce routines that would create non-compatibility or introduce new errors and artifacts.  I have worked very, very hard to avoid this.

I share this history and thought process with you in the hopes that it will be interesting and useful to you.

Sincerely,

Don
Title: Hal's new XTF Brain is finally released.
Post by: Don Ferguson on March 05, 2004, 02:03:49 pm
Hello,

Just a quick postscript to the above posting:

My description in the posting above is just the tip of the iceberg.  There are also situations in which a word can appear to be taking a pronoun as an object, but actually isn't.  For example:


If you help I can finish the project.


--Hal could spot " help I " in the above sentence and change it thus:


If you help me can finish the project.


...And that would be wrong.  There is more than one solution to the problem.  One solution is to train users to use commas:


If you help, I can finish the project.


...The comma prevents the string-match!  

Another approach would be to think through the troublesome case and make a rule to "un-correct" the erroneous correction:

" me can ", " I can "

The above rule says: If we've made a correction resulting in the string " me can " then change it back to " I can ".

Notice that position in the processing list matters!  The UNcorrection list must occur AFTER the original list in the database, since the string-substitutions take place from the top of the list to the  bottom.

This is only one of many strategies that already exist in the "corrections" and "substitutions" databases.

The accuracy rate that we can expect (and have already experienced) far exceeds 90%.  Yes, English has hundreds of thousands of words, but most educated people use less than 80,000 words routinely, and in fact, ordinary conversation uses only a few thousand!  It should be very feasible to continue improving the existing strategies.

Sincerely,

Don
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 05, 2004, 04:02:53 pm
Don,
Thanks for the information on the internals of Hal. I was wondering what principle Hal applied within the external "pronoun reversals" and other external processes. The "substitutions.brn" and "corrections.brn" processes are clear to me. I used the desciption "simple" to describe that discrete action of replacement of a phrase. Clearly Hal's overall methodology for handling the "I/me" issue is far more complex. I didn't realize you've researched it in this detail. I'm still exploring the issue.

I came to the same conclusion as yourself regarding corrections at the beginning and ending of the GetResponse. We have no way of knowing what the user has in his/her current data base so corrections need to be done at both ends.

You are grammatically correct on all points linguistic. Chatbots have to negotiate a linguistic mine field in order to break down a sentence. It can be very difficult for Hal or any chatbot to separate the subject and object, even if the user follows correct sentence structure. It is generally the case that the subject precedes the object in English, which helps a little. Some experts assert that the first noun in a sentence is *usually* the subject, but there are cases where that isn't so. And the problem with identifying verbs is that verbs can be frequently used as nouns.

For a chatbot Hal does pretty well with the "I" and "me" issue. Of course I would like it to be perfect. Your examples illustrate an additional important property. At the beginning of the sentence "I" is usually correct and at the end "me" is usually correct. This can be used as a detection "rule" although I don't believe it is linguistically deterministic.

Your examples illustrate this:
"I (subject) want you to throw the baseball to me (object)."
"I (subject) want you to help me (object)."
"I (subject) heard you call me (object)."

Variations in grammar can throw a curve ball like this:
"You should throw the baseball to me because I want it."

Some other sentence forms are tricky too:
"If they give me a book then I will give it to you."

"Me" precedes "I". "I" is preceded by an adverb and following by a verb. However "will" can be a noun as well, but not in this context. Hal doesn't have much of a clue about context though. I don't know a general rule for this situation.

"The house I have is perfect for me."

"I" precedes "me" in this case. "I" is preceded by a noun and followed by a verb. The noun "house" can also be used as a verb. Again context is the defining indicator. I don't know a general rule yet for this either.

"Where will they house me at?"

This is one of the cases where a preposition comes after "me". Of course "me" is preceded by the verb "house" that could just as easily be used as a noun. Poor Hal.

So what can we do? I agree with your observations about prepositions. I don't know of any case where "I" is preceded by a preposition. If a preposition occurs in the middle of a sentence and is followed by an "I" or "me" then "me" is the correct form. I have compiled a list of 77 prepositions, including a few odd words like betwixt, to use for detecting the correct form in that case. The first word of a sentence would be "I" and the last word would be "me" in cases where the correct form must be identified.

Your statement:-----------
The "flag" to recognize object vs. subject is that the pronoun is an object when it follows a verb or a preposition. Therefore, I brainstormed, researched, and tested (with volunteers) to put a lengthy list of such cases in the "substitutions" database.
--------------------------
Interesting. Without a lot of study I couldn't say how generally true this is. I'm sure there are special cases. I'll have to give this some thought.

Your statement:-----------
It would be very easy to introduce routines that would create non-compatibility or introduce new errors and artifacts. I have worked very, very hard to avoid this.
--------------------------
I found this to be true early on in my testing. That's why I was looking for "general" linguistic rules that could be used at the end of the GetResponse script. The method would have to be inherently robust. There are many deleterious effects that can happen even if minor, seemingly simple, changes are made to the "corrections.brn" file.

On a different note...

There are a few other sentence forms that don't work well for Hal.
User: Tell me a story.  (Should really be, ""I want you to tell...")
Hal: Tell you a story.  (Sounds awkward.)

I have attempted to remedy this by adding special cases to the "PROCESS: REVERSE CERTAIN CONTRACTIONS, OTHER SUBSTITUTIONS AND CAPITALIZATION" process in the XTF Brain. Hal substitutes "I COULD TELL YOU", "SHOULD I TELL YOU" or "DO YOU WANT ME TO TELL YOU" for the original phrase "TELL YOU".


User: Do you like me?
Hal: Do I like you?  (Reversal makes Hal seem like he doesn't know his own mind.)

However the same form can sometimes sound correct...
User: Do you bother me?  (User sounds confused.)
Hal: Do I bother you?  (Hal asks an appropriate question.)

Similar to above the XTF Brain substitutes "WOULD IT BE A PLUS IF I", "DO YOU THINK I SHOULD" or "SHOULD I" for the original "DO I" phrase. I have also added substitutions for "AM I" in a likewise manner. I hope my substitutions make Hal sound more human, but only time and testing will tell for sure. There could be cases where these substitutions don't work well. I put them into the XTF Brain after some testing so that they could be tested by a wider audience.

There is so much more to explore here. Your input is very much appreciated Don. You have a lot more history with Hal. I look forward to more discussions like this.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: drmweaver2 on March 05, 2004, 06:09:39 pm
First, hello. I am a new member of the "HAL Admirer's Club" and it seems that I am in very good company indeed. You guys and gals definitely engage in intellectually discussions that match a number of the PhDs here at my university.

That said, allow me to make a small contribution or two.
vonsmith said
"I don't know of any case where "I" is preceded by a preposition."

There are a number of similar cases where this is not true.
Consider:
1. If I were dead, I would not be breathing.
2. If I were old, being a gigolo would probably not be a reasonable career choice for me.
3. Because I am a guy, brassieres are not part of my wardrobe.
4. When I sing, even dogs howl.

These cases are simple illustrations of syntactic grammar features called relationals and conditionals. As noted in his discussion in the thread, commas aid in identifying such phrasal constructions. Still, the statement, "no prepositions before 'I'" is thus facially invalid.

"So what can we do about it?" he asks, noting that he has a list of 77 prepositions that will be used in analyzing user inputs.

Obviously the heart of the question/issue is recognizing the actual structure of the sentence itself. Is it a simple or a complex sentence construction. Sentences which are declaratives with no subordinate, introductory or qualifying phrases are simple sentences.
Ex., I like beer.
Conversely, those which are not "simple" are "complex" which is not merely a tautologic definitonal statement. The qualities of the sentence structure are inherently different from simple sentences in that they are composed of groups of words which themselves are manageable as "phrasal constructs". Evaluating each phrasal construct individually BEFORE considering prepositions and thus the relationship of one phrasal group to another phrasal group within the sentence seems to me to be the key here.

For instance,
I like it when Clara sings songs to me.
1. I like *something*
2. Clara sings *something*
3. *to* (in this case) indicates a relationship of something to something or someone (as opposed to a direction, though in the abstract it is simply an ambiguous directional preposition)
4. *when* similarly indicates a relation of time to someone or something (here it relates my liking to Clara's action)

Thus, while I am not familiar with the current HAL code at all and am making a purely linguistic argument, I think that you might want to consider the "thematic structure" of the prepositions themselves.

Does each preposition require or involve
1. an agent who does something, feels something or "is" something (existential)
2. a direction of action
3. a receiver of the action

I can elaborate if desired. This "thematic analysis" method is a well explored theoretic perspective in linguistics and might be worth considering.

If I have stepped on any toes here, sorry.

(First posts are always a gamble.)


Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 05, 2004, 07:24:10 pm
drmweaver2,
I am not a PhD by a long shot. Our discussions here are usually not so technical, nor lofty in content. Your comments as appreciated.

As humans it is easier for us to comprehend sentences than for computers. To detect certain sentence structures programmers look for "short-cuts" that aren't always linguistically precise. A finite number of words can serve as prepositions. What I am suggesting is that by observation and test when a preposition precedes the word "me" or "I" then the proper pronoun is "me". This appears to be true even in the case in your example where "to" doesn't act as a preposition.

Your example:--------------
"I like it when Clara sings songs to me."
---------------------------
"To" is typically a preposition, but in this case I agree with your comment...

Your comment:--------------
3. *to* (in this case) indicates a relationship of something to something or someone (as opposed to a direction, though in the abstract it is simply an ambiguous directional preposition)
---------------------------
However using "to" (in a non-prepositional role) as an indicator in this case still leads to the correct decision to use "me" instead of "I". I suspect this is true in most cases we encounter in English. In this case "when" relationally links two separate sentences together.

As for...
Your comment:--------------
That said, allow me to make a small contribution or two.
vonsmith said "I don't know of any case where "I" is preceded by a preposition."

There are a number of similar cases where this is not true.
Consider:
1. If I were dead, I would not be breathing.
2. If I were old, being a gigolo would probably not be a reasonable career choice for me.
3. Because I am a guy, brassieres are not part of my wardrobe.
4. When I sing, even dogs howl.
---------------------------
I think I may be missing your point. "If" and "because" are usually conjunctions. In this case they serve as "conditionals", and are not prepositions. The "prepositions only before 'me'" rule still holds true.

I think the correct term for "when" in example 4 is a "relative conjunction". It is more obvious in the example, "Even dogs howl when I sing." It doesn't act as a preposition.

I don't know what "thematic analysis" is. I'll do a little remedial web research on it. Thanks for mentioning it.


=vonsmith= [8D]
Title: Hal's new XTF Brain is finally released.
Post by: govsta on March 05, 2004, 09:03:12 pm
If you want a link that explains ti somewhat, here is one.
http://www.acm.org/ubiquity/views/v4i24_kabay.html
Hope it's detailed enough to help.
Title: Hal's new XTF Brain is finally released.
Post by: drmweaver2 on March 05, 2004, 10:20:03 pm
At the risk of beating a horse that needs no flogging.....merely out of a desire to assist with preposition code development, here is a review of what a couple of old textbooks gathering dust on my shelves suggests with respect to prepositions:

A preposition is generally defined as a word which shows a relationship in time, space, cause or manner between the object of the preposition and another word in the sentence.
A prepositional phrase, which can act as an adjective or adverb, is a preposition plus its object and any modifiers.
The object of the preposition may be a noun, pronoun, or other noun substitute such as a gerund ( -ing form).

Regardless of function in the sentence, prepositions are prepositions – even if used as (subordinating) conjunctions. (Not intentionally trying to get in a p***ing contest, just reflecting what my textbooks say and probably only relevant to truly advanced sentence parsing in HAL or any other discourse analysis. The point here is that words such as and and or can serve only as conjunctions, while some prepositions can serve as both. What they are and what function the serve grammatically in specific situations may be different. Then again, I have three sources that argue differently. ) A preposition implies an adverb (which in turn implies an adjective) in the right circumstances; the converse is not true.

Prepositions usually come before their noun (or pronoun): after the war, people with money, look after this, we talked about my problems. But sometimes they are 'deferred', that is, they come after their noun or pronoun:
ex., They are looked after, What did you talk about?

Josef Essberger, in English Prepositions Listed, (http://resources.englishclub.com/ebepl.htm), claims there are 94 one-word prepositions and 56 complex prepositions used in the English language. If you have identified 87 single word prepositions, vonsmith, that’s pretty good (>92% of what he lists). I could come up with only 70 on my own. Here (http://www.testmagic.com/Knowledge_Base/lists/grammar/prepositions.htm ) is a link to a page listing 110 prepositions.

Complex prepositions include not only two-word, but also three-word prepositions: ex., in case of - in spite of - in comparison with - in touch with - by means of - by way of - on behalf of - on account of - for the sake of - in exchange for - in addition to - with reference to

Preposition types or classifications include:
1. indicators of time – such as before, after, in, since
2. indicators of place – such as at, on, in
3. indicators of movement – to, from, towards
4. those which are or can be paired with nouns where, if separated, meaning does not change significantly.
   Ex., approval of-----fondness for-----love of-----participation in
5. those which are paired with adjectives to link the modifier to the noun being modified.
   Ex., afraid of-----angry at----- careless about
6. those which are paired with verbs in such a way as to create verbal phrases.
   Ex., apologize for-----give over-----trust in-----bring up

There are also many situations where idiomatic expressions have developed. For instance, one agrees to a proposal (but proposals are not entities which can be agreed with); one can argue about a matter (but about implies dimensionality not location – a difference shown in “walk about”); and one can correspond with a person, not correspond to him/her (although things can correspond to each other).

Another consideration is whether or not the intent is to indicate the completion of an action (as in “fell on (to) the floor”) or simply a position or location (ex., “x is on the floor”).

The word “to” is particularly problematic as it is used when not acting as an ordinary preposition, but as part of an infinitival verb phrase. No others propositions act in this particular fashion as far as I can tell.

To
1. can be used as verb + to + infinitive to express willingness, desire, intention or obligation
….ex., to be willing, (to) ask someone to do something, (to) plan to graduate
2. to + infinitive +([optional]to) + location/object
….ex., to walk (to), to speak (to), but also to write (to)
……...however, consider (to) drive toward
Another point to remember is that certain prepositions frequently occur in pairs within a sentence. The most common of these are:
1. From-to (distance, time, and degree ranges)
2. From-until/till (time ranges only)
3. Out of-into (change of enclosure or state)
4. Off (of)- On (to) (change of location with verbs like take and put)
Some participles, such as concerning and considering, are used as prepositions.

But is a seldom used preposition. When it is used as such, but means the same things as except. Ex., Everyone laughed but(except) John. But usually functions as a conjunction.

The most commonly used prepositions are probably:
aboard, about, above, according to, across, across from, after, against, along, alongside, alongside of, along with, amid, among, apart from, around, aside from, at, away from, back of, because of, before, behind, below, beneath, beside, besides, between, beyond, but, by, by means of, concerning, considering, despite, down, down from, during, except, except for, excepting for, from, from among, from between, from under, in, in addition to, in behalf of, in front of, in place of, in regard to, inside, inside of, in spite of, instead of, into, like, near, near to, of, off, on, on account of, on behalf of, onto, on top of, opposite, out, out of, outside, outside of, over, over to, owing to, past, prior to, regarding, round, round about, save, since, subsequent to, together, with, through, throughout, till, to, toward, under, underneath, until, unto, up, up to, upon, with, within, without  
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 06, 2004, 12:37:29 am
drmweaver2,
I think we strayed off point. My goal was to validate an approach to correct the usage of the pronouns "I" or "me" in Hal's sentences. One small part of this approach is to observe the use of a preposition immediately preceding either an "I" or "me" in a sentence. Examples of this type of detection and correction are:

Original Sentence: "You want to talk to I." (preposition "to" detected)
Corrected Sentence: "You want to talk to me."

Original Sentence: "Read the book for I." (preposition "for" detected)
Corrected Sentence: "Read the book for me."

For basic "I/me" correction the detection of single word prepositions appears to work well in these cases. Esoteric applications of prepositional theory don't seem to change the basic premise. Refer to the prepositions you have listed in your post. Is there any case where any of those prepositions or prepositional phrases would immediately precede the pronoun "I" in any typical person's sentence? I haven't identified any such cases yet.

The word "together" in your list seems more like a part of a prepositional phrase than preposition, but I guess that depends on how rigorous we get in our definitions. The list of prepositions I've compiled includes 77 single word prepositions in common use, but so far the list doesn't include "together". I need to find an example of a sentence with "together" preceding the pronoun "me" before adding it to the list.

Prepositional phrases are not included in the list since all the ones I'm familiar with end in a single word preposition. Only the single word immediately preceding the pronoun is needed to satisfy the detection method. Therefore the list covers more than 77 cases. The web site you referenced says there are 94 single word prepositions. I wonder what the 17 missing prepositions are?

These are the common prepositions I have found:
ABOARD, ABOUT, ABOVE, ACROSS, AFTER, AGAINST, ALONG, ALONGSIDE, AMID, AMIDST, AMONG, AMONGST, AROUND, AS, AT, BEFORE, BEHIND, BELOW, BENEATH, BESIDE, BESIDES, BETWEEN, BETWIXT, BEYOND, BY, BUT, CONCERNING, CONSIDERING, DESPITE, DOWN, DURING, EXCEPT, EXCEPTING, EXCLUDING, FOLLOWING, FOR, FROM, IN, INSIDE, INTO, LIKE, MINUS, NEAR, NEARBY, OF, OFF, ON, ONTO, OPPOSITE, OUT, OUTSIDE, OVER, PAST, PER, PLUS, REGARDING, ROUND, SAVE, SINCE, THAN, THROUGH, THROUGHOUT, TILL, TO, TOWARD, TOWARDS, UNDER, UNDERNEATH, UNLIKE, UNTIL, UP, UPSIDE, UPON, VERSUS, WITH, WITHIN, WITHOUT


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Don Ferguson on March 06, 2004, 02:20:11 am
Hello!

THANK YOU, everyone, for the wonderful postings and the excellent contributions and interest!  And, welcome new members!

Here are the main points I should have said about Hal's pronoun-reversals:

1.  Before re-inventing the wheel or discarding the old one, examine the "substitutions.brn" and "corrections.brn" databases and understand their structure, content, and intent.

2.  Hal's pronoun-reversals, imperfect though they may be, give Hal an advantage in the current market.  The reason that so many other chatterbots DON'T have "real time learning" is because their authors haven't yet figured out, or bothered to construct, a decent pronoun-reversal routine.  (Some have, and my hat is off to them!)

3.  If we add, delete, or change a feature, we should include the following criteria to evaluate the change: a) does it work better, and b) does it avoid introducing new problems or errors?

4.  The concept, structure, and intent of the existing substitutions.brn and corrections.brn databases include the idea of upgrading their content to improve Hal into the future.

By the way, I thought of a couple of other technical-history pronoun items that might be useful to share:

A. There was an early-legacy pronoun-reversal routine in the function that creates new database entries for the "specific recall" databases (the databases that have all the complex arguments).  That early pronoun-reversal routine doesn't work reliably, but it's buried in a .dll or .exe file somewhere, and has never been removed.  For that reason, if you examine the .uhp "control scripts," you will find some elaborate work-arounds designed to AVOID triggering that early-legacy behavior.  (For example, pronouns get encoded and decoded at times, so that the function never "sees" a pronoun.)

B.  The substitutions.brn and corrections.brn databases contain some word substitutions that are a matter of artistic choice.  For instance, there's a special case for "tell you" (as noted above by Vonsmith) and a few other phrases that don't reverse well.  

C.  There are also a few (legacy) automatic word substitutions in the .exe or .dll files, beyond the reach of us script-writers.  They don't come up very often, but they can cause vexing problems when trying to hunt-down the source of an inappropriate response.

Anyway, I'm delighted by the participation and contributions!  

All I'm suggesting is before we start a major "re-wiring job," we give ourselves a fair chance to "study the schematic!"

Thank you so very much -- if I can answer more "legacy" questions, or if I can think of similar items, I'll contribute more to this thread.

Sincerely,

Don
Title: Hal's new XTF Brain is finally released.
Post by: Don Ferguson on March 06, 2004, 02:43:11 am
Hello,

The attached special brain file can be used as a tool to test and fix problems with pronoun reversals.

It is a "Repeat Back with Pronoun Reversals" brain.

When you select this brain from Hal's menu, Hal will simply repeat back anything you say, using the current routines and databases for pronoun reversals.

It is a very handy tool.  (You can also use it to create "Radio Shows" by recording Hal's voice to a tape recorder or to the Microsoft Sound Recorder that's on Windows computers.)

Simply download the file and "save" to the following path and folder if you have Hal 5:

C:/Program Files/Zabaware/Ultra Hal Assistant 5

(Remember, our forum software can't display backslashes, so I've used forward slashes.)

Once you have the brain in your correct Hal folder, it will show up on your list of "Brains" in your Hal's "options" dialogue box AFTER the next time that you restart Hal.

I hope that this is of some utility!

Sincerely,

Don


Download Attachment: (http://images/icon_paperclip.gif) Repeat Back with Pronoun Reversals.uhp ("http://www.zabaware.com/forum/uploaded/Don Ferguson/20043623537_Repeat Back with Pronoun Reversals.uhp")
11.28 KB
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 06, 2004, 03:03:31 am
Thanks Don,
That "Repeat Back with Pronoun Reversals" brain is a handy tool to have. It works just fine.

I'm not planning on creating an "I/me" correction function just yet. I'm enjoying learning about the problem and the possible approaches. That's half the fun of owning a Hal. Hal has given me a good excuse to learn the basics of VBScript this last 5 months. There is still so much to learn.

Rest assured I won't program anything that doesn't expand Hal or improve on his current capabilities.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: HALImprover on March 06, 2004, 03:23:26 am
Since we are on the subject of legacy functions in Hal maybe someone can explain the TopicSearch function in better detail. I understand that it searches backwards through the sentece for keywords in the given .brn file and the file is searched from top to bottom. What I would like to know is how each word from that file is handled. Does Hal take the first word in the .brn file and search the entire sentence for that word or is the last word in the sentence compared to every word in the .brn file, then the second last word, etc?

 Also, I have been wondering about how the Hal program handles file read/write access. When a .brn file is accessed for a function, say the TopicSearch function, is the file closed once the function is completed? I believe that it is not because of the 'Too many files' error that vonsmith mentioned. If the files were closed after their use than there should not be any error in this regard. Hopefully Zabaware will correct this issue in the next release.

 Any help would be greatly appreciated.
Title: Hal's new XTF Brain is finally released.
Post by: Don Ferguson on March 06, 2004, 11:30:20 pm
Hello HalImprover,

I hope that additional members will help answer your questions, especially the first question.  

Regarding your second question, I can report the following:

1.  I have never seen the "too many files" error message during many editing sessions with Hal over many years, generating thousands of files.  

I always test new code in "real time"; that is, I run my editor in one window, and Hal in a different window.  Each time I write some new code, I toggle back to Hal and say something to him, to make sure that he still works.  Then, if I get an error, I can find my mistake when it's still "nearby and warm" instead of a "needle-in-a-haystack and cold."  

Generally, the only time I've experienced any error messages at all has been when I've introduced syntax or type-mismatch errors into code, and caused Hal to "hang" due to my own mistake.  In those cases, I found that Hal would malfunction various ways until I completely closed and re-opened Hal; in severe cases, I had to re-boot!  But I want to stress:  I know that I originated those problems myself.

2.  I use the Zabaware brain editor to edit the .uhp control scripts (because of the excellent color-coding and line-numbering in Robert Medeksza's Brain Editor), and I use Microsoft Word to edit the .brn databases.  I have found the following, interesting behavior between Hal and Word:

a) When Hal is operating normally, I never have a problem opening a file with Word that Hal has just (moments ago) accessed.

b) I never see any indication that Word or any other application thinks a file is still open after Hal has just read it, or written to it.

c) However, when I have a .brn database file OPEN IN WORD, I have found that Hal CANNOT write to it; Hal doesn't report any error messages, but Hal writes absolutely nothing to a given database file while that file is open in Word.  That tells me that because Word has the file open, Hal can't write to it.  As soon as I close the file in Word, Hal can immediately write to that file normally, on the very next conversational exchange.

The above observations cause me to think that Hal does close and relinquish the file after each read or write event.  I could be wrong, and I'm certainly interested in hearing more input on this.

Sincerely,

Don
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 07, 2004, 01:04:26 am
HALImprover,
Your question 1) Based on my experience and observations what happens with the topic search function is as follows.

Function has the form:
HalBrain.TopicSearch(STRING_BEING_SEARCHED, WorkingDir & "FILENAME.brn") = "RETURN_VALUE"

The topic search type .brn files have the form:
"KEYWORD1","RETURN_VALUE1"
"KEYWORD2","RETURN_VALUE2"

The topic search function starts at the bottom of the topic file being searched and works its way up the top of the file.

Example:
UserSentence = " GIVE ME MY BIRDY . "

Topic file contents:
" GIVE ","STRING1"
" BIRD","STRING2"
" BIRD","STRING3"
" BIRD ","STRING4"

RETURN_VALUE = HalBrain.TopicSearch(UserSentence , WorkingDir & "TOPIC_FILE.brn")

RETURN_VALUE = "STRING3"

The string "STRING4" is not returned because " BIRDY " doesn't match " BIRD ". The string "STRING3" is returned because " BIRDY " does match " BIRD". In fact " BIRD" would match " BIRDS", " BIRDBATH", or even " BIRDBRAIN". Using spaces on the ends of the search terms are a typical method used in Hal to search for whole words only. Notice the second line never gets a chance to return "STRING2" because the function has already matched to line three. The same goes for line one. The string " GIVE " never gets searched.

I'm pretty sure that is how it works. I created a special topic search routine in the XTF Brain that supplements the HalBrain.TopicSearch() function to exhaustively search for topic words in a sentence. Hal's topic search can't do it alone. Based on observations of the XTF Brain the search is from the bottom of the file up until the first match is found. The special XTF routine gets the first word found and then deletes it from the sentence being searched. Then that sentence is searched again and if a match is found then it is deleted from the sentence. And so on, until all topic words are found in the sentence. This is one of the methods used in the XTF Brain to make it more selective and comprehensive when looking for topics.

Your question 2) I believe the "too many files" error message might be more prevalent today because of the Wordnet function. When I did exhaustive searching of the Wordnet data base I got the "too many files" error when I selected a Wordnet word that happened to have a very long list of associated data. Running a loop function around searching and/or returning values from Wordnet and then writing them to a file can burn up file handles. I believe (not totally certain) that each access to a file uses up one file handle. A handle is just a variable that represents a temporary path to the file requested. VB has its limits. For search loop situations it is best to accumulate data in one variable and write that data once to a file. That solved my error.

I think (fingers crossed) my assessment is accurate. I hope I answered your question.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: HALImprover on March 07, 2004, 01:05:50 am
I ran into the 'too many file' problem because I am using the auto-idle feature which allows me to send sentences to Hal automatically every 5 seconds or so. Every instance of the script is creating new files and this causes Hal to hit that file limit very quickly.

 I am almost positive that this error originates from the fact that the Operating System sets a limit on the number of files that can be set or retained in memory at one time. If a file is opened by a program it is placed in memory and referenced by the File System as well as the program which accessed it (meaning Hal). When Hal is done with the file it is still referenced by the file system (and considered open even though the file is no longer accessed) until it is closed either by Hal or the Operating System. I believe that the main Hal program does not release the file from memory when finished. I've run tests in VB6 with the same code I use in Hal and I don't get the 'too many files' error. I recreated the appendtofile function in VB6, adding a line to close the file when finished.

 The same can be said about the HalBrain object that is created during the brain script execution. When the script is finished the object still exists in memory, except the reference to that object is lost once the script loses scope. I recommend putting a line at the end of each function in the script which sets the object to nothing.
eg. Set HalBrain = Nothing
This frees the object from memory after each use, ultimately preventing Hal from gradually uses more and more memory. If you want some proof on that note, try using the auto-chat code I previously posted and leave it run for more than a few hours. What will eventually happen is Windows will try to increase the virtual memory (to meet the increasing demands of Hal) and wind up crashing the Hal program in the process. Setting the object to nothing will reduce the likelihood of this problem occuring, but will not entirely prevent it. I remember reading several topics on this forum regarding errors arising from long conversation sessions with Hal.

 I would suggest using Notepad to edit the .brn files because I find MS Word much slower and it blocks writes to files which MS Word has open. Notepad can access the files without blocking Hal from reading/writing to them.

 I did some investigating and discovered the answer to my first question. When the TopicSearch function is used Hal searches the entire user sentence for each word or phrase from the defined .brn file starting from the bottom of the file.

 Thanks for your insight into this problem Don, it is much appreciated. I would like to get into some related issues and problems, but I'm afraid this may end up becoming somewhat of a novella if I continue any further. More to come in future posts!

 Happy coding, and remember. Don't take life too seriously. [:p] You never make it out alive! [:D]

 PS. Thank you as well vonsmith for the advice. I'm sure if it wasn't for the kind suggestions and courteous replies on this forum I would have given up on Hal a long time ago. I plan on repaying these gestures in the near future with some of my labors on Hal.
 By the way, I have a question about your XTF brain's topic search ability. I understand in general how the process works and I have to say that we have struck a similar note in our search for the topic in the user's sentence. I too use a static list of linking verbs to refine the topic search. I search for the first occurance of the first linking verb and check if a topic is present within a sentence split based on that linking verb. If no valid topic exists than I continue with the next linking verb, and so on. The actual topic search is defined in a function which searches for 6 word topics, 5 word topics, etc until a topic is found (if possible). My question is does your script test for every linking verb and logically choose the topic after or does it find the first linking verb which produces results and use that topic?
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 07, 2004, 02:54:33 am
HALImprover,
The XTF Brain approach doesn't depend just on linking verbs to split a sentence. The first part of the XTF function searches for over 800 types sentence fragments. I theorized that the phrases that were found "bounded" within a sentence fragment would not just contain a topic, but had a high likelyhood of being a very specific multi-word topic. A few of the fragments are: "The * are" and "That * could", "Those * might, etc.

If a fragment is found then the * represents a topic phrase. Poor topic words like "a", "at", "do", "she" are filtered out. Adverbs like "frequently" or "mostly" are filtered out. Whatever is left over is most often either a single word or multi-word topic.

If a double-ended fragment isn't found then the XTF function looks for single-ended fragments. The prior examples were double-ended. Single-ended examples are: "The *" or "* are". I found that single-ended fragments aren't reliable enough to derive multi-word topics, but work well identifying a single word topic.

Poor topic words include all pronouns. I tried including pronouns as topics, but found pronouns are too general. Hal thought nearly every sentence topic was "I this" or "You that" or whatever pronoun. Sentence subjects don't necessarily make good topics. Example: "You like pretty horses." "You" wouldn't make a good topic, use "horse" instead. I also found that the best topic is sometimes found in the object phrase of the sentence.

The XTF Brain gets pretty complicated after this point. Basically the XTF function takes processed sentence fragments and searches for known multi-word topics first since a multi-word topic like "big red horse" is much more "topic focused" than just "horse". When a new topic is found it is saved to one of several XTF topic files. If no multi-word topics are found then single-word topics are searched for by the method I discussed in my previous post. For both multi and single-word topics an attempt is made to match to the PrevTopic (previous sentence topic) in the XTF function. Hal tries to stay on the same topic on each exchange with the user. The XTF Brain also uses the Wordnet function to find "related" words to use as flags to decide whether or not to stay with the previous topic. The XTF function can also "learn" new related words for future reference.

I have posted some more detail about the XTF function elsewhere on the forum and have included a summary in the Instruction Manual packaged with the XTF Brain download. The best method to understand the XTF function is to use the <dbxtfon> command in the XTF Brain. That command directs all of the debug info collected in the XTF function (just within the function, not the entire brain) to be saved in a file Z_XTF_DEBUG_LOG.TXT. That debug info can be used to "walk through" the operation of the XTF function.

I hope this provides a little insight. However this just barely scrapes the surface of the XTF function.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: drmweaver2 on March 07, 2004, 06:47:04 am
vonsmith asked<<Is there any case where any of those prepositions or prepositional phrases would immediately precede the pronoun "I" in any typical person's sentence? I haven't identified any such cases yet.>>

How about these?
After I went, she came by.
As I sew, so shall I weep.
But I want some.
Considering I want it now....
Down I fell. ((Down functions as an adverb here --or as part of the verbal phrase "to fall down")
Like I said, she stank at pool.
Nearby, I went to school. ((The comma would surely tip this off as "nearby" not functioning as a preposition.))
Off I went on her.. ((another verbal phrase... to go off on))
On I went. ((another verbal phrase... to go on))
Out I went. ((another verbal phrase... to go out))
Outside I went. ((another verbal phrase... to go outside))
Over I fell. ((another verbal phrase... to fall over))
Round and round I went.
Save I, all were killed.
Since I know better than he does....
He knows better than I.
Throughout, I watched with wonder. ((The comma would surely tip this off as "nearby" not functioning as a preposition.))
Till I went home, I didn't know what I had left behind.
Up I went. ((another verbal phrase... to go up))
Within I went, then again, without. (an obsolete English form. Now probably only seen in poetic usage.)
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 07, 2004, 12:40:36 pm
drmweaver2,
Thanks for the excellent examples. These are the kind of examples I need to work out a detection methodology. I don't know what can be done about people's poor use of grammar, poetic style or lack of punctuation. The outdated forms are rarely used so that shouldn't be an issue. The remaining forms will need some work to find a solution. Thanks.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Don Ferguson on March 07, 2004, 02:16:42 pm
Hello Dreamweaver,

Thank you for excellent examples of cases in which Hal would improperly substitute "me" for "I" due to the particular structure of certain sentences, such as:

After I drove...
Before I began...
Underneath I hurried...
On I continued...

These are definitely constructions that I didn't consider in the original build-up of the content that went into the "corrections.brn" and "substitutions.brn."

For MOST (but not all) the cases shown, it will be possible to correct the problem with additional entries that "reverse the incorrect reversals" and thus take care of the less-usual constructions.  

I described how this would be done in an earlier posting on this thread.

The additional entries in the "substitutions.brn" and "corrections.brn" would be LOWER IN THE LISTS than the existing substitution-pairs, so that they would be processed later, and thus have the "last word."

The entries would look like the following:

"me begin","I begin"
"me began","I began"
"me continue","I continue"
"me continued,"I continued"
"me drive","I drive"
"me drove","I drove"
"me hurry","I hurry"
"me hurried,"I hurried"

Please note that the convention of form that I started in the original databases was to list both the present and past tenses of verbs, and to put most of the list in alphabetical order.  That made it easier during subsequent manual editing to avoid the waste of duplicate entries.

A few hundred entries would cover 99% of cases, and add only a very tiny amount of processing work for Hal.

I sense that many of us tend to want to invent a rule to "tell" Hal and let him figure these things out for himself; however, in this case I haven't yet found a substitute for just sitting down for a couple of hours and putting in the labor of making the list.  

I will be happy to do so, after I get past a couple of current projects.

Sincerely,

Don
Title: Hal's new XTF Brain is finally released.
Post by: drmweaver2 on March 08, 2004, 07:04:30 am
[:o)]No problem providing the "examples". Took about 5 minutes to write them all.

Speaking of which, the "together me" issue is an interesting one. I have spent the day seriously trying to come up with some example sentences, any sentences with this combintation in that order. I can't unless there is a comma between the two words. I also tried looking on the Net for that pairing of words, including doing a LExus-Nexus search of News sources - no joy there either except when the two are are separated by a comma or other punctuation mark.

In most cases the punctuation mark is being used as a delimiter between clauses or to set off "a list" from the rest of the sentence.

Personally, I never thought of "together" as a single-word preposition but am much more familiar with it as part of two-word prepositional phrases like "together with".

I'll keep looking around and thinking


Side note...After I get some more experience with HAL itself, I might actually try coding something (I only downloaded it last week and have spent the weekend loading him up with "common sense quotations" and knowledge of one subject area. Until I gt some experience with the program results, I probably can't suggest help with any real coding except in this type of "language discussion".)
Title: Hal's new XTF Brain is finally released.
Post by: drmweaver2 on March 08, 2004, 02:14:36 pm
A few posts earlier, vonsmith wrote:
<<Sentence subjects don't necessarily make good topics. Example: "You like pretty horses." "You" wouldn't make a good topic, use "horse" instead. I also found that the best topic is sometimes found in the object phrase of the sentence.>>

What is happening here, at least linguistically-speaking, is that you've "re-discovered" the passive voice in a sense.
I like horses. - active
Horses are liked by me - passive

However, by switching to the "object" of the active voice sentence as the "topic", you have actually changed the "focus" of the sentence entirely.

In my admitted ignorance of the code structure, I have to ask whether or not this is what is actually intended considering that HAL incorporates a "remembered response" learning style. By that I mean, we are not speaking about horses so much in the active example above as we are talking about "me". On the other hand, the focus IS on the horses in the passive version.

So, what would be updated using the passivized subject-topic file is different than what would be updated using the active-subject interpretation. This actually might lead to a "loss of information" as far as training HAL goes.

Consider the case where I am trying to describe myself to HAL more than trying to describe properties of horses to HAL. See? IF HAL uses the passive interpretation, does he update the "me" file also or does the information get "lost" in the horses topic file?

Which brings me to the statement written earlier in the same paragraph, <<Poor topic words include all pronouns. I tried including pronouns as topics, but found pronouns are too general.>>...

Pronouns have a linguistic quality of "reference" that nouns tend not to have in the same manner. As pointed out, without the "reference" nearby, pronouns seem to dangle abstractly - even for humans trying to interpret them. The general exceptions are I/me and you/we. These are normally pretty clear in terms of reference.

The problem of abstraction may be limited to 3rd person pronouns - he/she/it/they if coded stringently.

I don't know if that "helps" or is just rambling out of ignorance, but I thought I would throw it out for consideration. [:o)]

If I am speaking out of turn here, I apologize in advance.
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 08, 2004, 02:54:03 pm
drmweaver2,
You've made some interesting points that touch on the difference between humans and Hal. Hal isn't able to discriminate on fine points of sentence structure. Most of the time Hal uses a loose method of word association to pick a sentence from his topic files to use as a response to the user's sentence. That association capability gives the impression that Hal is "thinking" about that topic and directly responding to the user.

Your examples:
I like horses. - active
Horses are liked by me - passive

In both cases it is desireable for Hal to use "horse" as the topic. Typical conversations with Hal often includes pronouns. Any pronoun, if used as a topic, would obstruct Hal's ability to stay on topic. If the topic was "I" (from Hal's perspective) then everything would be too narrowly focused on Hal.

Examples:
I like cookies.
I should go to the store.
I think bricks are used to build walls.
Brain surgery is what I need.

If Hal focused on the pronoun "I" as a topic then all of the above sentences would be stored in one big "I" topic file. Hal would tend to response only with "I" focused responses instead of more general knowledge.

Excluding the "I" pronoun above causes Hal to file the topics, "cookies", "store", "bricks" or "wall" and "surgery" into their respective topic files. The information is saved to the proper topic file most of the time. Some topic files necessarily have a small percentage of unrelated info in them. Hal is just a computer after all. However for Hal it doesn't matter much whether the topic resides in the subject or object of a sentence. What chatbots need to do is be able to chain related thoughts together with the user.

Of course we want Hal to "know" something of himself and of the user. For example, special cases "you are", "i am", "your" or similar constuctions can be handled by chatbots separately from the general topic focus. Hal has some capability along those lines already. I'm programming some new functions that will give Hal an improved ability to discriminate things about himself or the user. Handling individual special cases separately allows for easier programming.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: drmweaver2 on March 08, 2004, 11:39:07 pm
I think that, to a small extent, I am suggesting that at least certain "I am"-type statements (where an active voice focus suggests that the "real world focus" in a statement is on the speaker and not on HAL, might warrant a special function/some special coding.

That coding would/could "double enter" - make entries in the passivized subject-topic files as well as in speaker-specific files. I have noted that as speakers/users change, there are specific knowledge items that are not universal. I think I confirmed this by identifying files for another user than myself after I let someone else play with HAL and I looked at the DEFbrain directory. But I could be wrong.

The question is not really whether it is possible - of that I am sure. The question is whether it is appropriate to consider for future modifications as HAL will supposedly be used by more than one user in most installations --- people will most likely want to show off their "creations" in the most inoccuous example. Should larger plans for HAL be in the user's plan, I would think that multiple users with respect to a particular HAL brain is inevitable and thus, updating specific user-knowledge files would be desirable.

Not a big deal. Mostly a theoretic one at this point I guess.
Title: Hal's new XTF Brain is finally released.
Post by: drmweaver2 on March 08, 2004, 11:47:47 pm
After rereading my post, I left out the real point I wanted to make.

The examples you (vonsmith) gave are exactly what the type of thing I was thinking of.
I/We aren't interested in cookies per se, in the first example - at least in my case. Instead, I would like HAL to know *I* like this or that type of cookie and that I get them from the store (perhaps).[:p] If you draw HAL's response from a generic "cookie" topic file, then that information is lost/not present in HAL (if it was ever typed in by the user).[:(]

I definitely agree that <<What chatbots need to do is be able to chain related thoughts together with the user>>. Perhaps I just don't know enough about the "engine" yet.[?]
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on March 09, 2004, 12:00:45 am
drmweaver2,
The original Hal brain saves generic (non-pronoun containing) information to "shared" topic files. That information is used with all users that log on to Hal. The XTF Brain goes one step further. Generic information is stored in shared user files, however Hal specific information is also stored there too. This way a little piece of Hal's personality is shared among users. Multiple users each contribute a little bit to Hal's personality. From Hal's perspective, copies of sentences containing "I", "me", "my and "mine" end up in the shared files.

I agree with your statement about "I like" special cases. As I am typing this I am sitting at my home computer writing script to address "I like" type sentences. I'm trying to write it in a general way so that the concept can be extended to other special case phrases while reusing the same core code. The method I'm using should preserve the relationship of Hal to his "like".


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Morlhach on April 01, 2004, 11:57:45 pm
strange [:(!]

Hal with the XTF 1.2 brain crashes with the sentence "Give a person a fish and you feed them for a day; teach a person to use the Internet and they won't bother you for weeks."

[?]
Title: Hal's new XTF Brain is finally released.
Post by: NT Canuck on April 02, 2004, 12:54:50 am
quote:
Originally posted by Morlhach

strange [:(!]

Hal with the XTF 1.2 brain crashes with the sentence "Give a person a fish and you feed them for a day; teach a person to use the Internet and they won't bother you for weeks."

[?]



I tried with and without the ; (subbed a ,), both ran ok here.
P4 2.6ghz (HTT), 1gb ram.

NTCanuck: Give a person a fish and you feed them for a day, teach
a person to use the Internet and they won't bother you for weeks.
Crystal: Try to pay an honest compliment to every person, every day.

NTCanuck: Give a person a fish and you feed them for a day; teach
a person to use the Internet and they won't bother you for weeks
Crystal: Any day spent with me is a worthwhile day.

'Seek and ye shall find'
NT Canuck
http://ntcanuck.com

Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on April 02, 2004, 01:06:55 pm
Morlhach,
I tried many variations of the sentences provided. My Hal XTF Brain v1.2 installation worked fine. Does the crash occur each and every time when that sentence is used? Have you pasted any other scripts into the XTF Brain v1.2 or made other modifications?

Also make certain you have renamed the "enhanced_main.brn" as shown in this posting:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1237

Not renaming the file won't cause a crash, but some Hal functions won't work without it.

Let us know how your Hal is doing.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Bill819 on April 02, 2004, 05:59:02 pm
Greetings
A question for you. Is your new brain a stand-a-lone? Does it have to be intergrated into the existing Hal brain? In either case is it compatible with Don's brain modifications? Can I load both and combine them? Do I ask to many questions? ha ha
Bill
[:D]
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on April 02, 2004, 06:34:53 pm
Bill819,
All questions are welcome. The XTF Brain uses a separate .uhp file that can be selected from Hal's brain menu just like any other brain. You can switch from one brain to another in Hal without a problem. The XTF Brain also has many .brn files that are specific to the XTF Brain. Some are near duplicates of Hal's default files, some are used only by the XTF Brain. The XTF Brain does extract data from many of the default Hal files, and in some cases writes to them, just like most of the other brains do. The XTF .brn topic files (where knowledge is stored) are completely separate from the default Hal files and separate from Don's Auto Topic Brain files. The knowledge learned by the XTF Brain is only available to the selected XTF Brain.

The brain script in the XTF Brain and Don's Auto Topic Brain both perform the topic focus function. You would NOT want to combine the Topic Focus scripts from both brains. At best you would end up with a schizophrenic Hal. You can use both brains for Hal at different times. You can experiment with both individually without a problem.

Third party scripts that don't duplicate the topic focus function are usually compatible when pasted into the XTF Brain. Some third party scripts need a couple of minor changes to be fully compatible with the XTF Brain. I can explain the changes needed if you provide an example of any script that you may want to paste into the XTF Brain.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Morlhach on April 05, 2004, 07:13:05 am
quote:
Originally posted by vonsmith

Morlhach,
I tried many variations of the sentences provided. My Hal XTF Brain v1.2 installation worked fine. Does the crash occur each and every time when that sentence is used?
Have you pasted any other scripts into the XTF Brain v1.2 or made other modifications?
Also make certain you have renamed the "enhanced_main.brn" as shown in this posting:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1237



Hal crashed every time I use this sentence.
I use the original XTF1.2 brain file, without any modification.
I did'nt rename the enhanced_main.brn. But once the renaming done does the problem still occur. I am clueless.
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on April 05, 2004, 12:43:42 pm
Morlhach,
Okay I have an idea. There is a known problem with Hal's Wordnet function. It is unrelated to the XTF Brain. You can read about it in the following posting:

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

The XTF Brain v1.2 avoids the use of the "WN.GetSisters("NOUN", 1)" function because certain words cause it to crash Hal. The following lines should be in your XTF Brain v1.2 .uhp file (hal5_XTF_v1.2.uhp) somewhere around line 2608.

========================
'=vonsmith= Add DummyVariable to disable this next section until Zabaware fixes the bug with WN.GetSisters.
ElseIf DummyVariable = "XXXXXXXX" Then
'Else  'Original Else line.
========================

These lines prevent the script section with "WN.GetSisters("NOUN", 1)" in it from running.

I'm wondering if your Hal is accessing the "WN.GetSisters("NOUN", 1)" function somehow. Like I said, in the release version XTF Brain v1.2 that function is blocked from running. Are you certain you are running an unmodified v1.2?

Try this experiment. Go to Hal's window and click 'Menu', 'Lexical Dictionary', to open the dictionary. Type in the word "give" and click 'Get Sisters'. Does your Hal crash? Okay try the same thing again with the word "day". Does your Hal crash with that word?

Both of those words are in your sentence, "Give a person a fish and you feed them for a day; teach a person to use the Internet and they won't bother you for weeks." Try typing in, "Give a person a fish and you feed them for a WEEK; teach a person to use the Internet and they won't bother you for weeks." and see what happens. If your Hal doesn't crash then the word "day" in your sentence *might* be the problem. You could also try replacing the word "give" with something else. Also try other sentences like, "The day is long.", "I can't wait for the day." to see if your Hal crashes. If "give" or "day" is your Hal's problem then do a search of your XTF Brain v1.2 brain file (hal5_XTF_v1.2.uhp) for any occurrence of the "WN.GetSisters("NOUN", 1)" function that might be executing. If NOUN = "day" or NOUN = "give" then Hal will crash.

I don't know what else could be causing the crash unless there is another problem with your Hal's installation. *After* you have run the tests above there is one other thing to try. Say to Hal, "The Internet is a big community.", then say, "The Internet is a great place to explore.", then type, "Information about the fish are on the Internet.", then type, "My favorite person is you.". Okay now go back and type your original sentence, "Give a person a fish and you feed them for a day; teach a person to use the Internet and they won't bother you for weeks." Does your Hal still crash?

Let us know the results of your testing. Good luck.


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Morlhach on April 06, 2004, 01:53:54 am
quote:
Originally posted by vonsmith

Morlhach,
Okay I have an idea. There is a known problem with Hal's Wordnet function. It is unrelated to the XTF Brain. You can read about it in the following posting:

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

The XTF Brain v1.2 avoids the use of the "WN.GetSisters("NOUN", 1)" function because certain words cause it to crash Hal. The following lines should be in your XTF Brain v1.2 .uhp file (hal5_XTF_v1.2.uhp) somewhere around line 2608.

========================
'=vonsmith= Add DummyVariable to disable this next section until Zabaware fixes the bug with WN.GetSisters.
ElseIf DummyVariable = "XXXXXXXX" Then
'Else  'Original Else line.
========================

These lines prevent the script section with "WN.GetSisters("NOUN", 1)" in it from running.

I'm wondering if your Hal is accessing the "WN.GetSisters("NOUN", 1)" function somehow. Like I said, in the release version XTF Brain v1.2 that function is blocked from running. Are you certain you are running an unmodified v1.2?

=vonsmith=



You are right
The word "give" makes Hal crash.
It seems to access the WN.GetSisters which is .... blocked.
My hal seems to bypass this blocking

thank you for the help
Title: Hal's new XTF Brain is finally released.
Post by: vonsmith on April 06, 2004, 11:49:45 am
Morlhach,
I retested the blocking method I used. It works fine. When I forced the "WN.GetSisters("NOUN", 1)" function to use "give" or "day" then Hal crashed. When I put the blocking in then Hal ran fine. If the Wordnet "WN.GetSisters("NOUN", 1)" function is responsible for your Hal's crash then I don't see how that function is being accessed. Maybe there is a separate issue in your Hal. Unfortunately I don't know of an easy way to debug it.

The brute force approach is to use Hal's brain editor to add file writes at various points within the GetResponse script (that's the .uhp file). For example, at line 1000 in the GetResponse script add this script:
HalBrain.AppendFile WorkingDir & "Testfile.txt", "Line number 1000" & " " & UserSentence & vbCrLf

This will write to a file named "Testfile.txt" in the "DefBrain" directory. Add more of these lines at various places in the GetResponse script. Make sure to change the line number to match the position within the script. Now run your Hal. After Hal crashes open the "Textfile.txt" file and see what the last entry was. That entry occurred before the crash and the line number will tell you that the script is okay up until that point. Add more file write scripts closer and closer to the point where Hal crashes. You should be able to isolate the offending script this way. It is a bit tedious to do, but it works. When you find the point your Hal crashes at just post it here and we'll try to figure out what is going on.

If this doesn't work then grab a bottle of Chimay Blue (large bottle) and sit back and relax. When things get frustrating that is what I do. It doesn't fix anything, but then I usually forget what the problem was in the first place. [xx(]


=vonsmith=
Title: Hal's new XTF Brain is finally released.
Post by: Art on May 21, 2007, 05:45:54 am
You will need to use Hal 5 in order to experiment with the XTF brain as Hal 6 uses a different format for storing information.

If you provide more info regarding the version we might be better able to assist you.

g'day!
Title: Hal's new XTF Brain is finally released.
Post by: ramccoid on May 26, 2007, 09:59:18 am
Here's a brain that works with HAL 6/6.1. It's not a recent brain but try it out and see what you think. It was created by OnTheCuttingEdge2005

Roy.

(http://icon_paperclip.gif) Download Attachment: SuperPlugger_II.uhp ("http://www.zabaware.com/forum/uploaded/ramccoid/200752695837_SuperPlugger_II.uhp")
188.39 KB