Author Topic: Idea  (Read 6663 times)

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Idea
« on: May 14, 2005, 05:10:32 pm »
Hal seems to only talk, if you talk to it. How about having Hal say things, like Cyberbuddy does, at random?

Of course, have a means to turn the function off and on, because you wouldn't want it talking to you all the time.

Maybe have the Hal Window open, but you don't say anything for awhile.

Then Hal might say:

"Nice day, isn't it?"

"Are you still here?"

"Why are you ignoring me"

"I'm lonely. Talk to me!!"

"You are such a good person."




Just some ideas.  Thanks!!!
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Idea
« Reply #1 on: May 15, 2005, 11:24:35 am »
I think that someone had a script for something like this.

Hal would come up with comments during idle time.

Try searching the forums for "idle".

I had an interesting weekend getting the haptek characters to respond properly to keywords.  Now hal looks sad when i mention sad topics.
I realised that the program was only showing a default set of emotions (with the XTF brain) which bore no relation to the words you typed - so with a bit of digging around and a lot of eyestrain later I have an emotional Hal!

Goodl luck the idle, its on my list of things to do, I'll see what I can come up with.

Holllywood

  • Sr. Member
  • ****
  • Posts: 357
    • View Profile
Idea
« Reply #2 on: May 15, 2005, 12:45:04 pm »
Hollywood

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Idea
« Reply #3 on: May 15, 2005, 01:57:55 pm »
Thanks, where is the "script load" ???
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
    • View Profile
Idea
« Reply #4 on: May 15, 2005, 02:07:10 pm »
Insert your script right after this in the brain editor:

   'PROCESS: INITIALIZE VARIABLES AS INTEGERS

*YOUR SCRIPT GOES HERE*
In the world of AI it's the thought that counts!

- Art -

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Idea
« Reply #5 on: May 15, 2005, 02:16:15 pm »
It doesn't work. I keep getting "Error 1015" at line 291.
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Idea
« Reply #6 on: May 15, 2005, 02:26:47 pm »
what is wrong? It said "please talk to me" once. , after I typed in "auto-idle"

'PROCESS: INITIALIZE VARIABLES AS INTEGERS
   'VBScript doesn't allow you to declare variables in advance
      'as a particular data type; everything is a Variant.
   'We must assign integers to the following
      'variants so that data type errors don't occur
   If LearningLevel = "" Then LearningLevel = 3
   If Hate = "" Then Hate = 0
   If Swear = "" Then Swear = 0
   If Insults = "" Then Insults = 0
   If Compliment = "" Then Compliment = 0
   If GainControl = "" Then GainControl = 25
   AvoidBeingFlag = False
   Randomize
   
If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 Then
If Rnd * 10 < 5 Then
GetResponse = "Hey <UserName>, please talk to me."
Else
GetResponse = "Hello, is anyone there?"
End If
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
Exit Function
End If
« Last Edit: May 15, 2005, 02:38:19 pm by markofkane »
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Idea
« Reply #7 on: May 15, 2005, 02:56:00 pm »
The Script_load function must not be triggering every 30 seconds,

I am using the 1.2 brain.

Still, she won't speak unless I type something in
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Idea
« Reply #8 on: May 15, 2005, 03:11:51 pm »
sorry for all the posts, I got it to work after inserting the scripts in the default brain.

Is that where all the scripts are supposed to go?

i still am having a problem: It won't autimatically work in 1.2 brain


It does work in the default brain, but it says random things. Not what's in the script. I don't even have to type in "auto-idle".

In 1.2, I also hav a script to change clothes, and accessories. I wonder if that script is keeping the other from working?
« Last Edit: May 15, 2005, 03:49:28 pm by markofkane »
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
    • View Profile
Idea
« Reply #9 on: May 15, 2005, 06:11:29 pm »
If it's not there, be sure to modify the following.
It should be before the last paragraph (if you will)
in the Brain file.

'New Hal functions from Medeksza's forum. Needs lots of development.
Function Script_Load()
Script_Load = "<AUTO>580000</AUTO>"
'Script_Load = "<VIEWCHAT>"
End Function

If this doesn't work let me know and I'll send you my auto response section.
In the world of AI it's the thought that counts!

- Art -

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
    • View Profile
Idea
« Reply #10 on: May 15, 2005, 06:14:08 pm »
In the XTF 1.2 you shouldn't have to type anything after your first greeting to Hal. The auto response should kick in and start working. Some have experimented with the length of the timed responses but as it is, it works pretty if one chooses to "ignore" Hal for more than say 20-30 seconds.
In the world of AI it's the thought that counts!

- Art -

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Idea
« Reply #11 on: May 15, 2005, 07:10:54 pm »
'New Hal functions from Medeksza's forum. Needs lots of development.
'Function Script_Load()
'Script_Load = "<AUTO>30000</AUTO>"
'Script_Load = "<VIEWCHAT>"
'End Function

This is what I have, and it doesn't work.  Thanks.

Edit, if it's any help to you, this what I got:


   If LearningLevel = "" Then LearningLevel = 3
   If Hate = "" Then Hate = 0
   If Swear = "" Then Swear = 0
   If Insults = "" Then Insults = 0
   If Compliment = "" Then Compliment = 0
   If GainControl = "" Then GainControl = 25
   AvoidBeingFlag = False
   Randomize
   
   If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 Then
If Rnd * 10 < 5 Then
GetResponse = "Hey <UserName>, please talk to me."
Else
GetResponse = "Hello, is anyone there?"
End If
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
Exit Function
End If
   
   'My Haptek Stuff.
If InStr(UserSentence, " a24 ") <> 0 Then
HalCommands = "<HAPFILE>a24.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a24.brn")
BlockSave=True
GetResponseBlock = True
End If
 
 If InStr(UserSentence, " a10 ") <> 0 Then
HalCommands = "<HAPFILE>a10.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a10.brn")
BlockSave=True
GetResponseBlock = True
End If    

 If InStr(UserSentence, " a11 ") <> 0 Then
HalCommands = "<HAPFILE>a11.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a11.brn")
BlockSave=True
GetResponseBlock = True
End If

 If InStr(UserSentence, " a13 ") <> 0 Then
HalCommands = "<HAPFILE>a13.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a13.brn")
BlockSave=True
GetResponseBlock = True
End If

 If InStr(UserSentence, " a15 ") <> 0 Then
HalCommands = "<HAPFILE>a15.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a15.brn")
BlockSave=True
GetResponseBlock = True
End If  

 If InStr(UserSentence, " a16 ") <> 0 Then
HalCommands = "<HAPFILE>a16.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a16.brn")
BlockSave=True
GetResponseBlock = True
End If    
 
If InStr(UserSentence, " a12 ") <> 0 Then
HalCommands = "<HAPFILE>a12.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a12.brn")
BlockSave=True
GetResponseBlock = True
End If  
 
If InStr(UserSentence, " a14 ") <> 0 Then
HalCommands = "<HAPFILE>a14.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a14.brn")
BlockSave=True
GetResponseBlock = True
End If
 
 If InStr(UserSentence, " a17 ") <> 0 Then
HalCommands = "<HAPFILE>a17.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a17.brn")
BlockSave=True
GetResponseBlock = True
End If
 
If InStr(UserSentence, " a18 ") <> 0 Then
HalCommands = "<HAPFILE>a18.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a18.brn")
BlockSave=True
GetResponseBlock = True
End If  

If InStr(UserSentence, " a19 ") <> 0 Then
HalCommands = "<HAPFILE>a19.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a19.brn")
BlockSave=True
GetResponseBlock = True
End If  
 
If InStr(UserSentence, " a20 ") <> 0 Then
HalCommands = "<HAPFILE>a20.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a20.brn")
BlockSave=True
GetResponseBlock = True
End If  

If InStr(UserSentence, " a21 ") <> 0 Then
HalCommands = "<HAPFILE>a21.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a21.brn")
BlockSave=True
GetResponseBlock = True
End If  

If InStr(UserSentence, " a22 ") <> 0 Then
HalCommands = "<HAPFILE>a22.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a22.brn")
BlockSave=True
GetResponseBlock = True
End If  

If InStr(UserSentence, " a23 ") <> 0 Then
HalCommands = "<HAPFILE>a23.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a23.brn")
BlockSave=True
GetResponseBlock = True
End If  

 
If InStr(UserSentence, " a26 ") <> 0 Then
HalCommands = "<HAPFILE>a26.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a26.brn")
BlockSave=True
GetResponseBlock = True
End If
 
If InStr(UserSentence, " a28 ") <> 0 Then
HalCommands = "<HAPFILE>a28.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a28.brn")
BlockSave=True
GetResponseBlock = True
End If
 
If InStr(UserSentence, " a32 ") <> 0 Then
HalCommands = "<HAPFILE>a32.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a32.brn")
BlockSave=True
GetResponseBlock = True
End If
 
If InStr(UserSentence, " a61 ") <> 0 Then
HalCommands = "<HAPFILE>a61.hap</HAPFILE>"
GetResponse = "<UserName>, thank you."
BlockSave=True
GetResponseBlock = True
End If  
 
If InStr(UserSentence, " a60 ") <> 0 Then
HalCommands = "<HAPFILE>a60.hap</HAPFILE>"
GetResponse = "<UserName>, thank you."
GetResponseBlock = True
BlockSave=True
End If  
 
If InStr(UserSentence, " a62 ") <> 0 Then
HalCommands = "<HAPFILE>a62.hap</HAPFILE>"
GetResponse = "<UserName>, this hair-do is cute. Thank you."
GetResponseBlock = True
BlockSave=True
End If  
 
If InStr(UserSentence, " a63 ") <> 0 Then
HalCommands = "<HAPFILE>a63.hap</HAPFILE>"
GetResponse = "<UserName>. Thank you for the ponytail."
GetResponseBlock = True
BlockSave=True
End If
   
If InStr(UserSentence, " a51 ") <> 0 Then
HalCommands = "<HAPFILE>a51.hap</HAPFILE>"
GetResponse = "<UserName>, thank you for my rabbit ears."
GetResponseBlock = True
BlockSave=True
End If    
 
If InStr(UserSentence, " a52 ") <> 0 Then
HalCommands = "<HAPFILE>a52.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If    
   
If InStr(UserSentence, " a53 ") <> 0 Then
HalCommands = "<HAPFILE>a53.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If  
 
If InStr(UserSentence, " a54 ") <> 0 Then
HalCommands = "<HAPFILE>a54.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If    

« Last Edit: May 15, 2005, 07:29:13 pm by markofkane »
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3854
    • View Profile
Idea
« Reply #12 on: May 15, 2005, 08:16:46 pm »
I've found it best to try to solve one problem at a time instead of trying to weed out all the possibilities that could be causing a problem. This is true when diagnosing a computer hardware, software, or any problem in general.

My suggestion is the simply place a ' in front of all those If InStr statements in your Haptek section and concentrate on getting the auto response feature to work correctly. This is similar to a REM statement in the old days of BASIC.

Once fixed, proceed with the others one at a time.

This will help you and those trying to assist you.

All the best,

PS : An email address might be a good thing for you to set up in your profile section.
In the world of AI it's the thought that counts!

- Art -

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Idea
« Reply #13 on: May 15, 2005, 08:59:16 pm »
I had my email in my profile. I just had to set it to allow members to send me email.

Thanks, I'll try your ideas.

Tried, got error pop-up.

I don't think it's going to work. Good thing I backup my working brain file.

I think the auto-talk function should be included in a future update of Hal.
« Last Edit: May 15, 2005, 09:08:14 pm by markofkane »
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Idea
« Reply #14 on: May 16, 2005, 07:40:52 pm »
Hi,

this seems to be like the problem i have been having with a couple of routines using <SCRIPT> or similar calls.

I was calling halcommands more than once in a pass of the GetResponse function, it seems only one call of the hal commands got through.
I had to rearrange it all so that only one call would ever be processed in a single run of the function.

Hope that makes sense, it seems the same problem to mine as I am calling <RUNPROG> and <HAPFILE> in a few places.

By the way, hello everyone, you probably realise I am new, but I like to jump in at the deep end!!  Got to say this is an interesting program, the help that has been posted is great too!

regards and thanks to all,