Hi there!
I have just used Hal 4.5 for a few weeks as Hal is my home work at school. So far, I think Hal is a great agent. However, I think I found some bugs with the Topic Focus process.
'RESPOND: PROCESS TOPICFOCUS FILES
'If Hal is currently focusing on a topic, this will read from the appropriate focus file
'First it tries from a topic file specific to the current user, and if that doesn't
'produce results it tries a global topic file that is the same for all users
If TopicFocus > 10 Then
FocusString = CStr(TopicFocus)
FocusFileNum = Left(FocusString, Len(FocusString) - 1) & "5"
If CInt(Right(FocusString, 1)) > 0 And CInt(Right(FocusString, 1)) < 28 Then
'=====this is the original code which i think it is wrong because not linking to grobal file ======
'HalUserBrain = HalBrain.QABrain(UserSentence, WorkingDir & Trim(UserName) & "focus" & FocusFileNum & ".brn", UserBrainRel)
'================
'======= I think this one is better=======
HalUserBrain = HalBrain.QABrain(UserSentence, WorkingDir & "Focus" & FocusFileNum & ".brn", UserBrainRel)
'=============================
If UserBrainRel > 0 Then
GetResponse = GetResponse & HalUserBrain & vbCrLf
If DebugMode = True Then
DebugInfo = DebugInfo & "A response of relevance " & UserBrainRel & " was found in the current global topic focus file and this response has been used." & vbCrLf & HalUserBrain
End If
End If
End If
If CInt(Right(FocusString, 1)) > 0 And CInt(Right(FocusString, 1)) < 28 And UserBrainRel = 0 Then
HalUserBrain = HalBrain.QABrain(UserSentence, WorkingDir & "focus" & FocusFileNum & ".brn", UserBrainRel)
If UserBrainRel > 0 Then
GetResponse = GetResponse & HalUserBrain & vbCrLf
If DebugMode = True Then
DebugInfo = DebugInfo & "A response of relevance " & UserBrainRel & " was found in the current user topic focus file and this response has been used." & vbCrLf
End If
End If
End If
End If
'=======
BTW, where can I find HAL 3.0 plug-in ?
Cheers
Wootinun Sung-Ong