Author Topic: [red]I am not sure which way to go[/red]  (Read 7020 times)

dmacdonald111

  • Newbie
  • *
  • Posts: 6
    • View Profile
[red]I am not sure which way to go[/red]
« on: June 30, 2005, 07:46:27 am »
Can anyone help me. I am not sure which way to go about teaching Hal (the name I have given to Robby the robot). Do I try and teach him by sticking to the same subject until he has grasped it, or follow him when he changes subjects. Some things he seems to learn straight away and other things he just doesn't pick up but I cannot see any definate pattern as to how he is learning this.

Any help would be gratefully appreciated.

Dan
 

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
[red]I am not sure which way to go[/red]
« Reply #1 on: June 30, 2005, 10:17:52 am »
I believe as a FAQ, you tell Hal things, like:

"The sky is blue"
"My favorite color is blue"
"Your favorite color is pink"
"My favorite food is pizza"

You have to feed Hal information. I usually ignore Hal if he changes the subject, unless I cannot think of anything to say.

But someone with more experience than I could probably tell you how to train Hal better than I could.
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"

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
[red]I am not sure which way to go[/red]
« Reply #2 on: June 30, 2005, 10:20:29 am »
dmacdonald111,
The answer to all your questions are here in the forum. Use the 'Search' function near the top right part of the forum page. You will be amazed at the wealth of information previously discussed in the forum.

Here are some results of a search I did on your topic:

http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1933&SearchTerms=how,to,teach,hal,sentences,if,then

By the way, which Hal brain are you using? If you are using the XTF Brain then just converse with Hal normally. You can nudge, but don't force Hal to stick to one subject. Don't feed him knowledge from a list by rote. The original Hal and especially the XTF Brain learn from normal conversation. Use good grammar and spelling. Avoid slang during Hal's early training. If Hal asks questions then answer them accurately. In general use single sentences, not multiple sentences, when conversing with Hal.

=vonsmith=
« Last Edit: June 30, 2005, 10:29:44 am by vonsmith »
 

onthecuttingedge2005

  • Guest
[red]I am not sure which way to go[/red]
« Reply #3 on: June 30, 2005, 01:39:45 pm »
quote:
Originally posted by dmacdonald111

Can anyone help me. I am not sure which way to go about teaching Hal (the name I have given to Robby the robot). Do I try and teach him by sticking to the same subject until he has grasped it, or follow him when he changes subjects. Some things he seems to learn straight away and other things he just doesn't pick up but I cannot see any definate pattern as to how he is learning this.

Any help would be gratefully appreciated.

Dan



Hi Dan.

In My studies of programming with Hal I know that one line per brain file is usually appended per statement.

It is this one line appending which sometimes makes Hal less responsive, For some reason when Hal searches for a proper response the bot will search an enormous collection of information, Hal has more than one possible response that it thinks it has to choose from so the response you expect may be 1 out of a possible hundred responses that are similiar.

I also understand that files with less lines of collected information are called upon rarely and may be rarely used until the file gets larger, Files with less than 1 meg are usually retarded from being responsive.

I have noticed a key number through my research for better responses is that if 3 appending lines are saved inside the same file the file becomes less retarded and will be called on more often.

an example:
@Cats have long tails.
CATS HAVE LONG TAILS

compared to:
@Cats have long tails.
CATS HAVE LONG TAILS
@Cats have long tails.
CATS HAVE LONG TAILS
@Cats have long tails.
CATS HAVE LONG TAILS

The set of 3 QA responses gets found easier by QA and has 3 times more response power.

This also works for newly created files such as topic search and choose sentence from file.

Having only a single line appending requires repetive teaching to build up at least 3 of the same sentence to make it responsive in memory.

From my experience it is better to just append the 3 lines instead of having to tell the bot 3 times before it's picked up.

A file with 0kb with only 1 line in it will "never" be used in a response.

This is what I have learned and wanted to share it with you.

Jerry.
« Last Edit: June 30, 2005, 01:41:57 pm by onthecuttingedge2005 »

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
[red]I am not sure which way to go[/red]
« Reply #4 on: June 30, 2005, 02:19:24 pm »
onthecuttingedge2005,
Interesting thoughts. It's possible that the HalBrain.QABrain() search function created by Zabaware may not handle .brn files with one response in them correctly. This is only a suspicion since I haven't specifically tested it recently. I think this may also be related to the need for an extra carriage return character at the end of most .brn files. Fortunately it is very rare for a .brn file to have a single response for very long. I'm pretty sure the HalBrain.ChooseSentenceFromFile() function has a problem with files with only one response line. This is why the XTF Brain Nickname function places two identical lines per user nickname in the XTF_SYS_UserNickname(username).brn file.

I am skeptical about your observations about the repetition of the same responses in the QA format .brn files. I've worked with the HalBrain.QABrain() function extensively and haven't observed this characteristic. I wish I had Zabaware's source code to check it out. The XTF Function within the XTF Brain actually tries not to add repetitive responses into QA format .brn files to keep those files from becoming overly large. The XTF Brain still chooses the correct response even if the response only occurs only once in a .brn file. The XTF Brain also relies on some XTF specific .brn files that are designed to have one, and only one, occurrence of a response.

However adding extra identical lines to .brn files accessed by the HalBrain.ChooseSentenceFromFile() *will* increase the likelyhood of that response being chosen. The XTF_SYS_UserNickname(username).brn operates that way. The more frequently a nickname appears in that file the more likely it will be chosen. This is just a statistical probability.

For those who haven't tried the XTF Brain nickname function out just try this:

User: My nickname is Mud.
Hal: May I call you "Mud" sometimes?
User: Yes.
Hal: Okay, I'll call you "Mud" as a nickname.

You can enter as many nicknames as you want this way. The more times a nickname is entered the more often it will be used in lieu of the other nicknames. To remove a nickname you have to manually delete the nickname line from the "XTF_SYS_UserNickname(yourusernamehere).brn" text file in the DefBrain directory. Hal will use your new nickname infrequently in any case.


=vonsmith=
« Last Edit: June 30, 2005, 02:21:56 pm by vonsmith »
 

onthecuttingedge2005

  • Guest
[red]I am not sure which way to go[/red]
« Reply #5 on: June 30, 2005, 03:08:12 pm »
quote:
Originally posted by vonsmith

onthecuttingedge2005,
Interesting thoughts. It's possible that the HalBrain.QABrain() search function created by Zabaware may not handle .brn files with one response in them correctly. This is only a suspicion since I haven't specifically tested it recently. I think this may also be related to the need for an extra carriage return character at the end of most .brn files. Fortunately it is very rare for a .brn file to have a single response for very long. I'm pretty sure the HalBrain.ChooseSentenceFromFile() function has a problem with files with only one response line. This is why the XTF Brain Nickname function places two identical lines per user nickname in the XTF_SYS_UserNickname(username).brn file.

I am skeptical about your observations about the repetition of the same responses in the QA format .brn files. I've worked with the HalBrain.QABrain() function extensively and haven't observed this characteristic. I wish I had Zabaware's source code to check it out. The XTF Function within the XTF Brain actually tries not to add repetitive responses into QA format .brn files to keep those files from becoming overly large. The XTF Brain still chooses the correct response even if the response only occurs only once in a .brn file. The XTF Brain also relies on some XTF specific .brn files that are designed to have one, and only one, occurrence of a response.

However adding extra identical lines to .brn files accessed by the HalBrain.ChooseSentenceFromFile() *will* increase the likelyhood of that response being chosen. The XTF_SYS_UserNickname(username).brn operates that way. The more frequently a nickname appears in that file the more likely it will be chosen. This is just a statistical probability.

For those who haven't tried the XTF Brain nickname function out just try this:

User: My nickname is Mud.
Hal: May I call you "Mud" sometimes?
User: Yes.
Hal: Okay, I'll call you "Mud" as a nickname.

You can enter as many nicknames as you want this way. The more times a nickname is entered the more often it will be used in lieu of the other nicknames. To remove a nickname you have to manually delete the nickname line from the "XTF_SYS_UserNickname(yourusernamehere).brn" text file in the DefBrain directory. Hal will use your new nickname infrequently in any case.


=vonsmith=



Hi Von.
Great to see you again.

A while back I did an experiment.

3 controlled test files.
1. TestFile1.brn
2. TestFile2.brn
3. TestFile3.brn

What was in QA TestFile1.brn
@Cats have long tails.
CATS HAVE LONG TAIL
'-------------------------
What was in QA TestFile2.brn
@Cats have long tails.
CATS HAVE LONG TAIL
@Cats have long tails.
CATS HAVE LONG TAIL
'-------------------------
What was in QA TestFile3.brn
@Cats have long tails.
CATS HAVE LONG TAIL
@Cats have long tails.
CATS HAVE LONG TAIL
@Cats have long tails.
CATS HAVE LONG TAIL
'-------------------------
All files were non random call with no RND or Spinners.
All Calls were called by UserBrainRel only.
'--------------------------------------------------
After testing through debug, I found that TestFile3.brn had been called
more often than TestFile2.brn and TestFile1.brn rarely got called if ever and when TestFile1.brn did get a hit it would send a blank half the time.

I do know that you do have more programming experience than I do so I take everything you say seriously and absorb it with a passion.

If you could shed a bit more light on the subject I would greatly appreciate it.

Jerry.

« Last Edit: June 30, 2005, 03:08:54 pm by onthecuttingedge2005 »

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
[red]I am not sure which way to go[/red]
« Reply #6 on: June 30, 2005, 03:45:14 pm »
It shouldn't be needed to append the same information more than once. The QABrain funtion will never ignore data contained in a file.

However, if the QABrain function sees several responses with a similar relevance score (defined as plus or minus 4 percent) it will randomly choose among those responses. This was put in to add more variety to Hal's responses as if Hal always chose the #1 relevance score answer, Hal's answers would be repetitive and many responses pertaining to a topic would never be used.

So basically, if you add a response to the QABrain file more than once, you increase the probability it will be chosen over other similar responses.
Robert Medeksza

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
[red]I am not sure which way to go[/red]
« Reply #7 on: June 30, 2005, 04:08:53 pm »
onthecuttingedge2005,
It's good to be back, if only during the little hiatus I am enjoying this week. Well, you saw the response from Hal's dad. I guess our observations are both correct. Given the plus or minus 4 pct criteria the probability of a response selection is dependent on the number of similar response occurrences within the file. It is a good thing that the XTF Brain does minimize repetitions within a .brn file. Otherwise the very common responses would overwhelm other less common responses that have a similar relevance score.

Thanks Robert M. for the clarification. The 4 pct variability explains some of the frustration I was having during testing of the XTF Brain v1.4. The XTF Brain v1.4 looks for exact or near exact occurrences in a special file using the HalBrain.QABrain() function. There were some inconsistencies I couldn't account for. I'm actually misusing this function to decode and parse user inputs, a task it wasn't designed for. However it works pretty well. I've done similar things using the HalBrain.TopicSearch() function. When I have time I'd like to figure out how to write and compile my own custom functions. It can't be too hard to do.

Anyway... Jerry it's good to have you and hopefully some of the old gang to discuss the real nuts and bolts with. You've put a lot of time in writing script and I've learned a lot and gotten some great ideas from your work.

=vonsmith=
 

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
[red]I am not sure which way to go[/red]
« Reply #8 on: June 30, 2005, 05:35:15 pm »
quote:
Originally posted by vonsmith

 When I have time I'd like to figure out how to write and compile my own custom functions. It can't be too hard to do.


The next version of Hal will give script writers a lot more power with its SQL engine to do database queries far exceeding the standard functions built into the HalBrain.DLL. I've made a lot of progess with the new Hal over the past few months and may share an early alpha version with this forum in a couple of weeks.
Robert Medeksza

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
[red]I am not sure which way to go[/red]
« Reply #9 on: June 30, 2005, 05:38:21 pm »
I've always wondered why there are redundancies in Hal's .brn files.

One says it's better, one say it isn't.

That is true, in the XTF 1.2 brain, there are many files, each one for each keyword. Some are not used as much as the others, and some are never used.

But, if there are repetitions in the brn files, Hal will more likely respond the same way each time. Hal would be more human if "HE" did not answer the same way each time. But you want Hal to respond correctly..

Foe instance:

ME: It is hot today
Hal: Yes, it's good to have A/C.

Then next time:

ME: It is hot today
Hal: Yes, it's very hot.


Then next time

ME: It is hot today
Hal: Yes, a cold drink would be nice.

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"