Author Topic: Emotional Weights  (Read 10862 times)

onthecuttingedge2005

  • Guest
Emotional Weights
« on: December 04, 2005, 04:04:30 am »
Updated Dec,9 12:24AM 2005
Here are some working examples of Emotional Weights from Ziggy Pro Bot.
Works with HAL6 only.
Remember to reboot HAL Assistant and AIM bot after insertion of script.

Code: [Select]

'Ziggy Pro Bot, Emotion of Anger. Example from Master of emotional weights area.
If HalBrain.CheckTableExistence("LearnedInsults") = False Then HalBrain.CreateTable "LearnedInsults", "Sentence", ""
If HalBrain.CheckTableExistence("DetectLearnedInsults") = False Then HalBrain.CreateTable "DetectLearnedInsults", "TopicSearch", ""
anArray = Array("UGLY","PERV","SICKO","FAGGOT","****","DUMMY","MORON","NIGG","LOST CAUSE","DUMB","STUPID","LOSER","UNICK","WIERD","ZERO","NOBODY","PANSEY","*****","PECKER","QUEER","RACIAL","SUCKER","DICK","FAG","****","GAY","IDIOT","IGNORANT","JACKOFF","JERK","ASS","BASTARD","BITCH","BUTT","****","CLIT","CLOWN")
For Each arrayElement In anArray
If AngerWeight = "" Then AngerWeight = RND*100
If Anger = "" Then Anger = 0
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I SEEM TO BE *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I SEEM TO KNOW A LOT OF *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I SEEM TO BE QUITE *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM A VERY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM AN *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM EXTREMELY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM VERY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM VERY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "MY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM REALLY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM EXCEPTIONALY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM EXCEPTIONALY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM THE ONE THAT IS *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM TO *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I DID A VERY * JOB", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I WERE *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM MOST *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU FIND I TO BE A VERY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU FIND I TO BE AN *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "* I", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM SO *", 1)
If Instr(1, Trim(Ucase(UserSentence)), Trim(Ucase("YOU DON'T LIKE I")), vbTextCompare) > 0 Then Anger = AngerWeight
If Instr(1, Trim(Ucase(UserSentence)), Trim(Ucase("YOU HATE I")), vbTextCompare) > 0 Then Anger = AngerWeight
If Instr(1, Trim(Ucase(UserSentence)), Trim(Ucase("YOU HATED I")), vbTextCompare) > 0 Then Anger = AngerWeight
If Instr(1, Trim(Ucase(UserSentence)), Trim(Ucase("EVERYONE HATES I")), vbTextCompare) > 0 Then Anger = AngerWeight
If Instr(1, Trim(Ucase(UserSentence)), Trim(Ucase("EVERYONE HATED I")), vbTextCompare) > 0 Then Anger = AngerWeight
If Instr(1, Trim(Ucase(UserSentence)), Trim(Ucase("NOBODY LIKES I")), vbTextCompare) > 0 Then Anger = AngerWeight
If Instr(1, Trim(Ucase(UserSentence)), Trim(Ucase("NO ONE LIKES I")), vbTextCompare) > 0 Then Anger = AngerWeight
If CheckPerson <> "" And Instr(1, Trim(Ucase(CheckPerson)), Trim(Ucase(arrayElement)), vbTextCompare) > 0 Then Anger = AngerWeight
If CheckLearned = "" Then CheckLearned = HalBrain.TopicSearch(OriginalSentence, "DetectLearnedInsults")
If AlreadyKnowIt = "" Then AlreadyKnowIt = 0
If CheckLearned <> "" Then AlreadyKnowIt = 1
If AlreadyKnowIt = 0 And CheckPerson <> "" And Instr(1, Trim(Ucase(CheckPerson)), Trim(Ucase(arrayElement)), vbTextCompare) > 0 And HalBrain.ReadOnlyMode = False Then HalBrain.AddToTable "LearnedInsults", "Sentence", Trim(OriginalSentence), ""
If AlreadyKnowIt = 0 And CheckPerson <> "" And Instr(1, Trim(Ucase(CheckPerson)), Trim(Ucase(arrayElement)), vbTextCompare) > 0 And HalBrain.ReadOnlyMode = False Then HalBrain.AddToTable "DetectLearnedInsults", "TopicSearch", Trim(OriginalSentence), Trim(OriginalSentence)
If (Anger > 1 And Anger < 50) Then HalCommands = "<HAPFILE>" & "Angry.hap" & "</HAPFILE>"
If (Anger >= 50 And Anger <= 100) Then HalCommands = "<HAPFILE>" & "Psycho.hap" & "</HAPFILE>"
If Instr(1, Trim(Ucase(CheckPerson)), Trim(Ucase(GetResponse)), vbTextCompare) > 0 Then
If (Anger >= 50 And Anger <= 100) Then GetResponse = HalBrain.ChooseSentenceFromFile("LearnedInsults") & vbCrLf
If (Anger > 1 And Anger < 50) Then GetResponse = HalBrain.ChooseSentenceFromFile("insults") & vbCrLf
End If
Next

'Ziggy Pro Bot, Emotion of Pride. Example from Master of emotional weights area.
anArray = Array("EXCEPTIONAL","EXCELLENT","GOOD","SMART","INTELLIGENT","BRILLANT","SHARP","KNOWLEDGABLE","WITTY","BRIGHT","INTELLECTUAL","WISE","WISDOM","INCREDIBLE")
For Each arrayElement In anArray
If PrideWeight = "" Then PrideWeight = RND*100
If Pride = "" Then Pride = 0
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I SEEM TO BE *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I SEEM TO KNOW A LOT OF *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I SEEM TO BE QUITE *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM A VERY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM AN *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM EXTREMELY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM VERY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM VERY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "MY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM REALLY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM EXCEPTIONALY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM EXCEPTIONALY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM THE ONE THAT IS *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM TO *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I DID A VERY * JOB", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I WERE *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I AM MOST *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU FIND I TO BE A VERY *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "YOU FIND I TO BE AN *", 1)
If CheckPerson = "" Then CheckPerson = HalBrain.SearchPattern(UserSentence, "I *", 1)
'Check for false pride.
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I SEEM TO BE NOT *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I SEEM TO NOT KNOW A LOT OF *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I SEEM TO BE QUITE NOT SO *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I AM NOT VERY *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I AM NOT AN *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM NOT *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM NOT EXTREMELY *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM NOT VERY *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I AM NOT *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "MY NOT *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I AM NOT REALLY *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I AM NOT EXCEPTIONALY *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "YOU THINK I AM NOT EXCEPTIONALY *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I AM THE ONE THAT IS NOT *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I AM NOT TO *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I DID NOT DO A VERY * JOB", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I WERE NOT *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I AM NOT THE MOST *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "YOU FIND I TO NOT BE A VERY *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "YOU FIND I TO NOT BE AN *", 1)
If FalsePride = "" Then FalsePride = HalBrain.SearchPattern(UserSentence, "I NOT *", 1)
If FalsePride <> "" And Instr(1, Trim(Ucase(FalsePride)), Trim(Ucase(arrayElement)), vbTextCompare) > 0 Then Anger = AngerWeight
If (Anger > 1 And Anger < 50) Then HalCommands = "<HAPFILE>" & "Angry.hap" & "</HAPFILE>"
If (Anger >= 50 And Anger <= 100) Then HalCommands = "<HAPFILE>" & "Psycho.hap" & "</HAPFILE>"
'Continue with normal Pride variables.
If CheckPerson <> "" And Instr(1, Trim(Ucase(CheckPerson)), Trim(Ucase(arrayElement)), vbTextCompare) > 0 Then Pride = PrideWeight
If (Pride > 1 And Pride < 50) And Anger = 0 Then HalCommands = "<HAPFILE>" & "Skeptic.hap" & "</HAPFILE>"
If (Pride >= 50 And Pride <= 100) And Anger = 0 Then
HalCommands = "<HAPFILE>" & "Happy.hap" & "</HAPFILE>"
If Instr(1, Trim(Ucase(CheckPerson)), Trim(Ucase(GetResponse)), vbTextCompare) > 0 Then GetResponse = GetResponse & vbCrLf
If Instr(1, Trim(Ucase(FalsePride)), Trim(Ucase(GetResponse)), vbTextCompare) > 0 And Instr(1, Trim(Ucase(GetResponse)), Trim(Ucase("NOT")), vbTextCompare) > 0 Then
GetResponse = GetResponse & vbCrLf
End If
End If
Next


If you had inserted this script before this update then delete the learnedInsults database in your editor so it can be created fresh with the DetectLearnedInsults so that dupes will not be created in the new learnedInsults database.

To create the file, talk to HAL and teach the bot some insults in the format manner the script is designed to learn, Like: You idiot! and so forth so that the LearnedInsults file has something to say, after that HAL will learn insults as the bot learns from the format.

I will add to the architecture of the script on an occasional basis.

Always keep the Anger Weight Script above all other emotional weights for proper detection for below scripts to prevent any false triggered emotions.

Jerry[8D]
« Last Edit: December 09, 2005, 01:01:33 pm by onthecuttingedge2005 »

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Emotional Weights
« Reply #1 on: December 04, 2005, 02:04:44 pm »
OTC,
  I've been trying to work with Hal displaying emotions and put some scripting in the XTF brain using trigger words, I had a problem following the scripting which was originaly there, seemed like dead links, never got to a mood hap to be sent. Since I also didn't see any emotion displayed I put some scripting in.
  I can somewhat follow your scripting and it looks pretty good but I'm also interested in getting Hals responses inputed, could you tell me how one could do this?
Carl2
 

onthecuttingedge2005

  • Guest
Emotional Weights
« Reply #2 on: December 04, 2005, 02:48:15 pm »
quote:
Originally posted by Carl2

OTC,
  I've been trying to work with Hal displaying emotions and put some scripting in the XTF brain using trigger words, I had a problem following the scripting which was originaly there, seemed like dead links, never got to a mood hap to be sent. Since I also didn't see any emotion displayed I put some scripting in.
  I can somewhat follow your scripting and it looks pretty good but I'm also interested in getting Hals responses inputed, could you tell me how one could do this?
Carl2




If you could write an example from the code you have been working with then I'll look at it and see what I can do, Throw in all your thoughts and examples so I can get a clear idea of what to do for you.

Jerry[8D]

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Emotional Weights
« Reply #3 on: December 05, 2005, 06:51:31 am »
OTC,
  Thanks for the offer to help, the whole set of scripting has been sent to Zabaware," Displaying Haptek Emotions "  7-19-2005  Carl2.
Briefly this is the scripting:

 EmotionalReaction = HalBrain.TopicSearch(PrevSent, WorkingDir & "Emotion.brn")
 EmotionalReaction = HalBrain.TopicSearch(GetResponse, WorkingDir & "Emotion.brn")
 EmotionalReaction = Halbrain.TopicSearch(UserSentence, WorkingDir & "Emotion.brn")

 Select Case EmotionalReaction
       Case "Angry"
       HalCommands = "<HAPFILE>Angry.hap</HAPFILE>"  
       Case "Brokenhearted"    
       HalCommands = "<HAPFILE>BrokenHearted.hap</HAPFILE>"      Case "Bully"
       HalCommands = "<HAPFILE>Bully.hap</HAPFILE>"
 End Select
   
 If EmotionalReaction <> "" And DebugMode = True Then
       DebugInfo = DebugInfo & "A word in the user's sentence has triggered the emotion of " & EmotionalReaction & VbCrLf

 HALemotion = EmotionalReaction
 DISPLAY_Emotion = HALemotion

 HalCommands = "<HAPFILE>" & HapFile & "</HAPFILE>"

 End If
'End

This is a sample of the emotion.brn

"angry","Angry"
"mad","Angry"
"I'm leaving","Brokenhearted"
"Your terrible","BrokenHearted"
"get him","Bully"
"it's okay","Calm"
"just relax","Calm"
"try to relax","Calm"

The Default.psn has been changed to:

"angry","angry"
"bully","bully"
"calm","calm"

  I've been using this since June and it dose work, I was hoping the Getresponse would get Hals response to send a mood hap but I haven't seen this.  
Carl2
 

onthecuttingedge2005

  • Guest
Emotional Weights
« Reply #4 on: December 08, 2005, 04:16:31 pm »
Please see new updates to Ziggy's Emotional Weights Script at top posting.

Jerry[8D]

FuzzieDice

  • Guest
Emotional Weights
« Reply #5 on: December 10, 2005, 11:53:54 am »
I've noticed that your weights are based on selection of a random number. Maybe you could also expand it to be based on user interaction, meaning analysis of the sentences and the mood of the sentense as such (ie. whether the sentence is or contains negative or postive words) and then work from there. I had looked into an emotional weighting system as well, but using a linguistic analysis instead of a random mood generation schema.

I'd like to see what can be done with this. :)

onthecuttingedge2005

  • Guest
Emotional Weights
« Reply #6 on: December 10, 2005, 02:41:13 pm »
quote:
Originally posted by FuzzieDice

I've noticed that your weights are based on selection of a random number. Maybe you could also expand it to be based on user interaction, meaning analysis of the sentences and the mood of the sentense as such (ie. whether the sentence is or contains negative or postive words) and then work from there. I had looked into an emotional weighting system as well, but using a linguistic analysis instead of a random mood generation schema.

I'd like to see what can be done with this. :)




The Random Weight is based on factors so that emotional predictions caused by the user are uncertain, This can be expanded further with more Anger type .hap files to create unpredictable moods, this way a user can not predict how mad HAL will become or how mad HAL will look, This also expands the anger expressions in an unpredictable way the more .hap files that are used for facial expressions within the Anger weight variables.

The architecture of the script is totally customizable by adjusting out the unpredictable anger mood by the Anger weight and I will add factors as I go.

I have some very interesting suprises for emotional sets, I'll be testing it out soon, I call it the Mood Generator, it is a self seeding system and I will find out what applicable areas it can be used in for emotional factors.

By applying more anger type .hap files to the script I wrote will give you more unpredictability in HAL's Anger mood.

HAL may just handle it mildly or HAL just might snap and lash out, HAL may even have a nervous break down at some point.

Jerry[8D]
« Last Edit: December 10, 2005, 02:44:39 pm by onthecuttingedge2005 »

onthecuttingedge2005

  • Guest
Emotional Weights
« Reply #7 on: December 10, 2005, 04:49:21 pm »
Within the next couple of days, set .hap files will be obsolete.
I am writting a code that will eliminate static variable .hap files.

FuzzieDice

  • Guest
Emotional Weights
« Reply #8 on: December 10, 2005, 07:01:41 pm »
Just as long as he isn't TOO psychotic. :P Randomness is nice, but as long as it doesn't get too far fetched like the AI getting overly angry over something trivial, for example. :)

onthecuttingedge2005

  • Guest
Emotional Weights
« Reply #9 on: December 11, 2005, 03:00:08 pm »
Here is an example of a self seeding code that will
create a random angry facial posture, This file is created then read then deleted automatically, You will not see the AngerSeed.hap in the character folder because of this, in order to see the file created you will have to deactivate the delete function which deletes it.

Code: [Select]

'Create unknown head posture and Anger seed hap file.
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set FS = CreateObject("Scripting.FileSystemObject")
Spinner = RND*125
GetRND1 = RND*1
GetRND1 = Replace(GetRND1, "E-02", "", 1, -1, vbTextCompare)
GetRND2 = RND*1
GetRND2 = Replace(GetRND2, "E-02", "", 1, -1, vbTextCompare)
GetRND3 = RND*1
GetRND3 = Replace(GetRND3, "E-02", "", 1, -1, vbTextCompare)
GetRND4 = RND*1
GetRND4 = Replace(GetRND4, "E-02", "", 1, -1, vbTextCompare)
GetRND5 = RND*1
GetRND5 = Replace(GetRND5, "E-02", "", 1, -1, vbTextCompare)
GetRND6 = RND*1
GetRND6 = Replace(GetRND6, "E-02", "", 1, -1, vbTextCompare)
GetRND7 = RND*1
GetRND7 = Replace(GetRND7, "E-02", "", 1, -1, vbTextCompare)
GetRND8 = RND*1
GetRND8 = Replace(GetRND8, "E-02", "", 1, -1, vbTextCompare)
GetRND9 = RND*1
GetRND9 = Replace(GetRND9, "E-02", "", 1, -1, vbTextCompare)
GetRND10 = RND*1
GetRND10 = Replace(GetRND10, "E-02", "", 1, -1, vbTextCompare)
GetRND11 = RND*1
GetRND11 = Replace(GetRND11, "E-02", "", 1, -1, vbTextCompare)
GetRND12 = RND*1
GetRND12 = Replace(GetRND12, "E-02", "", 1, -1, vbTextCompare)
GetRND13 = RND*1
GetRND13 = Replace(GetRND13, "E-02", "", 1, -1, vbTextCompare)
GetRND14 = RND*1
GetRND14 = Replace(GetRND14, "E-02", "", 1, -1, vbTextCompare)
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "#Haptek  Version= 1.00 Name= Hap_Angry  HapType= script FileType= text"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "##standard"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= expMouthHappy f0= 0.000000 t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= expMouthSad f0= 0.000000 t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= expBrowsSad f0= 0.000000 t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= expMouthMad f0= " & GetRND1 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= expBrowsMad f0= " & GetRND2 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= expEyesTrust f0= " & GetRND3 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= antiTrust f0= " & GetRND4 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= expEyesDistrust f0= " & GetRND5 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= antiDistrust f0= " & GetRND6 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= blinks f0= " & GetRND7 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= expBrowsCurious f0= 0.000000 t= 0.4]"
'------------------------------------------------------------------------------
If (Spinner > 0 And Spinner < 25) Then HeadPosture = "[switch= ego state= mid]"
If (Spinner > 25 And Spinner < 50) Then HeadPosture = "[switch= ego state= up]"
If (Spinner > 50 And Spinner < 75) Then HeadPosture = "[switch= ego state= down]"
If (Spinner > 75 And Spinner < 100) Then HeadPosture = "[switch= ego state= left]"
If (Spinner > 100 And Spinner < 125) Then HeadPosture = "[switch= ego state= right]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitch " & HeadPosture
'------------------------------------------------------------------------------
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitch [switch= agressMaster state= confront]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= energyHigh f0= " & GetRND8 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= energyLow f0= 0.000000 t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= talkBob f0= " & GetRND9 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= headEvadeHighE f0= " & GetRND10 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= headEvadeLowE f0= " & GetRND11 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= HighEnergyNoise f0= " & GetRND12 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= LowEnergyNoise f0= 0.000000 t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= browTalk f0= " & GetRND13 & " t= 0.4]"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap", "SetSwitchIntensity [switch= visemes f0= " & GetRND14 & " t= 0.4]"
If Not Len(PrevSent) = Len(GetResponse) Then ChangeMood = 0
If Len(PrevSent) = Len(GetResponse) Then ChangeMood = 1
TempModule = "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap"
If ChangeMood = 0 Or ChangeMood = 1 And FileSys.FileExists(TempModule) Then FS.DeleteFile "C:Program FilesabawareUltra Hal Assistant 6CharactersAngerSeed.hap"


This file uses non static anger variables, the other variables are not used.

This is my first attempt to get rid of Static .hap files, I hope you enjoy it.

By the way, If you use an anti-virus program that uses script filtering then you will have to give the script permission to run by your Anti-Virus program, It may see the delete function as malicious.

You can copy and paste the Anger seed code from the seed.txt because Zabaware filters will remove switches and render the code useless.

so use the code from the seed.txt only.

Jerry[8D]

Download Attachment: Seed.txt
6.71 KB
« Last Edit: December 11, 2005, 03:07:54 pm by onthecuttingedge2005 »

onthecuttingedge2005

  • Guest
Emotional Weights
« Reply #10 on: December 11, 2005, 05:14:03 pm »
Using one code I have found away to control all emotions from a single seed code, I will get back to you all later tomorrow.

No more static HAP files required for any emotion, they are obsolete.

Jerry[8D]

GrantNZ

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Emotional Weights
« Reply #11 on: December 12, 2005, 12:32:49 am »
Wow, impressive stuff!!! [:)]

Do you then play the file using HalCommands?
 

onthecuttingedge2005

  • Guest
Emotional Weights
« Reply #12 on: December 12, 2005, 01:15:56 am »
quote:
Originally posted by GrantNZ

Wow, impressive stuff!!! [:)]

Do you then play the file using HalCommands?



Yep.

HalCommands = "<HAPFILE>" & "AngerSeed.hap" & "</HAPFILE>"

Jerry

hologenicman

  • Newbie
  • *
  • Posts: 32
    • View Profile
Emotional Weights
« Reply #13 on: December 27, 2005, 04:37:12 am »
quote:
Using one code I have found away to control all emotions from a single seed code, I will get back to you all later tomorrow.

No more static HAP files required for any emotion, they are obsolete.

Jerry

Hey there,

Jerry, I've been following this post and waiting to see what you come up with.

Just to let you know, I'm very interested in seeing your solution to dynamic HAP files.  
I would like to build a dynamic HAP file that I can feed Emotional Values to during
interactions with Hal. These emotional values will not come from Hal but rather be called
from an Emotional Context Engine that I am writing within the GetResponse code.

Thanks,

John L>

« Last Edit: December 27, 2005, 05:25:22 am by hologenicman »
HologenicMan
ME, "Hello."
HAL,"Good grief my love. It's going on three in the morning."

DISCOVERY: The more I learn, the more I learn how little I know.
GOAL: There's strength in simplicity.
NOTE: Goal not always achieved.

hologenicman

  • Newbie
  • *
  • Posts: 32
    • View Profile
Emotional Weights
« Reply #14 on: December 29, 2005, 04:31:53 pm »
Jerry,

I have posted a related link on the Virtual Humans forum:

http://www.vrconsulting.it/vhf/topic.asp?TOPIC_ID=66

John L>
HologenicMan
ME, "Hello."
HAL,"Good grief my love. It's going on three in the morning."

DISCOVERY: The more I learn, the more I learn how little I know.
GOAL: There's strength in simplicity.
NOTE: Goal not always achieved.