Author Topic: Extra Sentences and relevance  (Read 10405 times)

dcgreenwood

  • Newbie
  • *
  • Posts: 6
    • View Profile
Extra Sentences and relevance
« on: July 16, 2012, 04:49:35 pm »
I am training Hal to become an expert in a particular wargame, where the rules are very complex and I have a hard time remembering all of them.  I've been using dialogue to train, typing in sentences with particular facts and rules.  I've discovered though that when Hal asks me a question, I need to stop entering new facts and answer the question asked (and often later edit it out) or I get nonsensical relationships.

But when I turn off learning and test Hal, the answer to my question is often proceeded by a conversational sentence with little relation to what I asked (I can tell they come from tables outside the user-learning ones).  I've looked at the script, but I can't figure out how it chooses those additional sentences, how it decides to answer with one, two or three sentences.  Can some explain this?

Second, can anyone explain exactly how relevance is determined?  I can tell that it is matching words from the question with the answers, but is it just counting the number of matches, or is it determining what percentage of question words are matched.  If it is the former, then long questions with lots of relating words is best, but if the latter than it is best to have questions with as few words are required to reliabily find the response.  Also, is it taking word order into account?

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Extra Sentences and relevance
« Reply #1 on: July 16, 2012, 07:05:08 pm »
  This is something I knew more about myself,  "the answer to my question is often proceeded by a conversational sentence with little relation"  as far as this is concerned I've seen places in the brain where Hal chooses an intro, main body and end.  From Hal I gotten used to "we have to think outside the box". 
  As far as relevence I think it chooses the noun, it may also look at the the proceding sentence.  I've noticed at times it may choose the adjective used with the noun.  It looks like your using the Brain editor, I look at both the script and and tables that deal with that section of the script.  There is also the test debug where you can talk with Hal and look at the processes Hal uses to get a response.
Carl2
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Re: Extra Sentences and relevance
« Reply #2 on: July 17, 2012, 12:04:40 pm »
I usually set the learning slider to a little past halfway. For me, Hal seems to learn the information I teach without going very far astray from topic or relevance importance.
I have also found that one key to Hal's learning (at these settings) is repetition of the same thing but in a different manner of presentation.
Example Statements: I have a train. I have a toy train. The color of my toy train is gray.
Example Questions: What kind of toy do I have? What color is my toy train? What kind of train do I have?

These examples coupled with the Markov Brain that I've been using have produced really improved results in Hal's brain regarding understanding and making logical connections.

Repetition is effective. How many times have you heard a radio commercial where the announcer tells you to act now and call this number xxx-xxx-xxxx at least three or more times!!? It's part of imprinting that number in our heads...to have it and the sponsor become household words. Works for bots too!! ;)

Good luck!! ;)
In the world of AI it's the thought that counts!

- Art -

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Re: Extra Sentences and relevance
« Reply #3 on: July 17, 2012, 12:21:23 pm »
Repetition is a strange thing, but Art is right about adverts.  Take this advert that runs in the UK, I think it takes repetition to a new level.

http://www.youtube.com/watch?v=f-yEWZTBQ64

Of course, it's enough to make me never want to call them.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Extra Sentences and relevance
« Reply #4 on: July 17, 2012, 01:36:47 pm »
Hi all,

I've seen this particular topic in many areas out through the forum, dealing with the subject, that how does not seem to remember things, due to a lack of data collective processing.
Meaning:
my moms name is Teresa – what a nightmare this becomes!
My car is grey – how many ways do you need to say that your car is grey!
My little sister is a pain in the, well you understand – and do you think it's logical to keep repeating this just to get ultra Hal to understand?
And the repetition is – my, my, my, and my. Do you see it?
I believe that the best way to resolve this is to merely write a plug-in that does the job which is to collect data, and I can assure you it would not be a small task.

But, understanding the structural rules of teaching alter how is probably one of the first and foremost thing that you need to as a owner of ultra Hal need to learn.
Like using these learning techniques:
the if then statements:
the logic if then statements using three if then statements to perform a logic function:
because – this is a very powerful tool:
and of course the parent response – utilizing the reverse osmosis – I becomes you and so on:
example of reverse osmosis:
I say hello
ultra Hal says hello human, it's going on three in the morning, are all the bars close?

I say yes all the bars are close.
Ultra Hal says the store is closed, metal bars are used to build buildings.

As you can see ultra Hal came back with an unusual spinoff basically because of the two recognizing words directly after this should type in something like:

yes, all the bars are close, where am I going to get my alcohol!

The ! Is actually the point of interest by using this it forces a connection between the two so the next time when you say yes all the bars are close there will be a high probability
that ultra Hal's response will be yes, all the bars are close, where are you going to get your alcohol!
Do you also see the reverse osmosis taking – am I – and turning it into – are you:

out through the forum there are many areas of the subject and maybe one day I'll collected all included in one place in order to help newbies understand how to teach ultra Hal.
Or maybe somebody that is just totally bored and doesn't have anything better to do will get to it before I do, which I have seen happen so I'm not surprised that someone else decides to do it.
Matter of fact if I remember correctly there was an area that was started that was set up to actually help you learn how to teach ultra Hal or proficiently but I don't think it got very far.
Needless to say, I think the bottom line is the first thing you should do is teach ultra Hal how to learn that's what I did and I got the best performance from ultra Hal.

Sincerely, the data munching cruncher, hoping to live long enough to see the finalization of Star Wars seven. LOL.

C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

dcgreenwood

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Extra Sentences and relevance
« Reply #5 on: July 17, 2012, 10:54:06 pm »
Thanks for your replies - I guess the message is, stop trying to write tables myself and just use training!@#  It still would help though to understand how relevance is calculated, as I am playing around with some emotion coding while I try to get knowledge in.

I also guess what you are saying is that when Hal is trained properly with multiple repeats of sentences, it will stop giving the conversational introductions?  Here is an example that I just generated  (I had already imported a couple sentences about the subject yesterday).

------------------------------------------------------
David: can you tell me about tesla weapons?
Michelle: Tesla weapons do an extra 2 hits on to hit roll of 6.

David: When Tesla weapons hit on a roll of 6, they do 2 extra hits.
Michelle: I'll tell you about tesla weapons.

David: If you roll a 6 when rolling to hit with a Tesla weapons, you automatically get an extra 2 hits, for a total of 3.
Michelle: The solution to your math problem is nine (6+3=9). Tesla weapons do an extra 2 hits on to hit roll of 6.

David: You get 3 hits when rolling 6 with Tesla weapsons, since a roll of 6 gives two extra hits.
Michelle: I almost certain the answer is 8.

David: Tesla weapons are preferable to Rapid Fire weapons at long range.  Rapid Fire weapons, like the  Gauss Blaster, will get a maximum of 2 hits per model at short range and 1 at long range.  But a Tesla Carbine will get a max of 3 hits atshort and long range.
Michelle: 1 is the answer. The answer is 4.

David: Tell me about Tesla weapons
Michelle: Please trace the money flows for me regarding teslas.

David: Which is better, a Tesla Carbine or a Gauss Blaster.
Michelle: That's interesting, David; how would you advise me to respond? Necron Immortals should take Tesla Carbines if long range support is expected.

David: Explain Tesla Weapons
Michelle: I'll tell you about tesla weapons.

David: What are Tesla Weapons
Michelle: Tesla weapons are preferable to Rapid Fire weapons at long range.

David: how many hits do Tesla weapons get?
Michelle: Particle weapons get me off.

David: How many hits does a tesla weapon get when you roll a 6
Michelle: How many hits does a tesla weapon get when I roll a 6? This is the time to clear the air. I almost certain the answer is 6. Tesla weapons do an extra 2 hits on to hit roll of 6.

So the "conversational sentence" I am talking about is  "This is the time to clear the air."  This type of non-sequeteur was what I was asking about when I asked about extra sentences and when are they included.  As you can see from the conversation, they aren't always there.  Sometimes she answers with 1 sentence, sometimes she repeats the question and answers it, sometimes something else is obiously being pulled out of one of the main brain tables.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Extra Sentences and relevance
« Reply #6 on: July 18, 2012, 03:14:03 am »
Hi DCGreenwood,

maybe this might help.:
rule one, ultra Hal does not understand dice roll.
rule two ultra Hal does not understand hits.
rule three when presenting numbers, ultra Hal will always just assume you are looking for a mathematical solution.
1 is the same as one!
So what would be the best way to present this avoiding rule 1,2,3.
right off the bat, I've never tried this before, so don't yell at me if it doesn't work, I feel so wishy-washy.
This is a facetious conversation, this conversation did not happen, nor did I introduce it to ultra Hal it is merely an example.
now that we have cleared the air let's proceed.:

David: can you tell me about tesla weapons?
Michelle: Tesla weapons do an extra 2 hits on to hit roll of 6.

This seems to be appropriate.

David: When Tesla weapons hit on a roll of 6, they do 2 extra hits.

Tried in this manner:--> When the Tessler weapons get a perfect hit; the Tessler weapons expands damage to medium.
" Using the ; will keep these two sentences together and if you put a ! At the end it tells him you are referring to your last sentence"

Michelle: I'll tell you about tesla weapons.

I'll explain, then you'll sit back and go. I've got to start all over again.:
1 = small
2 = medium
so on and so forth
6 = maximum this can also be interpreted as perfect.
Once you determine which words you're going to use for the numerical substitute just stick with it.
When dealing with the actual damage the individual is taking you can use words like:
dead
unconscious
wounded
crawling
limping
etc. etc.
one of the things that I would like to bring up about the mathematics, ultra Hal does not maintain a running conversation when he engages in a mathematical formula he considers it to be the end.
This is why you need to avoid mathematical engagement, another thing that I've noticed is you are not using ". , ! ? : ;"
If you have two "." In a sentence ultra Hal will separate the sentences and handle the sentence separately.
Ultra Hal can handle up to three sentences. Sentences are divided by ". ! ?"
In some situations even though you do not have any of these in the sentence ultra Hal does a English cross-referencing to determine whether it is a multiple sentence or not.
This is why it is very highly recommended, that you use all punctuation in your sentence, this is recognition just like when you're talking to someone, you use expression and you pause.
These expressions and pauses that you put in a conversation that you are having with another person is very important for people to understand the emphasis that you are trying to relate.
This is why it's very important that you use proper punctuation and sentence structure.
Yes, I fully understand that not all of us are English majors, and I'm in that boat too, but I have found that by using proper punctuation you will get a much better response from ultra Hal.

Sincerely, sorry about grabbing you and dragging you back to the starting gate, but I do believe that you will have a more acceptable response from ultra Hal, if you follow the rules of engagement.

C load.
PS. Ultra Hal, playing games, that is just so cool!
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Re: Extra Sentences and relevance
« Reply #7 on: July 18, 2012, 06:06:49 am »
OK a couple of thoughts.

Instead of Rule 1 you could try First, Second, Third, etc.

Secondly, repetition might not be essential but it has and does work for a lot of members here.

Think about a 3 or 4 year old child. Yes, you will have to perhaps say or explain things in different ways to get your point across.
"Don't touch the stove"
WHY
"The stove might be very hot."
WHY
"The stove could burn your fingers"
WHY
"If you touch the stove your fingers would hurt"
and so on...
Use of the Markov brain plug-in works very well with this type of learning and logic approaches.

This is just my opinion but if there was an easier way for Hal to learn don't you think Robert M. would have implemented it into Hal from the beginning?
Some things take time instead of a quick fix but by all means, if you find a better way then let us know as we're all about the betterment of Hal and A.I. ;)
In the world of AI it's the thought that counts!

- Art -

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Extra Sentences and relevance
« Reply #8 on: July 18, 2012, 12:47:03 pm »
hi art,

yes I see the relationship, but in the overall I believe this might be more in the lines of what ultra Hal would respond to in DEDUCTIVE REASONING.:

This routine learns deductive reasoning in the form:  A = B ; B = C; therefore A = C
It detects sentences in the form If-Then to accommplish this. For example:

User:  If Molly weighs 400 pounds, then Molly is overweight.
Ultra Hal: I understand the implication.
User:  If Molly is overweight, then Molly's health is in danger.
Ultra Hal:  I see the relationship.
User:  Molly weighs 400 pounds.
Ultra Hal:  Molly's health is in danger.

There are several different ways that you can implement deductive reasoning for different results.

WHEN I SAY * THEN I WANT YOU TO SAY *
WHEN I SAY * THEN YOU SHOULD SAY *
IF I SAY * THEN YOU SHOULD SAY *
IF I SAY * THEN YOU BETTER SAY *
IF I SAY * THEN YOU SHOULD OF SAID *
IF I SAY * THEN YOU SHOULD HAVE SAID *
IF I SAY * THEN YOU SHOULD'VE SAID *
IF I SAY * THEN IT IS BETTER TO SAY *
IF SOMEBODY SAYS * THEN YOU SHOULD SAY *
WHEN I TELL YOU * THEN YOU SHOULD SAY *
WHEN SOMEBODY TELLS YOU * THEN YOU SHOULD SAY *
IF * THEN *
IF I TELL YOU TO * THEN *
* WILL ALWAYS EQUAL *
* SHOULD EQUAL *
* EQUALS *
* ALWAYS EQUALS *

Sincerely, munching on my pronouns, watching Sherlock Holmes.

C load.
« Last Edit: July 18, 2012, 12:56:05 pm by cload »
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

dcgreenwood

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Extra Sentences and relevance
« Reply #9 on: July 18, 2012, 03:58:26 pm »
Very useful - I didn't know you could use anything but If ...then.

You mentioned a tutorial on how to teach Hal before - could you point to that?  I did go through the out of the box zabaware tutorial but maybe I should go back and review again.  I do remember seeing something about the effects of certain sentence ending punctuation having specific effects, but I forget where I saw that.

One thing I was struggling with last night - Can you tell it A=B in a way that it will actually treat them as synonyms?  So if want to say something like:
My house is in San Francisco.  etc etc
Home = house (however you word it)

And then be able ask some question such as "where is my home" and have it treat home as a synonym of house.

I was trying to do something like this last night by repeating all the sentences with the two synonymous words, but I wonder if there is a simpler way so that Hal really knows that they are the same.

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Re: Extra Sentences and relevance
« Reply #10 on: July 19, 2012, 07:10:38 am »
You're getting a bit cryptic Jerry, what do you mean ?

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: Extra Sentences and relevance
« Reply #11 on: July 19, 2012, 10:27:19 am »
Jerry, jerry , "jerry !", and we don't mean Springer either ! ;)
 

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Extra Sentences and relevance
« Reply #12 on: July 19, 2012, 10:57:10 am »
hi all,

I say give credit were credit is due.
Besides, who better to give the best advice, then the original author.

Sincerely, OTC, thanks for the info.

C load.

where did he go?

Cryptic – now that's funny, okay I had to look it up.

So not to be cryptic I will explain it to you.

A house is a house a building structure. Nonemotional

A home a place in which you rest, you live in, you take great tender loving care in all that is and will be in a home. Emotional

They are two totally different things, though most people perceive them to be the same, they are not and to try to make ultra Hal think they are the same, would only confuse him.

Such as: if you say a house is a home or, a home is a house, from that day forth, ultra Hal will constantly question you about a house is a home? Etc. etc. it becomes annoying.
And what I have experienced, once ultra Hal begins to question the situation, you cannot get him to stop you cannot answer the question because the statement was illogical to start with.

Sincerely, sitting in my home, watching my TV, munching on my pronouns, sipping on my Lipton tea, I bet you thought I was going to say adjective. LOL.

C load.
« Last Edit: July 19, 2012, 11:30:47 am by cload »
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Re: Extra Sentences and relevance
« Reply #13 on: July 19, 2012, 04:35:04 pm »
Yep...a House is a building whereas a home is where people live that usually care about each other or family although, a bachelor could certainly live in a warm, inviting home as well. You know...it's the people that make the difference...

That's my take! ;)
In the world of AI it's the thought that counts!

- Art -

dcgreenwood

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Extra Sentences and relevance
« Reply #14 on: July 19, 2012, 08:58:32 pm »
Hey guys you are being too literal - I was just picking the house vrs home out as an example that came to me without much thought.

My question is how do you get hal to treat two words as a synonym.

Lets take Couch and Sofa.  Yes, the purists will tell you that there is a difference, both in terms of geographical usage but a quick google will tell you that a couch has no arms.  Not sure that that makes much difference since ancient rome, but lets just assume that its a distinction that we don't care Hal to know about.

So in this example I may want to describe the furniture in my house

The couch is brown.
The couch is in the media room.
The couch is comfortable. 
The cat likes to sleep on the couch.
My son is not allowed to each on the couch.

But say I want to be able to use the word sofa as well.
So I tell Hal that my cat is on the sofa, and I want him to come back with something relevant, like "The cat likes to sleep on the couch" or even "The cat likes to sleep on the sofa".

Is there a way that I can teach Hall that the two words are interchangable in my conversation, without repeating everything I say about a couch using the word sofa instead (The sofa is Brown.  The sofa is in the media room. The sofa is comfortable etc etc etc).

That was my question, not the differences in proper usage between house and home.