[alicebot-archcomm] [motion] <shuffle>

Noel Bush alicebot-archcomm@list.alicebot.org
15 May 2002 17:58:54 +0400


I'd like to see a <shuffle> tag added to AIML, along the lines described
by Yuri (quoted below).  Here's my proposal:

a) Text for insertion into the AIML spec;

7.3.3. Shuffle
The shuffle element instructs the AIML interpreter to behave as follows:
if not all of the li children of the shuffle have yet been returned to
the current user by the AIML interpreter for the current bot, then from
the set containing all li children that have not yet been returned to
the current user by the AIML interpreter for the current bot, one li
child is selected randomly and returned.  If all of the li children of
the shuffle have been returned to the current user by the AIML
interpreter for the current bot, then the status of the shuffle is reset
as though none of its li children have been returned to the current user
by the AIML interpreter for the current bot, and a selection is made
according to the first rule.

<!-- Category: aiml-template-elements -->
<aiml:shuffle>
    <!-- Contents: default-list-item+ -->
</aiml:shuffle>

b) Becomes effective immediately upon approval (not the default 30
days).  Justification: this isn't a change to an existing function, so
no existing AIML will be broken.

According to our rules, I need a second and then we may vote.

Noel

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

On Mon, 2002-04-29 at 03:55, Yuri A. Tijerino wrote:
> I believe I started the most recent Random threat in the list.  I
agree with
> Noel, I think there is a need for a function (whether it is <random>
or not
> I don't care) that allows the bot to choose <li>s that have not
previously
> been chosen before.  I think taht a new <shuffle> function or changing
the
> current <random> function so that it implements "random selection
without
> replacement" should do.  I think the math or statistics can be solved
once
> we have defined what it should do.
> 
> >From a bot developer point of view I would like to see a function
<Function>
> that randomly selects an item from a list of elements, but on the next
time
> around selects a different element randomly until all elements have
been
> selected during a session.  It would be desireable that once all
elements
> have been selected once, then the function would start selecting again
from
> the same set.
> 
> The closest analogy I can think of is a deck of cards.  Lets say the
deck
> has 10 cards for convenience.
> First shuffle the deck and select one card.  Put the card on a
separate
> deck.
> Now shuffle the original deck and select another card.  Put the card
on the
> separate deck.
> Repeat until all cards on the original deck have been exhausted.
> Now begin the process again with the second deck creating another
deck.
> 
> This is the kind of function that I think would make conversations
with bots
> more interesting, specially with the number of items in the function
is not
> so large.