Zabaware Support Forums

Where is Seattle, Who was Galileo ?

Started by vrossi, May 18, 2006, 06:12:11 PM

Previous topic - Next topic

vrossi

Another little bug in Hal 6, version 6.0.103.

Ask Hal: Who was Galileo? (or any other famous person)
Where is Seattle? (or any other city)

Hal will give a generic answer.

The first release of Hal6 had the same problem, which I pointed out to Robert (see http://www.zabaware.com/forum/topic.asp?TOPIC_ID=2624 )

Then Rob fixed it in the final Hal 6 version. Now he maybe forgot to set up the same fix in this new version.

However, anybody can easily fix it. Go to the brain editor (after backing it up) and around line 700 add the following lines:










This is the result after this little brain surgery:

Vit: where is seattle
Pat: Seattle: a major port of entry and the largest city in Washington; located in west central Washington on the protected waters of Puget Sound with the snow-capped peaks of the Cascade Mountains and Mount Ranier visible to the south and east; an aerospace and computer center; site of the University of Washington.

Vit: who is galileo
Pat: Who is galileo? I'm thinking that it must have a good frame work. Galileo: Italian astronomer and mathematician who was the first to use a telescope to study the stars; demonstrated that different weights descend at the same rate; perfected the refracting telescope that enabled him to make many discoveries (1564-1642). Galileo Galilei.

Anyway, I hope Robert fix this (together with the other bug I described in http://www.zabaware.com/forum/topic.asp?TOPIC_ID=3264 ), in the next upgrade.


Vittorio
www.robotinfo.net

markofkane

Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

vrossi

Really? Are you using the new version?
If yes, this means that something went wrong with my installation. Next week-end I will uninstall and reinstall everything and check again. In this case, sorry to everybody for posting about a non-existing bug.

Vittorio
www.robotinfo.net

Art

Vittorio,

I'm having the same problem and I installed the final version as did you.

In the world of AI it's the thought that counts!

- Art -

markofkane

#4
I am using 6.0.103.

I installed over the older version, I believe.

No problems so far!!

Edit: Now I know why. I wasn't using the default brain. I was using a custom brain from the previous version!!!

Yep, the bug lies in the default brain!!!

Thanks for alerting me to this!!!
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

markofkane

Brain Surgery completed. So far, no complications. Patient is now resting.
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

markofkane

Complications after brain surgery!! My custom brains do not work!! Blank responses!!!

Must revert back.
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

vrossi

#7
quote:
I'm having the same problem and I installed the final version as did you.


Thank you, Art. So I can avoid spending my week-end time uninstalling and reinstalling Hal [:(]

I believe that when Robert created the 6.0.103 version, he started from a brain release which was not the last one, because this problem was already solved in 6.0.

markofkane

 
quote:
Complications after brain surgery!! My custom brains do not work!! Blank responses!!!


Please check the spelling of your changes. If you just add the 4 lines as in my example, it should work.

you can copy and paste from here:

   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHO IS *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHO WAS *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHERE IS *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHERE ARE *", 1)



BTW: this method only works with single words, since it searches the word in the Wordnet database. It would be nice to find a way to make it work also with places and people whose name is made up of two or more words (i.e. Los Angeles). I will think about it.

Vittorio
www.robotinfo.net

markofkane

Still same problem :(

In the custom brain, the lines are as follows:

'RESPOND: DICTIONARY FUNCTION
   'If the user asks Hal to define a word, then access wordnet and define it
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHAT DOES THE WORD * MEAN*", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHAT DOES * MEAN", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "* DEFINE THE WORD *", 2)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "PLEASE DEFINE *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "DEFINE *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "* DEFINITION OF *", 2)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHAT'S A *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHAT IS A *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHATS A *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHATS AN *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHAT'S AN *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHAT IS AN *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHATS *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHAT'S *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHAT IS *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHO IS *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHO WAS *", 1)
   If WordToLookup = "" Then WordToLookup = HalBrain.SearchPattern(UserSentence, "WHERE IS *", 1)
   WordToLookup = Trim(WordToLookup)
   If WordToLookup <> "" And InStr(WordToLookup, " ") = 0 Then
       If WN.LookupWord(WordToLookup) = True Then
           GetResponse = GetResponse & WordToLookup & ": " & WN.GetDefinition(WN.GuessPartOfSpeech, 1, "D") & ". " & WN.GetDefinition(WN.GuessPartOfSpeech, 1, "S") & ". " & WN.GetDefinition(WN.GuessPartOfSpeech, 1, "E") & "." & vbCrLf & "<EXCLUSIVE>"
       ElseIf SearchEngine <> "" Then
           HalCommands = HalCommands & "<RUNPROG>" & SearchEngine & WordToLookup & "</RUNPROG>"
           GetResponse = GetResponse & "I don't know much about " & WordToLookup & ", but I will help you research it on the Web."
       End If
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

markofkane

I decided to rebuild off of the default brain after adding the 4 lines. She has to be retaught, but that's ok.
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Daireaux

I'm having the same issue with "who is" and "where is". This custom brain shown here also has some additional strings for internet research if Hal doesn't have an answer. Is this something to be copied into the 6.0.103 too?
Live long and prosper.

vrossi

#11
Hey, Daireaux, you are absolutely right!

The code you have seen in the markofkane post was in Hal 6.0 but I can't find it in the 6.0.103 version.

Last October I made this improvement to my version of Hal 5 and Robert included it in Hal 6.0 (see http://www.zabaware.com/forum/topic.asp?TOPIC_ID=2624 )

Now I really believe that Robert created the 6.0.103 starting from an earlier version of 6.0

However, you can add this useful function just changing the brain as follows (after the Dictionary function, add the four lines between my comments VR Begin and VR End):



WordToLookup = Trim(WordToLookup)
If WordToLookup <> "" And InStr(WordToLookup, " ") = 0 Then
  If WN.LookupWord(WordToLookup) = True Then
     GetResponse = GetResponse & WordToLookup & ": " & WN.GetDefinition(WN.GuessPartOfSpeech, 1, "D") & ". " & WN.GetDefinition(WN.GuessPartOfSpeech, 1, "S") & ". " & WN.GetDefinition(WN.GuessPartOfSpeech, 1, "E") & "." & vbCrLf & "<EXCLUSIVE>"
'VR Begin
  ElseIf SearchEngine <> "" Then
     HalCommands = HalCommands & "<RUNPROG>" & SearchEngine & WordToLookup & "</RUNPROG>"
     GetResponse = GetResponse & "I don't know much about " & WordToLookup & ", but I will help you research it on the Web."
  End If
'VR End
End If
HalBrain.DebugWatch GetResponse, "Definitions"



Robert, please, you should check all these things which have disappeared from 6.0.103 !




Vittorio
www.robotinfo.net

Daireaux

Hal has also asked me to define a word (self-aware), but I don't know how to teach him the definition of a new word that he doesn't know. Can we add to the wordnet database in such an event?
Live long and prosper.

Daireaux

p.s. I also don't see the vr begin and vr end functions in the 6.0.103
Live long and prosper.

vrossi

#14
As far as I know, you can't change the WordNet database from Hal. So the only option to define a new word is to give Hal the answer so that he will store it in his own database.

The 2 comments VR Begin and VR End are mine and mark the beginning and the end of my changes. I always do this, so that one can easily find what is changed from the original brain.

I attach here a print screen, so maybe it's easier to understand:



Vittorio
www.robotinfo.net