[alicebot-archcomm] Matching Order Revised

Kim Sullivan alicebot-archcomm@list.alicebot.org
Thu, 20 May 2004 12:41:53 +0200


> (Can you name a bot that uses <topic/> and that is not one from Dirk? Even
> Alice does not use <topic/> ;-))

She does, try lizards ;-) Also, my bots often use topic in some form (sadly,
I've got none of them on display anywhere).

> With this matching order i think that a catchall in a topic could be a
> pre-process action, or it can mange the behaviour of switching between
> topics or do something other like fall in the * <topic/>.

This seems rather complicated, could you be more specific?

> > The basic premise in AIML is that the more you know about the
> user input,
> > the bettern a certain response is - disregarding all other contexts.
>
> isn't it too strict ? ;)

Yes and no - since AIML also allows you adjust the order with the
underscore, therefore boosting certain topics. So - yes, it is strict, but
there are ways to override this behaviour, if so desired.

> K. said:
>
> > This allows you to stay flexible - when talking about the weather and
> > somebody suddenly yells "WATCH OUT!" you probably won't continue to talk
> > about the weather.
> >
>
> in this revised matching order topics are like chambers. For
> example in each
> topic the catchall is used to manage the topic change behaviour, so i can
> think of sentences like "let's talk about something else" or "What do you
> know about foobar" in the * <topic/> are the keys to leave and join any
> room.

But they probably won't get to the * <topic/> because they will be "stopped"
by the catchall inside the topic:

<category>
<pattern>LETS TALK ABOUT SOMETHING ELSE</pattern>
<template>OK, we'll talk about <set name="topic">something
else</set>.</template>
</category>

<topic name="lizards">
<category>
<pattern>*</pattern>
<template>Do you want to continue talking about Lizards?</template>
</category>
</category>
</topic>

<category>
<pattern>NO</pattern>
<that>DO YOU WANT TO CONTINUE TALKING ABOUT LIZARDS</that>
<template>
<think><set name="topic"></set></think>
<srai><input index="2"/></srai>
</template>
</category>
</topic>


This looks OK, doesn't it? But let's look at the behaviour. Each example
assumes the topic is set to lizards:

Ex. 1 - Standard behaviour, expected input handled outside a topic:
User: Let's talk about something else.
Bot: OK, we'll talk about something else.

Ex. 2 - standard behavior, unexpected input:
User: What do you know about foobar?
Bot: Do you want to continue talking about Lizards?
User: No
Bot: I don't know much about foobar

Ex. 3 - Standard behaviour, unexpected input, assuming "standard" srais:
User: What do you know about foobar?
Bot: Do you want to continue talking about Lizards?
User: I suppose not.
(the above triggered a srai category that srais to "no")
Bot: I don't know much about foobar

You see, everything works more or less as expected. We'll try to have the
same conversations with the modified behaviour:


Ex. 1 - Modified behaviour, expected input handled outside a topic:
User: Let's talk about something else.
Bot: Do you want to continue talking about Lizards?
User: No
Bot: OK, We'll talk about something else

Ex. 2 - Modified behavior, unexpected input:
User: What do you know about foobar?
Bot: Do you want to continue talking about Lizards?
User: No
Bot: I don't know much about foobar

Ex. 3 - Modified behaviour, unexpected input, assuming "standard" srais:
User: What do you know about foobar?
Bot: Do you want to continue talking about Lizards?
User: I suppose not.
Bot: Do you want to continue talking about Lizards?
User: I said no!
Bot: Do you want to continue talking about Lizards?
...

As you can see, the modified bot get's of rather well in the first 2
examples (he didn't catch the "something else" but managed to recover), but
fails horribly in the third case - you disable all srai preprocessing. Using
your room analogy, your order seals the user hermetically in a single room,
and he has to use keys to get to the hall and to all other rooms. The
current order leaves the user in the hall and only unlocks doors to other
rooms so the conversation has more space. But the current order also allows
(using underscores) to seal off the user in a single room if this is needed.

> Indeed, i think in this way it is possible to divide specific topics in
> compartments and leave all the basic patterns in the general one.

> Like if in a boring chat we are talking about nothing and you say: how is
> the weather?
> in this way you are able to catch on specific keywords that uses
> _ and move
> on in a spicific topic to gather the reply. moreover you can continue the
> chat about that topic or jump in another topic using the catchall in that
> topic.

But how is this different from the way it currently works? Or better, could
you provide AIML examples of cases where the current order fails or is
inappropriate, and your order works better?

> as a last disclaimer: i haven't tried it practically but you are
> free to do
> it ;-)

Oops, well, you should try it. Definitely ;-) Change your bot's behaviour,
write some categories, explore the mechanisms you propose and then come back
with what you've found out. Please?

Kim