[alicebot-general] AIML conflict solving

Helio Perroni Filho xperroni at yahoo.com
Fri Sep 22 07:34:36 PDT 2006


--- "Dr. Rich Wallace" <drwallace at gmail.com> escreveu:

> <category>
>   <pattern>* WENT TO *</pattern>
>   <template>first </template>
> </category>
> <category>
>   <pattern>* TO *</pattern>
>   <template>second</template>
> </category>
> <category>
>   <pattern>*</pattern>
>   <template>none</template>
> </category>
> 
> gives 'second'.
> 
> My first impression is that ProgramQ is behaving
> correctly since there's nothing in the spec
> that permits to resolve such a conflict (by
> forbidding "greedy-matching" for instance).
> 
> What do you think guys?

This behaviour might not be "wrong" (that is, in
violation of the spec), but it's not very convenient
either. It's a basic assumption that, when several
rules apply to a given input, the "more specific" one
will be favoured. This is not only more intutive but
also more useful, as it allows botmasters to create
category hierarchies where progressively more generic
patterns return progressivaley more general responses.

Also, remember that the description of the "*"
wildcard says that it only matches an input element
when there would be no way to match it with a (1) "_"
wildcard or (2) non-wildcard element. This may leave
the first example open to discussion, but in the
second case it seems clear to me that the category
that leaves less elements to the wildcard (that is,
the more specific one) should be favoured.

-- 
Ja mata ne.
Helio



	



	
		
_______________________________________________________ 
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/


More information about the alicebot-general mailing list