[alicebot-archcomm] [discuss] (2) sets and lists in AIML

Manos Batsis alicebot-archcomm@list.alicebot.org
Tue, 19 Mar 2002 10:17:33 +0200


Sorry, missed this before :-)


> From: Manos Batsis 

> > From: Dr. Richard S. Wallace [mailto:drwallace@alicebot.org] 
> > 
> > Stepping back for a moment, we overlooked one fundamental 
> > question.  What is
> > the definition of "equals"?  To implement <remove> or <less> 
> > you need to
> > define an equals() function of some kind.  One choice would 
> be to say
> > "equals" means "matches with AIML Pattern mathcing rules."

Please don't!

Let's say we have an expression A that matches any sequence of integers
above zero; Then

A = {x: x is an integer, x > 0}

And you have two variables V1 and V2 that match the pattern then both V1
and V2 are subsets of U, where U is all strings matching A (thus, A's
universal set). The logical thing to use is 

If( V1.subsetOf(A)  && V2.subsetOf(A) )

And *not*

If ( V1.hasTheSameSupersetWith(V2) )

Because the context is wrong. Um... Am I making any sense?

More specifically on the "matches with AIML Pattern rules" I think that
it should not be confused with "equals". More something like

A.matches(V1) 

Or 

V1.matchOf(A)


Kindest regards,

Manos


> > Another choice
> > would be "equals" means "exactly equal to including case, 
> punctuation,
> > spaces etc."  Thoughts?  Strongly held convictions?
> > 
> 
> 
> The way I see it (and since I'm so happy being at the 
> university this year) equals means 'has the same members with'.
> So I guess it's a matter of how complex your typing is or, in 
> other words, what are you considering to be the members of the set.
> 
> BTW what types can Alice see today?
> 
> 
> Kindest regards,
> 
> Manos
>