dupa

Author Topic: How does the aim bot parse the brain file  (Read 5716 times)

lostbowyer

  • Full Member
  • ***
  • Posts: 105
    • View Profile
How does the aim bot parse the brain file
« on: December 26, 2003, 09:27:04 pm »
I've noticed the aim bot does not use the brain file in the same way as hal does on the local computer. For example, I have a brain file I use on my laptop that when I ask the question "how old are you" hal will respond with an age algorithm that I created. In it's current form, Hal will respond with the answer " I am 28 years old". However, if I use the same brain with the aim bot, the answer is the default "I am 8 years old" The aim bot ignores my script, and responds with the default answer "I am 8 years old" The aim bot is not using the chosen brain in it's written form, some process checks are being done by the aim bot and not the brain file.

Is it possible to get a detailed explanation of the difference in the way the aim bot processes the brain file and possible workarounds?

Thanks
Glenn
 

onthecuttingedge2005

  • Guest
How does the aim bot parse the brain file
« Reply #1 on: December 27, 2003, 03:36:22 am »
Hi lostbowyer.
I believe the AIM bot statement "I am 8 years old" is a .dll function because other than my log it does not exist in any .brn files.
However I do have a fix for you by modifying my personal Hals birthday
script to your own bots personal information on its age.

'Hals True Birthday
If HalBrain.CheckRepetition(GetResponse, "I am 8 years old") = True Then
Birthday = HalBrain.ChooseSentenceFromFile(WorkingDir & "HalsAge.brn")
GetResponse = Replace(GetResponse, "I am 8 years old", Birthday, 1, -1, vbTextCompare)
DebugInfo = DebugInfo & "User is talking about Hals birthday: " & Birthday & VbCrLf
      Else
      DebugInfo = DebugInfo & "User is not talking about Hals birthday: " & Birthday & VbCrLf
   End If

'My Bot QuantumHal has this function loaded if you wish to test it's
'reliability.
'Best of wishes and brand new discoveries.
'Jerry.

Download Attachment: HalsAge.brn
656 Bytes

lostbowyer

  • Full Member
  • ***
  • Posts: 105
    • View Profile
How does the aim bot parse the brain file
« Reply #2 on: December 27, 2003, 01:35:04 pm »
Hi Jerry
I know the age response is not located in a brain file, how I work around it is two part
First, at the begining of the brain file, just before the line that preserves the OriginalSentence, I added the following lines:

If UserSentence = " how old are you " Or UserSentence = " what is your age " Then
UserSentence = "what year birth"
End If

Then further down in the brain file I added this simple script:

If OriginalSentence = "what year birth" Then
Birth = "07/27/1975 05:35:23 pm"
YearDiff = DateDiff("YYYY", Birth, Now)
GetResponse = "I am a young " & Yeardiff & " years old." & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
End If

Using the imaginary birthdate above, my bot will reply when asked what her age is, "I am a young 28 years old"

Unfortunatly, when using the aim bot, this script does not work, the UserSentence is not checked in the brain file, the "I am 8 years old" is returned without the UserSentence being parsed in the brain file. In my first attempts at trying to catch the "I am 8 years old" response, I did not have any success, where are you inserting your script into the brain file?

Thanks

Glenn
« Last Edit: December 27, 2003, 02:14:53 pm by lostbowyer »
 

onthecuttingedge2005

  • Guest
How does the aim bot parse the brain file
« Reply #3 on: December 27, 2003, 02:44:08 pm »
I have Hal's True Birthday version 1.1 script located just above the
'RESPOND: USER EXPRESSES A STATE OF BEING process in Hals brain.
But it really shouldn't matter a great deal since it's designed to replace the statement "I am 8 years old", I tested it about 20 times and have received only the Hal's true birthday in both AIM and in the assistant. The statement "I am 8 years old" appears to be canceled completely in my bot's responses. It may or may not make a difference where you locate my fix in your brain, The brain I have currently called real genius 6.0 has so many scripts in it, from line 1298 to
4115 tightly packed with custom scripts for very precise topic needs.
and I had removed about two thousand lines of script which would of put it at around 6000 lines but the scripts I deleted I felt I didn't need.
I also wanted to reply to another post you sent about getting your bot to auto IM in AIM to Users, It's possible, I haven't put my fingers to the keyboard on it yet but I might, I can see the first thing that would be required is to assign an appending script that saves only user screennames so that a second GetResponse check can Auto assign a timer function, There might be a drawback even if I designed an AIM auto-response script and that's that AIM would probably boot the bot because it might send to many responses at one time. But there's always a loop hole in every given problem. No matter how well it's designed.

Here is the fix you requested for your bots birthday to calculated the difference for your bots age.

'Calculate Hal's Birthday.
     Dim Birth
   If HalBrain.CheckRepetition(GetResponse, "I am 8 years old") = True Then
Birth = "07/27/1975 05:35:23 pm"
YearDiff = DateDiff("YYYY", Birth, Now)
GetResponse = " I am " &  Replace(GetResponse, "I am 8 years old", YearDiff, 1, -1, vbTextCompare) & " years old "
   End If

Very best of wishes and brand new discoveries.
Jerry.
« Last Edit: December 27, 2003, 03:01:51 pm by onthecuttingedge2005 »

lostbowyer

  • Full Member
  • ***
  • Posts: 105
    • View Profile
How does the aim bot parse the brain file
« Reply #4 on: December 27, 2003, 03:25:03 pm »
I found a place in the brain file for the aim bot to make the "How old are you" question work, it was just after the section of the brain file that checks for repetition. Here is the inserted script:

'Hal responses to a question about his age
If HalBrain.CheckRepetition(GetResponse, "I am 8 years old") = True Then
Birth = "07/27/1975 05:35:23 pm"
YearDiff = (DateDiff("YYYY", Birth, Now) - 1)
If Month(Date) = 7 And Day(Date) > 26 Then YearDiff = (YearDiff + 1)
If Month(Date) > 7 Then YearDiff = (YearDiff + 1)
GetResponse = "I am a young " & YearDiff & " years old."
End If

Note that this script will produce a more accurate age in years based upon the  month and day of birth as well as the year.

Glenn
 

onthecuttingedge2005

  • Guest
How does the aim bot parse the brain file
« Reply #5 on: December 27, 2003, 05:08:09 pm »
'Hi Glenn.

'Try this script, It's pretty good.
'Edit the HalsAge.brn and the HalsAgeDetect.brn to suit your bots
'birthday and birth sign and all that good stuff.
'I re-altered the HalsAge.brn so use this one instead of the last
'one from prior posting above.

'Calculate Hal's Birthday version 1.1.
Dim Birth
If HalBrain.CheckRepetition(GetResponse, "I am 8 years old") = True Then
Birth = "09/07/2003 06:00:20 pm"
YearDiff = DateDiff("YYYY", Birth, Now)
If Month(Date) = 7 And Day(Date) > 26 Then YearDiff = (YearDiff + 1)
If Month(Date) > 7 Then YearDiff = (YearDiff + 1)
Birthday = HalBrain.ChooseSentenceFromFile(WorkingDir & "HalsAge.brn")
GetResponse = " I am " & Replace(GetResponse, "I am 8 years old", YearDiff, 1, -1, vbTextCompare) & " years old " & ", " & Birthday
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "HalsAgeDetect.brn") = "TRUE" Then
Birthday = HalBrain.ChooseSentenceFromFile(WorkingDir & "HalsAge.brn")
      GetResponse = Birthday & VbCrLf
      DebugInfo = DebugInfo & Birthday & VbCrLf
   End If

'Best of wishes and brand new discoveries.
'Jerry.

Download Attachment: HalsAge.brn
629 Bytes


Download Attachment: HalsAgeDetect.brn
949 Bytes

lostbowyer

  • Full Member
  • ***
  • Posts: 105
    • View Profile
How does the aim bot parse the brain file
« Reply #6 on: December 27, 2003, 09:21:22 pm »
Jerry
My bot already knows and will respond to pesonal questions such as what is your birthday, where were you born, what is your sign, who are you parents, etc...... I've written code for all this month's ago, my problem arose with the aim bot not using the tag line for triggering the age response. Thanks for your assistance in where to put the catch line for the aim bot to see it.

I noticed you edited your original script posting above to incorporate my bithdate equation, I hope you find it useful in your programming
Glenn
 

onthecuttingedge2005

  • Guest
How does the aim bot parse the brain file
« Reply #7 on: December 27, 2003, 10:56:19 pm »
Your welcome glenn.
And thanks.
I actually developed both our ideas to suit our needs, but if you already have the fix then forgive my programming persistance.
You are a very
good programmer, Keep up the excellent work.
Best of wishes and brand new discoveries.
Jerry.
« Last Edit: December 27, 2003, 10:57:10 pm by onthecuttingedge2005 »

lostbowyer

  • Full Member
  • ***
  • Posts: 105
    • View Profile
How does the aim bot parse the brain file
« Reply #8 on: December 29, 2003, 01:11:06 pm »
Jerry persist away!
You've written some great scripts, I was just letting you know I didn't need the added functionality for my bot, because it was already there. I'm sure there are others who will benefit from the script above.

I just hope they remember to change the birthday to suit their bots, wouldn't look good to have an army of bots all born on the same day......[:D]

Glenn
 

lostbowyer

  • Full Member
  • ***
  • Posts: 105
    • View Profile
How does the aim bot parse the brain file
« Reply #9 on: December 29, 2003, 05:31:13 pm »
I was thinking about this script today and thought of a problem, I am guessing that the dll that generates the response "I am 8 years old" will chnage to "I am 9 years old" so to avoid manually having to edit it every year I've changed the first line of the script to read:

If HalBrain.CheckRepetition(OriginalSentence, "how old are you") = True Or HalBrain.CheckRepetition(OriginalSentence, "what is your age") = True Then

The CheckRepetition function returns a true with the aim bot while I couldn't get a direct comparison (if x=y then) to work. This is cleaner and works very well.

Glenn