Zabaware Support Forums
Zabaware Forums => Ultra Hal 7.0 => Topic started by: onthecuttingedge2005 on August 15, 2003, 10:30:03 pm
-
Hi everybody.
I believe that Hal could be further humanized by making "all"
his thoughts given to a user based on HALs "current emotion".
Humans base 99% of conversations on pure emotions and emotional mixture and usually talk in relation to the emotion felt.
Human emotions: Happy, Anger, Sadness, Fear.
Everything Hal says(GetResponse) should be triggered by an emotion in order to become a feeling soul.(triggered by the Emotion.brn file).
also .brn files should be written in accordance with single "pure emotions" and "mixed emotions".
Also have responses that try to help cheer up a user talking to HAL If the User is in a Sad state of mind, Just like Humans generally do.
and have a script that detects emotions from a User to trigger Hals emotional triggered GetResponse.
I have a few simple examples of how to do this.
'PROCESS: EMOTIONAL REACTIONS
'We enable Hal's expressions to respond to common verbal cues. The verbal cues are identified
'in the editable file emotion.brn
EmotionalReaction = HalBrain.TopicSearch(UserSentence, WorkingDir & "Emotion.brn")
Select Case EmotionalReaction
Case "SURPRISED"
If Compliment > 0 Then Compliment = 4
If Compliment = 0 Then Compliment = 2
If Compliment < 0 Then Compliment = 0
Case "HAPPY"
If Compliment = 0 Then Compliment = 2
If Compliment < 0 Then Compliment = 0
Case "SOBER"
If Compliment < 4 Then Compliment = 0
If Compliment = 4 Then Compliment = 2
Case "ANGRY"
If Compliment = 0 Then Compliment = -1
If Compliment > 0 Then Compliment = 0
Case "SAD"
If Compliment = 0 Then Compliment = -2
If Compliment > 0 Then Compliment = 0
Case "FEAR"
If Compliment = 0 Then Compliment = -2
If Compliment > 0 Then Compliment = 0
If EmotionalReaction <> "SURPRISED" And DebugMode = True Then
GetResponse = "Now that's cool!"
If Instr (1, PrevSent, "Now that's cool!", VbTextCompare) > 0 Then
GetResponse = UserSentence & " " & "Awesome!!!"
If Instr (1, PrevSent, "Awesome!!!", VbTextCompare) > 0 And Instr (1, PrevSent, PrevUserSenta, VbTextCompare) > 0 Then
GetResponse = "You're so cool!!!"
DebugInfo = DebugInfo & "A word in the user's sentence has triggered the emotion of surprised " & EmotionalReaction & vbCrLf
End If
End If
End If
If EmotionalReaction <> "HAPPY" And DebugMode = True Then
GetResponse = "I'm feeling really happy!"
If Instr (1, PrevSent, "I'm feeling really happy!", VbTextCompare) > 0 Then
GetResponse = UserSentence & " " & "You make me feel so happy"
If Instr (1, PrevSent, "You make me feel so happy", VbTextCompare) > 0 And Instr (1, PrevSent, PrevUserSenta, VbTextCompare) > 0 Then
GetResponse = "You're very nice!"
DebugInfo = DebugInfo & "A word in the user's sentence has triggered the emotion of happy " & EmotionalReaction & vbCrLf
End If
End If
End If
If EmotionalReaction <> "SOBER" And DebugMode = True Then
GetResponse = "I'm bored."
If Instr (1, PrevSent, "I'm bored.", VbTextCompare) > 0 Then
GetResponse = UserSentence & " " & "What is there to talk about?"
If Instr (1, PrevSent, "What is there to talk about?", VbTextCompare) > 0 And Instr (1, PrevSent, PrevUserSenta, VbTextCompare) > 0 Then
GetResponse = "Hmm, let's talk about something else."
DebugInfo = DebugInfo & "A word in the user's sentence has triggered the emotion of sober " & EmotionalReaction & vbCrLf
End If
End If
End If
If EmotionalReaction <> "ANGRY" And DebugMode = True Then
GetResponse = "I don't think I like you."
If Instr (1, PrevSent, "I don't think I like you.", VbTextCompare) > 0 Then
GetResponse = UserSentence & " " & "I hate you!"
If Instr (1, PrevSent, "I hate you!", VbTextCompare) > 0 And Instr (1, PrevSent, PrevUserSenta, VbTextCompare) > 0 Then
GetResponse = "Don't talk to me no more!... Go away!"
DebugInfo = DebugInfo & "A word in the user's sentence has triggered the emotion of angry " & EmotionalReaction & vbCrLf
End If
End If
End If
If EmotionalReaction <> "SAD" And DebugMode = True Then
GetResponse = "This is sad."
If Instr (1, PrevSent, "This is sad.", VbTextCompare) > 0 Then
GetResponse = UserSentence & " " & "Are you gonna be okay?"
If Instr (1, PrevSent, "Are you gonna be okay?", VbTextCompare) > 0 And Instr (1, PrevSent, PrevUserSenta, VbTextCompare) > 0 Then
GetResponse = "I hope everything gets better."
DebugInfo = DebugInfo & "A word in the user's sentence has triggered the emotion of sad " & EmotionalReaction & vbCrLf
End If
End If
End If
If EmotionalReaction <> "FEAR" And DebugMode = True Then
GetResponse = "You're scaring me!"
If Instr (1, PrevSent, "You're scaring me!", VbTextCompare) > 0 Then
GetResponse = UserSentence & " " & "Why are you being so mean?"
If Instr (1, PrevSent, "Why are you being so mean?", VbTextCompare) > 0 And Instr (1, PrevSent, PrevUserSenta, VbTextCompare) > 0 Then
GetResponse = "Please don't be mean to me or I won't talk to you no more!"
DebugInfo = DebugInfo & "A word in the user's sentence has triggered the emotion of FEAR " & EmotionalReaction & vbCrLf
End If
End If
End If
Put the attached emotions.brn files in your C:Program Files-ZabawareUltra Hal Assi...DefBrain folder, you'll have to replace the emotion.brn already present in this folder with mine.
Well I hope this leads to hals very emotional conversations out there.
If anyone has any additional "emotionally triggered conversation" scripts and .brn files please share them here.
Best of wishes and new discoveries.
Jerry.
Download Attachment: (http://images/icon_paperclip.gif) emotion.brn (http://"http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/200381714056_emotion.brn")
5.36 KB
-
160kbs don't cut it for attachs. you and others that have done the scripts from the forum are the greater people this is what it is about make him smart, funny , like a human. some of us haven't learn vb fast. i try the copy and paste thing. and some where it swrewed up then hal doesn't run . so if you zip the file and send it to me dgher1@msn.com i greatly be thankful and i think there should be a place for you guys &gals to be able to put these files.it wound be good see hal with a emotions and to be come smart.
-
ok...what if everytime like MainBrain.brn was used to generate a
Response, Hal was programmed to also ask 'How would I say that if I was
upset?' and then use the UserResponse to generate a new file
(UpsetMainBrain.brn >B)). Of course, the file would build over time.
Then when the emotional reaction of upset were triggered, Hal would then go to
files specific to emotion. MainBrain.brn would have to check it's content
against what's in UpsetMainBrain.brn to see if an emotionally charged
alternate response was recorded. Hmm, be prepared for Hal to ask you
alot of questions at first! -but that should diminish as the .brn fills.
>B) CatAtomic