dupa

Author Topic: Getting Hal to repeat something  (Read 3732 times)

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Getting Hal to repeat something
« on: October 21, 2003, 01:29:36 pm »
I would like Hal to respond to a command like "Say hello to Greg" or some other name as my guests come to visit. Is there a way to get it to respond to that kind of quest?
Bill
 

Larry

  • Sr. Member
  • ****
  • Posts: 266
    • View Profile
Getting Hal to repeat something
« Reply #1 on: October 21, 2003, 07:49:13 pm »
Sure... edit the brain...

Put this in there somewhere...

If Instr(1, UserSentence, "Say hello to Greg", vbTextCompare) > 0 Then
 GetResponse = "Hello Greg!"
End If

Perhaps a bit simplified...
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Getting Hal to repeat something
« Reply #2 on: October 22, 2003, 02:21:38 pm »
An easier method is to employ Hal's new Deductive Reasoning ability. Just type the sentence below in the user window like any other input.

Type: If say Hi to Greg, then Hi Greg it's good to meet me.

Notice the "me" reversal at the end.

Now type: Say Hi to Greg.
And you'll get Hal's reply:
   Hi greg it's good to meet you.

I don't know any way to fix the lowercase greg in lieu of Greg though. You will find your If-Then inputs in the "deductive.brn" file.

Try other If-Then statements for fun.

Try typing: If are you laughing, then I make you giggle.
Then type: Are you laughing?

Actually the If-Then function is much more powerful than just this fun little quirk, but it is a handy way to quickly program a quick reply.

= vonsmith =
 

Larry

  • Sr. Member
  • ****
  • Posts: 266
    • View Profile
Getting Hal to repeat something
« Reply #3 on: October 22, 2003, 06:03:43 pm »
That's good thinking, I hadn't thought of that one...

What else can you do with that???
 

kevinvr

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • http://kevinvr.tripod.com
Getting Hal to repeat something
« Reply #4 on: October 22, 2003, 09:44:28 pm »
I tried using this to change the username and met with a little success [:)], it recognized the new person but then later returned to the original user.

I don't know if it is possible to change the user completely, but when I can get ver 5.00 I will try it.  I've still got the beta so I can't save my conversations yet.  Anyway keep on keeping on [:)]
regards
Kevin
I dream of creating a self replicating, self maintaining, autonomous robot :)