dupa

Author Topic: General Knowledge plug in.  (Read 5772 times)

echoman

  • Guest
General Knowledge plug in.
« on: September 18, 2005, 03:12:39 am »
Hello

I am trying to install general knowledge plug. I have latest download of Hal (full version) Installation read-me says this -

INSTALLATION INSTRUCTIONS
1) Copy the "XTF_SYS_GeneralInfo.brn" file into the "Ultra Hal Assistant 5  DefBrain" directory.

2) Cut and paste the script in the "GENERAL & TRIVIAL KNOWLEDGE FUNCTION.txt" file into your XTF Brain v1.2 "hal5_XTF_v1.2.uhp" file. Ideally it should be placed below the "RESPOND: CALL CAPITALS FUNCTIONS" function and above the "RESPOND: DICTIONARY FUNCTION" function.


Point 1 was very easy. In point 2, I cannot find 'XTF Brain v1.2 "hal5_XTF_v1.2.uhp"' file. I have also done a search using agent ransack for 'RESPOND: CALL CAPITALS FUNCTIONS' and 'RESPOND: DICTIONARY FUNCTION' hoping that would highlight the file.

Can anyone help.

Thankyou

echo.

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
General Knowledge plug in.
« Reply #1 on: September 18, 2005, 10:52:35 am »
The XTF brain is a seperate brain created for Hal by Scott Higgins.
You can download it from the home page of Zabaware. You will have to look around for it, but it is there.
Bill
 

echoman

  • Guest
General Knowledge plug in.
« Reply #2 on: September 18, 2005, 12:39:33 pm »
Thankyou for the help

spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
General Knowledge plug in.
« Reply #3 on: October 13, 2005, 11:45:08 am »
the file is located in the zipfile downloadable off this site.

first install the plugin... xtf 1.0

then copy the contents of the updated patch in to the hal directory,
overwriting any existiing files

select from the menu

Dr.Benway

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
General Knowledge plug in.
« Reply #4 on: October 13, 2005, 12:28:41 pm »
Great to know you are still out there, Spydaz!

axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
General Knowledge plug in.
« Reply #5 on: November 09, 2005, 11:03:33 am »
Hi, I just bought hal recently and I am trying to add the trivial knowledge patch too. I got the  Ultra Hal 5 XTF v1.0 (eXtended Topic Focus) fromt the site. I exatracted the brn file...

The readme says:

3) Turn on Hal and ask, "What can you tell me about dogs and cats?". Hal should give an answer mentioning "relevance" and include some thought about dogs and/or cats.

Well I ask hal:

What can you tell me about dogs and cats?

Hal's answer:

Each species has its strengths.


Since I did not get an answer mentioning "relevance" and include some thought about dogs and/or cats. does this mean that I its not working.

I pasted the script where the instrustiond told me to.
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
General Knowledge plug in.
« Reply #6 on: November 09, 2005, 03:36:58 pm »
You really should install the XTF 1.2 patch next. It's a very good brain.
In the world of AI it's the thought that counts!

- Art -

axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
General Knowledge plug in.
« Reply #7 on: November 10, 2005, 06:54:07 am »
quote:
Originally posted by Art

You really should install the XTF 1.2 patch next. It's a very good brain.



Well this is the only one that I saw on the zabaware site that was made by by Scott Higgins. There are only six brain plug-ins. If I am looking in the wrong place, then would somebody give me a link. Thanks.
 

Dr.Benway

  • Hero Member
  • *****
  • Posts: 554
    • View Profile

axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
General Knowledge plug in.
« Reply #9 on: November 12, 2005, 09:16:55 am »
Thank you for the link. I donwnloaded and installed it and thehn went on to install the general and trivial knowledge brain plug in and asked the same question...

What can you tell me about dogs and cats?

And still I got no reply mentioning relevance. Am I doing something wrong here?

I pasted the script in right after the RESPOND: CALL CAPITALS FUNCTIONS and bfore the RESPOND: DICTIONARY FUNCTION in the script:

'RESPOND: CALL CAPITALS FUNCTIONS
   'These 2 functions answer questions about US and World Capitals. The functions are built in to the DLL.
   'We add a qualifying word to reduce false triggering of these two functions.
   If InStr(UserSentence, "WHAT") > 0 Or InStr(UserSentence, "WHERE") > 0 Then
      If Len(HalBrain.USCaps(UserSentence)) > 4 Then
         Capitals = Trim(HalBrain.USCaps(UserSentence))
      End If
      If Len(HalBrain.WorldCaps(UserSentence)) > 4 Then
         Capitals = Trim(HalBrain.WorldCaps(UserSentence))
      End If
'=vonsmith= Added GetResponseBlock
      If Capitals <> "" And GetResponseBlock <> True Then
         GetResponse = GetResponse & Capitals & " . " & VbCrLf
         DebugInfo = DebugInfo & "The user was asking about a capital and Hal has given him the answer: " & Capitals & VbCrLf
      End If
   End If
   
'The "RESPOND: CALL CAPITALS FUNCTIONS" function should precede this.


'XTF Brain v1.4 Related Start
'x=x=x=x=x=x=x=x==vonsmith==x=x=x=x=x=x=x=x=x
'PROCESS: HAL "GENERAL & TRIVIAL KNOWLEDGE" FUNCTION
'(c) 2004 Scott Higgins. Portions of this script are copyright by Scott Higgins, aka: =vonsmith=
'This script shall not be sold or used for any purpose unless specifically authorized by the author
'in writing. Personal (non-business) use of this script is free for users of Ultra Hal Assistant.
'This is an entirely new function written by =vonsmith= , version 12-14-04a.
'
'This function searches a general knowledge and trivia file for information relevant to the user's request.
'
If (InStr(1, UserSentence, " WHAT CAN I TELL YOU ABOUT ", vbTextCompare) > 0 Or InStr(1, UserSentence, " WHAT ELSE CAN I TELL YOU ABOUT ", vbTextCompare) > 0 Or InStr(1, UserSentence, " WHAT ELSE DO I KNOW ABOUT ", vbTextCompare) > 0 Or InStr(1, UserSentence, " WHAT DO I KNOW ABOUT ", vbTextCompare) > 0 Or InStr(1, UserSentence, " TELL YOU SOMETHING ABOUT ", vbTextCompare) > 0 Or InStr(1, UserSentence, " TELL YOU SOMETHING ELSE ABOUT ", vbTextCompare) > 0) And GetResponseBlock <> True Then
   InfoStart = 0
   InfoStart = InStr(1, UserSentence, " ABOUT ", vbTextCompare) + Len(" ABOUT ")
   InfoEnd = Len(UserSentence)
   InfoRequest = Mid(UserSentence, InfoStart, (InfoEnd - InfoStart))  'Extract requested info phrase.
   InfoRequest = " " & HalBrain.AlphaNumericalOnly(InfoRequest) & " "
   HalInfoBrain = HalBrain.QABrain(InfoRequest, WorkingDir & "XTF_SYS_GeneralInfo.brn", InfoBrainRel)

   If InfoBrainRel > 15 And InfoBrainRel < 25 Then
      GetResponse = " You might not think this is relevant. " & HalInfoBrain & VbCrLf
      GetResponseBlock = True
      BlockPrevTopicSave = True
      DebugInfo = DebugInfo & "The user was requesting Hal to recall general or trivial knowledge and Hal has done so: " & HalInfoBrain & VbCrLf
   ElseIf InfoBrainRel > 24 And InfoBrainRel < 45 Then
      GetResponse = " I think this may be relevant. " & HalInfoBrain & VbCrLf
      GetResponseBlock = True
      BlockPrevTopicSave = True
      DebugInfo = DebugInfo & "The user was requesting Hal to recall general or trivial knowledge and Hal has done so: " & HalInfoBrain & VbCrLf
   ElseIf InfoBrainRel > 44 Then
      GetResponse = " This seems very relevant. " & HalInfoBrain & VbCrLf
      GetResponseBlock = True
      BlockPrevTopicSave = True
      DebugInfo = DebugInfo & "The user was requesting Hal to recall general or trivial knowledge and Hal has done so: " & HalInfoBrain & VbCrLf
   Else
      GetResponse = " Sorry, I can't think of anything relevant. " & VbCrLf
      BlockPrevTopicSave = True
      DebugInfo = DebugInfo & "The user was requesting Hal to recall general or trivial knowledge and Hal has done so: " & HalInfoBrain & VbCrLf
   End If
   BlockSave = True
End If
'x=x=x=x=x=x=x=x==vonsmith==x=x=x=x=x=x=x=x=x
'XTF Brain v1.4 Related End


'The "RESPOND: DICTIONARY FUNCTION" function should follow this.

   'RESPOND: DICTIONARY FUNCTION
   'If the user asks Hal to define a word, then access wordnet and define it
       If WordToLookup = "" Then WordToLookup =
       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)
---------------------------------------------------------------------

I should get a respond about relevance when I have this installed right?
 

Dr.Benway

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
General Knowledge plug in.
« Reply #10 on: November 12, 2005, 11:23:01 am »
Axyse, the only person likely to know the answer to your question is Vonsmith himself. Although he has posted a lot more than anyone else on this forum he is currenly M.I.A. I think that Vonsmith ment this test to be run with a fresh installation of HAL. I am not sure if you tried that.
Personally I don't think that the fact that your HAL gives a different answer means that the XTF-brain is not working properly.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
General Knowledge plug in.
« Reply #11 on: November 12, 2005, 01:37:39 pm »
axyse,

During past conversations with Scott (vonsmith), he indicated that a lot of errors can be caused from using the cut / paste method.

Depending on the text editor spaces have a way of creeping into the script and these can and will cause problems.

Check to compare the original script to what ends up being pasted into your brain file(s).

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

- Art -

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
General Knowledge plug in.
« Reply #12 on: November 12, 2005, 02:23:20 pm »
Well said Art. I noticed that if I used notepad I always got extra junk inserted into my brains so I switched to Wordpad and always saved the output as a *.txt document. Haven't had any problems since except for maybe a typo or two which were very easy to correct.
Bill [8]
 

axyse

  • Newbie
  • *
  • Posts: 35
    • View Profile
General Knowledge plug in.
« Reply #13 on: November 13, 2005, 08:12:44 am »
Maybe I misworded my post. I downloaded and installed hal5_XTF_v1 from zabaware to my hal from a fresh install. Then I downloaded the 200422923615_hal5_XTF_v1.2 frim the link that Dr.Benway gave me in this forum. Then I got the trivial knowledge plug in and the instructions state...

INSTALLATION INSTRUCTIONS
1) Copy the "XTF_SYS_GeneralInfo.brn" file into the "Ultra Hal Assistant 5  DefBrain" directory.

2) Cut and paste the script in the "GENERAL & TRIVIAL KNOWLEDGE FUNCTION.txt" file into your XTF Brain v1.2 "hal5_XTF_v1.2.uhp" file. Ideally it should be placed below the "RESPOND: CALL CAPITALS FUNCTIONS" function and above the "RESPOND: DICTIONARY FUNCTION" function.

3) Turn on Hal and ask, "What can you tell me about dogs and cats?". Hal should give an answer mentioning "relevance" and include some thought about dogs and/or cats.

This is why I am expecting a reply stating something about relevence. I simply want to know if I did this right or if it is working properly
and the documentation says that hal should state something about relevence.
« Last Edit: November 13, 2005, 08:15:52 am by axyse »
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
General Knowledge plug in.
« Reply #14 on: November 13, 2005, 09:21:29 am »
By relevance, it might say something like, "I see the connection." or "I understand." or "I got that." or something of a similar nature.
This is usually done by using an IF THEM statement.

If you just asked HAL about dogs and cats, it should have responded with a phrase mentioning dogs or cats in its answer.

HAL does take in everything you say or type and like most bots, takes time to develop.

You might want to wait for the final release of version 6 as it promises to be a far better, more responsive bot than its predecessors.
In the world of AI it's the thought that counts!

- Art -