AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Ordering Gambits in ChatScript?
 
 

Firstly, I am new to ChatScript - I apologize if this is a foolish question.

Here is my code:

topic: ~TEST keep repeat (test testing)

tI love my parentsAlsoyou are in a test topic.
  
a: (<<{[tell talk]} [who about what] [parent they them]>>) ^reuse(PARENTS)

uPARENTS (<<[who about] parent>>) My parents are Don Francisco and Donya Teodora!

tDAD_GAMBIT () My papa is awesome.
tMy papa is very smarthe knows a lot of stuffHe is also fluent in both Spanish and Latin.

tMOM_GAMBIT () My Mama is awesome.
tMama is just as good at money as my PapaI think she is the only woman in town who can do business! And she trained us to be just as practical!

#! who is Don Francisco
#! tell me about Don Francisco
u: (<<[who about] (Don_Francisco)>>) He is my papa. ^reuse(DAD_GAMBIT)
u: (<<[who about] (Donya_Teodora)>>) She is my mama. ^reuse(MOM_GAMBIT)
u: (<<[who about] ~father>>) My papa is named Don Francisco! ^reuse(DAD_GAMBIT)
u: (<<[who about] ~mother>>) My mama is named Donya Teodora! ^reuse(MOM_GAMBIT

No surprise there! Good old ChatScript is functioning perfectly. Here’s a good conversation that came about.

HARRY:  Welcome to ChatScript.
andre: > go to test
HARRY:  I love my parents. Also, you are in a test topic.
andre: > who are your parents
HARRY:  My parents are Don Francisco and Donya Teodora!
andre: > who is Don Francisco
HARRY:  He’s my papa. My papa is awesome.
andre: > ok
HARRY:  My papa is very smart, he knows a lot of stuff! He is also fluent in both Spanish and Latin.
andre: > nice
HARRY:  My Mama is awesome.
andre: > uh huh
HARRY:  Mama is just as good at money as my Papa! I think she is the only woman in town who can do business! And she trained us to be just as practical!

I :reset the conversation as I wanted to talk about Donya Teodora, the mother of pseudo-Harry first.

HARRY:  Welcome to ChatScript.
andre: > go to test
HARRY:  I love my parents. Also, you’re in a test topic.
andre: > who is donya teodora
HARRY:  She’s my mama. My Mama is awesome.
andre: > cool
HARRY:  My papa is awesome.

Understandably, After going to the MOM_GAMBIT, the DAD_GAMBIT was still unused and is ahead in the code, so it went there first.

My questions:

1. Is there a way to go to the MOM_GAMBIT and a number of succeeding related gambits? If so, may I ask for how that will be done, or what tools or commands I should use?

Using the example above, the “response” to my cool would’ve been “Mama is just as good…”

2. This scenario, in my chatbot, is kind of commonplace - i can imagine this happening for the parents, and even the siblings. Will creating facts be a better way of doing this?

Thank you in advance. smile

 

 
  [ # 1 ]

Note: since you are using unordered <<, then {[tell talk]}  is completely meaningless. You are saying it is optional to find this somewhere, which means it becomes unimportant to even look for it.

You could split this into two topics, one on mama and one on papa, then have either end with a gambit calling the other (eg ^gambit(~mama)

Whether or not to do this with facts is your choice. You still have to write rules that find the meaning. It seems clearer not to use facts in this context.

 

 
  [ # 2 ]

Woah, it is meaningless, I must have been sleepy when I wrote that. Thank you for your input, Mr. Wilcox!

Meanwhile, you probably hear this often, but ChatScript is still very awesome. Thank you for it!

 

 
  login or register to react