[Reality] verbObject location -- what to do about verb ambiguity?

James Knight jknight@MIT.EDU
Tue, 17 Aug 1999 11:25:11 -0400


At 9:04 PM -0400 8/16/99, Glyph Lefkowitz wrote:
>Example situation:
>
>I have a Location{ name "table" feature "twisted.reality.Put"} and a
>Location{name "box" feature "twisted.reality.Put"}.  I want to put the
>book on the table.  This is a problem.
>
>Right now, the parser sees 'put book on table' and barfs (throws an
>AmbiguousVerbException). It can't figure out whether the book is the
>verbObject or the table is the verbObject.  It also doesn't know whose
>'put' verb to use.
>
>"Pshaw," I hear you say.  "This is simple.  Make verbObject throw an
>AmbiguousVerbException later (if it's called) and execute the verb which
>they both have!".
>
>"Yes", I respond, self-referentially, 'They do have the same verb.  But
>what if the other verb was random.other.Put and did something different?
>How would it know then?"
>
>"I ask this", I continue, in an esoteric blend of first and third person,
>"because there are many circumstances where one would wish to put a box on
>a table, or take a grappling hook with a claw, or perhaps say something
>with a microphone to a person.  I'm working on a solution, but I'd like to
>hear some other ideas, because I haven't been able to come up with
>anything suitably generic."

The put example is easy. (and btw, twisted.reality.plugin.Put is horribly
broken).
twisted.reality.plugin.Put should not apply when you're putting the
verbObject() on something else. That put only works to put something else
ON the verbObject(). Therefore, there is really no ambiguity involved...
However, there is currently a problem in the implementation...there is no
way for it to know if there will be an ambiguity before executing one of
the verbs. We could either get rid of AmbiguousVerbException, and try all
the verbs and hope that none of them conflict (all but one of them would
return false). This might actually not be bad, since if all the verbs are
written properly, there probably won't actually be a conflict.
or we could make a applies() method which would get called on each of the
verbs to weed them down to one instead of using the return false method.

Take grappling hook with claw is exactly the same thing situation.
Say with microphone to person is not much of a problem either. People don't
have a say feature at all...so there is no conflict.
-James

--
You are in a maze of testy little Java VMs, all subtly different.