[pandorabots-general] conditional based on a predicate
Ron Ingram
fra_nsn at yahoo.com
Sun Aug 13 12:07:50 PDT 2006
Perfect I think this is working well on some tests, I
suppose I could do a list within a list also so that
if I want to filter certain random responses out of a
long list of random responses based on what the bot
"knows" about a client I could use this same approach
by simply nesting this list within a larger random
list (making it a bit less 'random').
I'll play around with this and let you all know it
goes after I put some examples into live "production".
Thx everyone,
Ron
--- alison <ali.carver at gmail.com> wrote:
> G'day Ron,
>
> I've been doing this with a condition tag - it's a
> little bit tedious but it
> works; for example;
>
> <pattern> What is my name? </pattern>
> <template>
> <condition name="name">
> <li value="*"> Your name is <get name="name"/>.</li>
> <li> You haven't told me. What is your name? </li>
> </condition>
> </template>
>
> ... what that does is checks if it has a value, and
> does one thing if it
> matches the wildcard character ( * ) and something
> else if it doesn't - i.e.
> it's empty.
>
> if you have the default return for "get"s set to ""
> then this will work;
> otherwise the second <li> statement needs to look
> like this...
>
> <li value="default return statement"> not sure </li>
>
> usually this will be "OM".
>
> hope that helps / all the best...
> Alison
>
> -----Original Message-----
>
> > From:
> >
>
pandorabots-general-bounces+brian_hoecht=msn.com at list.pandorabots
> > com
> >
>
[mailto:pandorabots-general-bounces+brian_hoecht=msn.com at list.pan
> > dorabots.com] On Behalf Of Ron Ingram
> > Sent: Saturday, August 12, 2006 1:28 PM
> > To: pandorabots-general at list.pandorabots.com
> > Subject: [pandorabots-general] conditional based
> on a predicate
> >
> > I find with long conversations my bot often asks a
> few
> > questions that it should already "know" the answer
> > too, for example asking "how old are you" when the
> > client indicated their age only a few questions
> prior.
> >
> > Does anybody have an example of a conditional
> > statement in aiml to turn a response on or off
> based
> > on whether a client predicate has a value or not?
> >
> > For example if the bot already has a client age
> > predicate with a value of 38, the bot would
> respond
> > with "when is your birthday" instead of "how old
> are
> > you", unless it already had a client predicate
> value
> > for "birthday" in which case it would respond
> with,
> > "what is new with you". But if the value for
> either
> > age or birthday was empty then the bot would go
> ahead
> > and ask "how old are you" or "when is your
> birthday".
> >
> > I think this would greatly enrich bot
> "intelligence",
> > any help very much appreciated.
> >
> > thx,
> >
> > Ron
> >
> >
> > _______________________________________________
> This is the pandorabots-general mailing list
> To Post, reply to
> pandorabots-general at list.pandorabots.com
> Unsubscribe and change preferences at
>
http://list.pandorabots.com/mailman/listinfo/pandorabots-general
> Learn netiquette at
> http://www.dtcc.edu/cs/rfc1855.html
> Learn to read at http://www.literacy.org/
More information about the pandorabots-general
mailing list