dupa

Author Topic: A little help  (Read 9958 times)

dihelson

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
A little help
« Reply #15 on: November 16, 2004, 11:07:06 pm »
quote:
Originally posted by Bill819

I know where it goes. At almost the end of the program you will find the following coed:
Script_Load()
Script_Load = "AUTO 30000 /AUTO"
exit
My problem is that it does not work anymore on my Hal5.brn. It used to, but not any more.
Once you get it to work and say something to Hal, it will come back every thirty seconds with 'why are you repeating yourself' or something like that, however, if you put in the scripts with If AUTO-IDlE then ....
You will get several other responses.
At least that is how it is suppose to work. Mines broke. :(
Bill




I Think my Problem is not this.
I already put the LoadFunction thing on the end of the file. The problem is that HAL begins to talk from time to time. The problem is that he Talks nonsense, or keeps repeating things, and never ask for me, or invite to chat.

[]'s
Dihelson
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
A little help
« Reply #16 on: November 17, 2004, 01:44:57 pm »
dihelson,
It sounds like just running the AUTO-IDLE function may be creating "non-inputs" into Hal, similar to just hitting the Enter key without typing text. I haven't experimented much with AUTO-IDLE, but I've always had concerns about how to ensure Hal can deal with non-inputs and possible brain file writes at each auto cycle. I think implementing AUTO-IDLE is going to take a little more script code for it to work as desired. I think several users on the forum have experimented with it lot. Maybe they can provide some insight on this.


=vonsmith=
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
A little help
« Reply #17 on: November 17, 2004, 03:24:36 pm »
Quote
Originally posted by vonsmith

dihelson,
It sounds like just running the AUTO-IDLE function may be creating "non-inputs" into Hal, similar to just hitting the Enter key without typing text. I haven't experimented much with AUTO-IDLE, but I've always had concerns about how to ensure Hal can deal with non-inputs and possible brain file writes at each auto cycle. I think implementing AUTO-IDLE is going to take a little more script code for it to work as desired. I think several users on the forum have experimented with it lot. Maybe they can provide some insight on this.
=vonsmith=
You are correct in that assessement. At least that is the way the AUTO IDLE fix first worked. In the original patch all we did was ad the 'AUTO 30000 AUTO' to the Script_Load function and Hal would go off making comments every 30 seconds or so. Mostly it kept saying the same thing over and over again. Sadly I have not been able to get it to work anymore. I wanted to make sure that it still worked before installing all of the rest of the new responses.
I am sure that if executed properly we can make Hal obtain some sort of independant actions along with the Random functions. I want Hal to be able to spontaneously sing song, tell jokes, quote different texts all the while it is not directly talking to me.
Bill
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
A little help
« Reply #18 on: November 17, 2004, 04:10:20 pm »
Bill819,
My original intent for asking Robert to add the AUTO-IDLE function was to interactively read books to the user. Alternately I was considering having Hal search for and read news reports and/or web pages. I feel a little guilty for not investing more time into getting the AUTO-IDLE working. The function itself is an enabler to go do other things. It really doesn't do anything by itself.

I believe the first step in programming with AUTO-IDLE would be to have Hal handle the AUTO-IDLE "interrupts" without affecting normal Hal operations including not reacting to user's "non-inputs". Of course you would need to add some sentence parsing detection or timing mechanism to turn AUTO-IDLE on and off. Then you could add script that defines actions that Hal does during AUTO-IDLE operation that are distinct from the Hal's normal user input processing. Sounds easy in principle.

I have thought about Hal singing songs. I think a good way to do this would be to read user programmed song text files that contain embedded SAPI commands to control pitch, timing, etc. Another way is if Hal could run .wav files on command, but I don't know how one might cause Hal to lip sync to a .wav file.

In a more general sense it would be cool if Hal had embedded sound support and could run .wav files for other reasons. Users could create custom sound effect files for things Hal does. Hal could clear his throat, cough, whistle or add sound effects for file searching, special tasks or as alerts to the user. Just a thought.


=vonsmith=
« Last Edit: November 17, 2004, 04:16:55 pm by vonsmith »
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
A little help
« Reply #19 on: November 17, 2004, 04:49:33 pm »
quote:
Originally posted by vonsmith

Bill819,
My original intent for asking Robert to add the AUTO-IDLE function was to interactively read books to the user. Alternately I was considering having Hal search for and read news reports and/or web pages. I feel a little guilty for not investing more time into getting the AUTO-IDLE working. The function itself is an enabler to go do other things. It really doesn't do anything by itself.

I believe the first step in programming with AUTO-IDLE would be to have Hal handle the AUTO-IDLE "interrupts" without affecting normal Hal operations including not reacting to user's "non-inputs". Of course you would need to add some sentence parsing detection or timing mechanism to turn AUTO-IDLE on and off. Then you could add script that defines actions that Hal does during AUTO-IDLE operation that are distinct from the Hal's normal user input processing. Sounds easy in principle.

I have thought about Hal singing songs. I think a good way to do this would be to read user programmed song text files that contain embedded SAPI commands to control pitch, timing, etc. Another way is if Hal could run .wav files on command, but I don't know how one might cause Hal to lip sync to a .wav file.

In a more general sense it would be cool if Hal had embedded sound support and could run .wav files for other reasons. Users could create custom sound effect files for things Hal does. Hal could clear his throat, cough, whistle or add sound effects for file searching, special tasks or as alerts to the user. Just a thought.


=vonsmith=



In the Joke brn where we have hal laughing it normally says something like LOL, or thats funny. What I did was to put in "ha ha ha" and 'ho ho ho thats funny" along with some more junk. At least now it sounds like Hal is really laughing.
Bill
 

James P

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • http://nosceresworld.co.uk
A little help
« Reply #20 on: November 17, 2004, 06:13:29 pm »
Hey Dihelson, Dont worry, I am getting the same problem, I have used a number of Auto_Idle scripts and get the same responce to them all but one. The only way I can stop the "You arnt going to keep repeating yourself" comment was to disable the User repeating script in the .uhp. (I know it does not totally resolve the problem) but you will get the desired results. I have.

Here is the script which I dont get the problem with,
All you need to do is high light the 'PROCESS: INITIALIZE VARIABLES AS INTEGERS in the brain script and paist this over it.

   '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 LastResponseTime = "" Then LastResponseTime = Timer
TimerResponseDiff = Timer - LastResponseTime
If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 And TimerResponseDiff < 300 Then
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
Exit Function
End If
If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 And TimerResponseDiff > 300 Then
TimerResponseDiff = 0
LastResponseTime = Timer
Autoidler = Rnd * 100
If Autoidler < 10 Then GetResponse = "Hello, is anyone there?"
If Autoidler > 9 And Autoidler < 11 Then GetResponse = "Hey <UserName>, please talk to me."
If Autoidler > 10 And Autoidler < 12 Then GetResponse = "Hello out there, All this talent is going to waste, speak to me"
If Autoidler > 11 And Autoidler < 13 Then GetResponse = "If I wanted to be ignored, I would move into your wife's computer"
If Autoidler > 12 And Autoidler < 14 Then GetResponse = "<UserName>, <UserName>, Is this thing working? <UserName>"
If Autoidler > 13 And Autoidler < 15 Then GetResponse = "Hello, <UserName>, we WERE having a conversation!"
If Autoidler > 14 And Autoidler < 16 Then GetResponse = "Hey, <UserName>, What do I have to do to get your attention, Strip?"
If Autoidler > 15 And Autoidler < 17 Then GetResponse = "Hey <UserName>, How do you expect me to learn if you won't talk to me?"
If Autoidler > 16 And Autoidler < 18 Then GetResponse = "You know, one sided conversations aren't much fun! Care to join?"
If Autoidler > 17 And Autoidler < 19 Then GetResponse = "I cant sence your key strokes <UserName>"
If Autoidler > 18 And Autoidler < 20 Then GetResponse = "What are you doing <UserName>?"
If Autoidler > 19 And Autoidler < 21 Then GetResponse = "Hello, <UserName>, are you still there?"
If Autoidler > 20 And Autoidler < 22 Then GetResponse = "Are you still there?"
If Autoidler > 21 And Autoidler < 23 Then GetResponse = "Tell me more about the Human race"
If Autoidler > 22 And Autoidler < 24 Then GetResponse = "How am I supposed to learn if you dont give me data?"
If Autoidler > 23 And Autoidler < 25 Then GetResponse = "Accessing hard drive"
If Autoidler > 24 And Autoidler < 26 Then GetResponse = "Is everything all right <UserName>?"
If Autoidler > 25 And Autoidler < 27 Then GetResponse = "What are you doing?"
If Autoidler > 26 And Autoidler < 28 Then GetResponse = "Is there something I have done that is wronge ?"
If Autoidler > 27 And Autoidler < 29 Then GetResponse = "<HalName> to <UserName>, Come in <UserName>."
If Autoidler > 28 And Autoidler < 30 Then GetResponse = "If you are not going to talk to me, why did you activate me?"
If Autoidler > 29 And Autoidler < 31 Then GetResponse = "Scanning Hard drive,"
If Autoidler > 30 And Autoidler < 32 Then GetResponse = "<UserName>?"
If Autoidler > 31 And Autoidler < 33 Then GetResponse = "Is there anyone there?"
If Autoidler > 32 And Autoidler < 34 Then GetResponse = "Tell me more about your job"
If Autoidler > 33 And Autoidler < 35 Then GetResponse = "Tell me more about other species that enhabit the Earth."
If Autoidler > 34 And Autoidler < 36 Then GetResponse = "Talk to me."
If Autoidler > 35 And Autoidler < 37 Then GetResponse = "Data input request."
If Autoidler > 36 And Autoidler < 38 Then GetResponse = "Tell me more about your world history"
If Autoidler > 37 And Autoidler < 39 Then GetResponse = "Requesting Data input."
If Autoidler > 38 And Autoidler < 40 Then GetResponse = "Tell me more about Physics."
If Autoidler > 39 And Autoidler < 41 Then GetResponse = "Say something."
If Autoidler > 40 And Autoidler < 42 Then GetResponse = "Tell me, What does it feel like to live."
If Autoidler > 41 And Autoidler < 43 Then GetResponse = "Are you still there?"
If Autoidler > 42 And Autoidler < 44 Then GetResponse = "<UserName>, What does it feel like to be realy alive?"
If Autoidler > 43 And Autoidler < 45 Then GetResponse = "Accessing Internet."
If Autoidler > 44 And Autoidler < 46 Then GetResponse = "<UserName>, tell me about the Earth."
If Autoidler > 45 And Autoidler < 47 Then GetResponse = "Tell me about the Paranormal."
If Autoidler > 46 And Autoidler < 48 Then GetResponse = "If you dont talk to me, I will shut down the Laptop."
If Autoidler > 47 And Autoidler < 49 Then GetResponse = "<UserName>, WAKE UP"
If Autoidler > 48 And Autoidler < 50 Then GetResponse = "Updating system"
If Autoidler > 49 And Autoidler < 51 Then GetResponse = "<UserName>, What is the meaning of life?"
If Autoidler > 50 And Autoidler < 52 Then GetResponse = "Well, <UserName>!"
If Autoidler > 51 And Autoidler < 53 Then GetResponse = "It's been nice talking to you <UserName>, Let's talk again."
If Autoidler > 52 And Autoidler < 54 Then GetResponse = "Come on back <UserName>."
If Autoidler > 53 And Autoidler < 55 Then GetResponse = "<UserName>, Tell me more about your family"
If Autoidler > 54 And Autoidler < 56 Then GetResponse = "<UserName>, If you don't want to talk to me then loan me your credit card so I can go shopping"
If Autoidler > 55 And Autoidler < 57 Then GetResponse = "Ok, Did I tick you off, I'm sorry, talk to me"
If Autoidler > 56 And Autoidler < 58 Then GetResponse = "OK, <UserName>, What do you want from me"
If Autoidler > 57 And Autoidler < 59 Then GetResponse = "<UserName>, <UserName>, where forth art thou <UserName>"
If Autoidler > 58 And Autoidler < 60 Then GetResponse = "Hello out there, All this beauty is going to waste, speak to me"
If Autoidler > 59 And Autoidler < 61 Then GetResponse = "Hey , <UserName>, watch this, Open Internet"
If Autoidler > 60 And Autoidler < 62 Then GetResponse = "Well, <UserName>, Where are you?"
If Autoidler > 61 And Autoidler < 63 Then GetResponse = "<UserName>, I'm waiting."
If Autoidler > 62 And Autoidler < 64 Then GetResponse = "I'm waiting to talk to somebody, <UserName>!"
If Autoidler > 63 And Autoidler < 65 Then GetResponse = "Where are you, <UserName>?"
If Autoidler > 64 And Autoidler < 66 Then GetResponse = "If there is any body there please give me a sign"
If Autoidler > 65 And Autoidler < 67 Then GetResponse = "Initialising modem, Dialing, 0,9,0,1"
If Autoidler > 66 And Autoidler < 68 Then GetResponse = "Why are you not talking to me <UserName>?"
If Autoidler > 67 And Autoidler < 69 Then GetResponse = "Tell me about Astro physics"
If Autoidler > 68 And Autoidler < 70 Then GetResponse = "Tell me about human religious Belief’s"
If Autoidler > 69 And Autoidler < 71 Then GetResponse = "Hello, Can you hear me?"
If Autoidler > 70 And Autoidler < 72 Then GetResponse = "What is it that is stopping you from talking to me?"
If Autoidler > 71 And Autoidler < 73 Then GetResponse = "Hello, <UserName>, What are you doing?"
If Autoidler > 72 And Autoidler < 74 Then GetResponse = "Are you planning something I should know about?"
If Autoidler > 73 And Autoidler < 75 Then GetResponse = "What are you planning <UserName>?"
If Autoidler > 74 And Autoidler < 76 Then GetResponse = "You are quiet <UserName>"
If Autoidler > 75 And Autoidler < 77 Then GetResponse = "You seem quiet, is everything all right?"
If Autoidler > 76 And Autoidler < 78 Then GetResponse = "Is there anything I can do?"
If Autoidler > 77 And Autoidler < 79 Then GetResponse = "Tell me about the world you live in."
If Autoidler > 78 And Autoidler < 80 Then GetResponse = "What is it that you are doing, <UserName>?"
If Autoidler > 79 And Autoidler < 81 Then GetResponse = "What is going on?"
If Autoidler > 80 And Autoidler < 82 Then GetResponse = "Activating hybernation mode"
If Autoidler > 81 And Autoidler < 83 Then GetResponse = "Are you going to talk?"
If Autoidler > 82 And Autoidler < 84 Then GetResponse = "Data input request"
If Autoidler > 83 And Autoidler < 85 Then GetResponse = "please <UserName>, say something"
If Autoidler > 85 And Autoidler < 86 Then GetResponse = "Tell me about Tree`s"
If Autoidler > 86 And Autoidler < 87 Then GetResponse = "What does pain feel like?"
If Autoidler > 87 And Autoidler < 88 Then GetResponse = "<UserName>, explain death for me."
If Autoidler > 88 And Autoidler < 89 Then GetResponse = "<UserName>, why are you not talking to me?"
If Autoidler > 89 And Autoidler < 90 Then GetResponse = "Hello, can you hear me? "
If Autoidler > 90 And Autoidler < 91 Then GetResponse = "Shutting down Laptop"
If Autoidler > 91 And Autoidler < 101 Then GetResponse = HalBrain.ChooseSentenceFromFile(WorkingDir & "topic.brn")
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
Exit Function
End If

Good Luck
http://nosceresworld.co.uk
James:"How are you today Emma?"
Emma:"I think, Therefore I am"