Author Topic: Don't like the invalid frame errors???  (Read 3070 times)

Larry

  • Sr. Member
  • ****
  • Posts: 266
    • View Profile
Don't like the invalid frame errors???
« on: September 14, 2003, 06:07:49 pm »
Don't like the invalid frame errors???

How would you like to have new logs created every day???

Do you use DeBugMode a lot???

You want a regular log and a different one for DeBugMode???

Ok... look for this in your brain (hal5.uhp) Hopefully you made a backup of your brain before you mess with it...

Ok, look for this in your brain, it's almost at the end of the script...
   'POST PROCESS: SAVE HAL'S RESPONSE
   PrevSent = GetResponse

   'POST PROCESS: PRESERVE ALL VARIABLES
   'Remember all the variables through encoding them into one function string using
   'the DLL, since for some reason ByRef assignments don't work when a Visual Basic
   'executable is calling a function in a VBScript program.
   PrevUserSent = UserSentence
   GetResponse = HalBrain.FixCaps(HalBrain.HalFormat(GetResponse))
   If DebugMode = True Then
      GetResponse = "Hal's Response: " & GetResponse & vbCrLf & DebugInfo
   End If

That's what it looks like before you mess with it... now change it to look like this...
   'POST PROCESS: SAVE HAL'S RESPONSE
   PrevSent = GetResponse
   yyear = Right(date,4)
   ddate = Left(date,Len(date)-5)
   mmonth = Left(ddate,2)
   If InStr(mmonth, "/") >1 then
      mmonth = left(ddate,1)
      mmonth = "0" & mmonth
      ddate = right(ddate,Len(ddate)-2)
   Else
      ddate = right(ddate,Len(ddate)-3)
   End If
   dday = ddate
   If Len(dday) < 2 then dday = "0" & dday
   ddate = yyear & mmonth & dday
   AnswerSent = UserName & " said: " & Trim(OriginalSentence)
   AnswerSent = HalBrain.FixCaps(HalBrain.HalFormat(AnswerSent))
   QuestionSent = Time & " I said: " & Trim(GetResponse)
   QuestionSent = HalBrain.FixCaps(HalBrain.HalFormat(QuestionSent))
   HalBrain.AppendFile WorkingDir & "!Log" & ddate & ".txt", AnswerSent & vbCrLf & QuestionSent & vbCrLf
   If DebugMode = True Then
      HalBrain.AppendFile WorkingDir & "!DeBugLog" & ddate & ".txt", AnswerSent & vbCrLf & QuestionSent & vbCrLf
      DebugInfo = DebugInfo & "Last LearningLevel: " & LearningLevel & vbCrLf
      DebugInfo = DebugInfo & "Last LearningLevelA: " & LearningLevelA & vbCrLf
      HalBrain.AppendFile WorkingDir & "!DeBugLog" & ddate & ".txt", DebugInfo & vbCrLf
   End If

   'POST PROCESS: PRESERVE ALL VARIABLES
   'Remember all the variables through encoding them into one function string using
   'the DLL, since for some reason ByRef assignments don't work when a Visual Basic
   'executable is calling a function in a VBScript program.
   PrevUserSent = UserSentence
   GetResponse = HalBrain.FixCaps(HalBrain.HalFormat(GetResponse))
   If DebugMode = True Then
      'GetResponse = "Hal's Response: " & GetResponse & vbCrLf & DebugInfo
   End If

The last line - if debugmode etc then 'getresponse ="Hal's response:
Notice how it is here that they add the debuginfo to the getresponse??? Well, I kinda wanted to keep my jokes working in debugmode, but with the debuginfo in there like that, the jokes couldn't be debugged... now they can...

Good luck guys!
« Last Edit: September 14, 2003, 06:10:08 pm by Larry »
 

Larry

  • Sr. Member
  • ****
  • Posts: 266
    • View Profile
Don't like the invalid frame errors???
« Reply #1 on: September 15, 2003, 04:55:04 am »
This creates 2 files:
!DeBugLog20030914.txt and
!Log20030914.txt the format is 2003 = year 09 = month 14 = day
So as long as you use your hal every day, a new log will be created every day. The DeBugLogxxxxxxxx.txt won't be created unless you go into DeBug mode.

The regular log will look like this - even when you're using the AimBot:
Larry said: Better health care means more elderly people.
12:48:46 pm I said: Young people tend to have more health and energy but less material wealth.

Larry said: Body sculpting by surgery has become very socially acceptable.
12:57:06 pm I said: Shakespeare wrote a very large body of material.

Larry said: Breakfast cereal is now a health food.
1:12:05 pm I said: I ask youDo you know a lot about philosophy?

Larry said: I know nothing about philosophy!
1:15:02 pm I said: The scare stories about Canada's health care system seem a bit exaggerated.

Larry said: Broccoli have all sorts of vitamins and minerals.
1:18:20 pm I said: I ask you How tall are you?

Notice, their are no invalid frame errors listed???

Your debuglog will look like this:
Larry said: 'Complicated' is one of my favorite songs.
4:14:44 pm I said: I like the singer Lonestar. 'Not a Day Goes By' is one of my favorite songs.
Debug Information:::
User's sentence as we see it: 'COMPLICATED' IS ONE OF YOUR FAVORITE SONGS
A new smalltalk keyword has been found and has been made the current subject: 'COMPLICATED'
PROCESS: POST INITILIZE VARIABLES:::
A response of relevance 38 was found in the current user topic focus file and this response has been used.I like the singer Lonestar. 'Not A Day Goes By' is one of my favorite songs.
Hal will not use the response from the OriginalBrain function, which would have been:  Is it really?
shared_usersent.brn has returned "Why should one person or group get favorite treatment?" which had a relevance of 39 which was compared to 93. Hal has decided not to use this sentence.
[user]usersent.brn has returned "" which had a relevance of 1 which was compared to 93. Hal has decided not to use this sentence.
MainBrain.brn has returned "It's so nice licking an ice cream cone." which had a relevance of 64.90475 which was compared to 54. Hal has decided not to use this sentence.
Auto gain control increased by 7 to 60
Hal will not respond with the [user]user_strings.brn file which would have said:
The Enhanced_strings.brn has come up with this response, which will not be used:
The current smalltalk word is 'COMPLICATED'
Hal will not use the smalltalk word in randomly chosen sentence, which would have been: Do left-handed people have just as much success with 'COMPLICATED'?
Hal will not respond using the CheatResponse function which would have said: I don't think so.
Hal will not respond using subject/predicate assembly.
The highest relevance responsee has a rating of 64.90475 and is "It's so nice licking an ice cream cone." Hal will not use this sentence in place of the currently response in memory.

There's a lot of info packed in there, but you can follow hal's reasoning, and if you don't like how he gets his answers, you can CHANGE it!

Good Luck!