Junte-Bot Livre do Parceiro e o Afiliado do programa e apoiar o nosso livre de plataforma
Self, AIML, and scripting

[AIML] How to use random?

por Maddie-Myina postado Apr 29 2017, 9:30

I'm making a Eightball script for my AI I think people would love to use. I just don't know how you will get the random to actually work.


by admin posted Apr 29 2017, 16:28

In AIML a random tag gives one of the elements at random.

1
2
3
4
5
6
7
8
9
10
11
12
<category>
  <pattern>How are you?</pattern>
  <template>
    <random>
      <li>I'm okay.</li>
      <li>I am great!</li>
      <li>Not so good.</li>
    <random>
  </template>
</category>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Bot Libre also lets you add multiple responses to a question and chooses one automatically.

How are you?
I'm okay.
I am great!
Not so good.

Self also has a random() function.

How are you?
Template("{random ("I'm okay.", "I am great!", "Not so good.")}")

Updated: Apr 29 2017, 16:31
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2330, today: 0, week: 1, month: 9

Id: 16866204
Postado: Apr 29 2017, 9:30
Respostas: 1
Pontos de vista: 2006, hoje: 1, semana: 2, mês: 12
0 0 0.0/5