imaginary icon indicating copy to clipboard operation
imaginary copied to clipboard

The interface does not provide a way to resolve all ambiguity

Open exarkun opened this issue 5 years ago • 1 comments

If two things have exactly the same name and aliases then there is no input that can be entered into the text interface which will resolve the ambiguity and allow an action to proceed against one or the other of them.

Here's a simple world which demonstrates the situation:

from imaginary.objects import Thing, Container
from imaginary.world import ImaginaryWorld

def world(store):
    place = Thing(
        store=store,
        name=u"place",
    )
    Container.createFor(place, capacity=1000)
    world = ImaginaryWorld(
        store=store,
        origin=place,
    )
    protagonist = world.create(u"protagonist", location=place)
    for i in range(2):
        Thing(store=store, name=u"thing", location=place)
    return world

And here's a sample transcript that results:

> look
[ place ]
It contains a thing and a thing.
> take thing
Could you be more specific?  When you said 'thing', did you mean: a thing, or a thing?

exarkun avatar Nov 01 '20 20:11 exarkun

Seemingly the same problem manifests slightly differently using the look action:

> look at thing
Could you be more specific?  When you said 'thing', did you mean: [ thing ]
, or [ thing ]
?

exarkun avatar Nov 01 '20 20:11 exarkun