When using an AIML context (via <that>) I get some conversations I cannot explain. I expected that a (that) context would have priority over anything else.
Below I first show the script. Then I show a few conversations. I marked the inexpected parts with a // behind the response.
I added this Aiml file to the standard ALICE conversations.
The script:
<category><pattern>STEP 1</pattern>
<template>Step 2</template>
</category>
<category><pattern>YES</pattern><that>STEP 2</that>
<template>step 3</template>
</category>
<category><pattern>NO</pattern><that>STEP 2</that>
<template>step 3</template>
</category>
<category><pattern>*</pattern><that>STEP 2</that>
<template>step 3</template>
</category>
<category><pattern>*</pattern><that>STEP 3</that>
<template>Step 4! and you typed '<star/>'</template>
</category>
In the following conversation I marked the unexpected responses with // ?
Human : step 1
Robot : Step 2
Human : yes
Robot : step 3
Human : yes
Robot : Step 4! and you typed 'yes'
Human : step 1
Robot : Step 2
Human : no
Robot : step 3
Human : no
Robot : So. // ? I expected here step 4
Human : step 1
Robot : Step 2
Human : any
Robot : any is a name. // ? I expected here step 3
Can you explain both UNexpected flows of conversation?