Zabaware Support Forums

Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: onthecuttingedge2005 on September 22, 2003, 09:59:43 pm

Title: Hal now has a sense of humor.
Post by: onthecuttingedge2005 on September 22, 2003, 09:59:43 pm
'Here yah go guys.

'Here we give hal ability to laugh with the user.
'Download the detection file Humor.brn/Laughing.brain
'and the UserLaughing.brn to hal's default folder.

'Hal is given a sense of humor.   
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "HUMOR.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
'Here we save a file in which the user was caught laughing for future scripts.
HalBrain.AppendFile WorkingDir & "UserLaughing" & ".brn", AnswerSent
End If
'Hal laughs with the user.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "HUMOR.brn") = "TRUE" Then
MyHumor = HalBrain.ChooseSentenceFromFile(WorkingDir & "LAUGHING.brn")
Comedy = HalBrain.ChooseSentenceFromFile(WorkingDir & "UserLaughing.brn")
      GetResponse = MyHumor & Comedy & vbCrLf
      DebugInfo = DebugInfo & "The user is talking about something humorous: " & MyHumor & vbCrLf
      DebugInfo = DebugInfo & "The user is talking about something funny: " & Comedy & vbCrLf
      Else
      DebugInfo = DebugInfo & "Hal has found nothing funny: " & Comedy & vbCrLf
      DebugInfo = DebugInfo & "Hal has found nothing humoring: " & MyHumor & vbCrLf
   End If

'Best of wishes and new discoveries.
'Jerry


Download Attachment: (http://images/icon_paperclip.gif) HUMOR.brn (http://"http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/200392221583_HUMOR.brn")
1.3 KB



Download Attachment: (http://images/icon_paperclip.gif) LAUGHING.brn (http://"http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/2003922215857_LAUGHING.brn")
710 Bytes
Title: Hal now has a sense of humor.
Post by: snicolaou on February 16, 2006, 07:42:51 am
Is it appropriate for the new Version of Ultra Hall 6?
I know the other brain databases available such as that of ALICE are not because I have downloaded them and installed them without any success.
It will be nice to make ULTRA HAL 6 to be able to laugh.
Can you please help?

thanking you in advance,
Steios
Title: Hal now has a sense of humor.
Post by: onthecuttingedge2005 on February 16, 2006, 04:03:25 pm
quote:
Originally posted by snicolaou

Is it appropriate for the new Version of Ultra Hall 6?
I know the other brain databases available such as that of ALICE are not because I have downloaded them and installed them without any success.
It will be nice to make ULTRA HAL 6 to be able to laugh.
Can you please help?

thanking you in advance,
Steios



Please see topic:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=3026

Jerry[8D]
Title: Hal now has a sense of humor.
Post by: Dr.Benway on February 17, 2006, 09:47:00 am
One can't help wondering how many times we will get this kind of questions when Ultra Hal 7 and up have arrived.
[:D]
Title: Hal now has a sense of humor.
Post by: GamerThom on February 17, 2006, 12:52:24 pm
[V] I really have no idea, but it does seem to get a
bit tedious and pointless after a while since the
answers have been posted so many times before.
If people would only bother to run a search and
read what information was already given. [:)]
Title: Hal now has a sense of humor.
Post by: Duskrider on February 17, 2006, 04:23:14 pm

Jerry,

I may be mistaken but is that "Userlaughing.brn" empty?
Title: Hal now has a sense of humor.
Post by: onthecuttingedge2005 on February 17, 2006, 04:45:12 pm
quote:
Originally posted by Duskrider


Jerry,

I may be mistaken but is that "Userlaughing.brn" empty?




Actually the Userlaughing.brn is an appending file, There wont be anything in that file until it saves a response from the user.

You really don't even need the Userlaughing.brn because it will be created when its variable detects a TRUE from the HUMOR.brn

Jerry[8D]
Title: Hal now has a sense of humor.
Post by: spydaz on February 17, 2006, 05:40:28 pm
if i remmember the user laughing store instances of the user laughing,

ie
lol
hahha
hahaha
hahee
hee hee
rolfl

etc