Zabaware Support Forums

Hal now has a sense of humor.

Started by onthecuttingedge2005, September 22, 2003, 09:59:43 PM

Previous topic - Next topic

onthecuttingedge2005

'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: HUMOR.brn
1.3 KB



Download Attachment: LAUGHING.brn
710 Bytes

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
Stelios Nicolaou

onthecuttingedge2005

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]

Dr.Benway

One can't help wondering how many times we will get this kind of questions when Ultra Hal 7 and up have arrived.
[:D]

GamerThom

[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. [:)]
Gamer-T

Duskrider


Jerry,

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

onthecuttingedge2005

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]

spydaz

if i remmember the user laughing store instances of the user laughing,

ie
lol
hahha
hahaha
hahee
hee hee
rolfl

etc