Wednesday, May 28, 2008

Program E Bug

We found a bug in the Program E AIML interpreter and discovered a possible workaround. This post describes the bug; we will publish the solution in a subsequent post.

Suppose you create a simple default category:


<category>
<pattern>*</pattern>
<template>Keywords: <star/></star>
</template>

Assuming there is no other AIML, this category will just echo
whatever you type:

Client: Hello there
Bot: Keywords: Hello there
Client: testing one two three
Bot: Keywords: testing one two three

Now add a second AIML category,


<category>
<pattern>_ TEST ME *</pattern>
<template><srai>TEST ME</srai></template>
</category>

We get the expected result:

Client: xxx test me xxx
Bot: Keywords: TEST ME

Ok, finally, add one more category:


<category>
<pattern>TEST * ME</pattern>
<template>TEST ME</srai></template>
</category>

Now it is messed up:

Client: test xxx me
Bot: ME

What happened to the "TEST"?
and even the one that worked before is broken:

Client: xxx test me xxx
Bot: ME

If we copy the same AIML test file over to Pandorabots:

Client: test xxx me
Bot: TEST ME
Client: xxx test me xxx
Bot: TEST ME

4 comments:

  1. Hey Dr. Wallace,
    Please have a look at this "date format" bug fix for ProgramE:
    https://sourceforge.net/tracker/?func=detail&atid=435447&aid=1921653&group_id=43190
    You can delete this comment afterwards.

    All the best!
    Chip

    ReplyDelete
  2. Got a problem, It's just me or is a real bug.

    <category>
    <pattern>CENTRE IS *</pattern>
    <template><srai>center is <star/></srai></template>
    </category>
    <category>
    <pattern>CENTER IS *</pattern>
    <template>is <star/></template>
    </category>

    I type: Center is cool
    Respond: is cool
    I type: Centre is cool
    Respond: is cool

    is ok up to here, but if I do this:

    <category>
    <pattern>CENTRE *</pattern>
    <template><srai>center <star/></srai></template>
    </category>
    <category>
    <pattern>CENTER *</pattern>
    <template><star/></template>
    </category>

    I type: Center is cool
    Respond: is cool cool
    I type: Centre is cool
    Respond: is cool cool cool cool

    Why I get this weird loop with the last word?
    I hope to find a solution, this is making my head loop a lot more than 4 times...

    ReplyDelete
  3. More about the Bug.
    I'm using Program E (PHP)
    Got the same problem with "About" with two or more words after that.
    Just installed fresh from the programe-v.09.zip
    I did it with a Linux server as a Windows server and got the same bug.

    Client:About what I did today
    Robot:Oh yeah, we were talking about what I did today I did today.

    Why?!
    Thanks

    ReplyDelete
  4. Got the solution at http://sourceforge.net/forum/forum.php?thread_id=1848343&forum_id=141071

    This blog should be merged with
    http://sourceforge.net/forum/forum.php?forum_id=141071
    I guess

    regards!

    ReplyDelete

 

blogger templates | Make Money Online