|
|
Experienced member
Total posts: 37
Joined: May 16, 2012
|
Hello again,
I have another question regarding a problem of mine. In my testing script I have many gambits that ask questions and rejoinders to accept answers. For example:
FILE: questions.top
#! outer world r: IMPW () Would you prefer to focus on the outer world or on your own inner world? a: (<<outer>>) ^ImpPoint(E) a: (<<inner>>) ^ImpPoint(I)
#! yes r:EXPT () ^keep() [Do you like to analyze pros and cons, and then be consistent and logical in deciding?] a:(<<[~yes yes]>>) ^ExpPoint(T)
When I run the script and these questions show up:
FILE: introductions.top >test Question 1: Would you prefer to focus on the outer world or on your own inner world? >outer Try again >
The script gambits the questions script but it does not stay for a rejoinder to fire off. I wanted to make a loop that would choose a random gambit and record the users answer before moving on to the next question.
Im quite baffled on how to approach this situation. Is there anyone who can help?
|
|
|
|
|
Posted: Dec 22, 2014 |
[ # 1 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
is this CS 4.90 (which has a rejoinder bug) or CS 4.91 (in which that bug was fixed?)
|
|
|
|
|
Posted: Dec 22, 2014 |
[ # 2 ]
|
|
Experienced member
Total posts: 37
Joined: May 16, 2012
|
This is CS 4.91 where the bug was fixed.
|
|
|
|
|
Posted: Dec 22, 2014 |
[ # 3 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
start the harry introductions topic as follows and see if it works. It works for me. Since your code is incomplete, I don’t know what ^ImpPoint(E) and the like do.
topic: ~INTRODUCTIONS (~emogoodbye ~emohello ~emohowzit name here )
r: IMPW ()
Would you prefer to focus on the outer world or on your own inner world?
a: (<<outer>>) outer is it
a: (<<inner>>) inner is it
|
|
|
|
|
Posted: Dec 22, 2014 |
[ # 4 ]
|
|
Experienced member
Total posts: 37
Joined: May 16, 2012
|
Sorry about the confusion, I fixed the problem. The ^ImpPoint(E) and those functions are simple point acumulators for IMPlicit and EXPlicit question types.
At first, when the scripts in introduction.top called to a question, after answering it the gambit responder would register a point via function call in question.top. In addition, CS would try to respond to the user response in the responder in introductions.top. I forgot about this because the after the responder added the points for correct answers in question.top, the it would also try to generate a response in introductions.top which confused me.
after realizing this and making changes to the question.top adding keep to the topic rather individual questions the very opposite happened. After one volley in the questions.top the control was lost and the program bombarded me with questions.
As a solution, I made question.top a system topic and added and nostay it tags to it. Also taking some knowledge from the forum discussion about general rejoinders, I made functions to pull questions from question.top, The functions are:
^ask() - pulls random question
^askExplicit() - pulls random explicitly asked question
^askImplicit() - pulls random implicitly asked question
|
|
|
|
|
Posted: Dec 22, 2014 |
[ # 5 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
So currently you are happy?
Note: system is automatically nostay.
|
|
|
|
|
Posted: Dec 22, 2014 |
[ # 6 ]
|
|
Experienced member
Total posts: 37
Joined: May 16, 2012
|
Yes I am very happy. I can proctor an exam of qustions explicitly or I can test users passively by calling questions during casual conversational flow.
A few side notes though;
I could not get the loop() {} function to ask one question at a time so I created a psuedo loop that works great:
# Ask user to take the test, if declined give the passive test #! yes t: Do you want to take a test? a:(<<[~no no]>>) ok then. a:(<<[~yes yes]>>) Awesome! Lets get started. \n $questions = 10 ^reuse(TEST)
# Ask random questions pulled from the question bank u: TEST ($questions>0) ^keep() ^repeat() ^ask() $questions -= 1
So far this worlk great for me. Another unrelevant side note, Is there a wiki for ChatScript? I believe that having a wiki would help the growth of the ChatScript community and also for the advanced programmers; could be a place to showcase their bots and share their knowledge also. If there is no existing wiki, I would be happy to make one.
|
|
|
|
|
Posted: Dec 23, 2014 |
[ # 7 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
You can give me an example of the loop code you used and I can probably tell you how to fix it.
There is currently no Wiki for ChatScript. I’m happy for you to make one, but the question becomes where is it hosted? I don’t know enough about wiki essentials, and permission for writing, otherwise I would probably put the entire set of manuals as a wiki on brilligunderstanding.com
bruce
|
|
|
|
|
Posted: Dec 23, 2014 |
[ # 8 ]
|
|
Experienced member
Total posts: 37
Joined: May 16, 2012
|
Bruce Wilcox - Dec 23, 2014: You can give me an example of the loop code you used and I can probably tell you how to fix it.
There is currently no Wiki for ChatScript. I’m happy for you to make one, but the question becomes where is it hosted? I don’t know enough about wiki essentials, and permission for writing, otherwise I would probably put the entire set of manuals as a wiki on brilligunderstanding.com
bruce
The code for my loop was:
t: TEST () ^keep() Do you want to take a test? a: (~no) Ok, fine a: (~yes) ok great $questions = 15 $state = testing ^reuse(TESTING)
u: TESTING ($state=testing) ^keep() ^repeat() $questionNum = 1 loop($questions) { Question $questionNum :\n ^ask() \n $questionNum += 1 }
The code above displays all questions as a bulk paragraph. Can you help?
When it comes to the wiki, I plan on using https://www.openshift.com/ for hosting, Ive hosted a few school projects including my own private wiki on it so starting up a new account and hosting the wiki will be simple.
As for the wiki essentials and permissions for writing, look into media wiki, they created the wiki engine used by Wikipedia and most wiki websites. I will create a forum looking for Wiki admins, developers, and managers adding you as an administrator as well of course.
Learning how the wiki works is simple and they are extendable and programmable. Have you ever heard of a wiki bot? In a nut shell its an autonomous account that performs whatever its programmed for. I hope soon we can also be able ChatScript into wiki bots but thats future reference and speculation.
|
|
|
|
|
Posted: Dec 23, 2014 |
[ # 9 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Skipping temporarily the question of wikis..
For your loop, Loop uses a COUNT, not a condition, so once it is started it doesnt stop until it “fails” in some way or runs out of count. So when you do ^ask, if that generates a question, you’ll need to fail the loop. Easiest way is:
before the loop do: $$tmpcount = %response and inside the loop after ask,
if (%response != $$tmpcount) end(rule)
which will terminate the loop
|
|
|
|
|
Posted: Dec 23, 2014 |
[ # 10 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Note this is redundant patterning:
a:(<<[~no no]>>)
you don’t need << >> because you are not providing more than a single “thing” inside it, so order is moot anyway.
a: ( [~no no])
does the same job in this case.
|
|
|
|
|
Posted: Dec 24, 2014 |
[ # 11 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
on this wiki, I’ll happily take your help. I’m fine with having you create a wiki there. I would then point to it from sourceforge.
do we start with putting all the doc sections as wiki sections?
|
|
|
|
|
Posted: Dec 30, 2014 |
[ # 12 ]
|
|
Experienced member
Total posts: 37
Joined: May 16, 2012
|
Yes we would have all of the docs converted as wiki pages and links to the source forge page and any other pages to be listed. Currently my Internet situation is extremely limited temporarily. Ill have things going soon though.
Also thank you for the tip on my redundant patterning
|
|
|
|
|
Posted: Dec 30, 2014 |
[ # 13 ]
|
|
Experienced member
Total posts: 37
Joined: May 16, 2012
|
Also,
If you have any preference, what would you like to have the domain name and the wiki name?
|
|
|
|
|
Posted: Dec 30, 2014 |
[ # 14 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
dont know how they get used…. obviously ChatScript is a good name….
does ChatScript as domain and documentation as another make sense.
|
|
|
|
|
Posted: Jan 1, 2015 |
[ # 15 ]
|
|
Experienced member
Total posts: 31
Joined: Oct 23, 2014
|
Anything new on the wiki thing?
I think it would be helpful and I will also try my best to donate from what I’ve learn.
|
|
|
|