[alicebot-archcomm] [motion] <shuffle>

Noel Bush alicebot-archcomm@list.alicebot.org
17 May 2002 12:06:56 +0400


On Fri, 2002-05-17 at 11:39, Anne Kootstra wrote:
> I agree with Conan here that the difference in functionality between
> <shuffle> and <random> is very subtle. My personal opinion is that most
> people would prefer to use the <shuffle> tag in stead of the <random>.
> Effectively depreaciating the <random> tag. However, as Noel mentioned,
> backwards compatibility is something that should certainly be taken into
> account.

Hmm, but what do you think about the other problem I mentioned, that
"backward compatibility" might create absolutely undesired behavior. 
Look at this imaginary template:

<template>
  Now I will choose another card.
  I choose
  <random type="shuffle/plain">
    <li>Ace of Spades</li>
    <li>Two of Spades</li>
    <li>Three of Spades</li>
    ...
    <li>King of Diamonds</li>
  </random>
</template>

If you wanted this to choose a different card each time, until the full
"deck" was exhausted, then which outcome would you prefer when faced
with Program X, which does not know about random type="shuffle/plain":

1) The program uses the "default" behavior, which is the current
<random>, which can result in the same card being chosen more than once
before all cards have been chosen once.

2) The program signals an error at runtime (or better, when starting
up), indicating that this type of random is unknown (so you'd better not
expect to get the behavior you wanted).

I think most people would prefer outcome 2.  Outcome 1 could in this
example get the bot accused of cheating.  :-)

So if the "default behavior" approach cannot work reliably here, there
is maybe no advantage in making this new function an "attributed random"
vs. a new tag.  The advantage of a new tag, in fact, would be that it
indicates a new function, not implying that it is a variant of an old
one.

Noel