[alicebot-archcomm] topic attribute

Kim Sullivan alicebot-archcomm@list.alicebot.org
Thu, 22 Nov 2001 21:15:44 +0100


<rant>

> The term "predicate" as Noel said has a long and well established
> meaning in symbolic logic, going back at least 110 years.  Logic and
> mathematics are full of concepts that have been rediscovered by computer
> programmers in the era since 1960.  Few programming languages acknowledge
> the debt of invention to logic and math.  SETL, Lisp and Prolog are a few
> exceptions.  So hopefully is AIML.

  I've had an extensive discussion with Noel about the very same thing a few
days ago (I'm sorry to get back to this, but since this has popped up
again...) - basically I think that AIMLSpeak use of 'predicate' has little
to do with the well estabilished meaning - if it did, people wouldn't have
to think about it, or even discuss it. To find at least some small
justification of my feeling (I could have been wrong), I consulted my
dictionaries and what I had learned in math at school.
  I even went into looking through the documentation of the original alice
(SETL), to find out how the word 'predicate' came into use. Basically, in
the old implementation, the word 'predicate' referred only to the 'value'.
This would be fine with me, and I even suggested going back to this (Noel
didn't seem to like this too much). You could imagine all AIML variables
being of type 'predicate' (same as in "variable is of type 'integer'") -
which would make IMHO more sense than the current usage (if you really want
to use the word 'predicate' at all).
This would mean that in the expression
<set name='xxx'>foobar</set>
'foobar is the predicate for 'xxx'. You could also say that it set's xxx to
being foobar, and that the <get name='xxx'/> gets the predicate for xxx.

The practice of calling 'variable - value' pair a predicate is IMHO not very
lucky - even mathematicians use the term 'variable' (so does prolog) - and I
don't see why we should invent 'AIMLSpeak' for concepts well known and
generally understood.

> Having said all that, there is however a slight difference between the
term
> "predicate" in first-order logic and the term "predicate" as we use it.
In
> logic,
> predicates must be either true or false.  Thus:
>
> Name(client, Ziggy) = true
> Age(client, 18) = true
> Location(client, Tokyo) = true
>
> would be examples of predicates in symbolic logic.  Specifically, these
are
> called first-order binary predicates.  "First order" because the
predicates
 > cannot have predicates as arguments.  "Binary" because they have two
> arguments.

Now I'm going onto very thin ice - I've never learned english math
terminology (or predicate logic for that matter). But I don't think that an
expression with a known true/false value is a 'predicate'. Name(x,y) is a
predicate (where x and y are variables), which becomes a 'statement' (maybe
it's called a 'term' or 'clause') if we provide actual values for the
variables.
In AIML we only use one predicate (2 parameters):
variablehasvalue(variable_identifier,variable_value)

Or, you could write it like this
value(variable_identifier)=variable_value

This is nice and good, but has no practical value, nor does it (imho)
justify the use of calling a variable-value pair a predicate.

> In AIML, we represent these predicates by their functional equivalents:
>
> <set name="name">Ziggy</set>
> <set name="age">18</set>
> <set name="location">Tokyo</set>
>
> <get name="name"/> = Ziggy
> <get name="age"/> =  18
> <get name="location"/> = Tokyo
>
> Or in more mathematical notation:
>
> name(client) = Ziggy
> age(client) = 18
> location(client) = Tokyo.
>

What's wrong with calling
<set name="name">Ziggy</set>
a variable assignment? Like name:='Ziggy'; in pascal, or name="Ziggy" in
java/c? It has actually more resemblance to the C way, since in C an
assignment is an expression like every other (which in pascal is not the
case). Or if you really want to use the prolog metaphor:
name is Ziggy

<get name='name'/> returns the value of the variable - that's just it. In
normal mathematics you'd just write the variable, here we have to separate
it (more or less for parsing purposes) from all the other template content.

> Another way to state that question might be:
> How much like Prolog do we want AIML to become?

If we wanted AIML to be like prolog, there would be no need for AIML - there
have been several tries to make a chatbot with prolog, and they didn't win
Loebner twice in a row. Besides, even prolog's use of 'predicate' is more
natural than the current AIMLSpeak.

If someone wanted this kind of functionality, he should be free to make a
NL-frontend to a prolog interpreter, maybe using <system> tag to do this.
</rant>

Kim