dupa

Author Topic: Scripts, addins, and extras  (Read 23800 times)

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Scripts, addins, and extras
« Reply #30 on: May 05, 2005, 08:12:02 pm »
Without causing any offense I would seriously hesitate and EDIT the common knowledge files before allowing Hal to "read" them.

Thay contain anything but common knowledge. Person's names, slang, numerous misspellings, the overuse of I and many other wrongful statements will likely make Hal anything but smarter!

Caveat emptor
« Last Edit: May 27, 2005, 08:42:33 am by Art »
In the world of AI it's the thought that counts!

- Art -

HALImprover

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
    • BrianTaylor.me
Scripts, addins, and extras
« Reply #31 on: May 06, 2005, 04:22:54 am »
I suggest using the auto-idle method to get Hal to learn the new knowledge (setting the increment value to a suitable number so that Hal will be finished processing the previous sentence before starting the next one).
I wouldn't suggest having Hal digest the knowledge directly. It must be filtered for nonsensical remarks, spatial statements, situational statements, etc.
Try this for filtering:

If InStr(DBLtestlearn, "Another way to say " & Chr(34)) > 0 Or InStr(DBLtestlearn, "Spatial concept:") > 0 Or InStr(DBLtestlearn, "The statement " & Chr(34)) > 0 Or InStr(DBLtestlearn, "The story " & Chr(34)) > 0 Or InStr(DBLtestlearn, "In the event ") > 0 Or InStr(DBLtestlearn, "Something that might happen") > 0 Or InStr(DBLtestlearn, "To understand the event") > 0 Or InStr(DBLtestlearn, "Situation:") > 0 Or InStr(DBLtestlearn, "Things that are often found together are:") > 0 Or InStr(DBLtestlearn, "Picture description:") > 0 Or (InStr(DBLtestlearn, "topic") > 0 And InStr(DBLtestlearn, "contains") > 0) Or IsNumeric(Mid(DBLtestlearn, 1, 1)) = True Then

It will take care of most of the useless reponses, such as;
'The statement "people use some animals to make food for people" is true because vegetarians would have you believe meat is murder, but it is not.'

BTW If anyone is interested, I downloaded the knowledge I am posting from;
http://commonsense.media.mit.edu/cgi-bin/download.cgi

Happy coding [:)]
Living life with a loving heart, peaceful mind, and bold spirit.

FuzzieDice

  • Guest
Scripts, addins, and extras
« Reply #32 on: May 08, 2005, 01:22:04 pm »
quote:
Originally posted by HALImprover

It will take care of most of the useless reponses, such as;
'The statement "people use some animals to make food for people" is true because vegetarians would have you believe meat is murder, but it is not.'


Just to point out (and I realize you were actually quoting above so I'm not saying this directly to you :)) SOME vegans (those that avoid ALL animal products, INCLUDING diary and egg) don't believe that. Or I'm the only one. I'm vegan due to health reasons (I have problems eating anything that came from animals for some reason). But animals eat animals in the wild, and it's no surprise people would eat animals. So that part doesn't upset me, personally.

Interseting piece of code however. I've yet to start digging into hal's brain, but I too noticed some of teh 'nonsensical' responses and wondered how to fix those. I might try this.

trfroggatt

  • Newbie
  • *
  • Posts: 6
    • View Profile
Scripts, addins, and extras
« Reply #33 on: May 27, 2005, 05:49:23 am »
Dear HALImprover

I would really like to use your readfile utility (I am using Hal default 5 brain), other people seemed to have asked but not received a response:-

Where do you put the script code ? is it in the brain editor script window ? as if so where in the brain script ?

OR in a .brn file (as one reader suggests)

I am working on a command to create and add to text files, such as todo lists, shopping lists etc, I wish to use your readfile utility to get HAL to read the contents on these lists and I will also create a command to delete list entries.

Regards

Trev
 

HALImprover

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
    • BrianTaylor.me
Scripts, addins, and extras
« Reply #34 on: May 28, 2005, 02:06:45 am »
Yes, you do add it into the brain script. I haven't used the original brain script in a while, but I would suggest putting the addin code in the script right after this part;

   'Main Databases
   'Hal will go through several huge databases to try to find a response
   'The automatic gain control determines whether a particular response will
   'be used or not. The highest relevance response is stored in memory anyway,
   'which might be used if no function in this script is able to respond.
   HighestRel = 0
   HighestRelResponse = ""
 

that way the response will hopefully not be overwritten by another function in the brain script.

As far as using the code to read a list, it only selects a random entry in the text files you have Hal read. So you won't be able to read in a list using the code I posted. If you plan on having Hal maintain a list (for to-do items, groceries, etc.) that will be modified, I would suggest waiting until Mr. M. releases his new version of Hal because it will use databases, which are better suited at handling dynamic data and lists.

Good luck with your projects! [:)]
Living life with a loving heart, peaceful mind, and bold spirit.

Dr.Benway

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Scripts, addins, and extras
« Reply #35 on: May 28, 2005, 04:39:26 am »
quote:
Originally posted by HALImprover

... I would suggest waiting until Mr. M. releases his new version of Hal because it will use databases, which are better suited at handling dynamic data and lists.



How do you know something like that, HALimprover?

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Scripts, addins, and extras
« Reply #36 on: May 28, 2005, 09:59:00 am »
Raymond,

I believe it was just prior to your joining the forum that Robert M., enlisted the aid of a third party to design a completely new HAL. This new HAL version is supposed to run from a database which should be a vast improvement over how the current version handles inquiries.

That's what my previous topic was referring to when I asked for an ETA (Estimated Time of Arrival) or projected completion date.

Backward compatible with any existing brain files? Don't know yet.

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

- Art -

HALImprover

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
    • BrianTaylor.me
Scripts, addins, and extras
« Reply #37 on: May 30, 2005, 12:47:41 am »
quote:
The next version of Hal will have reverse compatability with current brains and the current system of text based .brn files. The new default brain however will appear vastly different, but should be easy to pickup for current vbscript brain programmers. Script control will be given for Hal's appointment functions and program launcher. A lot of the complexity of the current script will be moved into the database and dll without sacrificing user control.


I got that from a post by Mr. M. on 1/28/2005:

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

Happy coding [:)]
Living life with a loving heart, peaceful mind, and bold spirit.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Scripts, addins, and extras
« Reply #38 on: May 30, 2005, 07:57:32 am »
Thanks Halimprover!

I couldn't place the exavt time nor was I able to locate the topic.

A current progress posting would be nice to read.

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

- Art -

Dr.Benway

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Scripts, addins, and extras
« Reply #39 on: May 30, 2005, 09:15:43 am »
Thanks HalImprover, Art! I thought I had read everything on this server by now, but I apparently overlooked this page.

ANDYC

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • http://www.andyc.biz
Scripts, addins, and extras
« Reply #40 on: January 29, 2006, 11:43:58 am »
Hey guys,
this seems like a great plugin but i have Hal 6. Is there a way to intergrate this into Hal 6???
ANDYC