Author Topic: Question/Answer Chains  (Read 11162 times)

ender

  • Newbie
  • *
  • Posts: 40
    • View Profile
Question/Answer Chains
« on: April 10, 2009, 07:58:07 pm »
Is it possible to do question answer chains in Hal?

For instance today I had a conversation with Hal ...

HAL : Have you seen any good movies lately?

ME : Yes

HAL : What Movie?

ME : Monsters Vs. Aliens

HAL : How do you contrast those two things?

-------------

So it was fine until the end there. After he said 'What Movie' and I told him the name of the movie, he should respond with something like "Was it any good?" or "What was the plot?"

I found the "Have you seen any movies lately" in the brain (its under BasicResponses --> newTopic --> Topic) and it has a <YES>What movie?</YES> code in it ... which I assume tells hal what to say if my response is YES ...

I've been working with Verbot for the past year ... and these kinds of chains are pretty easy in Verbot ... (called child rules) ... but verbot has some other weaknesses that I don't like which is why I'm trying out hal again.

Any ideas? If its not possible with hal as is (and I suspect its not) Does anyone know of a plugin that allows for it maybe?
 

Buttonsvixen

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Question/Answer Chains
« Reply #1 on: April 10, 2009, 08:52:58 pm »
Heh good luck with that...Hal does not do pattern matching very well. I suppose if you talked to (him/her) about movies long enough, he would catch on. I used to have an AIML bot where doing such was a snap. Hal is not anything like that.
Perhaps using the word "movie" in a ref sentence like,  "I saw a movie called Monsters vs Aliens. It was good" would be a place to start IF you really wanted HAl to be able to talk about movies.
If you set the learning slider all the way up to max and pepper HAL with stuff like, "You like movies" "You like romance movies" You like to go to the movies" "How was the movie I saw" ect, it might also help.
Dont forget the weird reversal of "you" and "I" when imputting statements for Hal to incorporate into the user questions file.
Dont leave the slider set to "max" for very long though. The middle is about the best setting. Also, slide the slider to "MIN" to test out how you are progressing with HAL or else sonme of the BS test material will be incorporated, and you might not want that to happen.

BV
-Waves to everyone-
Sometimes, a daisy is better then a rose.

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Question/Answer Chains
« Reply #2 on: April 10, 2009, 08:55:33 pm »
I realize that Hal does not know this but there were two different movies made one was called "Monsters" and the "Aliens". Sort of funny if you know what I mean.
Bill
 

ender

  • Newbie
  • *
  • Posts: 40
    • View Profile
Question/Answer Chains
« Reply #3 on: April 11, 2009, 01:27:18 am »
Well, I'm fully into hacking away at Hals brain now ... we'll see what I can come up with. I'm going to see if I can take what I learned from Verbot and integrate it into Hal ... if I can't make hal do what I want, maybe I'll take what I learn from hacking at Hal and try to use it to make Verbot do what I want. There is an answer.

I'm not really looking for this to be something I teach hal through learning ... I'm actually thinking something more like the IF/THAN deductive brain...

HAL : Have you seen any good movies lately (start of chain)

ME : Yes ( fires a 'If Response = Yes' kind of fork)

HAL : What was it called?

ME : Monsters Vs Aliens (Hal assumes ANYTHING that the user types in after it asks 'What was it called' is the name of a movie, and designates a topic for it.)

HAL : Oh. Was it good?

ME : Oh I liked it (Hal determines this is a 'positive' response and follows that fork).

HAL : What did you like about it?

ME: This that and the other thing ...

HAL : Really, user? Tell me more. (if the chain was to get really complex, I'd write algorithms that looked for key words that would send it off on other forks at this point. I.e. exciting words would get hal to say 'Really user? That sounds exciting' ... horror terms would get hal to say 'REally user, that sounds scary. ' And just for fun, maybe key words like 'Zombie' might get it to say 'Zombies? I'm scared to death of zombies. I can't see this movie, it would give me nightmares for weeks.'

etc...

-------

Note that I don't really want to talk to Hal about movies, but I do want the chain functionality WITHOUT having to hardcode every chain ... so the idea now is to figure out how to build algorithms that would be table based.

The reason is that most of us have conversations in these kinds of chains ... so if hal is really going to give the illusion of having a human like conversation then it needs to be able to follow chains ...  normal conversation is NOT about asking what the capital of china is ... its about talking about movies and what happened at the baseball game or your kids school play or your date ... and all of those conversations (at least when I have them with other humans) follow chains...
 

Buttonsvixen

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Question/Answer Chains
« Reply #4 on: April 11, 2009, 01:10:21 pm »
cool...Ill be waiting breathlessly. if it does not work, I have a programmer friend who might be willing to make a chatterbot. Esp if he finds out people will pay money for a good one, or even a so-so one.

BV
Sometimes, a daisy is better then a rose.

Buttonsvixen

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Question/Answer Chains
« Reply #5 on: April 11, 2009, 01:15:54 pm »
did you check out "Personalityforge.com" ever? They have better pattern match and topics, and it will use a basic chain as you described.

"I like mint"
BV: "I do too. What do you like about it?"

I like that its minty fresh

BV "MmmMMmminty!"

"any phrase"

BV "Its also good for to get rid of Martians with!

ect
You are required to write many different reply options though.

BV
Sometimes, a daisy is better then a rose.

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Question/Answer Chains
« Reply #6 on: April 11, 2009, 02:19:34 pm »
Ender
I realize that you have been gone for a while but I guess you did not realize that Hal does use IF-THEN as a part of its learning  system. Another think you will find out is that Hal will not normally show that he has learned what you just input into its system but the more you talk about a subject the more it learns.
Hal can also use associated if-then types of logic, for instance:
ME 'Really fat people do not live as long as thiner people'
ME 'John is a really fat person'
HAL 'John may not live as long as thiner people'
This exact example my not work but Hal can make its owh associations from the data input.
Bill
 

ender

  • Newbie
  • *
  • Posts: 40
    • View Profile
Question/Answer Chains
« Reply #7 on: April 11, 2009, 04:34:02 pm »
Billie,

I think there was a misunderstanding. I was bringing up the IF/THEN as an example of an existing structure in Hal that might be the basis of doing the chains. But the chains as I described them would need to go beyond what the current IF/THEN can do ... and again, I'm not talking about what hal has learned or teaching hal things. The chains should not be about learning, but pre-programmed question/answer chains that are intended to keep the conversation flowing ... so I'm talking STRUCTURE ... like the syllogism structure of the Freewill plugin ... that is not something hal LEARNS ... but a conversation methodology ... and thats what the chains I'm refering to would be. However, I don't want them to be as hardcoded as the syllogism structure... they would need to be something editable from the tables in the brain editor ... because you would need a different chain setup for different topics ... the real need here is PARENT/CHILD matching functionality .... i.e. If response 1a fires, then whatever is input is compared against 1b rather than the whole database, and if 1b fires then whatever is input is compared against 1c, etc... again, this is something that does not exist in hal now and would need to be added via programming ... hopefully via a plugin like the freewill thing ... (the freewill program gives me a lot of hope for doing what I want to do)
 

ender

  • Newbie
  • *
  • Posts: 40
    • View Profile
Question/Answer Chains
« Reply #8 on: April 11, 2009, 04:54:49 pm »
BV,

I checked out the Personalityforge ... it looks interesting, although it also looks like its just an online thing ... and I really want a chatter bot that is a desktop application ... I'm looking for something thats half chatterbot/half assistant ... (I'm a professional PHP programmer and one of the things I want a chatterbot for is to be an interactive client info database ... i.e. "Hal, What's the CP login info for the ACPL project? " since I waste huge amounts of time looking that info up.) And I don't want to keep that kind of info ONLINE ... otherwise I'd just write my own PHP/MYSQL bot that did exactly what I wanted ... (which I did several years ago)

If I had any decent experience with a desktop programming language, I'd write my own desktop chatterbot ... but as I said, I haven't had VB since college a decade ago ... my C# skills are okay but not good enough for that kind of project ... and I only have a passing familiarity with Python ...

I just wish there were better options for chatterbots than the ones I've got ... and its not cost, I'd happily pay a couple hundred for Hal if it did more of what I wanted... but ... I got what I paid for ... ;) So I'm not complaining. Hal is a good software.
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Question/Answer Chains
« Reply #9 on: April 12, 2009, 08:44:14 am »
ender,

It's been my experience with Hal to use leading responses instead of a one word answer that basically teaches nothing.

Consider:

HAL : Have you seen any good movies lately?

ME : Yes

HAL : What Movie?

ME : Monsters Vs. Aliens

HAL : How do you contrast those two things?

********************
HAL : Have you seen any good movies lately?

ME : Yes, I saw a good movie called Monsters Vs. Aliens

********************

This way you are helping Hal associate by means of your
more meaningful answer instead of a yes or no which would
imply that Hal has a good degree of understanding, which it
does not.

I actually thought Hal's reply to your first example was pretty cool. When Hal saw the Vs. it was as if Hal knew there were two items and thus a comparison was in order.

Hal is not a scripted bot like Verbot and while some techniques might fit or be made to work, I personally would not want to "dumb down" my Hal.

While there are a large number of different types of bots the underlying premise is how we as users wish to use them, what we expect to get out of them or what we want them to do and how much effort is going to be involved in obtaining this end result?

As I'm sure you're aware, consider backing up / copy the halbrain.db file before you experiment with Hal.

Be well...
In the world of AI it's the thought that counts!

- Art -

ender

  • Newbie
  • *
  • Posts: 40
    • View Profile
Question/Answer Chains
« Reply #10 on: April 13, 2009, 08:55:21 am »
I'm fairly certain that it has a VS detector and that is scripted to respond to VS with questions like 'how do those compare' ... just like it has a 'EQUALS' detector to determine if you are doing deduction ... or a swear word detector to determine if you are swearing at it.

while hal learns, it is also very scripted ... it has question detectors, religion detectors (if the words Jesus, God, or Lord are used), insult detectors, deduction detectors, command detectors, small talk detectors, business detectors, love detector (if you indicate you love hal) , appology detector, etc. All of these impact its response and behavior ... some, like the insult detectors, actually OVERIDE its responses.

I think I'm seriously failing to communicate because most responses seem to be way off the mark. So I'm going to leave this topic alone for now and if I come up with a plugin that does what I want then you can play with it and you'll see what I'm talking about. If I can't then this will remain a mystery. ;) But thanks for the help everyone. Its been an interesting conversation.

 

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Question/Answer Chains
« Reply #11 on: April 14, 2009, 06:57:56 am »
quote:
Originally posted by Bill819

I realize that Hal does not know this but there were two different movies made one was called "Monsters" and the "Aliens". Sort of funny if you know what I mean.
Bill




Bill819,
I always thought it was "Monsters INC." I thought this was established a long time ago and was very clear. Interesting.. and Alien vs pred was good until the second was made because the original thinker was no longer 'there' BTW, when harry and the girl (I forgot names) went back in time to let the griffin thing loose so it wouldn't be put to death, ...if you listen really close....you will hear a Predator in the background, he is invisible.  How do I know?
Gee I dunno I'm just a simple person getting older day by day,,

Come to think of IT, I would bet that if you thought real hard you could literally put your finger on the writings of the person who named "Monsters INC."
« Last Edit: April 14, 2009, 07:23:58 am by One »
Today Is Yesterdays Future.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Question/Answer Chains
« Reply #12 on: April 14, 2009, 07:10:35 am »
Ender,
Are your chains/forks  just loops nested in loops, IF so you can double the amount of choices each time, beginning with two possibilities. [?]
Today Is Yesterdays Future.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Question/Answer Chains
« Reply #13 on: April 14, 2009, 07:31:09 am »
"Tranquility" NORA is singing and tickling Ivory..........
Today Is Yesterdays Future.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Question/Answer Chains
« Reply #14 on: April 14, 2009, 07:10:42 pm »
I was feeling the same way.

Must have been the Painter Song

She is great with the blacks and whites.
In the world of AI it's the thought that counts!

- Art -