[alicebot-archcomm] [motion] <shuffle>
Conan Callen
alicebot-archcomm@list.alicebot.org
Fri, 17 May 2002 10:32:43 -0700
>
> My own personal concern is how this would work in a multi user system.
Would
> for each user every used <li> in every <random> tag be recorded? If so,
> would these records be saved upon exit of the system. I know this is part
of
> the implementation of the AIML specification but I think the ArchComm
could
> make an recommendation regarding the implementation of this tag.
>
> Anne
>
x = How many occurances before a string can be repeated.
It probably would only require that the last x random-li's be saved to
insure that they dont pop back up for x draws off the deck.
If the whole strings are saved, then it could be quite large. But hard
drives are cheap these days. If indexes are saved (assuming that you an
indexed method), then you save a lot of memory, but indexes are brittle (if
the random li list is modified by the botmaster).
Use hashes to conserve memory:
Rather then using indexes, you could make a hash of the last x items and
save those hashes. This would get around the brittle index problem, but if a
string is modified or delted after the user leaves, when the same user
returns the hashes will not resolve back to the orginal string (call this a
Hash Miss) (because the string has changed or deleted). In the case of a
hash miss, you could just pick the next valid item in the list, because even
if you selete the last li that this user was given it will have been changed
in some way and is not technically the same string.
Conan