Author Topic: How can i alter the .brn files?  (Read 4944 times)

gamplyer1

  • Newbie
  • *
  • Posts: 1
    • View Profile
How can i alter the .brn files?
« on: June 16, 2003, 02:18:01 pm »
I would like to change some of the things hal says and the way he says them but i don't know how to get into the .brn files where all that is stored.  Can someone please help me?
 

Rich_A

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
How can i alter the .brn files?
« Reply #1 on: June 17, 2003, 02:43:00 am »
The .brn files are located in the DefBrain Folder or any other Brain Folder that you may have that your Hal uses. You can directly access .brn files by opening Windows Explorer and then open My Computer and then C:/Program Files/Zabaware/Ultra Hal Assistant 4/DefBrain. After you open the DefBrain Folder you will see all the .brn files. I don't recommend opening up a .brn file until you have consulted with someone about it or researched the topic first, especially if you are new to the Hal Program. Just making one small error while directly modifying a .brn file using a text editor like Notepad can inadvertently cause your Hal program to stop functioning. It is very easy to make an error without even realizing it. Some spaces and blanks within a .brn file are part of the file's format and this is the part that is very easy to mess up! I would recommend creating a new brain with the Brain Editor first and then carefully experiment with the new brain that you created. I replied to an email that you sent me, but I don't know if you have any prior programming experience. However, I am willing to help you along with the learning process if optimizing Hal's responses is what you want to do. Hopefully others at the forum can help you with other programming issues especially with VB Scripting. I don't know too much about VB Scripting but I am experienced in programming and Natural Language Processing and Concepts. See the below it is the email response that I sent to you.
 

Rich_A

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
How can i alter the .brn files?
« Reply #2 on: June 17, 2003, 02:54:25 am »
Hello Gamplyer1,

This email is in response to your inquiry concerning what can go wrong when modifying .brn files in the Hal Brain Database.

I modify the .brn files by opening them up with Notepad as my text editor.

The two key points are maintaining the file's format and the file's pattern. Other issues apply as well, but for now I will just try to stick to briefing you on the format and pattern issues. Some of what I am going to tell you is already addressed within the forum, but I know that it is almost impossible find everything that you want to read and know about in a forum setting.

The best way to describe this stuff is by example:

The following is the last few lines at the very end of one of my brain files named Richieconvresp.brn:

@You will you promise!
 RICHIE MY ONE ONLY MAN
@Good Bye!
 HOW FILLINGS ADHERE TEETH
(one blank line at end of file)

The "one blank line at end of file" in parenthesis is not actually written out that way, I just put that there to demonstrate the point. However, there is actually one blank line at the end of this file. If I were to remove this blank line by backspacing the cursor up to the end of the pervious line or if I just hit return and added a second blank line, Hal will then fail to operate once it tries to access this improperly formatted file. The Hal program will automatically close up and shutdown, and then the next time I try to start Hal it will report a pervious improper shutdown which may be the result of a nonfunctioning plug-in. All these problems because of one lousy blank line...yes...but it because the file needs to be formatted to a certain pattern.

The Hal program uses patterns to operate and run. The pattern is part of the file format that Hal needs to function properly. In Hal's world, patterns are the air that he needs to live and breathe. Patterns are also what makes Natural Language Processing possible. Hal uses pattern recognition and pattern matching to simulate Artificial Intelligence.

In this example the lines that begin with a "@" are Hal's responses. For this particular file every one of Hal's responses must begin with a "@" symbol.

Also, in this example the lines with all capital letters are keywords used to associate to the corresponding response above it. In this particular file, all the keyword lines begin with a blank as the first character of the line. You need that blank character for things to work, and also all the keywords need to capitalized as well. Just follow the pattern and if you don't...OH NO!

For this example I just gave, all applies for this particular file. For other .brn files other rules may apply. It's all about maintaining the format and pattern for whatever file you happen to be working with. In some cases some file patterns will be opposite of everything I just told you (ex. Responses are in capital letters and keywords are lower case). It can be confusing so just try to follow the pattern and always save a copy of whatever file you are going to work on prior to the modifications that you make to it. Copy the file to My Docs or a temp folder so that you can restore it back if Hal fails to operate after you modify a .brn file.

Well, that's it for now, but if you want to know some more about of this stuff send me another email. I'll be more than happy to bounce some ideas back and forth with you.
I can tell you some more about what to try to further optimize Hal's response's when you speak to him.

Best Regards,
           Rich A.
ricramo@aol.com
 

Morkeleb

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
How can i alter the .brn files?
« Reply #3 on: June 29, 2003, 11:27:43 pm »
Believe me when he says you need to keep the pattern you do![:0] Or It will corupt the brain and you will have to start over.[xx(] If you make any changes make backup copy of file first. Then if it doesn't work you can replace the new with the old again.
Ask and you shall learn
Be not afraid to try new things.
----------------------
Check out www.cold-chaos.net