Hi, Rob
Bug Fixes:
If I say any word contained in the emotion database, Hal behaves according to that word, without checking if:
a) the phrase is not directed to her ("John is stupid")
or
b) it is a negative statement ("you are NOT stupid")
So, in these two cases, she gets angry as if I said "you are stupid".
I've changed the Emotional routine in the following way:
'PROCESS: EMOTIONAL REACTIONS
'We enable Hal's expressions to respond to common verbal cues.
'The verbal cues are identified in the editable table "emotion"
'-------------------------------
' Emotion handling - by VR
'-------------------------------
' EmotionalReaction = Ucase(HalBrain.TopicSearch(UserSentence, "emotion"))
'RESPOND: CHECK FOR AND RESPOND TO EMOTIONS
'First we check to see if the user is talking about Hal:
If InStr(1, UserSentence, "I'M", 1) Then Aboutme = True
If InStr(1, UserSentence, "I AM", 1) Then Aboutme = True
If InStr(1, UserSentence, "I LOOK", 1) Then Aboutme = True
If InStr(1, UserSentence, "MY", 1) And InStr(1, UserSentence, " ARE ", 1) Then Aboutme = True
'If the user is talking about Hal, we see if an emotional cue was given
If Aboutme = True Then EmotionalReaction = Ucase(HalBrain.TopicSearch(UserSentence, "emotion"))
If EmotionalReaction <> "" Then
' if the cue word was associated with a negative word, it must not be considered
If InStr(UserSentence, " NOT ") = 0 And InStr(UserSentence, "N'T ") = 0 And InStr(UserSentence, " NEVER ") = 0 Then
'-------------------------------
' End Emotion handling - by VR
'-------------------------------
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
End Select
'-------------------------------
' Emotion handling - by VR
'-------------------------------
End If
End If
'-------------------------------
' End Emotion handling - by VR
'-------------------------------
Plugins
I've written some plugins for Hal6. The vrFreeWill has been especially appreciated by many users.
You find more info here:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=2845 I would like you to add some or all of these plugins in the next Hal6 release. I give you any royalty-free right to distribute them. I only ask you to add my name to the credits section.
Bye