« Return to Thread: Problems with forum ai mod based on alice

Conditional problem

by Ioannis Doumanis :: Rate this Message:

Reply to Author | View in Thread

Hello all,

I am a bit new in AIML and so my problems. I have the following script which
refuses to execute correctly. What the script should do is the following:

User: Hi; Robot What is your name?; User: Giannis; Robot: Nice to meet you
giannis; User: I am blond ; Robot: you sound very handsome. This means that
once the robot match the users name with the one in the list, it should set
the gender of the user accordingly and when the user states I am blond to
respond appropriately. Wit the script below the dialogue progresses
correctly until "Giannis". From there and after the bot replies correctly
"Nice to meet you giannis" but also add are you a man or woman (something
which is not suppose to happen). Also when the user states "I am blond" the
bot replies "You sound very" without the appropriate "attractive or
handsome".  Any ideas what is wrong? Please help! I am using the AIMLPad    

<aiml>

<category>
<pattern>Hi</pattern>
<template>What is your name</template>
</category>

<category>
<pattern>*</pattern>
<that>What is your name</that>
<template>
<think><setname/></think>
Nice to meet you <getname/>.
<srai>GET NAME GENDER</srai>
</template>
</category>

<category>
<pattern>GET NAME GENDER</pattern>
<template>
<condition name ="name">
<li value="Giannis"><think><set_gender>male</set_gender></think></li>
<li value="nick"><think><set_gender>male</set_gender></think></li>
<li value="adreas"><think><set_gender>male</set_gender></think></li>
<li value="maria"><think><set_gender>female</set_gender></think></li>
<li value="elena"><think><set_gender>female</set_gender></think></li>
<li>Are you a man or a woman?</li>  
</condition>
</template>
</category>
<category>
<pattern>I am blond</pattern>
<template>You sound very
<condition name="complement">
<li value="female"> attractive.</li>
<li value="male"> handsome.</li>
</condition>
</template> </category> </aiml>





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer

 « Return to Thread: Problems with forum ai mod based on alice

LightInTheBox - Buy quality products at wholesale price