« Return to Thread: Pickup Line Puzzle

Re: Pickup Line Puzzle

by Mike Procter :: Rate this Message:

Reply to Author | View in Thread


Well, here is an attempt to simplify the relevant aiml. Not all
supporting categories are present but hopefully it demonstrates the
concept adequately.

Some background. This was developed as part of an on going study, by Bob
Heller at Athabasca University, into the application of historical
figure conversational agents in distance education. A few famous names
from the field of Psychology are represented by Freudbot, Piagetbot, and
Skinnerbot.

Part of the challenge in using a conversational agent for education is
keeping the conversation "on topic" (referring to the subject, not an
aiml topic). One of the methods for addressing this is to identify when
multiple consecutive non-matches occur.  Basically, the pre-processor
approach allows us to apply conditional(s) to every user input.

The extra aiml processing associated with this is significant but does
not seem to cause a problem in response times as a rule.

If you'd like to try it out, visit Freudbot's office in SecondLife:
http://slurl.com/secondlife/Athabasca%20University/178/153/249

Mike


<category>
<pattern>CONNECT</pattern>
<template>
<think>
Saving actual topic: <set name="theactualtopic"><get
name="topic"/></set>;
Setting topic to: <set name="topic">PREPROCESSOR</set>;
</think>
</template>
</category>

<topic name="PREPROCESSOR">

<!-- Saves input pattern in ppstar, restores topic from theactualtopic
-->
<!-- SRAI's PREPROCESSOR -->
<category>
<pattern>_</pattern>
<template>
<think>
Processing: <set name="ppstar"><star/></set>;<br/>
<condition name="theactualtopic" value="PREPROCESSOR">
<set name="theactualtopic"><get name="startingtopic"></set>
</condition>
Restoring actual topic: <set name="topic"><get
name="theactualtopic"/></set>;<br/>
</think>
<srai>PREPROCESSOR</srai>
</template>
</category>

</topic>
<!-- End PREPROCESSOR -->

<!-- Increments inputcount (INCR * routine not shown) -->
<!-- SRAI's user input from ppstar -->
<!-- After processing user input... -->
<!--   if otflag (ot = off topic) is 1 indicates * was matched so
increments otcount -->
<!--   if otflag is 0, resets otcount -->
<!--   resets otflag to 0 -->
<!--   saves current topic to theactualtopic and sets topic to
PREPROCESSOR -->
<category>
<pattern>PREPROCESSOR</pattern>
<template>
<think>
inputcount was: <set name="counter"><get name="inputcount"/></set>;
setting inputcount: <set name="inputcount"><srai>INCR PP2</srai></set>;
</think>
<srai><get name="ppstar"/></srai>
<think>
<condition name="otflag">
<li value="1">
otcount was: <set name="counter"><get name="otcount"/></set>;
setting otcount: <set name="otcount"><srai>INCR PP1</srai></set>;
</li>
<li>Setting otcount: <set name="otcount">0</set></li>;
</condition>
Setting otflag: <set name="otflag">0</set>;
<br/><br/>Done executing...<br/>
<condition name="topic">
<li value="PREPROCESSOR"></li>
<li>
Saving actual topic: <set name="theactualtopic"><get
name="topic"/></set>;<br/>
Setting topic to: <set name="topic">PREPROCESSOR</set>;<br/>
</li>
</condition>
</think>
</template>
</category>

<!-- Sets otflag (off topic flag) -->
<!-- Checks otcount (how many consecutive hits on *), -->
<!--    if 3 then suggests new topic (SUGGESTTOPIC not shown) -->
<!--    else tries typical default categories (not shown) -->
<category>
<pattern>*</pattern>
<template>
<think>
<set name="otflag">1</set>
</think>
<condition name="otcount">
<li value="3"><think><set
name="otcount">0</set></think><srai>SUGGESTTOPIC</srai></li>
<li>
<random>
<li><srai>SAY CONFUSION STATEMENT</srai></li>
<li><srai>ASKRANDOMQUESTION</srai></li>
<li><srai>SAYDEADENDSTATEMENT</srai></li>
</random>
</li>
</condition>
</template>
</category>



-----Original Message-----
From: alicebot-general-bounces@...
[mailto:alicebot-general-bounces@...] On Behalf Of Dr.
Rich Wallace
Sent: May 21, 2008 3:59 PM
To: Alicebot and AIML General Discussion
Subject: Re: [alicebot-general] Pickup Line Puzzle


Yes, I'd like to see it.  Is it too long to publish here?


_______________________________________________
This is the alicebot-general mailing list
Reply to alicebot-general@...
Unsubscribe and change preferences at http://list.alicebot.org/mailman/listinfo/alicebot-general
Learn netiquette at http://www.dtcc.edu/cs/rfc1855.html
Learn to read at http://www.literacy.org/

 « Return to Thread: Pickup Line Puzzle