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..

Question about $cs_randIndex
 
 

Hello, I have a problem with using random gambit and random output by using [].

In my script, when one user logged in same bot again and again, system choose the same outputs or gambits those are random, even if I used %rand variable and print that, system prints same number.

-introductions.top

t: ( %input<%userfirstline )
%
rand
^AFTER_CHANGE_BOT()

outputmacro: ^AFTER_CHANGE_BOT()
[Welcome again.][Glad to meet you again.][I really missed you!][How have you been?

and the results are always 75 Glad to meet you again. I’ll attach log file and result image.
Also I have same problem with using random gambit;topic has 10 of r: gambits and call gambits in that topic using ^gambit(~topic), always the 5th gambit executed. 

So, I researched documents, logs and cpp files in SRC directory, and I guess $cs_randIndex may affect choosing random things.

In my USER/log-xxx.txt files, $cs_randIndex variable is always fixed when I command :reset. And also, in cpp files, I checked a function that randIndex variable newly set when ReadNewUser().

I just used simplecontrol.top, and didn’t add any cpp private code.

Here is my Questions :
1. Is my guess right? (That mean $cs_randIndex affect choosing random.)
2. Why $cs_randIndex value fixed? Or is it just me?
3. Can I change $cs_randIndex at random? If not, is there any conflict?
4. I want to change $cs_randIndex value when any existing user logged in. What should I do? Do I have to add private code or modify control top files?

Thank you for reading long question, I’ll be waiting for reply smile

 

 
  login or register to react